From 31a1760604ec18935be86d4a51e7d1083a9fbd2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Fri, 21 Mar 2014 12:15:45 +0100 Subject: [PATCH 01/83] Trac: Use normalized bugs URL from package --- lib/trac.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/trac.js b/lib/trac.js index c94a7bd..dc96883 100644 --- a/lib/trac.js +++ b/lib/trac.js @@ -1,9 +1,19 @@ module.exports = function( Release ) { Release.define({ - trac: function( path ) { - var tracUrl = "http://bugs." + Release.project + ".com"; + _tracUrl: function() { + var bugs = Release.readPackage().bugs; + + // Unwrap + if ( bugs.url ) { + bugs = bugs.url; + } + // Strip trailing slash + return bugs.replace( /\/$/, "" ); + }, + trac: function( path ) { + var tracUrl = Release._tracUrl(); return Release.exec({ command: "curl -s '" + tracUrl + path + "&format=tab'", silent: true From d6008804fa47390b47cca74d811844dd382b18bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 21 Mar 2014 13:15:56 -0400 Subject: [PATCH 02/83] All: Add missing newlines at end of file --- .gitignore | 2 +- .travis.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 58c689c..f7873df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules/grunt node_modules/grunt-contrib-jshint -test-release.sh \ No newline at end of file +test-release.sh diff --git a/.travis.yml b/.travis.yml index 60bbd48..666f7aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ language: node_js node_js: - "0.8" before_script: - - npm install -g grunt-cli \ No newline at end of file + - npm install -g grunt-cli From 1dd2442f8c3784549ed21dda287be7931b9b1159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Fri, 21 Mar 2014 18:18:32 +0100 Subject: [PATCH 03/83] Build: Add .editorconfig to avoid missing EOF newline --- .editorconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c94db9a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true From 67055b0040fdb7c82169fdfd3ef3f29d042952b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Fri, 21 Mar 2014 18:21:05 +0100 Subject: [PATCH 04/83] Repo: Set --quiet flag (aka --loglevel warn) for npm-install Gets rid of the unnecessary http log, while still outputting a useful summary and any warnings or errors. Fixes gh-44 --- lib/repo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/repo.js b/lib/repo.js index beb9ef3..ab585e3 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -18,7 +18,7 @@ Release.define({ console.log(); console.log( "Installing dependencies..." ); - Release.exec( "npm install", "Error installing dependencies." ); + Release.exec( "npm install -q", "Error installing dependencies." ); console.log(); projectRelease = require( Release.dir.repo + "/build/release" ); @@ -26,7 +26,7 @@ Release.define({ if ( projectRelease.dependencies ) { console.log( "Installing release dependencies..." ); releaseDependencies = projectRelease.dependencies.join( " " ); - Release.exec( "npm install " + releaseDependencies, + Release.exec( "npm install -q " + releaseDependencies, "Error installing release dependencies." ); console.log(); } From fe0cd503654f4f39286e9030a8489ef5d844e257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Sat, 22 Mar 2014 14:40:43 +0100 Subject: [PATCH 05/83] Util: Print a stacktrace when aborting Closes gh-50 --- lib/util.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/util.js b/lib/util.js index 89852b6..b7338c6 100644 --- a/lib/util.js +++ b/lib/util.js @@ -30,8 +30,11 @@ Release.define({ }, abort: function( msg ) { + var error = new Error(); + Error.captureStackTrace( error ); console.log( msg.red ); console.log( "Aborting.".red ); + console.log( error.stack ); process.exit( 1 ); }, From a2e31dc1557ee14365e9bbff2f5ccb366bf57666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Sat, 22 Mar 2014 16:06:27 +0100 Subject: [PATCH 06/83] Git: Log command when gitLog fails, improves debugging Closes gh-51 --- lib/git.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/git.js b/lib/git.js index b21eb69..304b65e 100644 --- a/lib/git.js +++ b/lib/git.js @@ -2,11 +2,12 @@ module.exports = function( Release ) { Release.define({ gitLog: function( format ) { - var result = Release.exec({ - command: "git log " + Release.prevVersion + ".." + Release.newVersion + " " + + var command = "git log " + Release.prevVersion + ".." + Release.newVersion + " " + "--format='" + format + "'", - silent: true - }, "Error getting git log." ); + result = Release.exec({ + command: command, + silent: true + }, "Error getting git log, command was: " + command ); result = result.split( /\r?\n/ ); if ( result[ result.length - 1 ] === "" ) { From 575fd9949626c9644e6079c3483bdb07eef3a209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Sat, 22 Mar 2014 16:08:45 +0100 Subject: [PATCH 07/83] All: Replace Release.project with more appropriate values Use package name for CDN. Use bugs and repository fields for changelog. Adds a _packageUrl method that the Trac module can also use. Fixes gh-49 Closes gh-52 --- lib/bootstrap.js | 12 ++---------- lib/cdn.js | 13 +++++++------ lib/changelog.js | 6 ++---- lib/repo.js | 34 ++++++++++++++++++++++++++++++++++ lib/trac.js | 13 +------------ 5 files changed, 46 insertions(+), 32 deletions(-) diff --git a/lib/bootstrap.js b/lib/bootstrap.js index cd1b3aa..a38d90e 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -48,7 +48,6 @@ Release.define({ } console.log(); - console.log( "\tProject: " + Release.project ); console.log( "\tRelease type: " + (Release.preRelease ? "pre-release" : "stable") ); console.log( "\tRemote: " + Release.remote ); console.log( "\tBranch: " + Release.branch ); @@ -71,15 +70,8 @@ Release.define({ process.exit( 1 ); } - // URL - if ( /:\/\//.test( remote ) ) { - Release.project = remote.replace( /.+\/([^\/]+)\.git/, "$1" ); - - // filesystem or GitHub - } else { - Release.project = remote.split( "/" ).pop(); - - // If it's not a local path, it must be a GitHub repo + // If it's not a local path, it must be a GitHub repo + if ( !/:\/\//.test( remote ) ) { if ( !fs.existsSync( remote ) ) { Release.isTest = !/^jquery\//.test( remote ); remote = "git@github.com:" + remote + ".git"; diff --git a/lib/cdn.js b/lib/cdn.js index d0bca25..b97f99d 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -6,18 +6,19 @@ module.exports = function( Release ) { testRemote = "git@github.com:jquery/fake-cdn.git"; function projectCdn() { - var jqueryCdn = Release._cloneCdnRepo() + "/cdn"; - if ( Release.project === "jquery" ) { + var npmPackage = Release.readPackage().name, + jqueryCdn = Release._cloneCdnRepo() + "/cdn"; + if ( npmPackage === "jquery" ) { return jqueryCdn; } - if ( Release.project === "qunit" ) { + if ( npmPackage === "qunitjs" ) { return jqueryCdn + "/qunit"; } - if ( /^jquery-/.test( Release.project ) ) { - return jqueryCdn + "/" + Release.project.substring( 7 ) + + if ( /^jquery-/.test( npmPackage ) ) { + return jqueryCdn + "/" + npmPackage.substring( 7 ) + "/" + Release.newVersion; } - return jqueryCdn + "/" + Release.project + "/" + Release.newVersion; + return jqueryCdn + "/" + npmPackage + "/" + Release.newVersion; } Release.define({ diff --git a/lib/changelog.js b/lib/changelog.js index 6de9a72..6d29e53 100644 --- a/lib/changelog.js +++ b/lib/changelog.js @@ -23,11 +23,9 @@ Release.define({ _generateCommitChangelog: function() { var commits, - commitRef = "[%h](http://github.com/jquery/" + Release.project + "/commit/%H)", + commitRef = "[%h](" + Release._repositoryUrl() + "/commit/%H)", fullFormat = "* %s (TICKETREF, " + commitRef + ")", - ticketUrl = Release.issueTracker === "trac" ? - "http://bugs." + Release.project + ".com/ticket/" : - "https://github.com/jquery/" + Release.project + "/issue/"; + ticketUrl = Release._ticketUrl(); console.log( "Adding commits..." ); Release.chdir( Release.dir.repo ); diff --git a/lib/repo.js b/lib/repo.js index ab585e3..472dbbb 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -82,6 +82,40 @@ Release.define({ checkRepoState: function() {}, + // Unwrapped URL field from package.json, no trailing slash + _packageUrl: function( field ) { + var result = Release.readPackage()[ field ]; + + // Make sure it exists + if ( !result ) { + Release.abort( "Failed to read '" + field + "' URL field from package.json" ); + } + + // Unwrap + if ( result.url ) { + result = result.url; + } + + // Strip trailing slash + return result.replace( /\/$/, "" ); + }, + + _ticketUrl: function() { + return Release._packageUrl( "bugs" ) + ( Release.issueTracker === "trac" ? + + // Trac bugs URL is just the host + "/ticket/" : + + // GitHub bugs URL is host/user/repo/issues + "/" ); + }, + + _repositoryUrl: function() { + return Release._packageUrl( "repository" ) + .replace( /^git/, "https" ) + .replace( /\.git$/, "" ); + }, + _readJSON: function( fileName ) { var json = fs.readFileSync( Release.dir.repo + "/" + fileName, "utf8" ); Release.packageIndentation = json.match( /\n([\t\s]+)/ )[ 1 ]; diff --git a/lib/trac.js b/lib/trac.js index dc96883..38aa69e 100644 --- a/lib/trac.js +++ b/lib/trac.js @@ -1,19 +1,8 @@ module.exports = function( Release ) { Release.define({ - _tracUrl: function() { - var bugs = Release.readPackage().bugs; - - // Unwrap - if ( bugs.url ) { - bugs = bugs.url; - } - - // Strip trailing slash - return bugs.replace( /\/$/, "" ); - }, trac: function( path ) { - var tracUrl = Release._tracUrl(); + var tracUrl = Release._packageUrl( "bugs" ); return Release.exec({ command: "curl -s '" + tracUrl + path + "&format=tab'", silent: true From 2aacd8321be640d00ea1dc3273cb8c9fc3164d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Wed, 26 Mar 2014 10:37:14 +0100 Subject: [PATCH 08/83] Build: Ignore all *test-release.sh files --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f7873df..5abd6c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules/grunt node_modules/grunt-contrib-jshint -test-release.sh +*test-release.sh From 089e3d173c6b584e3812f83a111cb6d3c318983a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 26 Mar 2014 14:21:39 -0400 Subject: [PATCH 09/83] Util: Allow an error to be passed to Release.abort() When generating a new stack trace, don't include Release.abort(). Ref gh-53 --- README.md | 5 +++-- lib/util.js | 11 ++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5b22db3..e8fefa4 100644 --- a/README.md +++ b/README.md @@ -141,9 +141,10 @@ need to install dependencies which are only necessary for the release. Defines new properties and methods to add to the `Release` object. -#### abort( msg ) +#### abort( msg [, error ] ) -Aborts the release and prints the message. +Aborts the release and prints the message. If an error object is provided, it is +used for the stack trace, otherwise the current call stack is used. #### exec( command, options ) diff --git a/lib/util.js b/lib/util.js index b7338c6..3adf5df 100644 --- a/lib/util.js +++ b/lib/util.js @@ -29,12 +29,17 @@ Release.define({ process.chdir( directory ); }, - abort: function( msg ) { - var error = new Error(); - Error.captureStackTrace( error ); + abort: function( msg, error ) { + if ( !error ) { + error = new Error( msg ); + Error.captureStackTrace( error, Release.abort ); + } + console.log( msg.red ); console.log( "Aborting.".red ); + console.log(); console.log( error.stack ); + process.exit( 1 ); }, From 2ff24fcc4210033b4629702351692480d50227e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 26 Mar 2014 09:43:22 -0400 Subject: [PATCH 10/83] Changelog: Use changelogplease for git parsing Fixes gh-7 Closes gh-53 --- lib/changelog.js | 66 ++- node_modules/changelogplease/.npmignore | 4 + node_modules/changelogplease/LICENSE.txt | 20 + node_modules/changelogplease/README.md | 60 +++ node_modules/changelogplease/index.js | 107 +++++ .../node_modules/git-tools/.npmignore | 3 + .../node_modules/git-tools/LICENSE-MIT.txt | 20 + .../node_modules/git-tools/README.md | 265 ++++++++++++ .../node_modules/git-tools/git-tools.js | 396 ++++++++++++++++++ .../node_modules/git-tools/package.json | 32 ++ node_modules/changelogplease/package.json | 41 ++ package.json | 1 + 12 files changed, 975 insertions(+), 40 deletions(-) create mode 100644 node_modules/changelogplease/.npmignore create mode 100644 node_modules/changelogplease/LICENSE.txt create mode 100644 node_modules/changelogplease/README.md create mode 100644 node_modules/changelogplease/index.js create mode 100644 node_modules/changelogplease/node_modules/git-tools/.npmignore create mode 100644 node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt create mode 100644 node_modules/changelogplease/node_modules/git-tools/README.md create mode 100644 node_modules/changelogplease/node_modules/git-tools/git-tools.js create mode 100644 node_modules/changelogplease/node_modules/git-tools/package.json create mode 100644 node_modules/changelogplease/package.json diff --git a/lib/changelog.js b/lib/changelog.js index 6d29e53..cd1dba3 100644 --- a/lib/changelog.js +++ b/lib/changelog.js @@ -1,16 +1,20 @@ -var fs = require( "fs" ); +var fs = require( "fs" ), + changelogplease = require( "changelogplease" ); module.exports = function( Release ) { Release.define({ - _generateChangelog: function() { - var changelogPath = Release.dir.base + "/changelog", - changelog = Release.changelogShell() + - Release._generateCommitChangelog() + - Release._generateIssueChangelog(); - - fs.writeFileSync( changelogPath, changelog ); - console.log( "Stored changelog in " + changelogPath.cyan + "." ); + _generateChangelog: function( callback ) { + Release._generateCommitChangelog(function( commitChangelog ) { + var changelogPath = Release.dir.base + "/changelog", + changelog = Release.changelogShell() + + commitChangelog + + Release._generateIssueChangelog(); + + fs.writeFileSync( changelogPath, changelog ); + console.log( "Stored changelog in " + changelogPath.cyan + "." ); + callback(); + }); }, changelogShell: function() { @@ -21,39 +25,21 @@ Release.define({ return Release.newVersion; }, - _generateCommitChangelog: function() { - var commits, - commitRef = "[%h](" + Release._repositoryUrl() + "/commit/%H)", - fullFormat = "* %s (TICKETREF, " + commitRef + ")", - ticketUrl = Release._ticketUrl(); - + _generateCommitChangelog: function( callback ) { console.log( "Adding commits..." ); - Release.chdir( Release.dir.repo ); - commits = Release.gitLog( fullFormat ); - - console.log( "Adding links to tickets..." ); - return commits - - // Add ticket references - .map(function( commit ) { - var tickets = []; - - commit.replace( /Fix(?:e[sd])? #(\d+)/g, function( match, ticket ) { - tickets.push( ticket ); - }); - - return tickets.length ? - commit.replace( "TICKETREF", tickets.map(function( ticket ) { - return "[#" + ticket + "](" + ticketUrl + ticket + ")"; - }).join( ", " ) ) : - - // Leave TICKETREF token in place so it's easy to find commits without tickets - commit; - }) - // Sort commits so that they're grouped by component - .sort() - .join( "\n" ) + "\n"; + changelogplease({ + ticketUrl: Release._ticketUrl() + "{id}", + commitUrl: Release._repositoryUrl() + "/commit/{id}", + repo: Release.dir.repo, + committish: Release.prevVersion + ".." + Release.newVersion + }, function( error, log ) { + if ( error ) { + Release.abort( "Error generating commit changelog.", error ); + } + + callback( log ); + }); }, _generateIssueChangelog: function() { diff --git a/node_modules/changelogplease/.npmignore b/node_modules/changelogplease/.npmignore new file mode 100644 index 0000000..36f30bb --- /dev/null +++ b/node_modules/changelogplease/.npmignore @@ -0,0 +1,4 @@ +/node_modules/ +/tests/ +.travis.yml +Gruntfile.js diff --git a/node_modules/changelogplease/LICENSE.txt b/node_modules/changelogplease/LICENSE.txt new file mode 100644 index 0000000..2354819 --- /dev/null +++ b/node_modules/changelogplease/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright 2014 Scott González http://scottgonzalez.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. diff --git a/node_modules/changelogplease/README.md b/node_modules/changelogplease/README.md new file mode 100644 index 0000000..b69685b --- /dev/null +++ b/node_modules/changelogplease/README.md @@ -0,0 +1,60 @@ +# Changelog, please + +Generate changelogs from git commit messages using node.js. The generated changelogs are written in markdown. + +Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/). + +## Installation + +``` +npm install changelogplease +``` + +## Usage + +```javascript +var changelog = require( "changelogplease" ); +var parsed = changelog({ + ticketUrl: "https://github.com/scottgonzalez/changelogplease/issues/{id}", + commitUrl: "https://github.com/scottgonzalez/changelogplease/commit/{id}", + repo: "/path/to/repo", + committish: "1.2.3..1.2.4" +}); +``` + +## API + +### changelog( options, callback ) + +* `options` (Object): Options for creating the changelog. + * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id. + * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash. + * `repo` (String): Path to the repository. + * `committish` (String): The range of commits for the changelog. +* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog. + * `log` (String): Generated changelog, written in markdown. + +### Changelog + +`changelog( options, callback )` is a shorthand for the following: + +```js +var Changelog = require( "changelogplease" ).Changelog; +var instance = new Changelog( options ); +instance.parse( callback ); +``` + +Changelog generation is tailored to a specific format based on the needs of the various jQuery +projects. However, the `Changelog` constructor and prototype are exposed to allow flexibility. +Be aware that these methods are not currently documented because they may change. Feel free to +submit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't +feel comfortable hacking in your own changes (or even if you do). + + +## License + +Copyright 2014 Scott González. Released under the terms of the MIT license. + +--- + +Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/). diff --git a/node_modules/changelogplease/index.js b/node_modules/changelogplease/index.js new file mode 100644 index 0000000..1cbf0b3 --- /dev/null +++ b/node_modules/changelogplease/index.js @@ -0,0 +1,107 @@ +var Repo = require( "git-tools" ); + +exports = module.exports = changelog; +exports.Changelog = Changelog; + +function changelog( options, callback ) { + var instance = new Changelog( options ); + + if ( callback ) { + instance.parse( callback ); + } + + return instance; +} + +function Changelog( options ) { + this.options = options; + this.repo = new Repo( this.options.repo ); + + // Bind all methods to the instance + for ( var method in this ) { + if ( typeof this[ method ] === "function" ) { + this[ method ] = this[ method ].bind( this ); + } + } +} + +Changelog.prototype.parse = function( callback ) { + this.getLog(function( error, log ) { + if ( error ) { + return callback( error ); + } + + callback( null, this.parseCommits( log ) ); + }.bind( this )); +}; + +Changelog.prototype.ticketUrl = function( id ) { + return this.options.ticketUrl.replace( "{id}", id ); +}; + +Changelog.prototype.getLog = function( callback ) { + var commitUrl = this.options.commitUrl.replace( "{id}", "%H" ); + + this.repo.exec( "log", + "--format=" + + "__COMMIT__%n" + + "%s (__TICKETREF__, [%h](" + commitUrl + "))%n" + + "%b", + this.options.committish, + callback ); +}; + +Changelog.prototype.parseCommits = function( commits ) { + commits = commits.split( "__COMMIT__\n" ); + commits.shift(); + + return commits + + // Parse each individual commit + .map( this.parseCommit ) + + // Sort commits so that they're grouped by component + .sort() + .join( "\n" ) + "\n"; +}; + +Changelog.prototype.parseCommit = function( commit ) { + var ticketUrl = this.ticketUrl; + var tickets = []; + + // Sane global exec with iteration over matches + commit.replace( + /Fix(?:e[sd])? ((?:[a-zA-Z0-9_-]{1,39}\/[a-zA-Z0-9_-]{1,100}#)|#|gh-)(\d+)/g, + function( match, refType, ticketId ) { + var ticketRef = { + url: ticketUrl( ticketId ), + label: "#" + ticketId + }; + + // If the refType has anything before the #, assume it's a GitHub ref + if ( /.#$/.test( refType ) ) { + refType = refType.replace( /#$/, "" ); + ticketRef.url = "https://github.com/" + refType + "/issues/" + ticketId; + ticketRef.label = refType + ticketRef.label; + } + + tickets.push( ticketRef ); + } + ); + + // Only keep the summary for the changelog; drop the body + var parsed = "* " + commit.split( /\r?\n/ )[ 0 ]; + + // Add in ticket references + // Leave __TICKETREF__ token in place so it's easy to find commits without tickets + if ( tickets.length ) { + parsed = parsed.replace( "__TICKETREF__", tickets.map(function( ticket ) { + return "[" + ticket.label + "](" + ticket.url + ")"; + }).join( ", " ) ); + } + + // Remove cherry pick references + parsed = parsed.replace( / \(cherry picked from commit [^)]+\)/, "" ); + + return parsed; +}; diff --git a/node_modules/changelogplease/node_modules/git-tools/.npmignore b/node_modules/changelogplease/node_modules/git-tools/.npmignore new file mode 100644 index 0000000..3a4259c --- /dev/null +++ b/node_modules/changelogplease/node_modules/git-tools/.npmignore @@ -0,0 +1,3 @@ +/test/ +.jshintrc +Gruntfile.js diff --git a/node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt b/node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt new file mode 100644 index 0000000..b99c1ea --- /dev/null +++ b/node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright 2013 Scott González http://scottgonzalez.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. diff --git a/node_modules/changelogplease/node_modules/git-tools/README.md b/node_modules/changelogplease/node_modules/git-tools/README.md new file mode 100644 index 0000000..ad92887 --- /dev/null +++ b/node_modules/changelogplease/node_modules/git-tools/README.md @@ -0,0 +1,265 @@ +# node-git-tools + +Tools for parsing data out of git repositories. + +Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/). + +## About + +The goal of node-git-tools is to provide a set of tools that can be used to +easily write custom git commands or other scripts that are tightly integrated +with git. + +I expect the API to grow over time and will happily entertain any feature +requests. If there is anything you'd like added, just file an issue. + +## Installation + +```sh +npm install git-tools +``` + +## Usage + +```js +var Repo = require( "git-tools" ); +var repo = new Repo( "path/to/repo" ); +repo.authors(function( error, authors ) { + console.log( authors ); +}); +``` + + + +## API + +### Repo.clone( options, callback ) + +Clones a repository and returns the new `Repo` instance. + +* `options` (Object): Options for cloning the repository. + * `repo` (String): The repository to clone from. + * `path` (String): The path to clone into. + * extra: Additional options can be provided, as documented below. +* `callback` (Function; `function( error, repo )`): Function to invoke after cloning the repository. + * `repo` (Object): A new `Repo` instance for the cloned repository. + +This function accepts arbitrary options to pass to `git clone`. +For example, to create a bare repository: + +```js +Repo.clone({ + repo: "git://github.com/scottgonzalez/node-git-tools.git", + dir: "/tmp/git-tools", + bare: true +}); +``` + +Or to create a repo with limited history: + +```js +Repo.clone({ + repo: "git://github.com/scottgonzalez/node-git-tools.git", + dir: "/tmp/git-tools", + depth: 5 +}); +``` + + + +### Repo.isRepo( path, callback ) + +Determines if the specified path is a git repository. + +* `path` (String): The path to check. +* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository. + * `isRepo` (Boolean): Whether the path is a git repository. + +*Note: This is equivalent to creating a `Repo` instance with `path` and calling `isRepo()` on the instance.* + + + +### activeDays( [committish], callback ) + +Gets the number of active days (unique days of authorship). Includes activity +by day, month, year, and the entire history. + +* `committish` (String; default: `"master"`): Committish range to analyze. +* `callback` (Function; `function( error, activeDays )`): Function to invoke after getting active days. + * `activeDays` (Object): Summary of active days. + +The `activeDays` object has the following form: + +```js +{ + activeDays: Number, + commits: Number, + dates: { + "YYYY-MM-DD": Number( commits ), + ... + }, + years: { + "YYYY": { + activeDays: Number, + commits: Number, + months: { + "M": { + activeDays: Number, + commits: Number, + days: { + "D": { + commits: Number + }, + ... + } + }, + ... + } + }, + ... + } +} +``` + + + +### age( callback ) + +Gets the age of the repository. + +* `callback` (Function; `function( error, age )`): Function to invoke after getting the age. + * `age` (String): The age of the repository. + + + +### authors( [committish], callback ) + +Gets all authors, sorted by number of commits. + +* `committish` (String; default: `"master"`): Committish range to analyze. +* `callback` (Function; `function( error, authors )`): Function to invoke after getting authors. + * `authors` (Array): All authors, sorted by number of commits. + +Each author object contains the following properties: + +* `email` (String): Author's email address. +* `name` (String): Author's name. +* `commits` (Number): Number of commits. +* `commitsPercent` (Number): Percentage of commits. + + + +### blame( options, callback ) + +Determine what revision and author last modified each line of a file. + +* `options` (Object): Options for the blame. + * `path` (String): The path to the file to run the blame for. + * `committish` (String; default: `"HEAD"`): Revision or range to blame against. +* `callback` (Function; `function( error, blame )`): Function to invoke after blaming the file. + * `blame` (Array): Commit information for each line. + +Each blame item contains the following properties: + +* `commit`: SHA of commit that most recently modified the line. +* `path`: Path to the file at the time of the most recent modification to the line. +* `lineNumber`: Line number within the file. +* `content`: Contents of the line. + + + +### branches( callback ) + +Gets all branches in order of most recent commit. + +* `callback` (Function; `function( error, branches )`): Function to invoke after getting branches. + * `branches` (Array): All branches, sorted by most recent commit date. + +Each branch object contains the following properties: + +* `name` (String): Branch name. +* `sha` (String): SHA-1 of most recent commit. +* `date` (Date): Author date of most recent commit. +* `subject` (String): Subject (first line) of most recent commit. +* `author` (Object): Author of most recent commit. + * `email` (String): Author's email address. + * `name` (String): Author's name. + + + +### config( name, callback ) + +Gets the value of a configuration option. + +* `name` (String): The name of the configuration option. +* `callback` (Function; `function( error, value )`): Function to invoke after getting the configuration option. + * `value` (String|null): The value for the configuration option, or `null` if no value is set. + + + +### currentBranch( callback ) + +Gets the name of the currently checked out branch, if any. + +* `callback` (Function; `function( error, branch )`): Function to invoke after getting the branch. + * `branch` (String|null): Branch name, or `null` if in detached HEAD state. + + + +### isRepo( callback ) + +Determines if the specified path is a git repository. + +* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository. + * `isRepo` (Boolean): Whether the path is a git repository. + + + +### remotes( callback ) + +Gets all remote repositories. + +* `callback` (Function; `function( error, remotes )`): Function to invoke after getting the remotes. + * `remotes` (Array): All remote repositories. + +Each remote object contains the following properties: + +* `name` (String): Remote name. +* `url` (String): URL for the remote repository. + + + +### resolveCommittish( committish, callback ) + +Resolves a committish to a SHA1. + +* `committish` (String): Any committish to resolve. +* `callback` (Function; `function( error, sha )`): Function to invoke after resolving the comittish. + * `sha`: SHA1 of the resolved committish. + + + +### tags( callback ) + +Gets all tags in reverse chronological order. + +Lightweight tags are sorted by author date and annotated tags are sorted by tagger date. + +* `callback` (Function; `function( error, tags )`): Function to invoke after getting tags. + * `tags` (Array): All tags, sorted by date. + +Each tag object contains the following properties: + +* `name` (String): Tag name. +* `sha` (String): SHA-1 for the tag. For lightweight tags, this is the SHA-1 of the commit. +* `date` (Date): Author date for ligthweight tags, tagger date for annotated tags. + + + +## License + +Copyright 2013 Scott González. Released under the terms of the MIT license. + +--- + +Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/). diff --git a/node_modules/changelogplease/node_modules/git-tools/git-tools.js b/node_modules/changelogplease/node_modules/git-tools/git-tools.js new file mode 100644 index 0000000..541ce59 --- /dev/null +++ b/node_modules/changelogplease/node_modules/git-tools/git-tools.js @@ -0,0 +1,396 @@ +var spawn = require( "child_process" ).spawn; + +function extend( a, b ) { + for ( var prop in b ) { + a[ prop ] = b[ prop ]; + } + + return a; +} + +function copy( obj ) { + return extend( {}, obj ); +} + +function Repo( path ) { + this.path = path; +} + +Repo.parsePerson = (function() { + var rPerson = /^(\S+)\s(.+)$/; + return function( person ) { + var matches = rPerson.exec( person ); + return { + email: matches[ 1 ], + name: matches[ 2 ] + }; + }; +})(); + +Repo.clone = function( options, callback ) { + var dir = options.dir; + var args = [ "clone", options.repo, dir ]; + options = copy( options ); + delete options.repo; + delete options.dir; + + Object.keys( options ).forEach(function( option ) { + args.push( "--" + option ); + + var value = options[ option ]; + if ( value !== true ) { + args.push( value ); + } + }); + + args.push(function( error ) { + if ( error ) { + return callback( error ); + } + + callback( null, new Repo( dir ) ); + }); + + var repo = new Repo( process.cwd() ); + repo.exec.apply( repo, args ); +}; + +Repo.isRepo = function( path, callback ) { + var repo = new Repo( path ); + repo.isRepo( callback ); +}; + +Repo.prototype.exec = function() { + var args = [].slice.call( arguments ); + var callback = args.pop(); + var stdout = ""; + var stderr = ""; + var child = spawn( "git", args, { cwd: this.path } ); + var hadError = false; + child.on( "error", function( error ) { + hadError = true; + callback( error ); + }); + child.stdout.on( "data", function( data ) { + stdout += data; + }); + child.stderr.on( "data", function( data ) { + stderr += data; + }); + child.on( "close", function( code ) { + if ( hadError ) { + return; + } + + var error; + if ( code ) { + error = new Error( stderr ); + error.code = code; + return callback( error ); + } + + callback( null, stdout.trimRight() ); + }); +}; + +Repo.prototype.activeDays = function( committish, callback ) { + if ( !callback ) { + callback = committish; + committish = "master"; + } + + this.exec( "log", "--format=%at", committish, function( error, dates ) { + if ( error ) { + return callback( error ); + } + + var dateMap = { + activeDays: 0, + commits: 0, + dates: {}, + years: {} + }; + + dates.split( "\n" ).sort().forEach(function( timestamp ) { + var date = new Date( timestamp * 1000 ); + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var day = date.getDate(); + + date = year + "-" + + (month < 10 ? "0" : "") + month + "-" + + (day < 10 ? "0" : "") + day; + + if ( !dateMap.dates[ date ] ) { + dateMap.dates[ date ] = 0; + } + dateMap.commits++; + dateMap.dates[ date ]++; + + if ( !dateMap.years[ year ] ) { + dateMap.years[ year ] = { + activeDays: 0, + commits: 0, + months: {} + }; + } + dateMap.years[ year ].commits++; + + if ( !dateMap.years[ year ].months[ month ] ) { + dateMap.years[ year ].months[ month ] = { + activeDays: 0, + commits: 0, + days: {} + }; + } + dateMap.years[ year ].months[ month ].commits++; + + if ( !dateMap.years[ year ].months[ month ].days[ day ] ) { + dateMap.years[ year ].months[ month ].days[ day ] = { + commits: 0 + }; + dateMap.activeDays++; + dateMap.years[ year ].activeDays++; + dateMap.years[ year ].months[ month ].activeDays++; + } + dateMap.years[ year ].months[ month ].days[ day ].commits++; + }); + + callback( null, dateMap ); + }); +}; + +Repo.prototype.age = function( callback ) { + this.exec( "log", "--reverse", "--format=%cr", function( error, stdout ) { + if ( error ) { + return callback( error ); + } + + callback( null, stdout.split( "\n" )[ 0 ].replace( /\sago/, "" ) ); + }); +}; + +Repo.prototype.authors = function( committish, callback ) { + if ( !callback ) { + callback = committish; + committish = "master"; + } + + this.exec( "log", "--format=%aE %aN", committish, function( error, data ) { + if ( error ) { + return callback( error ); + } + + var authors = data.split( "\n" ); + var authorMap = {}; + var totalCommits = 0; + + authors.forEach(function( author ) { + if ( !authorMap[ author ] ) { + authorMap[ author ] = 0; + } + + authorMap[ author ]++; + totalCommits++; + }); + + authors = Object.keys( authorMap ).map(function( author ) { + var commits = authorMap[ author ]; + return extend( Repo.parsePerson( author ), { + commits: commits, + commitsPercent: (commits * 100 / totalCommits).toFixed( 1 ) + }); + }).sort(function( a, b ) { + return b.commits - a.commits; + }); + + callback( null, authors ); + }); +}; + +Repo.prototype.blame = function( options, callback ) { + var args = [ "blame", "-s" ]; + + if ( options.committish ) { + args.push( options.committish ); + } + + args.push( "--", options.path ); + + var rBlame = /^(\w+)(\s(\S+))?\s+(\d+)\)\s(.*)$/; + + args.push(function( error, blame ) { + if ( error ) { + return callback( error ); + } + + var lines = blame.split( /\r?\n/ ); + lines = lines.map(function( line ) { + var matches = rBlame.exec( line ); + + return { + commit: matches[ 1 ], + path: matches[ 3 ] || options.path, + lineNumber: parseInt( matches[ 4 ], 10 ), + content: matches[ 5 ] + }; + }); + + callback( null, lines ); + }); + + this.exec.apply( this, args ); +}; + +Repo.prototype.branches = function( callback ) { + this.exec( "for-each-ref", + "--format=" + + "%(refname:short)%0a" + + "%(authordate:rfc2822)%0a" + + "%(authoremail) %(authorname)%0a" + + "%(subject)%0a" + + "%(objectname)%0a", + "refs/heads", + function( error, data ) { + if ( error ) { + return callback( error ); + } + + var branches = data.split( "\n\n" ).map(function( branch ) { + var lines = branch.split( "\n" ); + var name = lines[ 0 ]; + var date = new Date( lines[ 1 ] ); + var author = Repo.parsePerson( lines[ 2 ] ); + var subject = lines[ 3 ]; + var sha = lines[ 4 ]; + + return { + name: name, + sha: sha, + date: date, + subject: subject, + author: author + }; + }).sort(function( a, b ) { + return b.date - a.date; + }); + + callback( null, branches ); + }); +}; + +Repo.prototype.config = function( name, callback ) { + this.exec( "config --get " + name, function( error, stdout ) { + if ( error ) { + if ( /^Command failed:\s+$/.test( error.message ) ) { + return callback( null, null ); + } + + return callback( error ); + } + + callback( null, stdout.trim() ); + }); +}; + +Repo.prototype.currentBranch = function( callback ) { + this.exec( "rev-parse", "--abbrev-ref", "HEAD", function( error, data ) { + if ( error ) { + return callback( error ); + } + + var branch = data === "HEAD" ? null : data; + callback( null, branch ); + }); +}; + +Repo.prototype.isRepo = function( callback ) { + this.exec( "rev-parse", "--git-dir", function( error ) { + if ( error ) { + if ( error.message.indexOf( "Not a git repository" ) ) { + return callback( null, false ); + } + + // If the path doesn't exist, don't return an error + if ( error.code === "ENOENT" ) { + return callback( null, false ); + } + + return callback( error ); + } + + callback( null, true ); + }); +}; + +Repo.prototype.remotes = function( callback ) { + this.exec( "remote", "-v", function( error, data ) { + if ( error ) { + return callback( error ); + } + + var remotes = data.split( "\n" ); + var rRemote = /^(\S+)\s(\S+)/; + var remoteMap = {}; + + remotes.forEach(function( remote ) { + var matches = rRemote.exec( remote ); + + // New repositories with no remotes will have `origin` but no URL + if ( !matches ) { + return; + } + + var name = matches[ 1 ]; + var url = matches[ 2 ]; + + remoteMap[ name ] = url; + }); + + remotes = Object.keys( remoteMap ).map(function( remote ) { + return { + name: remote, + url: remoteMap[ remote ] + }; + }); + + callback( null, remotes ); + }); +}; + +Repo.prototype.resolveCommittish = function( committish, callback ) { + this.exec( "rev-parse", committish, callback ); +}; + +Repo.prototype.tags = function( callback ) { + this.exec( "for-each-ref", + "--format=" + + "%(refname:short)%0a" + + "%(authordate)%(taggerdate)%0a" + + "%(objectname)%0a", + "refs/tags", + function( error, data ) { + if ( error ) { + return callback( error ); + } + + var tags = data.split( "\n\n" ).map(function( tag ) { + var lines = tag.split( "\n" ); + var name = lines[ 0 ]; + var date = new Date( lines[ 1 ] ); + var sha = lines[ 2 ]; + + return { + name: name, + sha: sha, + date: date + }; + }).sort(function( a, b ) { + return b.date - a.date; + }); + + callback( null, tags ); + }); +}; + +module.exports = Repo; diff --git a/node_modules/changelogplease/node_modules/git-tools/package.json b/node_modules/changelogplease/node_modules/git-tools/package.json new file mode 100644 index 0000000..a24419f --- /dev/null +++ b/node_modules/changelogplease/node_modules/git-tools/package.json @@ -0,0 +1,32 @@ +{ + "name": "git-tools", + "version": "0.1.0", + "description": "Tools for parsing data out of git repositories.", + "keywords": [ + "git" + ], + "homepage": "https://github.com/scottgonzalez/node-git-tools", + "bugs": { + "url": "https://github.com/scottgonzalez/node-git-tools/issues" + }, + "author": { + "name": "Scott González", + "email": "scott.gonzalez@gmail.com", + "url": "http://scottgonzalez.com" + }, + "main": "git-tools.js", + "repository": { + "type": "git", + "url": "git://github.com/scottgonzalez/node-git-tools.git" + }, + "devDependencies": { + "grunt": "~0.4.0", + "grunt-contrib-jshint": "~0.1.1", + "grunt-contrib-nodeunit": "~0.1.2", + "rimraf": "~2.1.4" + }, + "readme": "# node-git-tools\n\nTools for parsing data out of git repositories.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## About\n\nThe goal of node-git-tools is to provide a set of tools that can be used to\neasily write custom git commands or other scripts that are tightly integrated\nwith git.\n\nI expect the API to grow over time and will happily entertain any feature\nrequests. If there is anything you'd like added, just file an issue.\n\n## Installation\n\n```sh\nnpm install git-tools\n```\n\n## Usage\n\n```js\nvar Repo = require( \"git-tools\" );\nvar repo = new Repo( \"path/to/repo\" );\nrepo.authors(function( error, authors ) {\n\tconsole.log( authors );\n});\n```\n\n\n\n## API\n\n### Repo.clone( options, callback )\n\nClones a repository and returns the new `Repo` instance.\n\n* `options` (Object): Options for cloning the repository.\n * `repo` (String): The repository to clone from.\n * `path` (String): The path to clone into.\n * extra: Additional options can be provided, as documented below.\n* `callback` (Function; `function( error, repo )`): Function to invoke after cloning the repository.\n * `repo` (Object): A new `Repo` instance for the cloned repository.\n\nThis function accepts arbitrary options to pass to `git clone`.\nFor example, to create a bare repository:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tbare: true\n});\n```\n\nOr to create a repo with limited history:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tdepth: 5\n});\n```\n\n\n\n### Repo.isRepo( path, callback )\n\nDetermines if the specified path is a git repository.\n\n* `path` (String): The path to check.\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n*Note: This is equivalent to creating a `Repo` instance with `path` and calling `isRepo()` on the instance.*\n\n\n\n### activeDays( [committish], callback )\n\nGets the number of active days (unique days of authorship). Includes activity\nby day, month, year, and the entire history.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, activeDays )`): Function to invoke after getting active days.\n * `activeDays` (Object): Summary of active days.\n\nThe `activeDays` object has the following form:\n\n```js\n{\n\tactiveDays: Number,\n\tcommits: Number,\n\tdates: {\n\t\t\"YYYY-MM-DD\": Number( commits ),\n\t\t...\n\t},\n\tyears: {\n\t\t\"YYYY\": {\n\t\t\tactiveDays: Number,\n\t\t\tcommits: Number,\n\t\t\tmonths: {\n\t\t\t\t\"M\": {\n\t\t\t\t\tactiveDays: Number,\n\t\t\t\t\tcommits: Number,\n\t\t\t\t\tdays: {\n\t\t\t\t\t\t\"D\": {\n\t\t\t\t\t\t\tcommits: Number\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t...\n\t\t\t}\n\t\t},\n\t\t...\n\t}\n}\n```\n\n\n\n### age( callback )\n\nGets the age of the repository.\n\n* `callback` (Function; `function( error, age )`): Function to invoke after getting the age.\n * `age` (String): The age of the repository.\n\n\n\n### authors( [committish], callback )\n\nGets all authors, sorted by number of commits.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, authors )`): Function to invoke after getting authors.\n * `authors` (Array): All authors, sorted by number of commits.\n\nEach author object contains the following properties:\n\n* `email` (String): Author's email address.\n* `name` (String): Author's name.\n* `commits` (Number): Number of commits.\n* `commitsPercent` (Number): Percentage of commits.\n\n\n\n### blame( options, callback )\n\nDetermine what revision and author last modified each line of a file.\n\n* `options` (Object): Options for the blame.\n * `path` (String): The path to the file to run the blame for.\n * `committish` (String; default: `\"HEAD\"`): Revision or range to blame against.\n* `callback` (Function; `function( error, blame )`): Function to invoke after blaming the file.\n * `blame` (Array): Commit information for each line.\n\nEach blame item contains the following properties:\n\n* `commit`: SHA of commit that most recently modified the line.\n* `path`: Path to the file at the time of the most recent modification to the line.\n* `lineNumber`: Line number within the file.\n* `content`: Contents of the line.\n\n\n\n### branches( callback )\n\nGets all branches in order of most recent commit.\n\n* `callback` (Function; `function( error, branches )`): Function to invoke after getting branches.\n * `branches` (Array): All branches, sorted by most recent commit date.\n\nEach branch object contains the following properties:\n\n* `name` (String): Branch name.\n* `sha` (String): SHA-1 of most recent commit.\n* `date` (Date): Author date of most recent commit.\n* `subject` (String): Subject (first line) of most recent commit.\n* `author` (Object): Author of most recent commit.\n * `email` (String): Author's email address.\n * `name` (String): Author's name.\n\n\n\n### config( name, callback )\n\nGets the value of a configuration option.\n\n* `name` (String): The name of the configuration option.\n* `callback` (Function; `function( error, value )`): Function to invoke after getting the configuration option.\n * `value` (String|null): The value for the configuration option, or `null` if no value is set.\n\n\n\n### currentBranch( callback )\n\nGets the name of the currently checked out branch, if any.\n\n* `callback` (Function; `function( error, branch )`): Function to invoke after getting the branch.\n * `branch` (String|null): Branch name, or `null` if in detached HEAD state.\n\n\n\n### isRepo( callback )\n\nDetermines if the specified path is a git repository.\n\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n\n\n### remotes( callback )\n\nGets all remote repositories.\n\n* `callback` (Function; `function( error, remotes )`): Function to invoke after getting the remotes.\n * `remotes` (Array): All remote repositories.\n\nEach remote object contains the following properties:\n\n* `name` (String): Remote name.\n* `url` (String): URL for the remote repository.\n\n\n\n### resolveCommittish( committish, callback )\n\nResolves a committish to a SHA1.\n\n* `committish` (String): Any committish to resolve.\n* `callback` (Function; `function( error, sha )`): Function to invoke after resolving the comittish.\n * `sha`: SHA1 of the resolved committish.\n\n\n\n### tags( callback )\n\nGets all tags in reverse chronological order.\n\nLightweight tags are sorted by author date and annotated tags are sorted by tagger date.\n\n* `callback` (Function; `function( error, tags )`): Function to invoke after getting tags.\n * `tags` (Array): All tags, sorted by date.\n\nEach tag object contains the following properties:\n\n* `name` (String): Tag name.\n* `sha` (String): SHA-1 for the tag. For lightweight tags, this is the SHA-1 of the commit.\n* `date` (Date): Author date for ligthweight tags, tagger date for annotated tags.\n\n\n\n## License\n\nCopyright 2013 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n", + "readmeFilename": "README.md", + "_id": "git-tools@0.1.0", + "_from": "git-tools@0.1.0" +} diff --git a/node_modules/changelogplease/package.json b/node_modules/changelogplease/package.json new file mode 100644 index 0000000..cd018ba --- /dev/null +++ b/node_modules/changelogplease/package.json @@ -0,0 +1,41 @@ +{ + "name": "changelogplease", + "version": "1.0.1", + "description": "Generate changelogs from git commit messages", + "author": { + "name": "Scott González", + "email": "scott.gonzalez@gmail.com", + "url": "http://scottgonzalez.com" + }, + "license": "MIT", + "main": "index.js", + "homepage": "https://github.com/scottgonzalez/changelogplease", + "repository": { + "type": "git", + "url": "git://github.com/scottgonzalez/changelogplease.git" + }, + "bugs": { + "url": "https://github.com/scottgonzalez/changelogplease/issues" + }, + "keywords": [ + "changelog", + "release" + ], + "scripts": { + "test": "nodeunit tests" + }, + "dependencies": { + "git-tools": "0.1.0" + }, + "devDependencies": { + "nodeunit": "0.8.6" + }, + "readme": "# Changelog, please\n\nGenerate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## Installation\n\n```\nnpm install changelogplease\n```\n\n## Usage\n\n```javascript\nvar changelog = require( \"changelogplease\" );\nvar parsed = changelog({\n\tticketUrl: \"https://github.com/scottgonzalez/changelogplease/issues/{id}\",\n\tcommitUrl: \"https://github.com/scottgonzalez/changelogplease/commit/{id}\",\n\trepo: \"/path/to/repo\",\n\tcommittish: \"1.2.3..1.2.4\"\n});\n```\n\n## API\n\n### changelog( options, callback )\n\n* `options` (Object): Options for creating the changelog.\n * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.\n * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.\n * `repo` (String): Path to the repository.\n * `committish` (String): The range of commits for the changelog.\n* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.\n * `log` (String): Generated changelog, written in markdown.\n\n### Changelog\n\n`changelog( options, callback )` is a shorthand for the following:\n\n```js\nvar Changelog = require( \"changelogplease\" ).Changelog;\nvar instance = new Changelog( options );\ninstance.parse( callback );\n```\n\nChangelog generation is tailored to a specific format based on the needs of the various jQuery\nprojects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.\nBe aware that these methods are not currently documented because they may change. Feel free to\nsubmit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't\nfeel comfortable hacking in your own changes (or even if you do).\n\n\n## License\n\nCopyright 2014 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n", + "readmeFilename": "README.md", + "_id": "changelogplease@1.0.1", + "dist": { + "shasum": "2953e41245f475cd0a3d66b2861e3344166d6c30" + }, + "_from": "changelogplease@1.0.1", + "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.0.1.tgz" +} diff --git a/package.json b/package.json index 0926c46..000ec82 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "changelogplease": "1.0.1", "colors": "0.6.2", "semver": "2.2.1", "shelljs": "0.2.6", From 579c4dad523657d81f05aad49b9362111cb1b259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 27 Mar 2014 08:47:09 -0400 Subject: [PATCH 11/83] Changelog: Upgrade to changelogplease 1.1.0 This upgrade keeps commits in chronological order within components. Ref gh-28 Closes gh-54 --- node_modules/changelogplease/README.md | 10 +++++- node_modules/changelogplease/index.js | 34 +++++++++++++++---- .../node_modules/git-tools/package.json | 6 +++- node_modules/changelogplease/package.json | 12 +++---- package.json | 2 +- 5 files changed, 49 insertions(+), 15 deletions(-) diff --git a/node_modules/changelogplease/README.md b/node_modules/changelogplease/README.md index b69685b..e00a038 100644 --- a/node_modules/changelogplease/README.md +++ b/node_modules/changelogplease/README.md @@ -14,11 +14,18 @@ npm install changelogplease ```javascript var changelog = require( "changelogplease" ); -var parsed = changelog({ +changelog({ ticketUrl: "https://github.com/scottgonzalez/changelogplease/issues/{id}", commitUrl: "https://github.com/scottgonzalez/changelogplease/commit/{id}", repo: "/path/to/repo", committish: "1.2.3..1.2.4" +}, function( error, log ) { + if ( error ) { + console.log( error ); + return; + } + + console.log( log ); }); ``` @@ -31,6 +38,7 @@ var parsed = changelog({ * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash. * `repo` (String): Path to the repository. * `committish` (String): The range of commits for the changelog. + * `sort` (Boolean, Function): Function for sorting commits. By default commits are sorted alphabetically so they are grouped by component. A value of `false` disables sorting. * `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog. * `log` (String): Generated changelog, written in markdown. diff --git a/node_modules/changelogplease/index.js b/node_modules/changelogplease/index.js index 1cbf0b3..682e311 100644 --- a/node_modules/changelogplease/index.js +++ b/node_modules/changelogplease/index.js @@ -51,18 +51,40 @@ Changelog.prototype.getLog = function( callback ) { callback ); }; +Changelog.prototype.sort = function( commits ) { + if ( this.options.sort === false ) { + return commits; + } + + if ( typeof this.options.sort === "function" ) { + return this.options.sort( commits ); + } + + // Sort commits so that they're grouped by component + var component = /^(.+):/; + return commits.sort(function( a, b ) { + var aMatch = a.match( component ), + bMatch = b.match( component ); + + if ( aMatch && bMatch) { + return aMatch[ 1 ].localeCompare( bMatch[ 1 ] ); + } + + return a.localeCompare( b ); + }); +}; + Changelog.prototype.parseCommits = function( commits ) { commits = commits.split( "__COMMIT__\n" ); commits.shift(); - return commits + // Parse each individual commit + commits = commits.map( this.parseCommit ); - // Parse each individual commit - .map( this.parseCommit ) + // Sort commits + commits = this.sort( commits ); - // Sort commits so that they're grouped by component - .sort() - .join( "\n" ) + "\n"; + return commits.join( "\n" ) + "\n"; }; Changelog.prototype.parseCommit = function( commit ) { diff --git a/node_modules/changelogplease/node_modules/git-tools/package.json b/node_modules/changelogplease/node_modules/git-tools/package.json index a24419f..8fb790b 100644 --- a/node_modules/changelogplease/node_modules/git-tools/package.json +++ b/node_modules/changelogplease/node_modules/git-tools/package.json @@ -28,5 +28,9 @@ "readme": "# node-git-tools\n\nTools for parsing data out of git repositories.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## About\n\nThe goal of node-git-tools is to provide a set of tools that can be used to\neasily write custom git commands or other scripts that are tightly integrated\nwith git.\n\nI expect the API to grow over time and will happily entertain any feature\nrequests. If there is anything you'd like added, just file an issue.\n\n## Installation\n\n```sh\nnpm install git-tools\n```\n\n## Usage\n\n```js\nvar Repo = require( \"git-tools\" );\nvar repo = new Repo( \"path/to/repo\" );\nrepo.authors(function( error, authors ) {\n\tconsole.log( authors );\n});\n```\n\n\n\n## API\n\n### Repo.clone( options, callback )\n\nClones a repository and returns the new `Repo` instance.\n\n* `options` (Object): Options for cloning the repository.\n * `repo` (String): The repository to clone from.\n * `path` (String): The path to clone into.\n * extra: Additional options can be provided, as documented below.\n* `callback` (Function; `function( error, repo )`): Function to invoke after cloning the repository.\n * `repo` (Object): A new `Repo` instance for the cloned repository.\n\nThis function accepts arbitrary options to pass to `git clone`.\nFor example, to create a bare repository:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tbare: true\n});\n```\n\nOr to create a repo with limited history:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tdepth: 5\n});\n```\n\n\n\n### Repo.isRepo( path, callback )\n\nDetermines if the specified path is a git repository.\n\n* `path` (String): The path to check.\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n*Note: This is equivalent to creating a `Repo` instance with `path` and calling `isRepo()` on the instance.*\n\n\n\n### activeDays( [committish], callback )\n\nGets the number of active days (unique days of authorship). Includes activity\nby day, month, year, and the entire history.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, activeDays )`): Function to invoke after getting active days.\n * `activeDays` (Object): Summary of active days.\n\nThe `activeDays` object has the following form:\n\n```js\n{\n\tactiveDays: Number,\n\tcommits: Number,\n\tdates: {\n\t\t\"YYYY-MM-DD\": Number( commits ),\n\t\t...\n\t},\n\tyears: {\n\t\t\"YYYY\": {\n\t\t\tactiveDays: Number,\n\t\t\tcommits: Number,\n\t\t\tmonths: {\n\t\t\t\t\"M\": {\n\t\t\t\t\tactiveDays: Number,\n\t\t\t\t\tcommits: Number,\n\t\t\t\t\tdays: {\n\t\t\t\t\t\t\"D\": {\n\t\t\t\t\t\t\tcommits: Number\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t...\n\t\t\t}\n\t\t},\n\t\t...\n\t}\n}\n```\n\n\n\n### age( callback )\n\nGets the age of the repository.\n\n* `callback` (Function; `function( error, age )`): Function to invoke after getting the age.\n * `age` (String): The age of the repository.\n\n\n\n### authors( [committish], callback )\n\nGets all authors, sorted by number of commits.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, authors )`): Function to invoke after getting authors.\n * `authors` (Array): All authors, sorted by number of commits.\n\nEach author object contains the following properties:\n\n* `email` (String): Author's email address.\n* `name` (String): Author's name.\n* `commits` (Number): Number of commits.\n* `commitsPercent` (Number): Percentage of commits.\n\n\n\n### blame( options, callback )\n\nDetermine what revision and author last modified each line of a file.\n\n* `options` (Object): Options for the blame.\n * `path` (String): The path to the file to run the blame for.\n * `committish` (String; default: `\"HEAD\"`): Revision or range to blame against.\n* `callback` (Function; `function( error, blame )`): Function to invoke after blaming the file.\n * `blame` (Array): Commit information for each line.\n\nEach blame item contains the following properties:\n\n* `commit`: SHA of commit that most recently modified the line.\n* `path`: Path to the file at the time of the most recent modification to the line.\n* `lineNumber`: Line number within the file.\n* `content`: Contents of the line.\n\n\n\n### branches( callback )\n\nGets all branches in order of most recent commit.\n\n* `callback` (Function; `function( error, branches )`): Function to invoke after getting branches.\n * `branches` (Array): All branches, sorted by most recent commit date.\n\nEach branch object contains the following properties:\n\n* `name` (String): Branch name.\n* `sha` (String): SHA-1 of most recent commit.\n* `date` (Date): Author date of most recent commit.\n* `subject` (String): Subject (first line) of most recent commit.\n* `author` (Object): Author of most recent commit.\n * `email` (String): Author's email address.\n * `name` (String): Author's name.\n\n\n\n### config( name, callback )\n\nGets the value of a configuration option.\n\n* `name` (String): The name of the configuration option.\n* `callback` (Function; `function( error, value )`): Function to invoke after getting the configuration option.\n * `value` (String|null): The value for the configuration option, or `null` if no value is set.\n\n\n\n### currentBranch( callback )\n\nGets the name of the currently checked out branch, if any.\n\n* `callback` (Function; `function( error, branch )`): Function to invoke after getting the branch.\n * `branch` (String|null): Branch name, or `null` if in detached HEAD state.\n\n\n\n### isRepo( callback )\n\nDetermines if the specified path is a git repository.\n\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n\n\n### remotes( callback )\n\nGets all remote repositories.\n\n* `callback` (Function; `function( error, remotes )`): Function to invoke after getting the remotes.\n * `remotes` (Array): All remote repositories.\n\nEach remote object contains the following properties:\n\n* `name` (String): Remote name.\n* `url` (String): URL for the remote repository.\n\n\n\n### resolveCommittish( committish, callback )\n\nResolves a committish to a SHA1.\n\n* `committish` (String): Any committish to resolve.\n* `callback` (Function; `function( error, sha )`): Function to invoke after resolving the comittish.\n * `sha`: SHA1 of the resolved committish.\n\n\n\n### tags( callback )\n\nGets all tags in reverse chronological order.\n\nLightweight tags are sorted by author date and annotated tags are sorted by tagger date.\n\n* `callback` (Function; `function( error, tags )`): Function to invoke after getting tags.\n * `tags` (Array): All tags, sorted by date.\n\nEach tag object contains the following properties:\n\n* `name` (String): Tag name.\n* `sha` (String): SHA-1 for the tag. For lightweight tags, this is the SHA-1 of the commit.\n* `date` (Date): Author date for ligthweight tags, tagger date for annotated tags.\n\n\n\n## License\n\nCopyright 2013 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n", "readmeFilename": "README.md", "_id": "git-tools@0.1.0", - "_from": "git-tools@0.1.0" + "dist": { + "shasum": "42709aabce667e87ee789f8167dbe0191db9a10b" + }, + "_from": "git-tools@0.1.0", + "_resolved": "https://registry.npmjs.org/git-tools/-/git-tools-0.1.0.tgz" } diff --git a/node_modules/changelogplease/package.json b/node_modules/changelogplease/package.json index cd018ba..14cb444 100644 --- a/node_modules/changelogplease/package.json +++ b/node_modules/changelogplease/package.json @@ -1,6 +1,6 @@ { "name": "changelogplease", - "version": "1.0.1", + "version": "1.1.0", "description": "Generate changelogs from git commit messages", "author": { "name": "Scott González", @@ -30,12 +30,12 @@ "devDependencies": { "nodeunit": "0.8.6" }, - "readme": "# Changelog, please\n\nGenerate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## Installation\n\n```\nnpm install changelogplease\n```\n\n## Usage\n\n```javascript\nvar changelog = require( \"changelogplease\" );\nvar parsed = changelog({\n\tticketUrl: \"https://github.com/scottgonzalez/changelogplease/issues/{id}\",\n\tcommitUrl: \"https://github.com/scottgonzalez/changelogplease/commit/{id}\",\n\trepo: \"/path/to/repo\",\n\tcommittish: \"1.2.3..1.2.4\"\n});\n```\n\n## API\n\n### changelog( options, callback )\n\n* `options` (Object): Options for creating the changelog.\n * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.\n * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.\n * `repo` (String): Path to the repository.\n * `committish` (String): The range of commits for the changelog.\n* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.\n * `log` (String): Generated changelog, written in markdown.\n\n### Changelog\n\n`changelog( options, callback )` is a shorthand for the following:\n\n```js\nvar Changelog = require( \"changelogplease\" ).Changelog;\nvar instance = new Changelog( options );\ninstance.parse( callback );\n```\n\nChangelog generation is tailored to a specific format based on the needs of the various jQuery\nprojects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.\nBe aware that these methods are not currently documented because they may change. Feel free to\nsubmit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't\nfeel comfortable hacking in your own changes (or even if you do).\n\n\n## License\n\nCopyright 2014 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n", + "readme": "# Changelog, please\n\nGenerate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## Installation\n\n```\nnpm install changelogplease\n```\n\n## Usage\n\n```javascript\nvar changelog = require( \"changelogplease\" );\nchangelog({\n\tticketUrl: \"https://github.com/scottgonzalez/changelogplease/issues/{id}\",\n\tcommitUrl: \"https://github.com/scottgonzalez/changelogplease/commit/{id}\",\n\trepo: \"/path/to/repo\",\n\tcommittish: \"1.2.3..1.2.4\"\n}, function( error, log ) {\n\tif ( error ) {\n\t\tconsole.log( error );\n\t\treturn;\n\t}\n\n\tconsole.log( log );\n});\n```\n\n## API\n\n### changelog( options, callback )\n\n* `options` (Object): Options for creating the changelog.\n * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.\n * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.\n * `repo` (String): Path to the repository.\n * `committish` (String): The range of commits for the changelog.\n * `sort` (Boolean, Function): Function for sorting commits. By default commits are sorted alphabetically so they are grouped by component. A value of `false` disables sorting.\n* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.\n * `log` (String): Generated changelog, written in markdown.\n\n### Changelog\n\n`changelog( options, callback )` is a shorthand for the following:\n\n```js\nvar Changelog = require( \"changelogplease\" ).Changelog;\nvar instance = new Changelog( options );\ninstance.parse( callback );\n```\n\nChangelog generation is tailored to a specific format based on the needs of the various jQuery\nprojects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.\nBe aware that these methods are not currently documented because they may change. Feel free to\nsubmit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't\nfeel comfortable hacking in your own changes (or even if you do).\n\n\n## License\n\nCopyright 2014 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n", "readmeFilename": "README.md", - "_id": "changelogplease@1.0.1", + "_id": "changelogplease@1.1.0", "dist": { - "shasum": "2953e41245f475cd0a3d66b2861e3344166d6c30" + "shasum": "693070250b6ddc93fd87e1634db058e769e4b7d0" }, - "_from": "changelogplease@1.0.1", - "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.0.1.tgz" + "_from": "changelogplease@1.1.0", + "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.1.0.tgz" } diff --git a/package.json b/package.json index 000ec82..016c943 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "changelogplease": "1.0.1", + "changelogplease": "1.1.0", "colors": "0.6.2", "semver": "2.2.1", "shelljs": "0.2.6", From 6bce7751a9a1d558dcf7052619ae6d311bcdf61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Mon, 31 Mar 2014 21:26:16 +0200 Subject: [PATCH 12/83] CDN: Allow disabling via cdnPublish flag Fixes gh-55 Closes gh-56 --- README.md | 4 ++++ lib/cdn.js | 1 + release.js | 14 ++++++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e8fefa4..5500c73 100644 --- a/README.md +++ b/README.md @@ -235,6 +235,10 @@ The previous release version (used for determining what changed). The version that will be set in `package.json` after the release. +#### cdnPublish + +Set to `false` to prevent publishing to the jQuery CDN. Defaults to `true`. + #### npmPublish Set to `true` to publish a release via npm. Defaults to `false`. diff --git a/lib/cdn.js b/lib/cdn.js index b97f99d..91c49d5 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -22,6 +22,7 @@ module.exports = function( Release ) { } Release.define({ + cdnPublish: true, _cloneCdnRepo: function() { var local = Release.dir.base + "/codeorigin.jquery.com", remote = Release.isTest ? testRemote : realRemote; diff --git a/release.js b/release.js index 2e41497..8ca8eb8 100644 --- a/release.js +++ b/release.js @@ -42,10 +42,16 @@ commonTasks = [ Release.confirmReview, Release._pushRelease, - Release._section( "publishing to jQuery CDN" ), - Release._copyCdnArtifacts, - Release.confirmReview, - Release._pushToCdn, + function( fn ) { + if ( Release.cdnPublish ) { + Release._section( "publishing to jQuery CDN" )(); + Release._walk([ + Release._copyCdnArtifacts, + Release.confirmReview, + Release._pushToCdn + ], fn ); + } + }, function() { if ( Release.npmPublish ) { From d9343ef63f432fc08c0121115bf182844a9a6f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Mon, 31 Mar 2014 22:19:48 +0200 Subject: [PATCH 13/83] Release: Fix check for cdnPublish flag Follow-up to 6bce7751a9a1d558dcf7052619ae6d311bcdf61c, where I missed this. Ref gh-56 --- release.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release.js b/release.js index 8ca8eb8..c0f3f54 100644 --- a/release.js +++ b/release.js @@ -50,6 +50,8 @@ commonTasks = [ Release.confirmReview, Release._pushToCdn ], fn ); + } else { + fn(); } }, From 85f3b7823d2500dd3d54f76e4cf2462543d9c5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Mon, 31 Mar 2014 22:29:17 +0200 Subject: [PATCH 14/83] Repo: Only update package.json with nextVersion Fixes gh-57 Closes gh-58 --- lib/repo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/repo.js b/lib/repo.js index 472dbbb..2f54e26 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -259,8 +259,8 @@ Release.define({ Release.exec( "git checkout " + Release.branch, "Error checking out " + Release.branch + " branch." ); - // Update all JSON versions - Release._setVersion( Release.nextVersion ); + // Update only canonical version + Release._versionJSON( "package.json", Release.nextVersion ); console.log( "Committing version update..." ); Release.exec( "git commit -am 'Build: Updating the " + Release.branch + From 0d86e9d5384630ce14ca1ab28189573b762ca6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 1 Apr 2014 11:25:37 +0200 Subject: [PATCH 15/83] Readme: What isTest is used for Closes gh-59 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5500c73..72cb1a7 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,8 @@ Saves `package` to `package.json`, preserving indentation style. #### isTest -Whether this is a test release. +Whether this is a test release. Test releases don't publish to npm and use the +fake-cdn project instead of publishing to the real CDN. #### project From ede41d5976cba478f5d0463178ad990e86be94ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 21 Mar 2014 14:09:02 -0400 Subject: [PATCH 16/83] NPM: Add npmTags() to provide full control over which tags are used Fixes gh-29 Fixes gh-30 Closes gh-48 --- README.md | 5 +++++ lib/npm.js | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 72cb1a7..0eab504 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,11 @@ the shell, the commit log, and the issue list. If using Trac, return a different milestone to be used in the queries to generate a changelog and list of contributors. Defaults to `newVersion`. +#### npmTags() + +An array of tags to apply to the npm release. Every release must contain at least +one tag. + #### issueTracker Which type of issue tracker is being used for the project. Must be either diff --git a/lib/npm.js b/lib/npm.js index c149058..b35940c 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -38,6 +38,16 @@ module.exports = function( Release ) { } }, + npmTags: function() { + var tags = [ "beta" ]; + + if ( !Release.preRelease ) { + tags.push( "latest" ); + } + + return tags; + }, + _publishNpm: function() { if ( !Release.npmPublish ) { return; @@ -45,20 +55,29 @@ module.exports = function( Release ) { Release.chdir( Release.dir.repo ); - var npmCommand = "npm publish"; + var name = Release.readPackage().name, + npmTags = Release.npmTags(), + npmCommand = "npm publish --tag " + npmTags.pop(); - if ( Release.preRelease ) { - npmCommand += " --tag beta"; + if ( Release.isTest ) { + console.log( "Actual release would now publish to npm using:" ); + } else { + console.log( "Publishing to npm, running:" ); } - if ( Release.isTest ) { - console.log( "Actual release would now publish to npm" ); - console.log( "Would run: " + npmCommand.cyan ); - return; + console.log( " " + npmCommand.cyan ); + if ( !Release.isTest ) { + Release.exec( npmCommand ); + } + + while ( npmTags.length ) { + npmCommand = "npm tag " + name + "@" + Release.newVersion + " " + npmTags.pop(); + console.log( " " + npmCommand.cyan ); + if ( !Release.isTest ) { + Release.exec( npmCommand ); + } } - console.log( "Publishing to npm, running " + npmCommand.cyan ); - Release.exec( npmCommand ); console.log(); } }); From 88a83a94e5de3c272ddd160deb69c2267f258e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 14 Apr 2014 11:30:52 -0400 Subject: [PATCH 17/83] Build: Normalize line endings --- .gitattributes | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b7ca95b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# JS files must always use LF for tools to work +*.js eol=lf From 2ac9706de90458a6bd4cf59d4b366fabac25c4c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Mon, 14 Apr 2014 19:10:49 +0200 Subject: [PATCH 18/83] README: Fix descript of npmTags() as function returning an array --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0eab504..cb2d4cf 100644 --- a/README.md +++ b/README.md @@ -116,8 +116,8 @@ generate a changelog and list of contributors. Defaults to `newVersion`. #### npmTags() -An array of tags to apply to the npm release. Every release must contain at least -one tag. +A function that returns an array of tags to apply to the npm release. +Every release must contain at least one tag. #### issueTracker From 54a815dd445ef76704db49cf5b101654741b9205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Mon, 14 Apr 2014 19:17:59 +0200 Subject: [PATCH 19/83] Utils: Make Release.walk public --- README.md | 10 ++++++++++ lib/util.js | 4 ++-- release.js | 6 +++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cb2d4cf..685918d 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,16 @@ Gets the contents of `package.json` as an object. Saves `package` to `package.json`, preserving indentation style. +#### walk( methods, done ) + +Executes the array of `methods` (minimum one element) step by step. For any +given method, if that method accepts arguments (`method.length > 0`), it will +pass a callback that the method needs to execute when done, making the method +call async. Otherwise the method is assumed to be sync and the next method runs +immediately. + +Once all methods are executed, the `done` callback is executed. + ### Other Properties #### isTest diff --git a/lib/util.js b/lib/util.js index 3adf5df..c4415a1 100644 --- a/lib/util.js +++ b/lib/util.js @@ -53,7 +53,7 @@ Release.define({ }; }, - _walk: function( methods, fn ) { + walk: function( methods, fn ) { var method = methods.shift(); function next() { @@ -61,7 +61,7 @@ Release.define({ return fn(); } - Release._walk( methods, fn ); + Release.walk( methods, fn ); } if ( !method.length ) { diff --git a/release.js b/release.js index c0f3f54..1548dbe 100644 --- a/release.js +++ b/release.js @@ -45,7 +45,7 @@ commonTasks = [ function( fn ) { if ( Release.cdnPublish ) { Release._section( "publishing to jQuery CDN" )(); - Release._walk([ + Release.walk([ Release._copyCdnArtifacts, Release.confirmReview, Release._pushToCdn @@ -80,10 +80,10 @@ stableTasks = [ Release._gatherContributors ]; -Release._walk( commonTasks, function() { +Release.walk( commonTasks, function() { if ( Release.preRelease ) { return Release.complete(); } - Release._walk( stableTasks, Release.complete ); + Release.walk( stableTasks, Release.complete ); }); From e39576dd24efc5991515fb6f23c788be0bd7ebb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 17 Apr 2014 14:35:29 -0400 Subject: [PATCH 20/83] Repo: Use valid semver for temp version Using a valid semver between releases allows users to do an npm install against a branch. Ref jquery #15020 Closes gh-61 --- lib/repo.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/repo.js b/lib/repo.js index 2f54e26..03cc489 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -156,9 +156,9 @@ Release.define({ currentVersion = Release.readPackage().version; console.log( "Validating current version..." ); - if ( currentVersion.substr( -3, 3 ) !== "pre" ) { + if ( currentVersion.substr( -4, 4 ) !== "-pre" ) { console.log( "The current version is " + currentVersion.red + "." ); - Release.abort( "The version must be a pre version." ); + Release.abort( "The version must be a pre version, e.g., 1.2.3-pre." ); } if ( Release.preRelease ) { @@ -167,7 +167,7 @@ Release.define({ // Note: prevVersion is not currently used for pre-releases. Release.prevVersion = Release.nextVersion = currentVersion; } else { - Release.newVersion = currentVersion.substr( 0, currentVersion.length - 3 ); + Release.newVersion = currentVersion.substr( 0, currentVersion.length - 4 ); parts = Release.newVersion.split( "." ); major = parseInt( parts[ 0 ], 10 ); minor = parseInt( parts[ 1 ], 10 ); @@ -185,7 +185,7 @@ Release.define({ Release.prevVersion = [ major, minor, patch - 1 ].join( "." ); } - Release.nextVersion = [ major, minor, patch + 1 ].join( "." ) + "pre"; + Release.nextVersion = [ major, minor, patch + 1 ].join( "." ) + "-pre"; } console.log( "We are going from " + Release.prevVersion.cyan + From 6f185747eed0dc5c2e4ad0b65411d19cbe93fbf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 18 Apr 2014 11:22:27 -0400 Subject: [PATCH 21/83] README: Don't hard wrap in prose --- README.md | 93 ++++++++++++++++--------------------------------------- 1 file changed, 26 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 685918d..7cc4378 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,10 @@ # jQuery Project Release Automation -This script automates releases for all jQuery projects. It is designed to create -consistency between projects and reduce the burden of maintaining individual -release scripts. +This script automates releases for all jQuery projects. It is designed to create consistency between projects and reduce the burden of maintaining individual release scripts. ## Creating a Release -Creating a release is as simple as cloning this repository and telling the -script which project to use. In order to ensure a clean and proper release is -created, you should always start from a new clone of this repository. +Creating a release is as simple as cloning this repository and telling the script which project to use. In order to ensure a clean and proper release is created, you should always start from a new clone of this repository. ```sh git clone git@github.com:jquery/jquery-release.git @@ -18,13 +14,9 @@ node release.js --remote=jquery/ ### Testing the Release Script -You can do a test run of the release script by using a different remote -repository. The script is smart enough to detect if you're using an -official repository and adjust which actions are taken so that undesired -actions, such as publishing to npm, don't occur for test runs. +You can do a test run of the release script by using a different remote repository. The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs. -When working on features of this script, adapt the following to simplify -testing a bit, replacing the paths for `project` and `cdn`: +When working on features of this script, adapt the following to simplify testing a bit, replacing the paths for `project` and `cdn`: ```bash #!/bin/sh -e @@ -50,26 +42,19 @@ rm -rf __release/ node release.js --remote=$project ``` -You need local clones of [fake-project](https://github.com/jquery/fake-project) -and [fake-cdn](https://github.com/jquery/fake-cdn), then update both variables -to point to those. +You need local clones of [fake-project](https://github.com/jquery/fake-project) and [fake-cdn](https://github.com/jquery/fake-cdn), then update both variables to point to those. -Save as `test-release.sh` in the checkout of this repo, make it executable -with `chmod +x test-release.sh`, then run with `./test-release.sh`. +Save as `test-release.sh` in the checkout of this repo, make it executable with `chmod +x test-release.sh`, then run with `./test-release.sh`. ### Full Usage Options -See the [usage documentation](/docs/usage.txt) for the full set of options. -You can also run the script with no parameters to see the usage. +See the [usage documentation](/docs/usage.txt) for the full set of options. You can also run the script with no parameters to see the usage. ## Creating a Project-Specific Release Script -This script only performs the set of common functionality across all projects. -Each project may have additional functionality. Any project-specific -configuration and functionality must be defined in the `build/release.js` file -inside the project's repository. +This script only performs the set of common functionality across all projects. Each project may have additional functionality. Any project-specific configuration and functionality must be defined in the `build/release.js` file inside the project's repository. Here's a minimal example: @@ -91,54 +76,41 @@ Release.define({ #### checkRepoState() -Performs any project-specific checks to ensure the repository is in a good state -to be released. For example, there is a built-in check to ensure that -AUTHORS.txt is up-to-date. +Performs any project-specific checks to ensure the repository is in a good state to be released. For example, there is a built-in check to ensure that `AUTHORS.txt` is up-to-date. -This method has no return value. If a project-specific check fails, the script -should use `Release.abort()` to prevent the release from continuing. +This method has no return value. If a project-specific check fails, the script should use `Release.abort()` to prevent the release from continuing. #### generateArtifacts( callback ) -Generates any release artifacts that should be included in the release. The -callback must be invoked with an array of files that should be committed before -creating the tag. +Generates any release artifacts that should be included in the release. The callback must be invoked with an array of files that should be committed before creating the tag. #### changelogShell() -Defines the shell for the changelog. The changelog is created by concatenating -the shell, the commit log, and the issue list. +Defines the shell for the changelog. The changelog is created by concatenating the shell, the commit log, and the issue list. #### tracMilestone() -If using Trac, return a different milestone to be used in the queries to -generate a changelog and list of contributors. Defaults to `newVersion`. +If using Trac, return a different milestone to be used in the queries to generate a changelog and list of contributors. Defaults to `newVersion`. #### npmTags() -A function that returns an array of tags to apply to the npm release. -Every release must contain at least one tag. +A function that returns an array of tags to apply to the npm release. Every release must contain at least one tag. #### issueTracker -Which type of issue tracker is being used for the project. Must be either -`"trac"` or `"github"`. +Which type of issue tracker is being used for the project. Must be either `"trac"` or `"github"`. #### contributorReportId -If using Trac, this defines which report will produce a list of contributors -for a specific release. +If using Trac, this defines which report will produce a list of contributors for a specific release. -See [docs/trac-contributors.sql](docs/trac-contributors.sql) for the SQL -necessary to create the Trac report. +See [docs/trac-contributors.sql](docs/trac-contributors.sql) for the SQL necessary to create the Trac report. #### exports.dependencies *Note: This is a property on the `exports` object in `build/release.js`.* -An array of release-specific dependencies. Dependencies can be listed here -instead of in `devDependencies` in `package.json` so that contributors don't -need to install dependencies which are only necessary for the release. +An array of release-specific dependencies. Dependencies can be listed here instead of in `devDependencies` in `package.json` so that contributors don't need to install dependencies which are only necessary for the release. ### Other Methods @@ -148,25 +120,21 @@ Defines new properties and methods to add to the `Release` object. #### abort( msg [, error ] ) -Aborts the release and prints the message. If an error object is provided, it is -used for the stack trace, otherwise the current call stack is used. +Aborts the release and prints the message. If an error object is provided, it is used for the stack trace, otherwise the current call stack is used. #### exec( command, options ) -Executes the given `command`. You can pass `{ silent: true }` to suppress output -on the command line. +Executes the given `command`. You can pass `{ silent: true }` to suppress output on the command line. Returns the output. #### git( command, errorMessage ) -Executes the given git `command`. If the command fails, the release will be -aborted and `errorMessage` will be displayed. +Executes the given git `command`. If the command fails, the release will be aborted and `errorMessage` will be displayed. #### gitLog( format ) -Gets a git log using the specified format. If the log fails, the release will be -aborted. +Gets a git log using the specified format. If the log fails, the release will be aborted. Returns an array of commits. @@ -178,15 +146,11 @@ Passes the input to `callback`. #### confirm( callback ) -Prompts the user to confirm they want to continue with the release script. If -the user decides not to continue, the release will be aborted and `callback` -won't be invoked. +Prompts the user to confirm they want to continue with the release script. If the user decides not to continue, the release will be aborted and `callback` won't be invoked. #### confirmReview( callback ) -Prompts the user to review the output and confirm they want to continue with the -release script. If the user decides not to continue, the release will be aborted -and `callback` won't be invoked. +Prompts the user to review the output and confirm they want to continue with the release script. If the user decides not to continue, the release will be aborted and `callback` won't be invoked. #### trac( path ) @@ -204,11 +168,7 @@ Saves `package` to `package.json`, preserving indentation style. #### walk( methods, done ) -Executes the array of `methods` (minimum one element) step by step. For any -given method, if that method accepts arguments (`method.length > 0`), it will -pass a callback that the method needs to execute when done, making the method -call async. Otherwise the method is assumed to be sync and the next method runs -immediately. +Executes the array of `methods` (minimum one element) step by step. For any given method, if that method accepts arguments (`method.length > 0`), it will pass a callback that the method needs to execute when done, making the method call async. Otherwise the method is assumed to be sync and the next method runs immediately. Once all methods are executed, the `done` callback is executed. @@ -216,8 +176,7 @@ Once all methods are executed, the `done` callback is executed. #### isTest -Whether this is a test release. Test releases don't publish to npm and use the -fake-cdn project instead of publishing to the real CDN. +Whether this is a test release. Test releases don't publish to npm and use the fake-cdn project instead of publishing to the real CDN. #### project From 80d61ccae91fbd21bd38f3569c7e2d389209e88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 18 Apr 2014 11:23:27 -0400 Subject: [PATCH 22/83] README: Note that tests should be from a fresh clone --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7cc4378..9090eec 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ node release.js --remote=jquery/ ### Testing the Release Script -You can do a test run of the release script by using a different remote repository. The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs. +You can do a test run of the release script by using a different remote repository. **It is recommended to perform tests from a fresh clone of the project being released.** The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs. When working on features of this script, adapt the following to simplify testing a bit, replacing the paths for `project` and `cdn`: From 705bcf6b850f3c4537e9bff44dfabebf396459e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 18 Apr 2014 12:29:59 -0400 Subject: [PATCH 23/83] CDN: Fix leftover reference to Release.package Closes gh-62 --- lib/cdn.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cdn.js b/lib/cdn.js index 91c49d5..4b789e8 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -40,9 +40,10 @@ module.exports = function( Release ) { }, _copyCdnArtifacts: function() { - var targetCdn = projectCdn(), + var npmPackage = Release.readPackage().name, + targetCdn = projectCdn(), releaseCdn = Release.dir.repo + "/dist/cdn", - commitMessage = Release.project + ": Added version " + Release.newVersion; + commitMessage = npmPackage + ": Added version " + Release.newVersion; Release.chdir( Release.dir.base ); console.log( "Copying files from " + releaseCdn.cyan + " to " + targetCdn.cyan + "." ); From ca9ec6808b45b792a4dd20d15de79c73c48ffd97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 6 May 2014 09:05:52 -0400 Subject: [PATCH 24/83] Release: Always generate changelog and contributor list Fixes gh-28 --- lib/repo.js | 46 ++++++++++++++++++++++------------------------ release.js | 14 +++++++------- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/lib/repo.js b/lib/repo.js index 03cc489..8d83838 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -161,33 +161,31 @@ Release.define({ Release.abort( "The version must be a pre version, e.g., 1.2.3-pre." ); } - if ( Release.preRelease ) { - Release.newVersion = Release.preRelease; - - // Note: prevVersion is not currently used for pre-releases. - Release.prevVersion = Release.nextVersion = currentVersion; + Release.newVersion = Release.preRelease ? + Release.preRelease : + currentVersion.substr( 0, currentVersion.length - 4 ); + + parts = Release.newVersion.split( "." ); + major = parseInt( parts[ 0 ], 10 ); + minor = parseInt( parts[ 1 ], 10 ); + patch = parseInt( parts[ 2 ], 10 ); + + if ( minor === 0 && patch === 0 ) { + Release.abort( + "This script is not smart enough to handle major release (eg. 2.0.0)." ); + } else if ( patch === 0 ) { + Release.prevVersion = Release.exec( + "git for-each-ref --count=1 --sort=-authordate --format='%(refname:short)' " + + "refs/tags/" + [ major, minor - 1 ].join( "." ) + "*" + ).trim(); } else { - Release.newVersion = currentVersion.substr( 0, currentVersion.length - 4 ); - parts = Release.newVersion.split( "." ); - major = parseInt( parts[ 0 ], 10 ); - minor = parseInt( parts[ 1 ], 10 ); - patch = parseInt( parts[ 2 ], 10 ); - - if ( minor === 0 && patch === 0 ) { - Release.abort( - "This script is not smart enough to handle major release (eg. 2.0.0)." ); - } else if ( patch === 0 ) { - Release.prevVersion = Release.exec( - "git for-each-ref --count=1 --sort=-authordate --format='%(refname:short)' " + - "refs/tags/" + [ major, minor - 1 ].join( "." ) + "*" - ).trim(); - } else { - Release.prevVersion = [ major, minor, patch - 1 ].join( "." ); - } - - Release.nextVersion = [ major, minor, patch + 1 ].join( "." ) + "-pre"; + Release.prevVersion = [ major, minor, patch - 1 ].join( "." ); } + Release.nextVersion = Release.preRelease ? + currentVersion : + [ major, minor, patch + 1 ].join( "." ) + "-pre"; + console.log( "We are going from " + Release.prevVersion.cyan + " to " + Release.newVersion.cyan + "." ); console.log( "After the release, the version will be " + Release.nextVersion.cyan + "." ); diff --git a/release.js b/release.js index 1548dbe..a44c8aa 100644 --- a/release.js +++ b/release.js @@ -38,6 +38,12 @@ commonTasks = [ Release._section( "building release" ), Release._createReleaseBranch, + Release._section( "generating changelog" ), + Release._generateChangelog, + + Release._section( "gathering contributors" ), + Release._gatherContributors, + Release._section( "pushing tag" ), Release.confirmReview, Release._pushRelease, @@ -71,13 +77,7 @@ stableTasks = [ Release._section( "pushing " + Release.branch )(); }, Release.confirmReview, - Release._pushBranch, - - Release._section( "generating changelog" ), - Release._generateChangelog, - - Release._section( "gathering contributors" ), - Release._gatherContributors + Release._pushBranch ]; Release.walk( commonTasks, function() { From 3269a60246cca471e1700da8d19611686c925bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 23 May 2014 10:03:11 -0400 Subject: [PATCH 25/83] Build: Upgrade to changelogplease 1.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 016c943..f3c1760 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "changelogplease": "1.1.0", + "changelogplease": "1.1.1", "colors": "0.6.2", "semver": "2.2.1", "shelljs": "0.2.6", From bdcf8835240ea20134909b3d32c0ed4ce0221bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 23 May 2014 10:04:53 -0400 Subject: [PATCH 26/83] Build: Actually update changelogplease --- node_modules/changelogplease/index.js | 2 +- node_modules/changelogplease/package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/node_modules/changelogplease/index.js b/node_modules/changelogplease/index.js index 682e311..9455ee5 100644 --- a/node_modules/changelogplease/index.js +++ b/node_modules/changelogplease/index.js @@ -61,7 +61,7 @@ Changelog.prototype.sort = function( commits ) { } // Sort commits so that they're grouped by component - var component = /^(.+):/; + var component = /^([^:]+):/; return commits.sort(function( a, b ) { var aMatch = a.match( component ), bMatch = b.match( component ); diff --git a/node_modules/changelogplease/package.json b/node_modules/changelogplease/package.json index 14cb444..30a5f79 100644 --- a/node_modules/changelogplease/package.json +++ b/node_modules/changelogplease/package.json @@ -1,6 +1,6 @@ { "name": "changelogplease", - "version": "1.1.0", + "version": "1.1.1", "description": "Generate changelogs from git commit messages", "author": { "name": "Scott González", @@ -32,10 +32,10 @@ }, "readme": "# Changelog, please\n\nGenerate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## Installation\n\n```\nnpm install changelogplease\n```\n\n## Usage\n\n```javascript\nvar changelog = require( \"changelogplease\" );\nchangelog({\n\tticketUrl: \"https://github.com/scottgonzalez/changelogplease/issues/{id}\",\n\tcommitUrl: \"https://github.com/scottgonzalez/changelogplease/commit/{id}\",\n\trepo: \"/path/to/repo\",\n\tcommittish: \"1.2.3..1.2.4\"\n}, function( error, log ) {\n\tif ( error ) {\n\t\tconsole.log( error );\n\t\treturn;\n\t}\n\n\tconsole.log( log );\n});\n```\n\n## API\n\n### changelog( options, callback )\n\n* `options` (Object): Options for creating the changelog.\n * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.\n * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.\n * `repo` (String): Path to the repository.\n * `committish` (String): The range of commits for the changelog.\n * `sort` (Boolean, Function): Function for sorting commits. By default commits are sorted alphabetically so they are grouped by component. A value of `false` disables sorting.\n* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.\n * `log` (String): Generated changelog, written in markdown.\n\n### Changelog\n\n`changelog( options, callback )` is a shorthand for the following:\n\n```js\nvar Changelog = require( \"changelogplease\" ).Changelog;\nvar instance = new Changelog( options );\ninstance.parse( callback );\n```\n\nChangelog generation is tailored to a specific format based on the needs of the various jQuery\nprojects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.\nBe aware that these methods are not currently documented because they may change. Feel free to\nsubmit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't\nfeel comfortable hacking in your own changes (or even if you do).\n\n\n## License\n\nCopyright 2014 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n", "readmeFilename": "README.md", - "_id": "changelogplease@1.1.0", + "_id": "changelogplease@1.1.1", "dist": { - "shasum": "693070250b6ddc93fd87e1634db058e769e4b7d0" + "shasum": "2904aae4883e6e0f64bc3e1fc436ba3717c8b22d" }, - "_from": "changelogplease@1.1.0", - "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.1.0.tgz" + "_from": "changelogplease@1.1.1", + "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.1.1.tgz" } From 4aa089dff608ffeadd1970fc72257feb29182198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Fri, 23 May 2014 16:07:44 +0200 Subject: [PATCH 27/83] Travis: Run aginst node 0.10 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 666f7aa..6ef04eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js node_js: - - "0.8" + - "0.10" before_script: - npm install -g grunt-cli From af046dcd6ff2d5cc80605c1d92f7f876d361dfc1 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Fri, 23 May 2014 12:25:20 -0400 Subject: [PATCH 28/83] Repo: allow synchronous or asynchronous Release.checkRepoState --- README.md | 4 +++- lib/repo.js | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9090eec..f80b3c2 100644 --- a/README.md +++ b/README.md @@ -74,12 +74,14 @@ Release.define({ ### Required/Recommended Configuration -#### checkRepoState() +#### checkRepoState( [ callback ] ) Performs any project-specific checks to ensure the repository is in a good state to be released. For example, there is a built-in check to ensure that `AUTHORS.txt` is up-to-date. This method has no return value. If a project-specific check fails, the script should use `Release.abort()` to prevent the release from continuing. +This method may be synchronous or asynchronous depending on the presence of `callback`. If present, the callback must be invoked. + #### generateArtifacts( callback ) Generates any release artifacts that should be included in the release. The callback must be invoked with an array of files that should be committed before creating the tag. diff --git a/lib/repo.js b/lib/repo.js index 8d83838..2da5c28 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -36,7 +36,7 @@ Release.define({ console.log(); }, - _checkRepoState: function() { + _checkRepoState: function( fn ) { if ( !Release.issueTracker ) { Release.abort( "Missing required config: issueTracker." ); } @@ -53,7 +53,8 @@ Release.define({ } Release._checkAuthorsTxt(); - Release.checkRepoState(); + + Release.walk( [ Release.checkRepoState ], fn ); }, _checkAuthorsTxt: function() { From 063d12b50961309ff31915b34ca29c4cf25c7263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 27 May 2014 15:11:56 -0400 Subject: [PATCH 29/83] Build: Add license Closes gh-65 --- LICENSE.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..9b7507d --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,37 @@ +Copyright 2013, 2014 jQuery Foundation and other contributors, +https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-release + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules directory are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. From 340c3d245f252e1ad95d2861609f70f6892b6dde Mon Sep 17 00:00:00 2001 From: Anne-Gaelle Colom Date: Wed, 31 Dec 2014 09:13:39 +0000 Subject: [PATCH 30/83] Build: Remove dates from copyright notice Closes gh-67 --- LICENSE.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 9b7507d..7f899db 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,4 @@ -Copyright 2013, 2014 jQuery Foundation and other contributors, -https://jquery.org/ +Copyright jQuery Foundation and other contributors, https://jquery.org/ This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history From 643d6ff8d97fa2deb4ec8b8cfd5fed39b741f97e Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Wed, 28 Jan 2015 14:32:33 -0800 Subject: [PATCH 31/83] Build: update colors Close gh-68 --- node_modules/colors/.travis.yml | 6 + node_modules/colors/MIT-LICENSE.txt | 7 +- node_modules/colors/ReadMe.md | 150 ++++++-- node_modules/colors/colors.js | 342 ------------------ node_modules/colors/example.html | 76 ---- node_modules/colors/example.js | 77 ---- node_modules/colors/examples/normal-usage.js | 74 ++++ node_modules/colors/examples/safe-string.js | 76 ++++ node_modules/colors/lib/colors.js | 176 +++++++++ node_modules/colors/lib/custom/trap.js | 45 +++ node_modules/colors/lib/custom/zalgo.js | 104 ++++++ .../colors/lib/extendStringPrototype.js | 118 ++++++ node_modules/colors/lib/index.js | 12 + node_modules/colors/lib/maps/america.js | 12 + node_modules/colors/lib/maps/rainbow.js | 13 + node_modules/colors/lib/maps/random.js | 8 + node_modules/colors/lib/maps/zebra.js | 5 + node_modules/colors/lib/styles.js | 77 ++++ .../colors/lib/system/supports-colors.js | 61 ++++ node_modules/colors/package.json | 41 ++- node_modules/colors/safe.js | 9 + node_modules/colors/screenshots/colors.png | Bin 0 -> 79787 bytes .../colors/{test.js => tests/basic-test.js} | 32 +- node_modules/colors/tests/safe-test.js | 45 +++ .../{winston-light.js => generic-logging.js} | 0 node_modules/colors/themes/winston-dark.js | 12 - package.json | 2 +- 27 files changed, 1005 insertions(+), 575 deletions(-) create mode 100644 node_modules/colors/.travis.yml delete mode 100644 node_modules/colors/colors.js delete mode 100644 node_modules/colors/example.html delete mode 100644 node_modules/colors/example.js create mode 100644 node_modules/colors/examples/normal-usage.js create mode 100644 node_modules/colors/examples/safe-string.js create mode 100644 node_modules/colors/lib/colors.js create mode 100644 node_modules/colors/lib/custom/trap.js create mode 100644 node_modules/colors/lib/custom/zalgo.js create mode 100644 node_modules/colors/lib/extendStringPrototype.js create mode 100644 node_modules/colors/lib/index.js create mode 100644 node_modules/colors/lib/maps/america.js create mode 100644 node_modules/colors/lib/maps/rainbow.js create mode 100644 node_modules/colors/lib/maps/random.js create mode 100644 node_modules/colors/lib/maps/zebra.js create mode 100644 node_modules/colors/lib/styles.js create mode 100644 node_modules/colors/lib/system/supports-colors.js create mode 100644 node_modules/colors/safe.js create mode 100644 node_modules/colors/screenshots/colors.png rename node_modules/colors/{test.js => tests/basic-test.js} (57%) create mode 100644 node_modules/colors/tests/safe-test.js rename node_modules/colors/themes/{winston-light.js => generic-logging.js} (100%) delete mode 100644 node_modules/colors/themes/winston-dark.js diff --git a/node_modules/colors/.travis.yml b/node_modules/colors/.travis.yml new file mode 100644 index 0000000..ec43125 --- /dev/null +++ b/node_modules/colors/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.11" + - "0.10" + - "0.8" + - "0.6" \ No newline at end of file diff --git a/node_modules/colors/MIT-LICENSE.txt b/node_modules/colors/MIT-LICENSE.txt index 7dca107..3de4e33 100644 --- a/node_modules/colors/MIT-LICENSE.txt +++ b/node_modules/colors/MIT-LICENSE.txt @@ -1,7 +1,8 @@ -Copyright (c) 2010 +Original Library + - Copyright (c) Marak Squires -Marak Squires -Alexis Sellier (cloudhead) +Additional Functionality + - Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/colors/ReadMe.md b/node_modules/colors/ReadMe.md index 0eda52d..beb5b14 100644 --- a/node_modules/colors/ReadMe.md +++ b/node_modules/colors/ReadMe.md @@ -1,7 +1,8 @@ -# colors.js - get color and style in your node.js console ( and browser ) like what +# colors.js - +## get color and style in your node.js console + ## Installation @@ -9,34 +10,105 @@ ## colors and styles! -- bold -- italic -- underline -- inverse -- yellow -- cyan -- white -- magenta -- green -- red -- grey -- blue -- rainbow -- zebra -- random +### text colors + + - black + - red + - green + - yellow + - blue + - magenta + - cyan + - white + - gray + - grey + +### background colors + + + + - bgBlack + - bgRed + - bgGreen + - bgYellow + - bgBlue + - bgMagenta + - bgCyan + - bgWhite + +### styles + + - reset + - bold + - dim + - italic + - underline + - inverse + - hidden + - strikethrough + +### extras + + - rainbow + - zebra + - america + - trap + - random + ## Usage -``` js -var colors = require('./colors'); +By popular demand, `colors` now ships with two types of usages! + +The super nifty way + +```js +var colors = require('colors'); console.log('hello'.green); // outputs green text console.log('i like cake and pies'.underline.red) // outputs red underlined text console.log('inverse the color'.inverse); // inverses the color -console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces) +console.log('OMG Rainbows!'.rainbow); // rainbow +console.log('Run the trap'.trap); // Drops the bass + +``` + +or a slightly less nifty way which doesn't extend `String.prototype` + +```js +var colors = require('colors/safe'); + +console.log(colors.green('hello')); // outputs green text +console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text +console.log(colors.inverse('inverse the color')); // inverses the color +console.log(colors.rainbow('OMG Rainbows!')); // rainbow +console.log(colors.trap('Run the trap')); // Drops the bass + +``` + +I prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way. + +If you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object. + +## Disabling Colors + +To disable colors you can pass the following arguments in the command line to your application: + +```bash +node myapp.js --no-color ``` -# Creating Custom themes +## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data) + +```js +var name = 'Marak'; +console.log(colors.green('Hello %s'), name); +// outputs -> 'Hello Marak' +``` + +## Custom themes + +### Using standard API ```js @@ -62,16 +134,34 @@ console.log("this is an error".error); console.log("this is a warning".warn); ``` +### Using string safe API -### Contributors +```js +var colors = require('colors/safe'); -Marak (Marak Squires) -Alexis Sellier (cloudhead) -mmalecki (Maciej Małecki) -nicoreed (Nico Reed) -morganrallen (Morgan Allen) -JustinCampbell (Justin Campbell) -ded (Dustin Diaz) +// set single property +var error = colors.red; +error('this is red'); +// set theme +colors.setTheme({ + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}); + +// outputs red text +console.log(colors.error("this is an error")); + +// outputs yellow text +console.log(colors.warn("this is a warning")); +``` -#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded) +*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.* \ No newline at end of file diff --git a/node_modules/colors/colors.js b/node_modules/colors/colors.js deleted file mode 100644 index 7a537d8..0000000 --- a/node_modules/colors/colors.js +++ /dev/null @@ -1,342 +0,0 @@ -/* -colors.js - -Copyright (c) 2010 - -Marak Squires -Alexis Sellier (cloudhead) - -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. - -*/ - -var isHeadless = false; - -if (typeof module !== 'undefined') { - isHeadless = true; -} - -if (!isHeadless) { - var exports = {}; - var module = {}; - var colors = exports; - exports.mode = "browser"; -} else { - exports.mode = "console"; -} - -// -// Prototypes the string object to have additional method calls that add terminal colors -// -var addProperty = function (color, func) { - exports[color] = function (str) { - return func.apply(str); - }; - String.prototype.__defineGetter__(color, func); -}; - -function stylize(str, style) { - - var styles; - - if (exports.mode === 'console') { - styles = { - //styles - 'bold' : ['\x1B[1m', '\x1B[22m'], - 'italic' : ['\x1B[3m', '\x1B[23m'], - 'underline' : ['\x1B[4m', '\x1B[24m'], - 'inverse' : ['\x1B[7m', '\x1B[27m'], - 'strikethrough' : ['\x1B[9m', '\x1B[29m'], - //text colors - //grayscale - 'white' : ['\x1B[37m', '\x1B[39m'], - 'grey' : ['\x1B[90m', '\x1B[39m'], - 'black' : ['\x1B[30m', '\x1B[39m'], - //colors - 'blue' : ['\x1B[34m', '\x1B[39m'], - 'cyan' : ['\x1B[36m', '\x1B[39m'], - 'green' : ['\x1B[32m', '\x1B[39m'], - 'magenta' : ['\x1B[35m', '\x1B[39m'], - 'red' : ['\x1B[31m', '\x1B[39m'], - 'yellow' : ['\x1B[33m', '\x1B[39m'], - //background colors - //grayscale - 'whiteBG' : ['\x1B[47m', '\x1B[49m'], - 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'], - 'blackBG' : ['\x1B[40m', '\x1B[49m'], - //colors - 'blueBG' : ['\x1B[44m', '\x1B[49m'], - 'cyanBG' : ['\x1B[46m', '\x1B[49m'], - 'greenBG' : ['\x1B[42m', '\x1B[49m'], - 'magentaBG' : ['\x1B[45m', '\x1B[49m'], - 'redBG' : ['\x1B[41m', '\x1B[49m'], - 'yellowBG' : ['\x1B[43m', '\x1B[49m'] - }; - } else if (exports.mode === 'browser') { - styles = { - //styles - 'bold' : ['', ''], - 'italic' : ['', ''], - 'underline' : ['', ''], - 'inverse' : ['', ''], - 'strikethrough' : ['', ''], - //text colors - //grayscale - 'white' : ['', ''], - 'grey' : ['', ''], - 'black' : ['', ''], - //colors - 'blue' : ['', ''], - 'cyan' : ['', ''], - 'green' : ['', ''], - 'magenta' : ['', ''], - 'red' : ['', ''], - 'yellow' : ['', ''], - //background colors - //grayscale - 'whiteBG' : ['', ''], - 'greyBG' : ['', ''], - 'blackBG' : ['', ''], - //colors - 'blueBG' : ['', ''], - 'cyanBG' : ['', ''], - 'greenBG' : ['', ''], - 'magentaBG' : ['', ''], - 'redBG' : ['', ''], - 'yellowBG' : ['', ''] - }; - } else if (exports.mode === 'none') { - return str + ''; - } else { - console.log('unsupported mode, try "browser", "console" or "none"'); - } - return styles[style][0] + str + styles[style][1]; -} - -function applyTheme(theme) { - - // - // Remark: This is a list of methods that exist - // on String that you should not overwrite. - // - var stringPrototypeBlacklist = [ - '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', - 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', - 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', - 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight' - ]; - - Object.keys(theme).forEach(function (prop) { - if (stringPrototypeBlacklist.indexOf(prop) !== -1) { - console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name'); - } - else { - if (typeof(theme[prop]) === 'string') { - addProperty(prop, function () { - return exports[theme[prop]](this); - }); - } - else { - addProperty(prop, function () { - var ret = this; - for (var t = 0; t < theme[prop].length; t++) { - ret = exports[theme[prop][t]](ret); - } - return ret; - }); - } - } - }); -} - - -// -// Iterate through all default styles and colors -// -var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG']; -x.forEach(function (style) { - - // __defineGetter__ at the least works in more browsers - // http://robertnyman.com/javascript/javascript-getters-setters.html - // Object.defineProperty only works in Chrome - addProperty(style, function () { - return stylize(this, style); - }); -}); - -function sequencer(map) { - return function () { - if (!isHeadless) { - return this.replace(/( )/, '$1'); - } - var exploded = this.split(""), i = 0; - exploded = exploded.map(map); - return exploded.join(""); - }; -} - -var rainbowMap = (function () { - var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV - return function (letter, i, exploded) { - if (letter === " ") { - return letter; - } else { - return stylize(letter, rainbowColors[i++ % rainbowColors.length]); - } - }; -})(); - -exports.themes = {}; - -exports.addSequencer = function (name, map) { - addProperty(name, sequencer(map)); -}; - -exports.addSequencer('rainbow', rainbowMap); -exports.addSequencer('zebra', function (letter, i, exploded) { - return i % 2 === 0 ? letter : letter.inverse; -}); - -exports.setTheme = function (theme) { - if (typeof theme === 'string') { - try { - exports.themes[theme] = require(theme); - applyTheme(exports.themes[theme]); - return exports.themes[theme]; - } catch (err) { - console.log(err); - return err; - } - } else { - applyTheme(theme); - } -}; - - -addProperty('stripColors', function () { - return ("" + this).replace(/\x1B\[\d+m/g, ''); -}); - -// please no -function zalgo(text, options) { - var soul = { - "up" : [ - '̍', '̎', '̄', '̅', - '̿', '̑', '̆', '̐', - '͒', '͗', '͑', '̇', - '̈', '̊', '͂', '̓', - '̈', '͊', '͋', '͌', - '̃', '̂', '̌', '͐', - '̀', '́', '̋', '̏', - '̒', '̓', '̔', '̽', - '̉', 'ͣ', 'ͤ', 'ͥ', - 'ͦ', 'ͧ', 'ͨ', 'ͩ', - 'ͪ', 'ͫ', 'ͬ', 'ͭ', - 'ͮ', 'ͯ', '̾', '͛', - '͆', '̚' - ], - "down" : [ - '̖', '̗', '̘', '̙', - '̜', '̝', '̞', '̟', - '̠', '̤', '̥', '̦', - '̩', '̪', '̫', '̬', - '̭', '̮', '̯', '̰', - '̱', '̲', '̳', '̹', - '̺', '̻', '̼', 'ͅ', - '͇', '͈', '͉', '͍', - '͎', '͓', '͔', '͕', - '͖', '͙', '͚', '̣' - ], - "mid" : [ - '̕', '̛', '̀', '́', - '͘', '̡', '̢', '̧', - '̨', '̴', '̵', '̶', - '͜', '͝', '͞', - '͟', '͠', '͢', '̸', - '̷', '͡', ' ҉' - ] - }, - all = [].concat(soul.up, soul.down, soul.mid), - zalgo = {}; - - function randomNumber(range) { - var r = Math.floor(Math.random() * range); - return r; - } - - function is_char(character) { - var bool = false; - all.filter(function (i) { - bool = (i === character); - }); - return bool; - } - - function heComes(text, options) { - var result = '', counts, l; - options = options || {}; - options["up"] = options["up"] || true; - options["mid"] = options["mid"] || true; - options["down"] = options["down"] || true; - options["size"] = options["size"] || "maxi"; - text = text.split(''); - for (l in text) { - if (is_char(l)) { - continue; - } - result = result + text[l]; - counts = {"up" : 0, "down" : 0, "mid" : 0}; - switch (options.size) { - case 'mini': - counts.up = randomNumber(8); - counts.min = randomNumber(2); - counts.down = randomNumber(8); - break; - case 'maxi': - counts.up = randomNumber(16) + 3; - counts.min = randomNumber(4) + 1; - counts.down = randomNumber(64) + 3; - break; - default: - counts.up = randomNumber(8) + 1; - counts.mid = randomNumber(6) / 2; - counts.down = randomNumber(8) + 1; - break; - } - - var arr = ["up", "mid", "down"]; - for (var d in arr) { - var index = arr[d]; - for (var i = 0 ; i <= counts[index]; i++) { - if (options[index]) { - result = result + soul[index][randomNumber(soul[index].length)]; - } - } - } - } - return result; - } - return heComes(text); -} - - -// don't summon zalgo -addProperty('zalgo', function () { - return zalgo(this); -}); diff --git a/node_modules/colors/example.html b/node_modules/colors/example.html deleted file mode 100644 index 7a2ae60..0000000 --- a/node_modules/colors/example.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - Colors Example - - - - - - \ No newline at end of file diff --git a/node_modules/colors/example.js b/node_modules/colors/example.js deleted file mode 100644 index b1e03a4..0000000 --- a/node_modules/colors/example.js +++ /dev/null @@ -1,77 +0,0 @@ -var colors = require('./colors'); - -//colors.mode = "browser"; - -var test = colors.red("hopefully colorless output"); -console.log('Rainbows are fun!'.rainbow); -console.log('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported -console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported -//console.log('zalgo time!'.zalgo); -console.log(test.stripColors); -console.log("a".grey + " b".black); -console.log("Zebras are so fun!".zebra); -console.log('background color attack!'.black.whiteBG) - -// -// Remark: .strikethrough may not work with Mac OS Terminal App -// -console.log("This is " + "not".strikethrough + " fun."); -console.log(colors.rainbow('Rainbows are fun!')); -console.log(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported -console.log(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported -//console.log(colors.zalgo('zalgo time!')); -console.log(colors.stripColors(test)); -console.log(colors.grey("a") + colors.black(" b")); - -colors.addSequencer("america", function(letter, i, exploded) { - if(letter === " ") return letter; - switch(i%3) { - case 0: return letter.red; - case 1: return letter.white; - case 2: return letter.blue; - } -}); - -colors.addSequencer("random", (function() { - var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; - - return function(letter, i, exploded) { - return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]]; - }; -})()); - -console.log("AMERICA! F--K YEAH!".america); -console.log("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random); - -// -// Custom themes -// - -// Load theme with JSON literal -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log("this is an error".error); - -// outputs yellow text -console.log("this is a warning".warn); - -// outputs grey text -console.log("this is an input".input); - -// Load a theme from file -colors.setTheme('./themes/winston-dark.js'); - -console.log("this is an input".input); - diff --git a/node_modules/colors/examples/normal-usage.js b/node_modules/colors/examples/normal-usage.js new file mode 100644 index 0000000..2818741 --- /dev/null +++ b/node_modules/colors/examples/normal-usage.js @@ -0,0 +1,74 @@ +var colors = require('../lib/index'); + +console.log("First some yellow text".yellow); + +console.log("Underline that text".yellow.underline); + +console.log("Make it bold and red".red.bold); + +console.log(("Double Raindows All Day Long").rainbow) + +console.log("Drop the bass".trap) + +console.log("DROP THE RAINBOW BASS".trap.rainbow) + + +console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported + +console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse + ' styles! '.yellow.bold); // styles not widely supported +console.log("Zebras are so fun!".zebra); + +// +// Remark: .strikethrough may not work with Mac OS Terminal App +// +console.log("This is " + "not".strikethrough + " fun."); + +console.log('Background color attack!'.black.bgWhite) +console.log('Use random styles on everything!'.random) +console.log('America, Heck Yeah!'.america) + + +console.log('Setting themes is useful') + +// +// Custom themes +// +console.log('Generic logging theme as JSON'.green.bold.underline); +// Load theme with JSON literal +colors.setTheme({ + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}); + +// outputs red text +console.log("this is an error".error); + +// outputs yellow text +console.log("this is a warning".warn); + +// outputs grey text +console.log("this is an input".input); + +console.log('Generic logging theme as file'.green.bold.underline); + +// Load a theme from file +colors.setTheme(__dirname + '/../themes/generic-logging.js'); + +// outputs red text +console.log("this is an error".error); + +// outputs yellow text +console.log("this is a warning".warn); + +// outputs grey text +console.log("this is an input".input); + +//console.log("Don't summon".zalgo) \ No newline at end of file diff --git a/node_modules/colors/examples/safe-string.js b/node_modules/colors/examples/safe-string.js new file mode 100644 index 0000000..111b363 --- /dev/null +++ b/node_modules/colors/examples/safe-string.js @@ -0,0 +1,76 @@ +var colors = require('../safe'); + +console.log(colors.yellow("First some yellow text")); + +console.log(colors.yellow.underline("Underline that text")); + +console.log(colors.red.bold("Make it bold and red")); + +console.log(colors.rainbow("Double Raindows All Day Long")) + +console.log(colors.trap("Drop the bass")) + +console.log(colors.rainbow(colors.trap("DROP THE RAINBOW BASS"))); + +console.log(colors.bold.italic.underline.red('Chains are also cool.')); // styles not widely supported + + +console.log(colors.green('So ') + colors.underline('are') + ' ' + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); // styles not widely supported + +console.log(colors.zebra("Zebras are so fun!")); + +console.log("This is " + colors.strikethrough("not") + " fun."); + + +console.log(colors.black.bgWhite('Background color attack!')); +console.log(colors.random('Use random styles on everything!')) +console.log(colors.america('America, Heck Yeah!')); + +console.log('Setting themes is useful') + +// +// Custom themes +// +//console.log('Generic logging theme as JSON'.green.bold.underline); +// Load theme with JSON literal +colors.setTheme({ + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}); + +// outputs red text +console.log(colors.error("this is an error")); + +// outputs yellow text +console.log(colors.warn("this is a warning")); + +// outputs grey text +console.log(colors.input("this is an input")); + + +// console.log('Generic logging theme as file'.green.bold.underline); + +// Load a theme from file +colors.setTheme(__dirname + '/../themes/generic-logging.js'); + +// outputs red text +console.log(colors.error("this is an error")); + +// outputs yellow text +console.log(colors.warn("this is a warning")); + +// outputs grey text +console.log(colors.input("this is an input")); + +// console.log(colors.zalgo("Don't summon him")) + + + diff --git a/node_modules/colors/lib/colors.js b/node_modules/colors/lib/colors.js new file mode 100644 index 0000000..59898de --- /dev/null +++ b/node_modules/colors/lib/colors.js @@ -0,0 +1,176 @@ +/* + +The MIT License (MIT) + +Original Library + - Copyright (c) Marak Squires + +Additional functionality + - Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +var colors = {}; +module['exports'] = colors; + +colors.themes = {}; + +var ansiStyles = colors.styles = require('./styles'); +var defineProps = Object.defineProperties; + +colors.supportsColor = require('./system/supports-colors'); + +if (typeof colors.enabled === "undefined") { + colors.enabled = colors.supportsColor; +} + +colors.stripColors = colors.strip = function(str){ + return ("" + str).replace(/\x1B\[\d+m/g, ''); +}; + + +var stylize = colors.stylize = function stylize (str, style) { + return ansiStyles[style].open + str + ansiStyles[style].close; +} + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; +var escapeStringRegexp = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + return str.replace(matchOperatorsRe, '\\$&'); +} + +function build(_styles) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + builder._styles = _styles; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + builder.__proto__ = proto; + return builder; +} + +var styles = (function () { + var ret = {}; + ansiStyles.grey = ansiStyles.gray; + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + ret[key] = { + get: function () { + return build(this._styles.concat(key)); + } + }; + }); + return ret; +})(); + +var proto = defineProps(function colors() {}, styles); + +function applyStyle() { + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + if (argsLen > 1) { + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!colors.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + + var i = nestedStyles.length; + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + return str; +} + +function applyTheme (theme) { + for (var style in theme) { + (function(style){ + colors[style] = function(str){ + return colors[theme[style]](str); + }; + })(style) + } +} + +colors.setTheme = function (theme) { + if (typeof theme === 'string') { + try { + colors.themes[theme] = require(theme); + applyTheme(colors.themes[theme]); + return colors.themes[theme]; + } catch (err) { + console.log(err); + return err; + } + } else { + applyTheme(theme); + } +}; + +function init() { + var ret = {}; + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build([name]); + } + }; + }); + return ret; +} + +var sequencer = function sequencer (map, str) { + var exploded = str.split(""), i = 0; + exploded = exploded.map(map); + return exploded.join(""); +}; + +// custom formatter methods +colors.trap = require('./custom/trap'); +colors.zalgo = require('./custom/zalgo'); + +// maps +colors.maps = {}; +colors.maps.america = require('./maps/america'); +colors.maps.zebra = require('./maps/zebra'); +colors.maps.rainbow = require('./maps/rainbow'); +colors.maps.random = require('./maps/random') + +for (var map in colors.maps) { + (function(map){ + colors[map] = function (str) { + return sequencer(colors.maps[map], str); + } + })(map) +} + +defineProps(colors, init()); \ No newline at end of file diff --git a/node_modules/colors/lib/custom/trap.js b/node_modules/colors/lib/custom/trap.js new file mode 100644 index 0000000..3f09143 --- /dev/null +++ b/node_modules/colors/lib/custom/trap.js @@ -0,0 +1,45 @@ +module['exports'] = function runTheTrap (text, options) { + var result = ""; + text = text || "Run the trap, drop the bass"; + text = text.split(''); + var trap = { + a: ["\u0040", "\u0104", "\u023a", "\u0245", "\u0394", "\u039b", "\u0414"], + b: ["\u00df", "\u0181", "\u0243", "\u026e", "\u03b2", "\u0e3f"], + c: ["\u00a9", "\u023b", "\u03fe"], + d: ["\u00d0", "\u018a", "\u0500" , "\u0501" ,"\u0502", "\u0503"], + e: ["\u00cb", "\u0115", "\u018e", "\u0258", "\u03a3", "\u03be", "\u04bc", "\u0a6c"], + f: ["\u04fa"], + g: ["\u0262"], + h: ["\u0126", "\u0195", "\u04a2", "\u04ba", "\u04c7", "\u050a"], + i: ["\u0f0f"], + j: ["\u0134"], + k: ["\u0138", "\u04a0", "\u04c3", "\u051e"], + l: ["\u0139"], + m: ["\u028d", "\u04cd", "\u04ce", "\u0520", "\u0521", "\u0d69"], + n: ["\u00d1", "\u014b", "\u019d", "\u0376", "\u03a0", "\u048a"], + o: ["\u00d8", "\u00f5", "\u00f8", "\u01fe", "\u0298", "\u047a", "\u05dd", "\u06dd", "\u0e4f"], + p: ["\u01f7", "\u048e"], + q: ["\u09cd"], + r: ["\u00ae", "\u01a6", "\u0210", "\u024c", "\u0280", "\u042f"], + s: ["\u00a7", "\u03de", "\u03df", "\u03e8"], + t: ["\u0141", "\u0166", "\u0373"], + u: ["\u01b1", "\u054d"], + v: ["\u05d8"], + w: ["\u0428", "\u0460", "\u047c", "\u0d70"], + x: ["\u04b2", "\u04fe", "\u04fc", "\u04fd"], + y: ["\u00a5", "\u04b0", "\u04cb"], + z: ["\u01b5", "\u0240"] + } + text.forEach(function(c){ + c = c.toLowerCase(); + var chars = trap[c] || [" "]; + var rand = Math.floor(Math.random() * chars.length); + if (typeof trap[c] !== "undefined") { + result += trap[c][rand]; + } else { + result += c; + } + }); + return result; + +} diff --git a/node_modules/colors/lib/custom/zalgo.js b/node_modules/colors/lib/custom/zalgo.js new file mode 100644 index 0000000..4dc20c8 --- /dev/null +++ b/node_modules/colors/lib/custom/zalgo.js @@ -0,0 +1,104 @@ +// please no +module['exports'] = function zalgo(text, options) { + text = text || " he is here "; + var soul = { + "up" : [ + '̍', '̎', '̄', '̅', + '̿', '̑', '̆', '̐', + '͒', '͗', '͑', '̇', + '̈', '̊', '͂', '̓', + '̈', '͊', '͋', '͌', + '̃', '̂', '̌', '͐', + '̀', '́', '̋', '̏', + '̒', '̓', '̔', '̽', + '̉', 'ͣ', 'ͤ', 'ͥ', + 'ͦ', 'ͧ', 'ͨ', 'ͩ', + 'ͪ', 'ͫ', 'ͬ', 'ͭ', + 'ͮ', 'ͯ', '̾', '͛', + '͆', '̚' + ], + "down" : [ + '̖', '̗', '̘', '̙', + '̜', '̝', '̞', '̟', + '̠', '̤', '̥', '̦', + '̩', '̪', '̫', '̬', + '̭', '̮', '̯', '̰', + '̱', '̲', '̳', '̹', + '̺', '̻', '̼', 'ͅ', + '͇', '͈', '͉', '͍', + '͎', '͓', '͔', '͕', + '͖', '͙', '͚', '̣' + ], + "mid" : [ + '̕', '̛', '̀', '́', + '͘', '̡', '̢', '̧', + '̨', '̴', '̵', '̶', + '͜', '͝', '͞', + '͟', '͠', '͢', '̸', + '̷', '͡', ' ҉' + ] + }, + all = [].concat(soul.up, soul.down, soul.mid), + zalgo = {}; + + function randomNumber(range) { + var r = Math.floor(Math.random() * range); + return r; + } + + function is_char(character) { + var bool = false; + all.filter(function (i) { + bool = (i === character); + }); + return bool; + } + + + function heComes(text, options) { + var result = '', counts, l; + options = options || {}; + options["up"] = options["up"] || true; + options["mid"] = options["mid"] || true; + options["down"] = options["down"] || true; + options["size"] = options["size"] || "maxi"; + text = text.split(''); + for (l in text) { + if (is_char(l)) { + continue; + } + result = result + text[l]; + counts = {"up" : 0, "down" : 0, "mid" : 0}; + switch (options.size) { + case 'mini': + counts.up = randomNumber(8); + counts.min = randomNumber(2); + counts.down = randomNumber(8); + break; + case 'maxi': + counts.up = randomNumber(16) + 3; + counts.min = randomNumber(4) + 1; + counts.down = randomNumber(64) + 3; + break; + default: + counts.up = randomNumber(8) + 1; + counts.mid = randomNumber(6) / 2; + counts.down = randomNumber(8) + 1; + break; + } + + var arr = ["up", "mid", "down"]; + for (var d in arr) { + var index = arr[d]; + for (var i = 0 ; i <= counts[index]; i++) { + if (options[index]) { + result = result + soul[index][randomNumber(soul[index].length)]; + } + } + } + } + return result; + } + // don't summon him + return heComes(text); +} diff --git a/node_modules/colors/lib/extendStringPrototype.js b/node_modules/colors/lib/extendStringPrototype.js new file mode 100644 index 0000000..b6b5b03 --- /dev/null +++ b/node_modules/colors/lib/extendStringPrototype.js @@ -0,0 +1,118 @@ +var colors = require('./colors'), + styles = require('./styles'); + +module['exports'] = function () { + + // + // Extends prototype of native string object to allow for "foo".red syntax + // + var addProperty = function (color, func) { + String.prototype.__defineGetter__(color, func); + }; + + var sequencer = function sequencer (map, str) { + return function () { + var exploded = this.split(""), i = 0; + exploded = exploded.map(map); + return exploded.join(""); + } + }; + + var stylize = function stylize (str, style) { + return styles[style].open + str + styles[style].close; + } + + addProperty('strip', function () { + return colors.strip(this); + }); + + addProperty('stripColors', function () { + return colors.strip(this); + }); + + addProperty("trap", function(){ + return colors.trap(this); + }); + + addProperty("zalgo", function(){ + return colors.zalgo(this); + }); + + addProperty("zebra", function(){ + return colors.zebra(this); + }); + + addProperty("rainbow", function(){ + return colors.rainbow(this); + }); + + addProperty("random", function(){ + return colors.random(this); + }); + + addProperty("america", function(){ + return colors.america(this); + }); + + // + // Iterate through all default styles and colors + // + var x = Object.keys(colors.styles); + x.forEach(function (style) { + addProperty(style, function () { + return stylize(this, style); + }); + }); + + function applyTheme(theme) { + // + // Remark: This is a list of methods that exist + // on String that you should not overwrite. + // + var stringPrototypeBlacklist = [ + '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', + 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', + 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', + 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight' + ]; + + Object.keys(theme).forEach(function (prop) { + if (stringPrototypeBlacklist.indexOf(prop) !== -1) { + console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name'); + } + else { + if (typeof(theme[prop]) === 'string') { + colors[prop] = colors[theme[prop]]; + addProperty(prop, function () { + return colors[theme[prop]](this); + }); + } + else { + addProperty(prop, function () { + var ret = this; + for (var t = 0; t < theme[prop].length; t++) { + ret = exports[theme[prop][t]](ret); + } + return ret; + }); + } + } + }); + } + + colors.setTheme = function (theme) { + if (typeof theme === 'string') { + try { + colors.themes[theme] = require(theme); + applyTheme(colors.themes[theme]); + return colors.themes[theme]; + } catch (err) { + console.log(err); + return err; + } + } else { + applyTheme(theme); + } + }; + +}; \ No newline at end of file diff --git a/node_modules/colors/lib/index.js b/node_modules/colors/lib/index.js new file mode 100644 index 0000000..96d2b84 --- /dev/null +++ b/node_modules/colors/lib/index.js @@ -0,0 +1,12 @@ +var colors = require('./colors'); +module['exports'] = colors; + +// Remark: By default, colors will add style properties to String.prototype +// +// If you don't wish to extend String.prototype you can do this instead and native String will not be touched +// +// var colors = require('colors/safe); +// colors.red("foo") +// +// +var extendStringPrototype = require('./extendStringPrototype')(); \ No newline at end of file diff --git a/node_modules/colors/lib/maps/america.js b/node_modules/colors/lib/maps/america.js new file mode 100644 index 0000000..a07d832 --- /dev/null +++ b/node_modules/colors/lib/maps/america.js @@ -0,0 +1,12 @@ +var colors = require('../colors'); + +module['exports'] = (function() { + return function (letter, i, exploded) { + if(letter === " ") return letter; + switch(i%3) { + case 0: return colors.red(letter); + case 1: return colors.white(letter) + case 2: return colors.blue(letter) + } + } +})(); \ No newline at end of file diff --git a/node_modules/colors/lib/maps/rainbow.js b/node_modules/colors/lib/maps/rainbow.js new file mode 100644 index 0000000..a7ce24e --- /dev/null +++ b/node_modules/colors/lib/maps/rainbow.js @@ -0,0 +1,13 @@ +var colors = require('../colors'); + +module['exports'] = (function () { + var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV + return function (letter, i, exploded) { + if (letter === " ") { + return letter; + } else { + return colors[rainbowColors[i++ % rainbowColors.length]](letter); + } + }; +})(); + diff --git a/node_modules/colors/lib/maps/random.js b/node_modules/colors/lib/maps/random.js new file mode 100644 index 0000000..5cd101f --- /dev/null +++ b/node_modules/colors/lib/maps/random.js @@ -0,0 +1,8 @@ +var colors = require('../colors'); + +module['exports'] = (function () { + var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; + return function(letter, i, exploded) { + return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter); + }; +})(); \ No newline at end of file diff --git a/node_modules/colors/lib/maps/zebra.js b/node_modules/colors/lib/maps/zebra.js new file mode 100644 index 0000000..bf7dcde --- /dev/null +++ b/node_modules/colors/lib/maps/zebra.js @@ -0,0 +1,5 @@ +var colors = require('../colors'); + +module['exports'] = function (letter, i, exploded) { + return i % 2 === 0 ? letter : colors.inverse(letter); +}; \ No newline at end of file diff --git a/node_modules/colors/lib/styles.js b/node_modules/colors/lib/styles.js new file mode 100644 index 0000000..067d590 --- /dev/null +++ b/node_modules/colors/lib/styles.js @@ -0,0 +1,77 @@ +/* +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +var styles = {}; +module['exports'] = styles; + +var codes = { + reset: [0, 0], + + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29], + + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + grey: [90, 39], + + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // legacy styles for colors pre v1.0.0 + blackBG: [40, 49], + redBG: [41, 49], + greenBG: [42, 49], + yellowBG: [43, 49], + blueBG: [44, 49], + magentaBG: [45, 49], + cyanBG: [46, 49], + whiteBG: [47, 49] + +}; + +Object.keys(codes).forEach(function (key) { + var val = codes[key]; + var style = styles[key] = []; + style.open = '\u001b[' + val[0] + 'm'; + style.close = '\u001b[' + val[1] + 'm'; +}); \ No newline at end of file diff --git a/node_modules/colors/lib/system/supports-colors.js b/node_modules/colors/lib/system/supports-colors.js new file mode 100644 index 0000000..3e008aa --- /dev/null +++ b/node_modules/colors/lib/system/supports-colors.js @@ -0,0 +1,61 @@ +/* +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +var argv = process.argv; + +module.exports = (function () { + if (argv.indexOf('--no-color') !== -1 || + argv.indexOf('--color=false') !== -1) { + return false; + } + + if (argv.indexOf('--color') !== -1 || + argv.indexOf('--color=true') !== -1 || + argv.indexOf('--color=always') !== -1) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); \ No newline at end of file diff --git a/node_modules/colors/package.json b/node_modules/colors/package.json index 03cd915..f38ef09 100644 --- a/node_modules/colors/package.json +++ b/node_modules/colors/package.json @@ -1,12 +1,14 @@ { "name": "colors", - "description": "get colors in your node.js console like what", - "version": "0.6.2", + "description": "get colors in your node.js console", + "version": "1.0.3", "author": { "name": "Marak Squires" }, "homepage": "https://github.com/Marak/colors.js", - "bugs": "https://github.com/Marak/colors.js/issues", + "bugs": { + "url": "https://github.com/Marak/colors.js/issues" + }, "keywords": [ "ansi", "terminal", @@ -16,12 +18,35 @@ "type": "git", "url": "http://github.com/Marak/colors.js.git" }, + "license": "MIT", + "scripts": { + "test": "node tests/basic-test.js && node tests/safe-test.js" + }, "engines": { "node": ">=0.1.90" }, - "main": "colors", - "readme": "# colors.js - get color and style in your node.js console ( and browser ) like what\n\n\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n- rainbow\n- zebra\n- random\n\n## Usage\n\n``` js\nvar colors = require('./colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n```\n\n# Creating Custom themes\n\n```js\n\nvar colors = require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n\n### Contributors \n\nMarak (Marak Squires)\nAlexis Sellier (cloudhead)\nmmalecki (Maciej Małecki)\nnicoreed (Nico Reed)\nmorganrallen (Morgan Allen)\nJustinCampbell (Justin Campbell)\nded (Dustin Diaz)\n\n\n#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)\n", - "readmeFilename": "ReadMe.md", - "_id": "colors@0.6.2", - "_from": "colors@" + "main": "./lib/index", + "gitHead": "e9e6557cc0fa26dba1a20b0d45e92de982f4047c", + "_id": "colors@1.0.3", + "_shasum": "0433f44d809680fdeb60ed260f1b0c262e82a40b", + "_from": "colors@1.0.3", + "_npmVersion": "2.0.2", + "_nodeVersion": "0.11.13", + "_npmUser": { + "name": "marak", + "email": "marak.squires@gmail.com" + }, + "maintainers": [ + { + "name": "marak", + "email": "marak.squires@gmail.com" + } + ], + "dist": { + "shasum": "0433f44d809680fdeb60ed260f1b0c262e82a40b", + "tarball": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/colors/safe.js b/node_modules/colors/safe.js new file mode 100644 index 0000000..a6a1f3a --- /dev/null +++ b/node_modules/colors/safe.js @@ -0,0 +1,9 @@ +// +// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype +// +// var colors = require('colors/safe); +// colors.red("foo") +// +// +var colors = require('./lib/colors'); +module['exports'] = colors; \ No newline at end of file diff --git a/node_modules/colors/screenshots/colors.png b/node_modules/colors/screenshots/colors.png new file mode 100644 index 0000000000000000000000000000000000000000..7200a623590c35e8b4a8e74a8df49a42998ca9c5 GIT binary patch literal 79787 zcmZ^~V{~RgurB<@wrx#p+nFS9oJ?%nwylXKnAo;$+qP|ebMT#e*1GHNU)@#pRPCx> ztM}^aXGbW=OCrGH!U6yQ1ZgQTB>(`F0{{Rih6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ough, '' + s + ''); -assert.equal(s.inverse, '' + s + ''); -assert.ok(s.rainbow); -stylesColors.forEach(function (color) { - assert.equal(s[color], h(s, color)); - assert.equal(colors[color](s), h(s, color)); -}); - -assert.equal(typeof("astring".red),'string'); -assert.equal(typeof("astring".error),'string'); - -colors.mode = 'none'; -stylesAll.forEach(function (style) { - assert.equal(s[style], s); - assert.equal(colors[style](s), s); -}); - -assert.equal(typeof("astring".red),'string'); -assert.equal(typeof("astring".error),'string'); diff --git a/node_modules/colors/tests/safe-test.js b/node_modules/colors/tests/safe-test.js new file mode 100644 index 0000000..daad4f9 --- /dev/null +++ b/node_modules/colors/tests/safe-test.js @@ -0,0 +1,45 @@ +var assert = require('assert'), + colors = require('../safe'); + +var s = 'string'; + +function a(s, code) { + return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m'; +} + +function aE(s, color, code) { + assert.equal(colors[color](s), a(s, code)); + assert.equal(colors.strip(s), s); +} + +function h(s, color) { + return '' + s + ''; +} + +var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow']; +var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']); + +colors.mode = 'console'; +assert.equal(colors.bold(s), '\x1B[1m' + s + '\x1B[22m'); +assert.equal(colors.italic(s), '\x1B[3m' + s + '\x1B[23m'); +assert.equal(colors.underline(s), '\x1B[4m' + s + '\x1B[24m'); +assert.equal(colors.strikethrough(s), '\x1B[9m' + s + '\x1B[29m'); +assert.equal(colors.inverse(s), '\x1B[7m' + s + '\x1B[27m'); + +assert.ok(colors.rainbow); + +aE(s, 'white', 37); +aE(s, 'grey', 90); +aE(s, 'black', 30); +aE(s, 'blue', 34); +aE(s, 'cyan', 36); +aE(s, 'green', 32); +aE(s, 'magenta', 35); +aE(s, 'red', 31); +aE(s, 'yellow', 33); + +assert.equal(s, 'string'); +colors.setTheme({error:'red'}); + +assert.equal(typeof(colors.red("astring")), 'string'); +assert.equal(typeof(colors.error("astring")), 'string'); \ No newline at end of file diff --git a/node_modules/colors/themes/winston-light.js b/node_modules/colors/themes/generic-logging.js similarity index 100% rename from node_modules/colors/themes/winston-light.js rename to node_modules/colors/themes/generic-logging.js diff --git a/node_modules/colors/themes/winston-dark.js b/node_modules/colors/themes/winston-dark.js deleted file mode 100644 index 49a905b..0000000 --- a/node_modules/colors/themes/winston-dark.js +++ /dev/null @@ -1,12 +0,0 @@ -module['exports'] = { - silly: 'rainbow', - input: 'black', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}; \ No newline at end of file diff --git a/package.json b/package.json index f3c1760..68c4390 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "dependencies": { "changelogplease": "1.1.1", - "colors": "0.6.2", + "colors": "1.0.3", "semver": "2.2.1", "shelljs": "0.2.6", "which": "1.0.5" From eaedcfe3a83e78799e7dc8d7f1ceb60339345ce8 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Wed, 28 Jan 2015 14:33:10 -0800 Subject: [PATCH 32/83] Repo: only abort major version bump if prevVersion is not provided --- lib/repo.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/repo.js b/lib/repo.js index 2da5c28..6dc5bce 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -172,8 +172,11 @@ Release.define({ patch = parseInt( parts[ 2 ], 10 ); if ( minor === 0 && patch === 0 ) { - Release.abort( - "This script is not smart enough to handle major release (eg. 2.0.0)." ); + Release.prevVersion = process.env.PREV_VERSION; + if ( !Release.prevVersion ) { + Release.abort( + "For major releases, set PREV_VERSION in the environment." ); + } } else if ( patch === 0 ) { Release.prevVersion = Release.exec( "git for-each-ref --count=1 --sort=-authordate --format='%(refname:short)' " + From 3efdd372f3844e658958e540592942d6570c57fa Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Wed, 28 Jan 2015 17:13:10 -0800 Subject: [PATCH 33/83] npm: add Release.dist for inserting more distribution work Close gh-69 --- README.md | 5 +++++ release.js | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index f80b3c2..56b25bd 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,11 @@ Executes the array of `methods` (minimum one element) step by step. For any give Once all methods are executed, the `done` callback is executed. +#### dist( callback ) + +This function is available in case the project requires more distribution than what is provided. +It is called after building, but before publishing to npm. + ### Other Properties #### isTest diff --git a/release.js b/release.js index a44c8aa..edb0fcc 100644 --- a/release.js +++ b/release.js @@ -61,6 +61,15 @@ commonTasks = [ } }, + function( fn ) { + if ( Release.dist ) { + Release._section( "additional custom distribution" ); + Release.dist( fn ); + } else { + fn(); + } + }, + function() { if ( Release.npmPublish ) { Release._section( "publishing to npm" )(); From a550abb68ef004bbea84c1b41db335dfc88ffd0e Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Thu, 29 Jan 2015 15:30:10 -0800 Subject: [PATCH 34/83] CDN: push jquery-compat files to same folder as jquery Close gh-70 --- lib/cdn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cdn.js b/lib/cdn.js index 4b789e8..953fd82 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -8,7 +8,7 @@ module.exports = function( Release ) { function projectCdn() { var npmPackage = Release.readPackage().name, jqueryCdn = Release._cloneCdnRepo() + "/cdn"; - if ( npmPackage === "jquery" ) { + if ( npmPackage === "jquery" || npmPackage === "jquery-compat" ) { return jqueryCdn; } if ( npmPackage === "qunitjs" ) { From 208bb05ef00517467efa148e797414c1ffed6b2e Mon Sep 17 00:00:00 2001 From: Joshua Appelman Date: Tue, 24 Feb 2015 17:25:48 +0100 Subject: [PATCH 35/83] Lib: Replace 'colors' package with 'chalk'. Fixes #72 Closes #74 --- lib/cdn.js | 7 +- lib/changelog.js | 5 +- lib/contributors.js | 5 +- lib/npm.js | 6 +- lib/prompt.js | 6 +- lib/repo.js | 27 +-- lib/util.js | 13 +- node_modules/chalk/index.js | 100 +++++++++ .../{colors/MIT-LICENSE.txt => chalk/license} | 8 +- node_modules/chalk/node_modules/.bin/has-ansi | 1 + .../chalk/node_modules/.bin/strip-ansi | 1 + .../chalk/node_modules/.bin/supports-color | 1 + .../chalk/node_modules/ansi-styles/index.js | 56 +++++ .../node_modules/ansi-styles/license} | 40 ---- .../node_modules/ansi-styles/package.json | 80 +++++++ .../chalk/node_modules/ansi-styles/readme.md | 86 ++++++++ .../escape-string-regexp/index.js | 11 + .../escape-string-regexp/license} | 56 ----- .../escape-string-regexp/package.json | 70 +++++++ .../escape-string-regexp/readme.md | 27 +++ .../chalk/node_modules/has-ansi/cli.js | 45 ++++ .../chalk/node_modules/has-ansi/index.js | 4 + .../chalk/node_modules/has-ansi/license | 21 ++ .../has-ansi/node_modules/ansi-regex/index.js | 4 + .../has-ansi/node_modules/ansi-regex/license | 21 ++ .../node_modules/ansi-regex/package.json | 86 ++++++++ .../node_modules/ansi-regex/readme.md | 33 +++ .../has-ansi/node_modules/get-stdin/index.js | 49 +++++ .../node_modules/get-stdin/package.json | 64 ++++++ .../has-ansi/node_modules/get-stdin/readme.md | 44 ++++ .../chalk/node_modules/has-ansi/package.json | 92 ++++++++ .../chalk/node_modules/has-ansi/readme.md | 45 ++++ .../chalk/node_modules/strip-ansi/cli.js | 47 +++++ .../chalk/node_modules/strip-ansi/index.js | 6 + .../node_modules/ansi-regex/index.js | 4 + .../node_modules/ansi-regex/license | 21 ++ .../node_modules/ansi-regex/package.json | 86 ++++++++ .../node_modules/ansi-regex/readme.md | 33 +++ .../node_modules/strip-ansi/package.json | 89 ++++++++ .../chalk/node_modules/strip-ansi/readme.md | 43 ++++ .../chalk/node_modules/supports-color/cli.js | 29 +++ .../node_modules/supports-color/index.js | 47 +++++ .../chalk/node_modules/supports-color/license | 21 ++ .../node_modules/supports-color/package.json | 85 ++++++++ .../node_modules/supports-color/readme.md | 46 ++++ node_modules/chalk/package.json | 83 ++++++++ node_modules/chalk/readme.md | 197 ++++++++++++++++++ node_modules/colors/.travis.yml | 6 - node_modules/colors/ReadMe.md | 167 --------------- node_modules/colors/examples/normal-usage.js | 74 ------- node_modules/colors/examples/safe-string.js | 76 ------- node_modules/colors/lib/colors.js | 176 ---------------- node_modules/colors/lib/custom/trap.js | 45 ---- node_modules/colors/lib/custom/zalgo.js | 104 --------- .../colors/lib/extendStringPrototype.js | 118 ----------- node_modules/colors/lib/index.js | 12 -- node_modules/colors/lib/maps/america.js | 12 -- node_modules/colors/lib/maps/rainbow.js | 13 -- node_modules/colors/lib/maps/random.js | 8 - node_modules/colors/lib/maps/zebra.js | 5 - node_modules/colors/package.json | 52 ----- node_modules/colors/safe.js | 9 - node_modules/colors/screenshots/colors.png | Bin 79787 -> 0 bytes node_modules/colors/tests/basic-test.js | 50 ----- node_modules/colors/tests/safe-test.js | 45 ---- node_modules/colors/themes/generic-logging.js | 12 -- package.json | 2 +- 67 files changed, 1820 insertions(+), 1117 deletions(-) create mode 100644 node_modules/chalk/index.js rename node_modules/{colors/MIT-LICENSE.txt => chalk/license} (86%) create mode 120000 node_modules/chalk/node_modules/.bin/has-ansi create mode 120000 node_modules/chalk/node_modules/.bin/strip-ansi create mode 120000 node_modules/chalk/node_modules/.bin/supports-color create mode 100644 node_modules/chalk/node_modules/ansi-styles/index.js rename node_modules/{colors/lib/system/supports-colors.js => chalk/node_modules/ansi-styles/license} (61%) create mode 100644 node_modules/chalk/node_modules/ansi-styles/package.json create mode 100644 node_modules/chalk/node_modules/ansi-styles/readme.md create mode 100644 node_modules/chalk/node_modules/escape-string-regexp/index.js rename node_modules/{colors/lib/styles.js => chalk/node_modules/escape-string-regexp/license} (53%) create mode 100644 node_modules/chalk/node_modules/escape-string-regexp/package.json create mode 100644 node_modules/chalk/node_modules/escape-string-regexp/readme.md create mode 100755 node_modules/chalk/node_modules/has-ansi/cli.js create mode 100644 node_modules/chalk/node_modules/has-ansi/index.js create mode 100644 node_modules/chalk/node_modules/has-ansi/license create mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js create mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license create mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json create mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md create mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js create mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json create mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md create mode 100644 node_modules/chalk/node_modules/has-ansi/package.json create mode 100644 node_modules/chalk/node_modules/has-ansi/readme.md create mode 100755 node_modules/chalk/node_modules/strip-ansi/cli.js create mode 100644 node_modules/chalk/node_modules/strip-ansi/index.js create mode 100644 node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js create mode 100644 node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license create mode 100644 node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json create mode 100644 node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md create mode 100644 node_modules/chalk/node_modules/strip-ansi/package.json create mode 100644 node_modules/chalk/node_modules/strip-ansi/readme.md create mode 100755 node_modules/chalk/node_modules/supports-color/cli.js create mode 100644 node_modules/chalk/node_modules/supports-color/index.js create mode 100644 node_modules/chalk/node_modules/supports-color/license create mode 100644 node_modules/chalk/node_modules/supports-color/package.json create mode 100644 node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/chalk/package.json create mode 100644 node_modules/chalk/readme.md delete mode 100644 node_modules/colors/.travis.yml delete mode 100644 node_modules/colors/ReadMe.md delete mode 100644 node_modules/colors/examples/normal-usage.js delete mode 100644 node_modules/colors/examples/safe-string.js delete mode 100644 node_modules/colors/lib/colors.js delete mode 100644 node_modules/colors/lib/custom/trap.js delete mode 100644 node_modules/colors/lib/custom/zalgo.js delete mode 100644 node_modules/colors/lib/extendStringPrototype.js delete mode 100644 node_modules/colors/lib/index.js delete mode 100644 node_modules/colors/lib/maps/america.js delete mode 100644 node_modules/colors/lib/maps/rainbow.js delete mode 100644 node_modules/colors/lib/maps/random.js delete mode 100644 node_modules/colors/lib/maps/zebra.js delete mode 100644 node_modules/colors/package.json delete mode 100644 node_modules/colors/safe.js delete mode 100644 node_modules/colors/screenshots/colors.png delete mode 100644 node_modules/colors/tests/basic-test.js delete mode 100644 node_modules/colors/tests/safe-test.js delete mode 100644 node_modules/colors/themes/generic-logging.js diff --git a/lib/cdn.js b/lib/cdn.js index 953fd82..dff30f5 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -1,5 +1,6 @@ var shell = require( "shelljs" ), - fs = require( "fs" ); + fs = require( "fs" ), + chalk = require( "chalk" ); module.exports = function( Release ) { var realRemote = "git@github.com:jquery/codeorigin.jquery.com.git", @@ -31,7 +32,7 @@ module.exports = function( Release ) { return local; } - console.log( "Cloning " + remote.cyan + "..." ); + console.log( "Cloning " + chalk.cyan( remote ) + "..." ); Release.chdir( Release.dir.base ); Release.exec( "git clone " + remote + " " + local, "Error cloning CDN repo." ); console.log(); @@ -46,7 +47,7 @@ module.exports = function( Release ) { commitMessage = npmPackage + ": Added version " + Release.newVersion; Release.chdir( Release.dir.base ); - console.log( "Copying files from " + releaseCdn.cyan + " to " + targetCdn.cyan + "." ); + console.log( "Copying files from " + chalk.cyan( releaseCdn ) + " to " + chalk.cyan( targetCdn ) + "." ); shell.mkdir( "-p", targetCdn ); shell.cp( "-r", releaseCdn + "/*", targetCdn ); diff --git a/lib/changelog.js b/lib/changelog.js index cd1dba3..6847359 100644 --- a/lib/changelog.js +++ b/lib/changelog.js @@ -1,5 +1,6 @@ var fs = require( "fs" ), - changelogplease = require( "changelogplease" ); + changelogplease = require( "changelogplease" ), + chalk = require( "chalk" ); module.exports = function( Release ) { @@ -12,7 +13,7 @@ Release.define({ Release._generateIssueChangelog(); fs.writeFileSync( changelogPath, changelog ); - console.log( "Stored changelog in " + changelogPath.cyan + "." ); + console.log( "Stored changelog in " + chalk.cyan( changelogPath ) + "." ); callback(); }); }, diff --git a/lib/contributors.js b/lib/contributors.js index e0b18dd..ab7cf59 100644 --- a/lib/contributors.js +++ b/lib/contributors.js @@ -1,4 +1,5 @@ -var fs = require( "fs" ); +var fs = require( "fs" ), + chalk = require( "chalk" ); module.exports = function( Release ) { @@ -34,7 +35,7 @@ Release.define({ })); fs.writeFileSync( contributorsPath, contributors.join( "\n" ) ); - console.log( "Stored contributors in " + contributorsPath.cyan + "." ); + console.log( "Stored contributors in " + chalk.cyan( contributorsPath ) + "." ); }, _gatherIssueContributors: function() { diff --git a/lib/npm.js b/lib/npm.js index b35940c..4a561d3 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -1,3 +1,5 @@ +var chalk = require( "chalk" ); + module.exports = function( Release ) { Release.define({ _getNpmUser: function() { @@ -65,14 +67,14 @@ module.exports = function( Release ) { console.log( "Publishing to npm, running:" ); } - console.log( " " + npmCommand.cyan ); + console.log( " " + chalk.cyan( npmCommand ) ); if ( !Release.isTest ) { Release.exec( npmCommand ); } while ( npmTags.length ) { npmCommand = "npm tag " + name + "@" + Release.newVersion + " " + npmTags.pop(); - console.log( " " + npmCommand.cyan ); + console.log( " " + chalk.cyan( npmCommand ) ); if ( !Release.isTest ) { Release.exec( npmCommand ); } diff --git a/lib/prompt.js b/lib/prompt.js index 5f94a2d..825211e 100644 --- a/lib/prompt.js +++ b/lib/prompt.js @@ -1,3 +1,5 @@ +var chalk = require( "chalk" ); + module.exports = function( Release ) { Release.define({ @@ -10,12 +12,12 @@ Release.define({ }, confirm: function( fn ) { - console.log( "Press enter to continue, or ctrl+c to cancel.".yellow ); + console.log( chalk.yellow( "Press enter to continue, or ctrl+c to cancel." ) ); Release.prompt( fn ); }, confirmReview: function( fn ) { - console.log( "Please review the output and generated files as a sanity check.".yellow ); + console.log( chalk.yellow( "Please review the output and generated files as a sanity check." ) ); Release.confirm( fn ); } }); diff --git a/lib/repo.js b/lib/repo.js index 6dc5bce..6787bc7 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -1,4 +1,5 @@ -var fs = require( "fs" ); +var fs = require( "fs" ), + chalk = require( "chalk" ); module.exports = function( Release ) { @@ -8,12 +9,12 @@ Release.define({ var projectRelease, releaseDependencies; Release.chdir( Release.dir.base ); - console.log( "Cloning " + Release.remote.cyan + "..." ); + console.log( "Cloning " + chalk.cyan( Release.remote ) + "..." ); Release.exec( "git clone " + Release.remote + " " + Release.dir.repo, "Error cloning repo." ); Release.chdir( Release.dir.repo ); - console.log( "Checking out " + Release.branch.cyan + " branch..." ); + console.log( "Checking out " + chalk.cyan( Release.branch ) + " branch..." ); Release.exec( "git checkout " + Release.branch, "Error checking out branch." ); console.log(); @@ -73,12 +74,12 @@ Release.define({ lastActualAuthor = result.split( /\r?\n/ ).splice( -4, 1 )[ 0 ]; if ( lastListedAuthor !== lastActualAuthor ) { - console.log( "Last listed author is " + lastListedAuthor.red + "." ); - console.log( "Last actual author is " + lastActualAuthor.green + "." ); + console.log( "Last listed author is " + chalk.red( lastListedAuthor ) + "." ); + console.log( "Last actual author is " + chalk.green( lastActualAuthor ) + "." ); Release.abort( "Please update AUTHORS.txt." ); } - console.log( "Last listed author (" + lastListedAuthor.cyan + ") is correct." ); + console.log( "Last listed author (" + chalk.cyan( lastListedAuthor ) + ") is correct." ); }, checkRepoState: function() {}, @@ -158,7 +159,7 @@ Release.define({ console.log( "Validating current version..." ); if ( currentVersion.substr( -4, 4 ) !== "-pre" ) { - console.log( "The current version is " + currentVersion.red + "." ); + console.log( "The current version is " + chalk.red( currentVersion ) + "." ); Release.abort( "The version must be a pre version, e.g., 1.2.3-pre." ); } @@ -190,16 +191,16 @@ Release.define({ currentVersion : [ major, minor, patch + 1 ].join( "." ) + "-pre"; - console.log( "We are going from " + Release.prevVersion.cyan + - " to " + Release.newVersion.cyan + "." ); - console.log( "After the release, the version will be " + Release.nextVersion.cyan + "." ); + console.log( "We are going from " + chalk.cyan( Release.prevVersion ) + + " to " + chalk.cyan( Release.newVersion ) + "." ); + console.log( "After the release, the version will be " + chalk.cyan( Release.nextVersion ) + "." ); }, _createReleaseBranch: function( fn ) { var json; Release.chdir( Release.dir.repo ); - console.log( "Creating " + "release".cyan + " branch..." ); + console.log( "Creating " + chalk.cyan( "release" ) + " branch..." ); Release.exec( "git checkout -b release", "Error creating release branch." ); console.log(); @@ -257,7 +258,7 @@ Release.define({ _updateBranchVersion: function() { Release.chdir( Release.dir.repo ); - console.log( "Checking out " + Release.branch.cyan + " branch..." ); + console.log( "Checking out " + chalk.cyan( Release.branch ) + " branch..." ); Release.exec( "git checkout " + Release.branch, "Error checking out " + Release.branch + " branch." ); @@ -272,7 +273,7 @@ Release.define({ _pushBranch: function() { Release.chdir( Release.dir.repo ); - console.log( "Pushing " + Release.branch.cyan + " to GitHub..." ); + console.log( "Pushing " + chalk.cyan( Release.branch ) + " to GitHub..." ); Release.exec( "git push", "Error pushing to GitHub." ); } }); diff --git a/lib/util.js b/lib/util.js index c4415a1..249ae3c 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,6 +1,5 @@ -var shell = require( "shelljs" ); - -require( "colors" ); +var shell = require( "shelljs" ), + chalk = require( "chalk" ); module.exports = function( Release ) { @@ -25,7 +24,7 @@ Release.define({ }, chdir: function( directory ) { - console.log( "Changing working directory to " + directory.cyan + "." ); + console.log( "Changing working directory to " + chalk.cyan( directory ) + "." ); process.chdir( directory ); }, @@ -35,8 +34,8 @@ Release.define({ Error.captureStackTrace( error, Release.abort ); } - console.log( msg.red ); - console.log( "Aborting.".red ); + console.log( chalk.red( msg ) ); + console.log( chalk.red( "Aborting." ) ); console.log(); console.log( error.stack ); @@ -47,7 +46,7 @@ Release.define({ return function() { console.log(); console.log( "##" ); - console.log( "## " + name.toUpperCase().magenta ); + console.log( "## " + chalk.magenta( name.toUpperCase() ) ); console.log( "##" ); console.log(); }; diff --git a/node_modules/chalk/index.js b/node_modules/chalk/index.js new file mode 100644 index 0000000..4138a64 --- /dev/null +++ b/node_modules/chalk/index.js @@ -0,0 +1,100 @@ +'use strict'; +var escapeStringRegexp = require('escape-string-regexp'); +var ansiStyles = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasAnsi = require('has-ansi'); +var supportsColor = require('supports-color'); +var defineProps = Object.defineProperties; + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (process.platform === 'win32') { + ansiStyles.blue.open = '\u001b[94m'; +} + +function build(_styles) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + builder.__proto__ = proto; + return builder; +} + +var styles = (function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + /*jshint validthis: true */ + var nestedStyles = this._styles; + + var i = nestedStyles.length; + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; diff --git a/node_modules/colors/MIT-LICENSE.txt b/node_modules/chalk/license similarity index 86% rename from node_modules/colors/MIT-LICENSE.txt rename to node_modules/chalk/license index 3de4e33..654d0bf 100644 --- a/node_modules/colors/MIT-LICENSE.txt +++ b/node_modules/chalk/license @@ -1,8 +1,6 @@ -Original Library - - Copyright (c) Marak Squires +The MIT License (MIT) -Additional Functionality - - Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/.bin/has-ansi b/node_modules/chalk/node_modules/.bin/has-ansi new file mode 120000 index 0000000..c1e7413 --- /dev/null +++ b/node_modules/chalk/node_modules/.bin/has-ansi @@ -0,0 +1 @@ +../has-ansi/cli.js \ No newline at end of file diff --git a/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/chalk/node_modules/.bin/strip-ansi new file mode 120000 index 0000000..b65c9f8 --- /dev/null +++ b/node_modules/chalk/node_modules/.bin/strip-ansi @@ -0,0 +1 @@ +../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/chalk/node_modules/.bin/supports-color b/node_modules/chalk/node_modules/.bin/supports-color new file mode 120000 index 0000000..af0f05e --- /dev/null +++ b/node_modules/chalk/node_modules/.bin/supports-color @@ -0,0 +1 @@ +../supports-color/cli.js \ No newline at end of file diff --git a/node_modules/chalk/node_modules/ansi-styles/index.js b/node_modules/chalk/node_modules/ansi-styles/index.js new file mode 100644 index 0000000..caf9e11 --- /dev/null +++ b/node_modules/chalk/node_modules/ansi-styles/index.js @@ -0,0 +1,56 @@ +'use strict'; + +var styles = module.exports = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } +}; + +// fix humans +styles.colors.grey = styles.colors.gray; + +Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); +}); diff --git a/node_modules/colors/lib/system/supports-colors.js b/node_modules/chalk/node_modules/ansi-styles/license similarity index 61% rename from node_modules/colors/lib/system/supports-colors.js rename to node_modules/chalk/node_modules/ansi-styles/license index 3e008aa..654d0bf 100644 --- a/node_modules/colors/lib/system/supports-colors.js +++ b/node_modules/chalk/node_modules/ansi-styles/license @@ -1,4 +1,3 @@ -/* The MIT License (MIT) Copyright (c) Sindre Sorhus (sindresorhus.com) @@ -20,42 +19,3 @@ 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. - -*/ - -var argv = process.argv; - -module.exports = (function () { - if (argv.indexOf('--no-color') !== -1 || - argv.indexOf('--color=false') !== -1) { - return false; - } - - if (argv.indexOf('--color') !== -1 || - argv.indexOf('--color=true') !== -1 || - argv.indexOf('--color=always') !== -1) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -})(); \ No newline at end of file diff --git a/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/chalk/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..e670f25 --- /dev/null +++ b/node_modules/chalk/node_modules/ansi-styles/package.json @@ -0,0 +1,80 @@ +{ + "name": "ansi-styles", + "version": "2.0.1", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/ansi-styles" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "mocha": "*" + }, + "gitHead": "da6541334e1681cb803f891fab8abf4313cc4bc1", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-styles/issues" + }, + "homepage": "https://github.com/sindresorhus/ansi-styles", + "_id": "ansi-styles@2.0.1", + "_shasum": "b033f57f93e2d28adeb8bc11138fa13da0fd20a3", + "_from": "ansi-styles@>=2.0.1 <3.0.0", + "_npmVersion": "2.1.16", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + }, + "dist": { + "shasum": "b033f57f93e2d28adeb8bc11138fa13da0fd20a3", + "tarball": "http://registry.npmjs.org/ansi-styles/-/ansi-styles-2.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/chalk/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000..89ec6a7 --- /dev/null +++ b/node_modules/chalk/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/sindresorhus/ansi-styles.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +```sh +$ npm install --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/escape-string-regexp/index.js b/node_modules/chalk/node_modules/escape-string-regexp/index.js new file mode 100644 index 0000000..ac6572c --- /dev/null +++ b/node_modules/chalk/node_modules/escape-string-regexp/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; diff --git a/node_modules/colors/lib/styles.js b/node_modules/chalk/node_modules/escape-string-regexp/license similarity index 53% rename from node_modules/colors/lib/styles.js rename to node_modules/chalk/node_modules/escape-string-regexp/license index 067d590..654d0bf 100644 --- a/node_modules/colors/lib/styles.js +++ b/node_modules/chalk/node_modules/escape-string-regexp/license @@ -1,4 +1,3 @@ -/* The MIT License (MIT) Copyright (c) Sindre Sorhus (sindresorhus.com) @@ -20,58 +19,3 @@ 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. - -*/ - -var styles = {}; -module['exports'] = styles; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - grey: [90, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // legacy styles for colors pre v1.0.0 - blackBG: [40, 49], - redBG: [41, 49], - greenBG: [42, 49], - yellowBG: [43, 49], - blueBG: [44, 49], - magentaBG: [45, 49], - cyanBG: [46, 49], - whiteBG: [47, 49] - -}; - -Object.keys(codes).forEach(function (key) { - var val = codes[key]; - var style = styles[key] = []; - style.open = '\u001b[' + val[0] + 'm'; - style.close = '\u001b[' + val[1] + 'm'; -}); \ No newline at end of file diff --git a/node_modules/chalk/node_modules/escape-string-regexp/package.json b/node_modules/chalk/node_modules/escape-string-regexp/package.json new file mode 100644 index 0000000..749f5de --- /dev/null +++ b/node_modules/chalk/node_modules/escape-string-regexp/package.json @@ -0,0 +1,70 @@ +{ + "name": "escape-string-regexp", + "version": "1.0.3", + "description": "Escape RegExp special characters", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/escape-string-regexp" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "regex", + "regexp", + "re", + "regular", + "expression", + "escape", + "string", + "str", + "special", + "characters" + ], + "devDependencies": { + "mocha": "*" + }, + "gitHead": "1e446e6b4449b5f1f8868cd31bf8fd25ee37fb4b", + "bugs": { + "url": "https://github.com/sindresorhus/escape-string-regexp/issues" + }, + "homepage": "https://github.com/sindresorhus/escape-string-regexp", + "_id": "escape-string-regexp@1.0.3", + "_shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5", + "_from": "escape-string-regexp@>=1.0.2 <2.0.0", + "_npmVersion": "2.1.16", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + }, + "dist": { + "shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5", + "tarball": "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/chalk/node_modules/escape-string-regexp/readme.md b/node_modules/chalk/node_modules/escape-string-regexp/readme.md new file mode 100644 index 0000000..808a963 --- /dev/null +++ b/node_modules/chalk/node_modules/escape-string-regexp/readme.md @@ -0,0 +1,27 @@ +# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) + +> Escape RegExp special characters + + +## Install + +```sh +$ npm install --save escape-string-regexp +``` + + +## Usage + +```js +var escapeStringRegexp = require('escape-string-regexp'); + +var escapedString = escapeStringRegexp('how much $ for a unicorn?'); +//=> how much \$ for a unicorn\? + +new RegExp(escapedString); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/has-ansi/cli.js b/node_modules/chalk/node_modules/has-ansi/cli.js new file mode 100755 index 0000000..0386a82 --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/cli.js @@ -0,0 +1,45 @@ +#!/usr/bin/env node +'use strict'; +var stdin = require('get-stdin'); +var pkg = require('./package.json'); +var hasAnsi = require('./'); +var argv = process.argv.slice(2); +var input = argv[0]; + +function help() { + console.log([ + '', + ' ' + pkg.description, + '', + ' Usage', + ' has-ansi ', + ' echo | has-ansi', + '', + ' Exits with code 0 if input has ANSI escape codes and 1 if not' + ].join('\n')); +} + +function init(data) { + process.exit(hasAnsi(data) ? 0 : 1); +} + +if (argv.indexOf('--help') !== -1) { + help(); + return; +} + +if (argv.indexOf('--version') !== -1) { + console.log(pkg.version); + return; +} + +if (process.stdin.isTTY) { + if (!input) { + help(); + return; + } + + init(input); +} else { + stdin(init); +} diff --git a/node_modules/chalk/node_modules/has-ansi/index.js b/node_modules/chalk/node_modules/has-ansi/index.js new file mode 100644 index 0000000..98fae06 --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +var ansiRegex = require('ansi-regex'); +var re = new RegExp(ansiRegex().source); // remove the `g` flag +module.exports = re.test.bind(re); diff --git a/node_modules/chalk/node_modules/has-ansi/license b/node_modules/chalk/node_modules/has-ansi/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..2fcdd1e --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g; +}; diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..8d70330 --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,86 @@ +{ + "name": "ansi-regex", + "version": "1.1.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/ansi-regex" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha test/test.js", + "view-supported": "node test/viewCodes.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "mocha": "*" + }, + "gitHead": "47fb974630af70998157b30fad6eb5e5bd7c7cd6", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-regex/issues" + }, + "homepage": "https://github.com/sindresorhus/ansi-regex", + "_id": "ansi-regex@1.1.1", + "_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", + "_from": "ansi-regex@>=1.0.0 <2.0.0", + "_npmVersion": "2.1.16", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + }, + "dist": { + "shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", + "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..ae876e7 --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,33 @@ +# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +```sh +$ npm install --save ansi-regex +``` + + +## Usage + +```js +var ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.* + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js b/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js new file mode 100644 index 0000000..0f1aeb3 --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js @@ -0,0 +1,49 @@ +'use strict'; + +module.exports = function (cb) { + var stdin = process.stdin; + var ret = ''; + + if (stdin.isTTY) { + setImmediate(cb, ''); + return; + } + + stdin.setEncoding('utf8'); + + stdin.on('readable', function () { + var chunk; + + while (chunk = stdin.read()) { + ret += chunk; + } + }); + + stdin.on('end', function () { + cb(ret); + }); +}; + +module.exports.buffer = function (cb) { + var stdin = process.stdin; + var ret = []; + var len = 0; + + if (stdin.isTTY) { + setImmediate(cb, new Buffer('')); + return; + } + + stdin.on('readable', function () { + var chunk; + + while (chunk = stdin.read()) { + ret.push(chunk); + len += chunk.length; + } + }); + + stdin.on('end', function () { + cb(Buffer.concat(ret, len)); + }); +}; diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json b/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json new file mode 100644 index 0000000..e0e5c64 --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json @@ -0,0 +1,64 @@ +{ + "name": "get-stdin", + "version": "4.0.1", + "description": "Easier stdin", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/get-stdin" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js && node test-buffer.js && echo unicorns | node test-real.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "std", + "stdin", + "stdio", + "concat", + "buffer", + "stream", + "process", + "stream" + ], + "devDependencies": { + "ava": "0.0.4", + "buffer-equal": "0.0.1" + }, + "gitHead": "65c744975229b25d6cc5c7546f49b6ad9099553f", + "bugs": { + "url": "https://github.com/sindresorhus/get-stdin/issues" + }, + "homepage": "https://github.com/sindresorhus/get-stdin", + "_id": "get-stdin@4.0.1", + "_shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe", + "_from": "get-stdin@>=4.0.1 <5.0.0", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "dist": { + "shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe", + "tarball": "http://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md b/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md new file mode 100644 index 0000000..bc1d32a --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md @@ -0,0 +1,44 @@ +# get-stdin [![Build Status](https://travis-ci.org/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stdin) + +> Easier stdin + + +## Install + +```sh +$ npm install --save get-stdin +``` + + +## Usage + +```js +// example.js +var stdin = require('get-stdin'); + +stdin(function (data) { + console.log(data); + //=> unicorns +}); +``` + +```sh +$ echo unicorns | node example.js +unicorns +``` + + +## API + +### stdin(callback) + +Get `stdin` as a string. + +### stdin.buffer(callback) + +Get `stdin` as a buffer. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/has-ansi/package.json b/node_modules/chalk/node_modules/has-ansi/package.json new file mode 100644 index 0000000..43582f8 --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/package.json @@ -0,0 +1,92 @@ +{ + "name": "has-ansi", + "version": "1.0.3", + "description": "Check if a string has ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/has-ansi" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "bin": { + "has-ansi": "cli.js" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js", + "cli.js" + ], + "keywords": [ + "cli", + "bin", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern", + "has" + ], + "dependencies": { + "ansi-regex": "^1.1.0", + "get-stdin": "^4.0.1" + }, + "devDependencies": { + "mocha": "*" + }, + "gitHead": "416428ed16f8e9718aec54cea083173af6019917", + "bugs": { + "url": "https://github.com/sindresorhus/has-ansi/issues" + }, + "homepage": "https://github.com/sindresorhus/has-ansi", + "_id": "has-ansi@1.0.3", + "_shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538", + "_from": "has-ansi@>=1.0.3 <2.0.0", + "_npmVersion": "2.1.16", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + }, + "dist": { + "shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538", + "tarball": "http://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/chalk/node_modules/has-ansi/readme.md b/node_modules/chalk/node_modules/has-ansi/readme.md new file mode 100644 index 0000000..0fa149a --- /dev/null +++ b/node_modules/chalk/node_modules/has-ansi/readme.md @@ -0,0 +1,45 @@ +# has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi) + +> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +```sh +$ npm install --save has-ansi +``` + + +## Usage + +```js +var hasAnsi = require('has-ansi'); + +hasAnsi('\u001b[4mcake\u001b[0m'); +//=> true + +hasAnsi('cake'); +//=> false +``` + + +## CLI + +```sh +$ npm install --global has-ansi +``` + +``` +$ has-ansi --help + + Usage + has-ansi + echo | has-ansi + + Exits with code 0 if input has ANSI escape codes and 1 if not +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/strip-ansi/cli.js b/node_modules/chalk/node_modules/strip-ansi/cli.js new file mode 100755 index 0000000..b83f63b --- /dev/null +++ b/node_modules/chalk/node_modules/strip-ansi/cli.js @@ -0,0 +1,47 @@ +#!/usr/bin/env node +'use strict'; +var fs = require('fs'); +var pkg = require('./package.json'); +var stripAnsi = require('./'); +var argv = process.argv.slice(2); +var input = argv[0]; + +function help() { + console.log([ + '', + ' ' + pkg.description, + '', + ' Usage', + ' strip-ansi > ', + ' cat | strip-ansi > ', + '', + ' Example', + ' strip-ansi unicorn.txt > unicorn-stripped.txt' + ].join('\n')); +} + +function init(data) { + process.stdout.write(stripAnsi(data)); +} + +if (argv.indexOf('--help') !== -1) { + help(); + return; +} + +if (argv.indexOf('--version') !== -1) { + console.log(pkg.version); + return; +} + +if (!input && process.stdin.isTTY) { + help(); + return; +} + +if (input) { + init(fs.readFileSync(input, 'utf8')); +} else { + process.stdin.setEncoding('utf8'); + process.stdin.on('data', init); +} diff --git a/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/chalk/node_modules/strip-ansi/index.js new file mode 100644 index 0000000..099480f --- /dev/null +++ b/node_modules/chalk/node_modules/strip-ansi/index.js @@ -0,0 +1,6 @@ +'use strict'; +var ansiRegex = require('ansi-regex')(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; diff --git a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..2fcdd1e --- /dev/null +++ b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g; +}; diff --git a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..8d70330 --- /dev/null +++ b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,86 @@ +{ + "name": "ansi-regex", + "version": "1.1.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/ansi-regex" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha test/test.js", + "view-supported": "node test/viewCodes.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "mocha": "*" + }, + "gitHead": "47fb974630af70998157b30fad6eb5e5bd7c7cd6", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-regex/issues" + }, + "homepage": "https://github.com/sindresorhus/ansi-regex", + "_id": "ansi-regex@1.1.1", + "_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", + "_from": "ansi-regex@>=1.0.0 <2.0.0", + "_npmVersion": "2.1.16", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + }, + "dist": { + "shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", + "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..ae876e7 --- /dev/null +++ b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,33 @@ +# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +```sh +$ npm install --save ansi-regex +``` + + +## Usage + +```js +var ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.* + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/chalk/node_modules/strip-ansi/package.json new file mode 100644 index 0000000..44c71ff --- /dev/null +++ b/node_modules/chalk/node_modules/strip-ansi/package.json @@ -0,0 +1,89 @@ +{ + "name": "strip-ansi", + "version": "2.0.1", + "description": "Strip ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/strip-ansi" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bin": { + "strip-ansi": "cli.js" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js", + "cli.js" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^1.0.0" + }, + "devDependencies": { + "mocha": "*" + }, + "gitHead": "1eff0936c01f89efa312d9d51deed137259871a1", + "bugs": { + "url": "https://github.com/sindresorhus/strip-ansi/issues" + }, + "homepage": "https://github.com/sindresorhus/strip-ansi", + "_id": "strip-ansi@2.0.1", + "_shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e", + "_from": "strip-ansi@>=2.0.1 <3.0.0", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "dist": { + "shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e", + "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/chalk/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000..53ec264 --- /dev/null +++ b/node_modules/chalk/node_modules/strip-ansi/readme.md @@ -0,0 +1,43 @@ +# strip-ansi [![Build Status](https://travis-ci.org/sindresorhus/strip-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +```sh +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## CLI + +```sh +$ npm install --global strip-ansi +``` + +```sh +$ strip-ansi --help + + Usage + strip-ansi > + cat | strip-ansi > + + Example + strip-ansi unicorn.txt > unicorn-stripped.txt +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/supports-color/cli.js b/node_modules/chalk/node_modules/supports-color/cli.js new file mode 100755 index 0000000..e746987 --- /dev/null +++ b/node_modules/chalk/node_modules/supports-color/cli.js @@ -0,0 +1,29 @@ +#!/usr/bin/env node +'use strict'; +var pkg = require('./package.json'); +var supportsColor = require('./'); +var argv = process.argv.slice(2); + +function help() { + console.log([ + '', + ' ' + pkg.description, + '', + ' Usage', + ' supports-color', + '', + ' Exits with code 0 if color is supported and 1 if not' + ].join('\n')); +} + +if (argv.indexOf('--help') !== -1) { + help(); + return; +} + +if (argv.indexOf('--version') !== -1) { + console.log(pkg.version); + return; +} + +process.exit(supportsColor ? 0 : 1); diff --git a/node_modules/chalk/node_modules/supports-color/index.js b/node_modules/chalk/node_modules/supports-color/index.js new file mode 100644 index 0000000..2c294c2 --- /dev/null +++ b/node_modules/chalk/node_modules/supports-color/index.js @@ -0,0 +1,47 @@ +'use strict'; +var argv = process.argv; + +module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (argv.indexOf('--no-color') !== -1 || + argv.indexOf('--no-colors') !== -1 || + argv.indexOf('--color=false') !== -1) { + return false; + } + + if (argv.indexOf('--color') !== -1 || + argv.indexOf('--colors') !== -1 || + argv.indexOf('--color=true') !== -1 || + argv.indexOf('--color=always') !== -1) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if ('UPSTART_JOB' in process.env) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/node_modules/chalk/node_modules/supports-color/license b/node_modules/chalk/node_modules/supports-color/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/chalk/node_modules/supports-color/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/supports-color/package.json b/node_modules/chalk/node_modules/supports-color/package.json new file mode 100644 index 0000000..2318240 --- /dev/null +++ b/node_modules/chalk/node_modules/supports-color/package.json @@ -0,0 +1,85 @@ +{ + "name": "supports-color", + "version": "1.3.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/supports-color" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "bin": { + "supports-color": "cli.js" + }, + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js", + "cli.js" + ], + "keywords": [ + "cli", + "bin", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect" + ], + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + }, + "gitHead": "6977091035fc1634eace9470a35e21262d84356a", + "bugs": { + "url": "https://github.com/sindresorhus/supports-color/issues" + }, + "homepage": "https://github.com/sindresorhus/supports-color", + "_id": "supports-color@1.3.0", + "_shasum": "ca7def134d8bf8163e1c92905a49a2e4439b72a0", + "_from": "supports-color@>=1.3.0 <2.0.0", + "_npmVersion": "2.5.1", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "dist": { + "shasum": "ca7def134d8bf8163e1c92905a49a2e4439b72a0", + "tarball": "http://registry.npmjs.org/supports-color/-/supports-color-1.3.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.3.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/chalk/node_modules/supports-color/readme.md b/node_modules/chalk/node_modules/supports-color/readme.md new file mode 100644 index 0000000..fe6016f --- /dev/null +++ b/node_modules/chalk/node_modules/supports-color/readme.md @@ -0,0 +1,46 @@ +# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + + +## CLI + +``` +$ npm install --global supports-color +``` + +``` +$ supports-color --help + + Usage + supports-color + + Exits with code 0 if color is supported and 1 if not +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json new file mode 100644 index 0000000..999624b --- /dev/null +++ b/node_modules/chalk/package.json @@ -0,0 +1,83 @@ +{ + "name": "chalk", + "version": "1.0.0", + "description": "Terminal string styling done right. Much color.", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/chalk" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "bench": "matcha benchmark.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "ansi", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^2.0.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^1.0.3", + "strip-ansi": "^2.0.1", + "supports-color": "^1.3.0" + }, + "devDependencies": { + "matcha": "^0.6.0", + "mocha": "*" + }, + "gitHead": "8864d3563313ed15574a38dd5c9d5966080c46ce", + "bugs": { + "url": "https://github.com/sindresorhus/chalk/issues" + }, + "homepage": "https://github.com/sindresorhus/chalk", + "_id": "chalk@1.0.0", + "_shasum": "b3cf4ed0ff5397c99c75b8f679db2f52831f96dc", + "_from": "chalk@*", + "_npmVersion": "2.5.1", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "dist": { + "shasum": "b3cf4ed0ff5397c99c75b8f679db2f52831f96dc", + "tarball": "http://registry.npmjs.org/chalk/-/chalk-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md new file mode 100644 index 0000000..43c7064 --- /dev/null +++ b/node_modules/chalk/readme.md @@ -0,0 +1,197 @@ +

+
+ chalk +
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/sindresorhus/chalk.svg?branch=master)](https://travis-ci.org/sindresorhus/chalk) [![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg?style=flat)](https://www.youtube.com/watch?v=Sm368W0OsHo) + +[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. + +**Chalk is a clean and focused alternative.** + +![screenshot](https://github.com/sindresorhus/ansi-styles/raw/master/screenshot.png) + + +## Why + +- Highly performant +- Doesn't extend `String.prototype` +- Expressive API +- Ability to nest styles +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by ~3000 modules](https://www.npmjs.com/browse/depended/chalk) + + +## Install + +``` +$ npm install --save chalk +``` + + +## Usage + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +var chalk = require('chalk'); + +// style a string +chalk.blue('Hello world!'); + +// combine styled and normal strings +chalk.blue('Hello') + 'World' + chalk.red('!'); + +// compose multiple styles using the chainable API +chalk.blue.bgRed.bold('Hello world!'); + +// pass in multiple arguments +chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); + +// nest styles +chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); + +// nest styles of the same type even (color, underline, background) +chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +); +``` + +Easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + +Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). + +```js +var name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> Hello Sindre +``` + + +## API + +### chalk.`[....](string, [string...])` + +Example: `chalk.red.bold.underline('Hello', 'world');` + +Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `Chalk.red.yellow.green` is equivalent to `Chalk.green`. + +Multiple arguments will be separated by space. + +### chalk.enabled + +Color support is automatically detected, but you can override it by setting the `enabled` property. You should however only do this in your own code as it applies globally to all chalk consumers. + +If you need to change this in a reusable module create a new instance: + +```js +var ctx = new chalk.constructor({enabled: false}); +``` + +### chalk.supportsColor + +Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color). Used internally and handled for you, but exposed for convenience. + +Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + +### chalk.styles + +Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). + +Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own. + +```js +var chalk = require('chalk'); + +console.log(chalk.styles.red); +//=> {open: '\u001b[31m', close: '\u001b[39m'} + +console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close); +``` + +### chalk.hasColor(string) + +Check whether a string [has color](https://github.com/sindresorhus/has-ansi). + +### chalk.stripColor(string) + +[Strip color](https://github.com/sindresorhus/strip-ansi) from a string. + +Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported. + +Example: + +```js +var chalk = require('chalk'); +var styledString = getText(); + +if (!chalk.supportsColor) { + styledString = chalk.stripColor(styledString); +} +``` + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` *(on Windows the bright version is used as normal blue is illegible)* +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## 256-colors + +Chalk does not support support anything other than the base eight colors, which guarantees it will work on all terminals and systems. Some terminals, specifically `xterm` compliant ones, will support the full range of 8-bit colors. For this the lower level [ansi-256-colors](https://github.com/jbnicolai/ansi-256-colors) package can be used. + + +## Windows + +If you're on Windows, do yourself a favor and use [`cmder`](http://bliker.github.io/cmder/) instead of `cmd.exe`. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/colors/.travis.yml b/node_modules/colors/.travis.yml deleted file mode 100644 index ec43125..0000000 --- a/node_modules/colors/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.8" - - "0.6" \ No newline at end of file diff --git a/node_modules/colors/ReadMe.md b/node_modules/colors/ReadMe.md deleted file mode 100644 index beb5b14..0000000 --- a/node_modules/colors/ReadMe.md +++ /dev/null @@ -1,167 +0,0 @@ -# colors.js - -## get color and style in your node.js console - - - -## Installation - - npm install colors - -## colors and styles! - -### text colors - - - black - - red - - green - - yellow - - blue - - magenta - - cyan - - white - - gray - - grey - -### background colors - - - - - bgBlack - - bgRed - - bgGreen - - bgYellow - - bgBlue - - bgMagenta - - bgCyan - - bgWhite - -### styles - - - reset - - bold - - dim - - italic - - underline - - inverse - - hidden - - strikethrough - -### extras - - - rainbow - - zebra - - america - - trap - - random - - -## Usage - -By popular demand, `colors` now ships with two types of usages! - -The super nifty way - -```js -var colors = require('colors'); - -console.log('hello'.green); // outputs green text -console.log('i like cake and pies'.underline.red) // outputs red underlined text -console.log('inverse the color'.inverse); // inverses the color -console.log('OMG Rainbows!'.rainbow); // rainbow -console.log('Run the trap'.trap); // Drops the bass - -``` - -or a slightly less nifty way which doesn't extend `String.prototype` - -```js -var colors = require('colors/safe'); - -console.log(colors.green('hello')); // outputs green text -console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text -console.log(colors.inverse('inverse the color')); // inverses the color -console.log(colors.rainbow('OMG Rainbows!')); // rainbow -console.log(colors.trap('Run the trap')); // Drops the bass - -``` - -I prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way. - -If you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object. - -## Disabling Colors - -To disable colors you can pass the following arguments in the command line to your application: - -```bash -node myapp.js --no-color -``` - -## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data) - -```js -var name = 'Marak'; -console.log(colors.green('Hello %s'), name); -// outputs -> 'Hello Marak' -``` - -## Custom themes - -### Using standard API - -```js - -var colors = require('colors'); - -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log("this is an error".error); - -// outputs yellow text -console.log("this is a warning".warn); -``` - -### Using string safe API - -```js -var colors = require('colors/safe'); - -// set single property -var error = colors.red; -error('this is red'); - -// set theme -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log(colors.error("this is an error")); - -// outputs yellow text -console.log(colors.warn("this is a warning")); -``` - -*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.* \ No newline at end of file diff --git a/node_modules/colors/examples/normal-usage.js b/node_modules/colors/examples/normal-usage.js deleted file mode 100644 index 2818741..0000000 --- a/node_modules/colors/examples/normal-usage.js +++ /dev/null @@ -1,74 +0,0 @@ -var colors = require('../lib/index'); - -console.log("First some yellow text".yellow); - -console.log("Underline that text".yellow.underline); - -console.log("Make it bold and red".red.bold); - -console.log(("Double Raindows All Day Long").rainbow) - -console.log("Drop the bass".trap) - -console.log("DROP THE RAINBOW BASS".trap.rainbow) - - -console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported - -console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse + ' styles! '.yellow.bold); // styles not widely supported -console.log("Zebras are so fun!".zebra); - -// -// Remark: .strikethrough may not work with Mac OS Terminal App -// -console.log("This is " + "not".strikethrough + " fun."); - -console.log('Background color attack!'.black.bgWhite) -console.log('Use random styles on everything!'.random) -console.log('America, Heck Yeah!'.america) - - -console.log('Setting themes is useful') - -// -// Custom themes -// -console.log('Generic logging theme as JSON'.green.bold.underline); -// Load theme with JSON literal -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log("this is an error".error); - -// outputs yellow text -console.log("this is a warning".warn); - -// outputs grey text -console.log("this is an input".input); - -console.log('Generic logging theme as file'.green.bold.underline); - -// Load a theme from file -colors.setTheme(__dirname + '/../themes/generic-logging.js'); - -// outputs red text -console.log("this is an error".error); - -// outputs yellow text -console.log("this is a warning".warn); - -// outputs grey text -console.log("this is an input".input); - -//console.log("Don't summon".zalgo) \ No newline at end of file diff --git a/node_modules/colors/examples/safe-string.js b/node_modules/colors/examples/safe-string.js deleted file mode 100644 index 111b363..0000000 --- a/node_modules/colors/examples/safe-string.js +++ /dev/null @@ -1,76 +0,0 @@ -var colors = require('../safe'); - -console.log(colors.yellow("First some yellow text")); - -console.log(colors.yellow.underline("Underline that text")); - -console.log(colors.red.bold("Make it bold and red")); - -console.log(colors.rainbow("Double Raindows All Day Long")) - -console.log(colors.trap("Drop the bass")) - -console.log(colors.rainbow(colors.trap("DROP THE RAINBOW BASS"))); - -console.log(colors.bold.italic.underline.red('Chains are also cool.')); // styles not widely supported - - -console.log(colors.green('So ') + colors.underline('are') + ' ' + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); // styles not widely supported - -console.log(colors.zebra("Zebras are so fun!")); - -console.log("This is " + colors.strikethrough("not") + " fun."); - - -console.log(colors.black.bgWhite('Background color attack!')); -console.log(colors.random('Use random styles on everything!')) -console.log(colors.america('America, Heck Yeah!')); - -console.log('Setting themes is useful') - -// -// Custom themes -// -//console.log('Generic logging theme as JSON'.green.bold.underline); -// Load theme with JSON literal -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log(colors.error("this is an error")); - -// outputs yellow text -console.log(colors.warn("this is a warning")); - -// outputs grey text -console.log(colors.input("this is an input")); - - -// console.log('Generic logging theme as file'.green.bold.underline); - -// Load a theme from file -colors.setTheme(__dirname + '/../themes/generic-logging.js'); - -// outputs red text -console.log(colors.error("this is an error")); - -// outputs yellow text -console.log(colors.warn("this is a warning")); - -// outputs grey text -console.log(colors.input("this is an input")); - -// console.log(colors.zalgo("Don't summon him")) - - - diff --git a/node_modules/colors/lib/colors.js b/node_modules/colors/lib/colors.js deleted file mode 100644 index 59898de..0000000 --- a/node_modules/colors/lib/colors.js +++ /dev/null @@ -1,176 +0,0 @@ -/* - -The MIT License (MIT) - -Original Library - - Copyright (c) Marak Squires - -Additional functionality - - Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -var colors = {}; -module['exports'] = colors; - -colors.themes = {}; - -var ansiStyles = colors.styles = require('./styles'); -var defineProps = Object.defineProperties; - -colors.supportsColor = require('./system/supports-colors'); - -if (typeof colors.enabled === "undefined") { - colors.enabled = colors.supportsColor; -} - -colors.stripColors = colors.strip = function(str){ - return ("" + str).replace(/\x1B\[\d+m/g, ''); -}; - - -var stylize = colors.stylize = function stylize (str, style) { - return ansiStyles[style].open + str + ansiStyles[style].close; -} - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; -var escapeStringRegexp = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - return str.replace(matchOperatorsRe, '\\$&'); -} - -function build(_styles) { - var builder = function builder() { - return applyStyle.apply(builder, arguments); - }; - builder._styles = _styles; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - builder.__proto__ = proto; - return builder; -} - -var styles = (function () { - var ret = {}; - ansiStyles.grey = ansiStyles.gray; - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - ret[key] = { - get: function () { - return build(this._styles.concat(key)); - } - }; - }); - return ret; -})(); - -var proto = defineProps(function colors() {}, styles); - -function applyStyle() { - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); - if (argsLen > 1) { - for (var a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!colors.enabled || !str) { - return str; - } - - var nestedStyles = this._styles; - - var i = nestedStyles.length; - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - str = code.open + str.replace(code.closeRe, code.open) + code.close; - } - - return str; -} - -function applyTheme (theme) { - for (var style in theme) { - (function(style){ - colors[style] = function(str){ - return colors[theme[style]](str); - }; - })(style) - } -} - -colors.setTheme = function (theme) { - if (typeof theme === 'string') { - try { - colors.themes[theme] = require(theme); - applyTheme(colors.themes[theme]); - return colors.themes[theme]; - } catch (err) { - console.log(err); - return err; - } - } else { - applyTheme(theme); - } -}; - -function init() { - var ret = {}; - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - return build([name]); - } - }; - }); - return ret; -} - -var sequencer = function sequencer (map, str) { - var exploded = str.split(""), i = 0; - exploded = exploded.map(map); - return exploded.join(""); -}; - -// custom formatter methods -colors.trap = require('./custom/trap'); -colors.zalgo = require('./custom/zalgo'); - -// maps -colors.maps = {}; -colors.maps.america = require('./maps/america'); -colors.maps.zebra = require('./maps/zebra'); -colors.maps.rainbow = require('./maps/rainbow'); -colors.maps.random = require('./maps/random') - -for (var map in colors.maps) { - (function(map){ - colors[map] = function (str) { - return sequencer(colors.maps[map], str); - } - })(map) -} - -defineProps(colors, init()); \ No newline at end of file diff --git a/node_modules/colors/lib/custom/trap.js b/node_modules/colors/lib/custom/trap.js deleted file mode 100644 index 3f09143..0000000 --- a/node_modules/colors/lib/custom/trap.js +++ /dev/null @@ -1,45 +0,0 @@ -module['exports'] = function runTheTrap (text, options) { - var result = ""; - text = text || "Run the trap, drop the bass"; - text = text.split(''); - var trap = { - a: ["\u0040", "\u0104", "\u023a", "\u0245", "\u0394", "\u039b", "\u0414"], - b: ["\u00df", "\u0181", "\u0243", "\u026e", "\u03b2", "\u0e3f"], - c: ["\u00a9", "\u023b", "\u03fe"], - d: ["\u00d0", "\u018a", "\u0500" , "\u0501" ,"\u0502", "\u0503"], - e: ["\u00cb", "\u0115", "\u018e", "\u0258", "\u03a3", "\u03be", "\u04bc", "\u0a6c"], - f: ["\u04fa"], - g: ["\u0262"], - h: ["\u0126", "\u0195", "\u04a2", "\u04ba", "\u04c7", "\u050a"], - i: ["\u0f0f"], - j: ["\u0134"], - k: ["\u0138", "\u04a0", "\u04c3", "\u051e"], - l: ["\u0139"], - m: ["\u028d", "\u04cd", "\u04ce", "\u0520", "\u0521", "\u0d69"], - n: ["\u00d1", "\u014b", "\u019d", "\u0376", "\u03a0", "\u048a"], - o: ["\u00d8", "\u00f5", "\u00f8", "\u01fe", "\u0298", "\u047a", "\u05dd", "\u06dd", "\u0e4f"], - p: ["\u01f7", "\u048e"], - q: ["\u09cd"], - r: ["\u00ae", "\u01a6", "\u0210", "\u024c", "\u0280", "\u042f"], - s: ["\u00a7", "\u03de", "\u03df", "\u03e8"], - t: ["\u0141", "\u0166", "\u0373"], - u: ["\u01b1", "\u054d"], - v: ["\u05d8"], - w: ["\u0428", "\u0460", "\u047c", "\u0d70"], - x: ["\u04b2", "\u04fe", "\u04fc", "\u04fd"], - y: ["\u00a5", "\u04b0", "\u04cb"], - z: ["\u01b5", "\u0240"] - } - text.forEach(function(c){ - c = c.toLowerCase(); - var chars = trap[c] || [" "]; - var rand = Math.floor(Math.random() * chars.length); - if (typeof trap[c] !== "undefined") { - result += trap[c][rand]; - } else { - result += c; - } - }); - return result; - -} diff --git a/node_modules/colors/lib/custom/zalgo.js b/node_modules/colors/lib/custom/zalgo.js deleted file mode 100644 index 4dc20c8..0000000 --- a/node_modules/colors/lib/custom/zalgo.js +++ /dev/null @@ -1,104 +0,0 @@ -// please no -module['exports'] = function zalgo(text, options) { - text = text || " he is here "; - var soul = { - "up" : [ - '̍', '̎', '̄', '̅', - '̿', '̑', '̆', '̐', - '͒', '͗', '͑', '̇', - '̈', '̊', '͂', '̓', - '̈', '͊', '͋', '͌', - '̃', '̂', '̌', '͐', - '̀', '́', '̋', '̏', - '̒', '̓', '̔', '̽', - '̉', 'ͣ', 'ͤ', 'ͥ', - 'ͦ', 'ͧ', 'ͨ', 'ͩ', - 'ͪ', 'ͫ', 'ͬ', 'ͭ', - 'ͮ', 'ͯ', '̾', '͛', - '͆', '̚' - ], - "down" : [ - '̖', '̗', '̘', '̙', - '̜', '̝', '̞', '̟', - '̠', '̤', '̥', '̦', - '̩', '̪', '̫', '̬', - '̭', '̮', '̯', '̰', - '̱', '̲', '̳', '̹', - '̺', '̻', '̼', 'ͅ', - '͇', '͈', '͉', '͍', - '͎', '͓', '͔', '͕', - '͖', '͙', '͚', '̣' - ], - "mid" : [ - '̕', '̛', '̀', '́', - '͘', '̡', '̢', '̧', - '̨', '̴', '̵', '̶', - '͜', '͝', '͞', - '͟', '͠', '͢', '̸', - '̷', '͡', ' ҉' - ] - }, - all = [].concat(soul.up, soul.down, soul.mid), - zalgo = {}; - - function randomNumber(range) { - var r = Math.floor(Math.random() * range); - return r; - } - - function is_char(character) { - var bool = false; - all.filter(function (i) { - bool = (i === character); - }); - return bool; - } - - - function heComes(text, options) { - var result = '', counts, l; - options = options || {}; - options["up"] = options["up"] || true; - options["mid"] = options["mid"] || true; - options["down"] = options["down"] || true; - options["size"] = options["size"] || "maxi"; - text = text.split(''); - for (l in text) { - if (is_char(l)) { - continue; - } - result = result + text[l]; - counts = {"up" : 0, "down" : 0, "mid" : 0}; - switch (options.size) { - case 'mini': - counts.up = randomNumber(8); - counts.min = randomNumber(2); - counts.down = randomNumber(8); - break; - case 'maxi': - counts.up = randomNumber(16) + 3; - counts.min = randomNumber(4) + 1; - counts.down = randomNumber(64) + 3; - break; - default: - counts.up = randomNumber(8) + 1; - counts.mid = randomNumber(6) / 2; - counts.down = randomNumber(8) + 1; - break; - } - - var arr = ["up", "mid", "down"]; - for (var d in arr) { - var index = arr[d]; - for (var i = 0 ; i <= counts[index]; i++) { - if (options[index]) { - result = result + soul[index][randomNumber(soul[index].length)]; - } - } - } - } - return result; - } - // don't summon him - return heComes(text); -} diff --git a/node_modules/colors/lib/extendStringPrototype.js b/node_modules/colors/lib/extendStringPrototype.js deleted file mode 100644 index b6b5b03..0000000 --- a/node_modules/colors/lib/extendStringPrototype.js +++ /dev/null @@ -1,118 +0,0 @@ -var colors = require('./colors'), - styles = require('./styles'); - -module['exports'] = function () { - - // - // Extends prototype of native string object to allow for "foo".red syntax - // - var addProperty = function (color, func) { - String.prototype.__defineGetter__(color, func); - }; - - var sequencer = function sequencer (map, str) { - return function () { - var exploded = this.split(""), i = 0; - exploded = exploded.map(map); - return exploded.join(""); - } - }; - - var stylize = function stylize (str, style) { - return styles[style].open + str + styles[style].close; - } - - addProperty('strip', function () { - return colors.strip(this); - }); - - addProperty('stripColors', function () { - return colors.strip(this); - }); - - addProperty("trap", function(){ - return colors.trap(this); - }); - - addProperty("zalgo", function(){ - return colors.zalgo(this); - }); - - addProperty("zebra", function(){ - return colors.zebra(this); - }); - - addProperty("rainbow", function(){ - return colors.rainbow(this); - }); - - addProperty("random", function(){ - return colors.random(this); - }); - - addProperty("america", function(){ - return colors.america(this); - }); - - // - // Iterate through all default styles and colors - // - var x = Object.keys(colors.styles); - x.forEach(function (style) { - addProperty(style, function () { - return stylize(this, style); - }); - }); - - function applyTheme(theme) { - // - // Remark: This is a list of methods that exist - // on String that you should not overwrite. - // - var stringPrototypeBlacklist = [ - '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', - 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', - 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', - 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight' - ]; - - Object.keys(theme).forEach(function (prop) { - if (stringPrototypeBlacklist.indexOf(prop) !== -1) { - console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name'); - } - else { - if (typeof(theme[prop]) === 'string') { - colors[prop] = colors[theme[prop]]; - addProperty(prop, function () { - return colors[theme[prop]](this); - }); - } - else { - addProperty(prop, function () { - var ret = this; - for (var t = 0; t < theme[prop].length; t++) { - ret = exports[theme[prop][t]](ret); - } - return ret; - }); - } - } - }); - } - - colors.setTheme = function (theme) { - if (typeof theme === 'string') { - try { - colors.themes[theme] = require(theme); - applyTheme(colors.themes[theme]); - return colors.themes[theme]; - } catch (err) { - console.log(err); - return err; - } - } else { - applyTheme(theme); - } - }; - -}; \ No newline at end of file diff --git a/node_modules/colors/lib/index.js b/node_modules/colors/lib/index.js deleted file mode 100644 index 96d2b84..0000000 --- a/node_modules/colors/lib/index.js +++ /dev/null @@ -1,12 +0,0 @@ -var colors = require('./colors'); -module['exports'] = colors; - -// Remark: By default, colors will add style properties to String.prototype -// -// If you don't wish to extend String.prototype you can do this instead and native String will not be touched -// -// var colors = require('colors/safe); -// colors.red("foo") -// -// -var extendStringPrototype = require('./extendStringPrototype')(); \ No newline at end of file diff --git a/node_modules/colors/lib/maps/america.js b/node_modules/colors/lib/maps/america.js deleted file mode 100644 index a07d832..0000000 --- a/node_modules/colors/lib/maps/america.js +++ /dev/null @@ -1,12 +0,0 @@ -var colors = require('../colors'); - -module['exports'] = (function() { - return function (letter, i, exploded) { - if(letter === " ") return letter; - switch(i%3) { - case 0: return colors.red(letter); - case 1: return colors.white(letter) - case 2: return colors.blue(letter) - } - } -})(); \ No newline at end of file diff --git a/node_modules/colors/lib/maps/rainbow.js b/node_modules/colors/lib/maps/rainbow.js deleted file mode 100644 index a7ce24e..0000000 --- a/node_modules/colors/lib/maps/rainbow.js +++ /dev/null @@ -1,13 +0,0 @@ -var colors = require('../colors'); - -module['exports'] = (function () { - var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV - return function (letter, i, exploded) { - if (letter === " ") { - return letter; - } else { - return colors[rainbowColors[i++ % rainbowColors.length]](letter); - } - }; -})(); - diff --git a/node_modules/colors/lib/maps/random.js b/node_modules/colors/lib/maps/random.js deleted file mode 100644 index 5cd101f..0000000 --- a/node_modules/colors/lib/maps/random.js +++ /dev/null @@ -1,8 +0,0 @@ -var colors = require('../colors'); - -module['exports'] = (function () { - var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; - return function(letter, i, exploded) { - return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter); - }; -})(); \ No newline at end of file diff --git a/node_modules/colors/lib/maps/zebra.js b/node_modules/colors/lib/maps/zebra.js deleted file mode 100644 index bf7dcde..0000000 --- a/node_modules/colors/lib/maps/zebra.js +++ /dev/null @@ -1,5 +0,0 @@ -var colors = require('../colors'); - -module['exports'] = function (letter, i, exploded) { - return i % 2 === 0 ? letter : colors.inverse(letter); -}; \ No newline at end of file diff --git a/node_modules/colors/package.json b/node_modules/colors/package.json deleted file mode 100644 index f38ef09..0000000 --- a/node_modules/colors/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "colors", - "description": "get colors in your node.js console", - "version": "1.0.3", - "author": { - "name": "Marak Squires" - }, - "homepage": "https://github.com/Marak/colors.js", - "bugs": { - "url": "https://github.com/Marak/colors.js/issues" - }, - "keywords": [ - "ansi", - "terminal", - "colors" - ], - "repository": { - "type": "git", - "url": "http://github.com/Marak/colors.js.git" - }, - "license": "MIT", - "scripts": { - "test": "node tests/basic-test.js && node tests/safe-test.js" - }, - "engines": { - "node": ">=0.1.90" - }, - "main": "./lib/index", - "gitHead": "e9e6557cc0fa26dba1a20b0d45e92de982f4047c", - "_id": "colors@1.0.3", - "_shasum": "0433f44d809680fdeb60ed260f1b0c262e82a40b", - "_from": "colors@1.0.3", - "_npmVersion": "2.0.2", - "_nodeVersion": "0.11.13", - "_npmUser": { - "name": "marak", - "email": "marak.squires@gmail.com" - }, - "maintainers": [ - { - "name": "marak", - "email": "marak.squires@gmail.com" - } - ], - "dist": { - "shasum": "0433f44d809680fdeb60ed260f1b0c262e82a40b", - "tarball": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/colors/safe.js b/node_modules/colors/safe.js deleted file mode 100644 index a6a1f3a..0000000 --- a/node_modules/colors/safe.js +++ /dev/null @@ -1,9 +0,0 @@ -// -// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype -// -// var colors = require('colors/safe); -// colors.red("foo") -// -// -var colors = require('./lib/colors'); -module['exports'] = colors; \ No newline at end of file diff --git a/node_modules/colors/screenshots/colors.png b/node_modules/colors/screenshots/colors.png deleted file mode 100644 index 7200a623590c35e8b4a8e74a8df49a42998ca9c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 79787 zcmZ^~V{~RgurB<@wrx#p+nFS9oJ?%nwylXKnAo;$+qP|ebMT#e*1GHNU)@#pRPCx> ztM}^aXGbW=OCrGH!U6yQ1ZgQTB>(`F0{{Rih6ep7p@odZ0RXV6EJQ^Wq(w!E6&&qM zEv!ud01cQ*4>!J)?eFi_D~s#S=PfV0x@T*L_4^^4WJQ?}Y8aec5fqtzXle7m#uVf* zh2b(JIJf+6`=4LlgxlNC-P@1u8_SO!y2l>6$1b|Z+Q%JJ=aBy8*~lm;k%j=`Xlyyh z4HNR6t6D99APkc~7%>3C99lpTCG_cOY3IA6D^7^ABYQm2ice5@O$K1VQy>6b575#J|Ra2{p#(02es-8l?%)x6@hW+*8TF^>Ju^g+wH64eIt*Cv1bgCV?ARB-QR9Ga zz3{pqc7=Qg=Xkqfiwuxr%!0X9D zl>p0sZLYApo!Zm;7+wNss6WNo<_j(ji^K?i-|+<{O8edB@N9iAyliu%2e{3Ef%xIT zvculPYWbaiuN!63Oo5xlvi3{o&Cj@;FgQcCL2X8Mfq~CF&&r+XKJc@A87*(CK`V$n z!LIfz_P~11A`N_al6~1+cXy!QBkjjQ^3d?8?m%0i2t(7sy%j?&>#0F~GSV~0?;>cy zhiaGm4eiJ2U^AcSs79kmV7=kIVfTmbg4SVUoH&R^3*dvPQh&Okf46hi^?au`8~Hs_ zfOmv_LPtIEVj~=*G9ku=lR-d$OTc0GEzSWYdIC?#sL1{n{4D_;v0_XI>#5tXX2&o% z|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GX+EPuZe zCH96|r?nu3@0{K?|nrGYDh=fFkV&uSq{pUZKyi9~qip4_a#s}J`PUCkO|skg48 zw7ltl;II6i^8oOT&czo)!=OP=RBI=KPr=qU4cvB=Ff;NLKIG$6F`n4>Bun!(lhQ&C zND=;_1BdE5HKQ9dVyN%aFPj!3X$I(3WvjkB$oqB(HDTF+eRJ63;p5;PdJypQdv!q| ztf3$R;k=qfvK_XD_*`;LjrDV|&Xq1fp%8pQh_45LAkxZ+{AyCnVVF1f_#Tu{u!7{o zAm4pALxR;zC#OfRnAXZ4*&ACn^{i8Ylzu<+pPT<*O$<1BDB_S#c JtP' + s + ''; -} - -var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow']; -var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']); - -colors.mode = 'console'; -assert.equal(s.bold, '\x1B[1m' + s + '\x1B[22m'); -assert.equal(s.italic, '\x1B[3m' + s + '\x1B[23m'); -assert.equal(s.underline, '\x1B[4m' + s + '\x1B[24m'); -assert.equal(s.strikethrough, '\x1B[9m' + s + '\x1B[29m'); -assert.equal(s.inverse, '\x1B[7m' + s + '\x1B[27m'); - -assert.ok(s.rainbow); - -aE(s, 'white', 37); -aE(s, 'grey', 90); -aE(s, 'black', 30); -aE(s, 'blue', 34); -aE(s, 'cyan', 36); -aE(s, 'green', 32); -aE(s, 'magenta', 35); -aE(s, 'red', 31); -aE(s, 'yellow', 33); - -assert.equal(s, 'string'); - -colors.setTheme({error:'red'}); - -assert.equal(typeof("astring".red),'string'); -assert.equal(typeof("astring".error),'string'); - diff --git a/node_modules/colors/tests/safe-test.js b/node_modules/colors/tests/safe-test.js deleted file mode 100644 index daad4f9..0000000 --- a/node_modules/colors/tests/safe-test.js +++ /dev/null @@ -1,45 +0,0 @@ -var assert = require('assert'), - colors = require('../safe'); - -var s = 'string'; - -function a(s, code) { - return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m'; -} - -function aE(s, color, code) { - assert.equal(colors[color](s), a(s, code)); - assert.equal(colors.strip(s), s); -} - -function h(s, color) { - return '' + s + ''; -} - -var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow']; -var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']); - -colors.mode = 'console'; -assert.equal(colors.bold(s), '\x1B[1m' + s + '\x1B[22m'); -assert.equal(colors.italic(s), '\x1B[3m' + s + '\x1B[23m'); -assert.equal(colors.underline(s), '\x1B[4m' + s + '\x1B[24m'); -assert.equal(colors.strikethrough(s), '\x1B[9m' + s + '\x1B[29m'); -assert.equal(colors.inverse(s), '\x1B[7m' + s + '\x1B[27m'); - -assert.ok(colors.rainbow); - -aE(s, 'white', 37); -aE(s, 'grey', 90); -aE(s, 'black', 30); -aE(s, 'blue', 34); -aE(s, 'cyan', 36); -aE(s, 'green', 32); -aE(s, 'magenta', 35); -aE(s, 'red', 31); -aE(s, 'yellow', 33); - -assert.equal(s, 'string'); -colors.setTheme({error:'red'}); - -assert.equal(typeof(colors.red("astring")), 'string'); -assert.equal(typeof(colors.error("astring")), 'string'); \ No newline at end of file diff --git a/node_modules/colors/themes/generic-logging.js b/node_modules/colors/themes/generic-logging.js deleted file mode 100644 index 571972c..0000000 --- a/node_modules/colors/themes/generic-logging.js +++ /dev/null @@ -1,12 +0,0 @@ -module['exports'] = { - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}; \ No newline at end of file diff --git a/package.json b/package.json index 68c4390..fe6b1b5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "dependencies": { + "chalk": "1.0.0", "changelogplease": "1.1.1", - "colors": "1.0.3", "semver": "2.2.1", "shelljs": "0.2.6", "which": "1.0.5" From 391f9c72dde197bed9d64cd848c3eafbe947926b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 24 Feb 2015 13:58:35 +0100 Subject: [PATCH 36/83] README: Note about private repos Ref #71 Closes #73 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 56b25bd..ca8d7f4 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ node release.js --remote=jquery/ ### Testing the Release Script +***This only applies to those with access to some private repos. You can also use any other repo with a release script.*** + You can do a test run of the release script by using a different remote repository. **It is recommended to perform tests from a fresh clone of the project being released.** The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs. When working on features of this script, adapt the following to simplify testing a bit, replacing the paths for `project` and `cdn`: @@ -42,7 +44,7 @@ rm -rf __release/ node release.js --remote=$project ``` -You need local clones of [fake-project](https://github.com/jquery/fake-project) and [fake-cdn](https://github.com/jquery/fake-cdn), then update both variables to point to those. +You need local clones of [fake-project](https://github.com/jquery/fake-project) and [fake-cdn](https://github.com/jquery/fake-cdn) (private, see note above), then update both variables to point to those. Save as `test-release.sh` in the checkout of this repo, make it executable with `chmod +x test-release.sh`, then run with `./test-release.sh`. From 29d9916819dee2e070f96e34da9dc06acde82f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 3 Mar 2015 16:40:40 -0500 Subject: [PATCH 37/83] CDN: Allow directory configuration via cdnPublish Closes gh-77 --- README.md | 2 +- lib/cdn.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ca8d7f4..7082206 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ The version that will be set in `package.json` after the release. #### cdnPublish -Set to `false` to prevent publishing to the jQuery CDN. Defaults to `true`. +Which directory contains files to publish to the jQuery CDN. Set to `false` to prevent publishing to the jQuery CDN. Defaults to `"dist/cdn"`. #### npmPublish diff --git a/lib/cdn.js b/lib/cdn.js index dff30f5..9627923 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -23,7 +23,7 @@ module.exports = function( Release ) { } Release.define({ - cdnPublish: true, + cdnPublish: "dist/cdn", _cloneCdnRepo: function() { var local = Release.dir.base + "/codeorigin.jquery.com", remote = Release.isTest ? testRemote : realRemote; @@ -43,7 +43,7 @@ module.exports = function( Release ) { _copyCdnArtifacts: function() { var npmPackage = Release.readPackage().name, targetCdn = projectCdn(), - releaseCdn = Release.dir.repo + "/dist/cdn", + releaseCdn = Release.dir.repo + "/" + Release.cdnPublish, commitMessage = npmPackage + ": Added version " + Release.newVersion; Release.chdir( Release.dir.base ); From b308aac0f21f743b980f51cfe5d67319c3b6b67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 4 Mar 2015 10:48:30 -0500 Subject: [PATCH 38/83] Build: Ignore all test release scripts --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5abd6c3..45c8d30 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules/grunt node_modules/grunt-contrib-jshint -*test-release.sh +test-*.sh From e9dfa63e8591b2ab1965c4017c0f2c7eddb974ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 5 Mar 2015 11:10:53 -0500 Subject: [PATCH 39/83] Util: Fix indentation --- lib/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.js b/lib/util.js index 249ae3c..30f9003 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,5 +1,5 @@ var shell = require( "shelljs" ), - chalk = require( "chalk" ); + chalk = require( "chalk" ); module.exports = function( Release ) { From 11536f7e365d8340bc70f1e0f6332bf7902dd3ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 5 Mar 2015 11:26:59 -0500 Subject: [PATCH 40/83] npm: Support releases for new packages Detect when a package doesn't exist yet and allow any user to publish Fixes gh-47 Closes gh-78 --- lib/npm.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/npm.js b/lib/npm.js index 4a561d3..d55b932 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -1,4 +1,5 @@ -var chalk = require( "chalk" ); +var chalk = require( "chalk" ), + shell = require( "shelljs" ); module.exports = function( Release ) { Release.define({ @@ -16,12 +17,18 @@ module.exports = function( Release ) { }, _getNpmOwners: function( npmPackage ) { - var owners = Release.exec({ - command: "npm owner ls " + npmPackage, - silent: true - }, "Error getting npm owners." ); + var result = shell.exec( "npm owner ls " + npmPackage, { silent: true } ); + if ( result.code !== 0 ) { + + // The npm package may not exist yet + if ( /ERR! 404/.test( result.output.split( "\n" )[ 1 ] ) ) { + return []; + } + + Release.abort( "Error getting npm owners." ); + } - return owners.trim().split( "\n" ).map(function( owner ) { + return result.output.trim().split( "\n" ).map(function( owner ) { return owner.split( " " )[ 0 ]; }); }, @@ -35,7 +42,7 @@ module.exports = function( Release ) { user = Release._getNpmUser(), owners = Release._getNpmOwners( npmPackage ); - if ( owners.indexOf( user ) === -1 ) { + if ( owners.length && owners.indexOf( user ) === -1 ) { Release.abort( user + " is not an owner of " + npmPackage + " on npm." ); } }, From e2a97ba9766d29763784c1753383e6b5154b651a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 12 Mar 2015 15:23:59 -0400 Subject: [PATCH 41/83] Build: Remove onevar requirement --- .jshintrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.jshintrc b/.jshintrc index d34c42d..e79eeee 100644 --- a/.jshintrc +++ b/.jshintrc @@ -6,7 +6,6 @@ "expr": true, "immed": true, "noarg": true, - "onevar": true, "quotmark": "double", "smarttabs": true, "trailing": true, From 1a4721b7464db58dfb1661e221dedfe723c833d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 6 Dec 2013 10:56:27 -0500 Subject: [PATCH 42/83] GitHub: Implemented changelog generation Fixes gh-1 Closes gh-8 --- lib/changelog.js | 38 +++---- lib/contributors.js | 64 +++++------- lib/github.js | 90 ++++++++++++++++ lib/trac.js | 24 +++++ node_modules/github-request/LICENSE.txt | 20 ++++ node_modules/github-request/README.md | 69 +++++++++++++ node_modules/github-request/lib/request.js | 114 +++++++++++++++++++++ node_modules/github-request/package.json | 45 ++++++++ package.json | 1 + 9 files changed, 404 insertions(+), 61 deletions(-) create mode 100644 lib/github.js create mode 100644 node_modules/github-request/LICENSE.txt create mode 100644 node_modules/github-request/README.md create mode 100644 node_modules/github-request/lib/request.js create mode 100644 node_modules/github-request/package.json diff --git a/lib/changelog.js b/lib/changelog.js index 6847359..54560c9 100644 --- a/lib/changelog.js +++ b/lib/changelog.js @@ -7,14 +7,19 @@ module.exports = function( Release ) { Release.define({ _generateChangelog: function( callback ) { Release._generateCommitChangelog(function( commitChangelog ) { - var changelogPath = Release.dir.base + "/changelog", - changelog = Release.changelogShell() + - commitChangelog + - Release._generateIssueChangelog(); - - fs.writeFileSync( changelogPath, changelog ); - console.log( "Stored changelog in " + chalk.cyan( changelogPath ) + "." ); - callback(); + Release._generateIssueChangelog(function( issueChangelog ) { + var changelogPath = Release.dir.base + "/changelog", + changelog = Release.changelogShell() + + commitChangelog + + "\n\n\n" + + "--- Issue List ---\n" + + issueChangelog; + + fs.writeFileSync( changelogPath, changelog ); + console.log( "Stored changelog in " + chalk.cyan( changelogPath ) + "." ); + + callback(); + }); }); }, @@ -43,21 +48,10 @@ Release.define({ }); }, - _generateIssueChangelog: function() { + _generateIssueChangelog: function( callback ) { return Release.issueTracker === "trac" ? - Release._generateTracChangelog() : - Release._generateGithubChangelog(); - }, - - _generateTracChangelog: function() { - console.log( "Adding Trac tickets..." ); - return Release.trac( "/query?milestone=" + Release.tracMilestone() + "&resolution=fixed" + - "&col=id&col=component&col=summary&order=component" ) + "\n"; - }, - - _generateGithubChangelog: function() { - console.log( "Adding GitHub issues..." ); - // TODO + Release._generateTracChangelog( callback ) : + Release._generateGithubChangelog( callback ); } }); diff --git a/lib/contributors.js b/lib/contributors.js index ab7cf59..1a50f96 100644 --- a/lib/contributors.js +++ b/lib/contributors.js @@ -12,51 +12,37 @@ function unique( arr ) { } Release.define({ - _gatherContributors: function() { - var contributors, - contributorsPath = Release.dir.base + "/contributors.txt"; - - console.log( "Adding committers and authors..." ); - Release.chdir( Release.dir.repo ); - contributors = Release.gitLog( "%aN%n%cN" ); + _gatherContributors: function( callback ) { + var contributorsPath = Release.dir.base + "/contributors.txt"; console.log( "Adding reporters and commenters from issues..." ); - contributors = contributors.concat( Release._gatherIssueContributors() ); - - console.log( "Sorting contributors..." ); - contributors = unique( contributors ).sort(function( a, b ) { - return a.toLowerCase() < b.toLowerCase() ? -1 : 1; + Release._gatherIssueContributors(function( contributors ) { + console.log( "Adding committers and authors..." ); + Release.chdir( Release.dir.repo ); + contributors = contributors.concat( Release.gitLog( "%aN%n%cN" ) ); + + console.log( "Sorting contributors..." ); + contributors = unique( contributors ).sort(function( a, b ) { + return a.toLowerCase() < b.toLowerCase() ? -1 : 1; + }); + + console.log( "Adding people thanked in commits..." ); + contributors = contributors.concat( + Release.gitLog( "%b%n%s" ).filter(function( line ) { + return (/thank/i).test( line ); + })); + + fs.writeFileSync( contributorsPath, contributors.join( "\n" ) ); + console.log( "Stored contributors in " + chalk.cyan( contributorsPath ) + "." ); + + callback(); }); - - console.log( "Adding people thanked in commits..." ); - contributors = contributors.concat( - Release.gitLog( "%b%n%s" ).filter(function( line ) { - return (/thank/i).test( line ); - })); - - fs.writeFileSync( contributorsPath, contributors.join( "\n" ) ); - console.log( "Stored contributors in " + chalk.cyan( contributorsPath ) + "." ); }, - _gatherIssueContributors: function() { + _gatherIssueContributors: function( callback ) { return Release.issueTracker === "trac" ? - Release._gatherTracContributors() : - Release._gatherGithubIssueContributors(); - }, - - _gatherTracContributors: function() { - var url = "/report/" + Release.contributorReportId + - "?V=" + Release.tracMilestone() + "&max=-1"; - - return Release.trac( url ) - .split( /\r?\n/ ) - - // Remove header and trailing newline - .slice( 1, -1 ); - }, - - _gatherGithubIssueContributors: function() { - // TODO + Release._gatherTracContributors( callback ) : + Release._gatherGithubIssueContributors( callback ); } }); diff --git a/lib/github.js b/lib/github.js new file mode 100644 index 0000000..03718d3 --- /dev/null +++ b/lib/github.js @@ -0,0 +1,90 @@ +var querystring = require( "querystring" ); +var github = require( "github-request" ); + +module.exports = function( Release ) { + +Release.define({ + _githubApiPath: function( path ) { + var repoUrl = Release._packageUrl( "bugs" ); + var repo = repoUrl.match( /github\.com\/(\w+\/\w+)/ )[ 1 ]; + return "/repos/" + repo + "/" + path; + }, + + _githubMilestone: function( callback ) { + github.requestAll({ + path: Release._githubApiPath( "milestones" ) + }, function( error, milestones ) { + if ( error ) { + Release.abort( "Error getting milestones.", error ); + } + + var milestone = milestones.filter(function( milestone ) { + return milestone.title === Release.newVersion; + })[ 0 ]; + + if ( !milestone ) { + Release.abort( "No milestone found." ); + } + + callback( milestone.number ); + }); + }, + + _generateGithubChangelog: function( callback ) { + Release._githubMilestone(function( milestone ) { + github.requestAll({ + path: Release._githubApiPath( "issues?" + querystring.stringify( { + milestone: milestone, + state: "closed" + } ) ), + }, function( error, issues ) { + if ( error ) { + return Release.abort( "Error getting issues.", error ); + } + + var changelog = issues + + // Remove pull requests from results + .filter(function( issue ) { + return !issue.pull_request; + }) + + // Convert each issue to text + .map(function( issue ) { + var component = "(none)"; + + issue.labels.forEach(function( label ) { + if ( /^component:/i.test( label.name ) ) { + component = label.name.substring( 11 ); + } + }); + + return [ + "#" + issue.number, + component, + issue.title + ] + .sort(function( a, b ) { + return a.component > b.component ? 1 : -1; + }) + .join( "\t" ); + }) + + // Concatenate the issues into a string + .join( "\n" ) + "\n"; + + callback( changelog ); + }); + }); + }, + + _gatherGithubIssueContributors: function( callback ) { + + // TODO + process.nextTick(function() { + callback( [] ); + }); + } +}); + +}; diff --git a/lib/trac.js b/lib/trac.js index 38aa69e..848decc 100644 --- a/lib/trac.js +++ b/lib/trac.js @@ -7,6 +7,30 @@ Release.define({ command: "curl -s '" + tracUrl + path + "&format=tab'", silent: true }, "Error getting Trac data." ); + }, + + _generateTracChangelog: function( callback ) { + process.nextTick(function() { + console.log( "Adding Trac tickets..." ); + var changelog = Release.trac( + "/query?milestone=" + Release.newVersion + "&resolution=fixed" + + "&col=id&col=component&col=summary&order=component" ) + "\n"; + callback( changelog ); + }); + }, + + _gatherTracContributors: function( callback ) { + var url = "/report/" + Release.contributorReportId + + "?V=" + Release.tracMilestone() + "&max=-1"; + + process.nextTick(function() { + callback( Release.trac( url ) + .split( /\r?\n/ ) + + // Remove header and trailing newline + .slice( 1, -1 ) + ); + }); } }); diff --git a/node_modules/github-request/LICENSE.txt b/node_modules/github-request/LICENSE.txt new file mode 100644 index 0000000..6ca2fdd --- /dev/null +++ b/node_modules/github-request/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright Scott González http://scottgonzalez.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. diff --git a/node_modules/github-request/README.md b/node_modules/github-request/README.md new file mode 100644 index 0000000..647aff1 --- /dev/null +++ b/node_modules/github-request/README.md @@ -0,0 +1,69 @@ +# GitHub Request + +Simplified GitHub API requests. + +Support this project by [donating on Gratipay](https://gratipay.com/scottgonzalez/). + +## About + +Low level helper for working with the GitHub API. + +## Installation + +```sh +npm install github-request +``` + +## Usage + +```js +var github = require("github-request"); +github.request({ + path: "/orgs/jquery/repos" +}, function(error, repos) { + console.log(repos); +}); +``` + +## API + +### request(settings, data, callback) + +Performs a single request based on the provided settings. + +* `settings` (Object): Settings for the HTTPS request. +* `data` (Mixed): Data to pass for POST requests. Data is encoded as JSON prior to making the request. +* `callback` (`function( error, response, meta )`): A callback to invoke when the API call is complete. + * `response` (Object): The parsed JSON response. + * `meta` (Object): Metadata from the response headers. + +### requestAll(settings, callback) + +Performs a request based on the provided settings and then requests any additional paged content based on the response. Data from all pages are concatenated together and buffered until the last page of data has been retrieved. + +* `settings` (Object): Settings for the HTTPS request. +* `callback` (`function( error, response, meta )`): A callback to invoke when all API calls are complete. + * `response` (Object): The parsed JSON response. + * `meta` (Object): Metadata from the headers of the *last* response. + +### Response Metadata + +The metadata provided contains information from the following headers: + +* `x-ratelimit-*` +* `x-github-*` +* `link` + +These headers are parsed into a more friendly format before being passed as the `meta` parameter in the `callback`. + +All `x-*` headers have the `x-` prefix removed and the names are changed from dashed form to camel case. For example, `x-ratelimit-remaining` becomes `ratelimitRemaining`. + +The `link` header is parsed into the named `rel` values. For example, `; rel="next"` becomes `{next: "https://api.github.com/resource?page=2"}` and is provided in the `links` property. + +## License + +Copyright Scott González. Released under the terms of the MIT license. + +--- + +Support this project by [donating on Gratipay](https://gratipay.com/scottgonzalez/). diff --git a/node_modules/github-request/lib/request.js b/node_modules/github-request/lib/request.js new file mode 100644 index 0000000..a4e9356 --- /dev/null +++ b/node_modules/github-request/lib/request.js @@ -0,0 +1,114 @@ +var https = require("https"); +var url = require("url"); +var userAgent = "Node GitHub Request " + require( "../package" ).version; + +function extend(a, b) { + for (var prop in b) { + a[prop] = b[prop]; + } + + return a; +} + +function xHeader(str) { + if (str.substring(0, 2) === "x-" ) { + str = str.substring(2); + } + + return str.replace(/-([a-z])/g, function(all, letter) { + return letter.toUpperCase(); + }); +} + +function request(settings, data, callback) { + if (typeof data === "function") { + callback = data; + data = null; + } else { + data = JSON.stringify(data); + } + callback = callback || function() {}; + + settings = extend({ + method: "GET" + }, settings); + settings.headers = extend({ + "user-agent": userAgent, + "content-length": typeof data === "string" ? data.length : 0 + }, settings.headers || {}); + + var req = https.request(extend({ + host: "api.github.com" + }, settings), function(res) { + var meta = {}; + Object.keys(res.headers).forEach(function(header) { + if (/^(x-(ratelimit|github))/.test(header)) { + meta[xHeader(header)] = res.headers[header]; + } else if (header === "link") { + var links = res.headers.link.split(/,\s*/); + meta.links = {}; + links.forEach(function(link) { + var parts = /<([^>]+)>;\s*rel="([^"]+)"/.exec(link); + meta.links[parts[2]] = parts[1]; + }); + } + }); + + var response = ""; + res.setEncoding("utf8"); + res.on("data", function(chunk) { + response += chunk; + }); + + res.on("end", function() { + if (res.statusCode >= 400) { + var message; + if (res.headers["content-type"].indexOf("json") !== -1) { + message = JSON.parse(response).message; + } else { + message = response; + } + if (!message && res.statusCode === 403) { + message = "Forbidden"; + } + callback(new Error(message)); + } else { + callback(null, JSON.parse(response), meta); + } + }); + }); + + req.on("error", callback); + + if (data) { + req.write(data); + } + + req.end(); +} + +function requestAll(settings, callback) { + request(settings, function(error, data, meta) { + if (error) { + return callback(error); + } + + if (!meta.links || !meta.links.next) { + return callback(null, data, meta); + } + + settings.path = url.parse(meta.links.next).path; + requestAll(settings, function(error, nextData, nextMeta) { + if (error) { + return callback(error); + } + + callback(null, data.concat(nextData), nextMeta); + }); + }); +} + +module.exports = { + request: request, + requestAll: requestAll +}; diff --git a/node_modules/github-request/package.json b/node_modules/github-request/package.json new file mode 100644 index 0000000..9bdea48 --- /dev/null +++ b/node_modules/github-request/package.json @@ -0,0 +1,45 @@ +{ + "name": "github-request", + "version": "1.2.2", + "description": "Simplified GitHub API requests.", + "keywords": [ + "github", + "request" + ], + "homepage": "https://github.com/scottgonzalez/github-request", + "bugs": { + "url": "https://github.com/scottgonzalez/github-request/issues" + }, + "author": { + "name": "Scott González", + "email": "scott.gonzalez@gmail.com", + "url": "http://scottgonzalez.com" + }, + "main": "./lib/request.js", + "repository": { + "type": "git", + "url": "git://github.com/scottgonzalez/github-request.git" + }, + "gitHead": "bec76ffe4854901aee0a4d589934acbc6a5cc589", + "_id": "github-request@1.2.2", + "scripts": {}, + "_shasum": "a60022753a4212c4426cbaafc0478bb4d8252bdb", + "_from": "github-request@1.2.2", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "scott.gonzalez", + "email": "scott.gonzalez@gmail.com" + }, + "maintainers": [ + { + "name": "scott.gonzalez", + "email": "scott.gonzalez@gmail.com" + } + ], + "dist": { + "shasum": "a60022753a4212c4426cbaafc0478bb4d8252bdb", + "tarball": "http://registry.npmjs.org/github-request/-/github-request-1.2.2.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/github-request/-/github-request-1.2.2.tgz" +} diff --git a/package.json b/package.json index fe6b1b5..03343f0 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "dependencies": { "chalk": "1.0.0", "changelogplease": "1.1.1", + "github-request": "1.2.3", "semver": "2.2.1", "shelljs": "0.2.6", "which": "1.0.5" From ef1427f9041f01d8ec25a96982205f612ca31907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 20 Apr 2015 08:34:18 -0400 Subject: [PATCH 43/83] npm: Support newer versions of npm for detecting owners The error output changed in newer versions of npm, so we're using a more lax check for 404s. --- lib/npm.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/npm.js b/lib/npm.js index d55b932..6565df9 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -21,7 +21,11 @@ module.exports = function( Release ) { if ( result.code !== 0 ) { // The npm package may not exist yet - if ( /ERR! 404/.test( result.output.split( "\n" )[ 1 ] ) ) { + if ( result.output.split( "\n" ).some( + function( line ) { + return (/ERR! 404/).test( line ); + }) + ) { return []; } From 7861e9215617d3d5c96784d2115d29a72fbc77ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 21 Apr 2015 14:04:40 -0400 Subject: [PATCH 44/83] CDN: Publish PEP releases to /pep --- lib/cdn.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cdn.js b/lib/cdn.js index 9627923..162504b 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -15,6 +15,9 @@ module.exports = function( Release ) { if ( npmPackage === "qunitjs" ) { return jqueryCdn + "/qunit"; } + if ( npmPackage === "pepjs" ) { + return jqueryCdn + "/pep"; + } if ( /^jquery-/.test( npmPackage ) ) { return jqueryCdn + "/" + npmPackage.substring( 7 ) + "/" + Release.newVersion; From 3f443a1360c45125f8be97c46fddf46ac5288c2c Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Mon, 13 Jul 2015 15:30:11 -0400 Subject: [PATCH 45/83] GitHub: drop version labels when generating changelog Fixes gh-82 --- lib/github.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/github.js b/lib/github.js index 03718d3..c61c223 100644 --- a/lib/github.js +++ b/lib/github.js @@ -18,8 +18,12 @@ Release.define({ Release.abort( "Error getting milestones.", error ); } + var version = Release.preRelease ? + /^\d+\.\d+\.\d+/.exec( Release.newVersion )[ 0 ] : + Release.newVersion; + var milestone = milestones.filter(function( milestone ) { - return milestone.title === Release.newVersion; + return milestone.title === version; })[ 0 ]; if ( !milestone ) { From 192c3d3947a92d0de99cd608fcfbb6dab568de09 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Mon, 13 Jul 2015 15:31:50 -0400 Subject: [PATCH 46/83] Repo: check for licenses before looping over them Fixes gh-83 Close gh-85 --- lib/repo.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/repo.js b/lib/repo.js index 6787bc7..3bbb918 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -210,9 +210,11 @@ Release.define({ console.log( "Updating package.json URLs..." ); json = Release.readPackage(); json.author.url = json.author.url.replace( "master", Release.newVersion ); - json.licenses.forEach(function( license ) { - license.url = license.url.replace( "master", Release.newVersion ); - }); + if ( json.licenses ) { + json.licenses.forEach(function( license ) { + license.url = license.url.replace( "master", Release.newVersion ); + }); + } Release.writePackage( json ); Release.generateArtifacts(function( paths ) { From aeaad77e0be6bcb5b46dddf4d19b5dfe9c05c721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 4 Nov 2015 20:54:40 -0500 Subject: [PATCH 47/83] CDN: Fix path for PEP Simplify logic for all projects. Closes gh-87 --- lib/cdn.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/cdn.js b/lib/cdn.js index 162504b..df54b08 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -7,22 +7,26 @@ module.exports = function( Release ) { testRemote = "git@github.com:jquery/fake-cdn.git"; function projectCdn() { - var npmPackage = Release.readPackage().name, + var project = Release.readPackage().name, jqueryCdn = Release._cloneCdnRepo() + "/cdn"; - if ( npmPackage === "jquery" || npmPackage === "jquery-compat" ) { + + // Projects with versioned file names + if ( project === "jquery" || project === "jquery-compat" ) { return jqueryCdn; } - if ( npmPackage === "qunitjs" ) { + if ( project === "qunitjs" ) { return jqueryCdn + "/qunit"; } - if ( npmPackage === "pepjs" ) { - return jqueryCdn + "/pep"; + + // Projects with different directory names than their npm package + if ( /^jquery-/.test( project ) ) { + project = project.substring( 7 ); } - if ( /^jquery-/.test( npmPackage ) ) { - return jqueryCdn + "/" + npmPackage.substring( 7 ) + - "/" + Release.newVersion; + if ( project === "pepjs" ) { + project = "pep"; } - return jqueryCdn + "/" + npmPackage + "/" + Release.newVersion; + + return jqueryCdn + "/" + project + "/" + Release.newVersion; } Release.define({ From 0e800c080f38af7b7af64ef16c920a23d556ced8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 4 Nov 2015 21:01:35 -0500 Subject: [PATCH 48/83] Build: Commit missing dependency update --- node_modules/github-request/lib/request.js | 7 +++++++ node_modules/github-request/package.json | 17 +++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/node_modules/github-request/lib/request.js b/node_modules/github-request/lib/request.js index a4e9356..9f0f518 100644 --- a/node_modules/github-request/lib/request.js +++ b/node_modules/github-request/lib/request.js @@ -88,6 +88,13 @@ function request(settings, data, callback) { } function requestAll(settings, callback) { + + // Force the request to use a page size of 100 for optimal performance + var parsed = url.parse(settings.path, true); + delete parsed.search; + parsed.query.per_page = 100; + settings.path = url.format(parsed); + request(settings, function(error, data, meta) { if (error) { return callback(error); diff --git a/node_modules/github-request/package.json b/node_modules/github-request/package.json index 9bdea48..08bb6cc 100644 --- a/node_modules/github-request/package.json +++ b/node_modules/github-request/package.json @@ -1,6 +1,6 @@ { "name": "github-request", - "version": "1.2.2", + "version": "1.2.3", "description": "Simplified GitHub API requests.", "keywords": [ "github", @@ -20,11 +20,11 @@ "type": "git", "url": "git://github.com/scottgonzalez/github-request.git" }, - "gitHead": "bec76ffe4854901aee0a4d589934acbc6a5cc589", - "_id": "github-request@1.2.2", + "gitHead": "e94973a48cdffb0f9c7f10b134c03ead1ecc506e", + "_id": "github-request@1.2.3", "scripts": {}, - "_shasum": "a60022753a4212c4426cbaafc0478bb4d8252bdb", - "_from": "github-request@1.2.2", + "_shasum": "cb0a34cb0ad07caf417072bff88a8b59f1738389", + "_from": "github-request@1.2.3", "_npmVersion": "1.4.28", "_npmUser": { "name": "scott.gonzalez", @@ -37,9 +37,10 @@ } ], "dist": { - "shasum": "a60022753a4212c4426cbaafc0478bb4d8252bdb", - "tarball": "http://registry.npmjs.org/github-request/-/github-request-1.2.2.tgz" + "shasum": "cb0a34cb0ad07caf417072bff88a8b59f1738389", + "tarball": "http://registry.npmjs.org/github-request/-/github-request-1.2.3.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/github-request/-/github-request-1.2.2.tgz" + "_resolved": "https://registry.npmjs.org/github-request/-/github-request-1.2.3.tgz", + "readme": "ERROR: No README data found!" } From 8d6c0e8036d1b722f552a8e57519b00f3aa74c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 4 Nov 2015 21:03:15 -0500 Subject: [PATCH 49/83] Build: Update package.json so npm doesn't complain --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 03343f0..b44ff17 100644 --- a/package.json +++ b/package.json @@ -13,5 +13,7 @@ }, "scripts": { "test": "grunt" - } + }, + "repository": "jquery/jquery-release", + "license": "MIT" } From 4b207e8d80bce4c1e6462d2ee4d0553a8194e241 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 24 Feb 2016 19:09:01 +0100 Subject: [PATCH 50/83] Build: Fix building releases on Windows Single quotes don't work on the Windows command line. See http://stackoverflow.com/a/24181667/2671 for details. Fixes #89 Closes #90 --- lib/cdn.js | 2 +- lib/git.js | 2 +- lib/repo.js | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/cdn.js b/lib/cdn.js index df54b08..1b9300a 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -61,7 +61,7 @@ module.exports = function( Release ) { console.log( "Adding files..." ); Release.chdir( targetCdn ); Release.exec( "git add ." , "Error adding files." ); - Release.exec( "git commit -m '" + commitMessage + "'" , "Error commiting files." ); + Release.exec( "git commit -m \"" + commitMessage + "\"" , "Error commiting files." ); }, _pushToCdn: function() { diff --git a/lib/git.js b/lib/git.js index 304b65e..71605ea 100644 --- a/lib/git.js +++ b/lib/git.js @@ -3,7 +3,7 @@ module.exports = function( Release ) { Release.define({ gitLog: function( format ) { var command = "git log " + Release.prevVersion + ".." + Release.newVersion + " " + - "--format='" + format + "'", + "--format=\"" + format + "\"", result = Release.exec({ command: command, silent: true diff --git a/lib/repo.js b/lib/repo.js index 3bbb918..79f4405 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -180,7 +180,7 @@ Release.define({ } } else if ( patch === 0 ) { Release.prevVersion = Release.exec( - "git for-each-ref --count=1 --sort=-authordate --format='%(refname:short)' " + + "git for-each-ref --count=1 --sort=-authordate --format=\"%(refname:short)\" " + "refs/tags/" + [ major, minor - 1 ].join( "." ) + "*" ).trim(); } else { @@ -237,14 +237,14 @@ Release.define({ Release.chdir( Release.dir.repo ); console.log( "Committing release artifacts..." ); Release.exec( "git add -f " + paths.join( " " ), "Error adding release artifacts to git." ); - Release.exec( "git commit -m '" + Release.newVersion + "'", + Release.exec( "git commit -m \"" + Release.newVersion + "\"", "Error committing release changes." ); console.log(); console.log( "Tagging release..." ); Release.exec( "git tag " + Release.newVersion, "Error tagging " + Release.newVersion + "." ); - Release.tagTime = Release.exec( "git log -1 --format='%ad'", + Release.tagTime = Release.exec( "git log -1 --format=\"%ad\"", "Error getting tag timestamp." ).trim(); }, @@ -268,8 +268,8 @@ Release.define({ Release._versionJSON( "package.json", Release.nextVersion ); console.log( "Committing version update..." ); - Release.exec( "git commit -am 'Build: Updating the " + Release.branch + - " version to " + Release.nextVersion + ".'", + Release.exec( "git commit -am \"Build: Updating the " + Release.branch + + " version to " + Release.nextVersion + ".\"", "Error committing package.json." ); }, From 6f85389d21cc4e45dd167aa55c33872b49efc3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 29 Sep 2016 10:52:54 -0400 Subject: [PATCH 51/83] npm: Replace deprecated `tag` method with `dist-tag` Closes gh-92 --- lib/npm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/npm.js b/lib/npm.js index 6565df9..15dcb06 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -84,7 +84,7 @@ module.exports = function( Release ) { } while ( npmTags.length ) { - npmCommand = "npm tag " + name + "@" + Release.newVersion + " " + npmTags.pop(); + npmCommand = "npm dist-tag add " + name + "@" + Release.newVersion + " " + npmTags.pop(); console.log( " " + chalk.cyan( npmCommand ) ); if ( !Release.isTest ) { Release.exec( npmCommand ); From 3b0c68eda6b9ee48315224523bfc568eab7d3f07 Mon Sep 17 00:00:00 2001 From: Timmy Willison <4timmywil@gmail.com> Date: Sat, 20 Jan 2018 12:04:01 -0500 Subject: [PATCH 52/83] repo: Install npm dependencies with the --no-save flag - Removed -q flag, as there is zero difference in output in this case. Closes gh-93 --- lib/repo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/repo.js b/lib/repo.js index 79f4405..d7e2b74 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -19,7 +19,7 @@ Release.define({ console.log(); console.log( "Installing dependencies..." ); - Release.exec( "npm install -q", "Error installing dependencies." ); + Release.exec( "npm install --no-save", "Error installing dependencies." ); console.log(); projectRelease = require( Release.dir.repo + "/build/release" ); @@ -27,7 +27,7 @@ Release.define({ if ( projectRelease.dependencies ) { console.log( "Installing release dependencies..." ); releaseDependencies = projectRelease.dependencies.join( " " ); - Release.exec( "npm install -q " + releaseDependencies, + Release.exec( "npm install --no-save " + releaseDependencies, "Error installing release dependencies." ); console.log(); } From 57a6303105d5cb74d7e52b9e78a011ebce3936c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Mon, 5 Feb 2018 17:56:20 +0100 Subject: [PATCH 53/83] Build: Add package-lock.json to .gitignore Closes #96 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 45c8d30..73a3a6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/grunt node_modules/grunt-contrib-jshint test-*.sh +package-lock.json From 591ca61e03a427b4ceef459a370a5699707c0e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Mon, 5 Feb 2018 17:56:59 +0100 Subject: [PATCH 54/83] GitHub: Fix repo detecting regexp The regular expression detecting the repository account+name didn't allow accounts & repo names containing dashes because of matching both those parts against the /\w+/ regexp. It was updated to match everything except the slash. This made the release script fail for jQuery Color. Closes #97 --- lib/github.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github.js b/lib/github.js index c61c223..e95864a 100644 --- a/lib/github.js +++ b/lib/github.js @@ -6,7 +6,7 @@ module.exports = function( Release ) { Release.define({ _githubApiPath: function( path ) { var repoUrl = Release._packageUrl( "bugs" ); - var repo = repoUrl.match( /github\.com\/(\w+\/\w+)/ )[ 1 ]; + var repo = repoUrl.match( /github\.com\/([^/]+\/[^/]+)/ )[ 1 ]; return "/repos/" + repo + "/" + path; }, From 5eb6f052f7d960f01d8fa17912b028476ec37b0e Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 26 Oct 2018 15:34:06 -0400 Subject: [PATCH 55/83] Release: Only auto-require .js files ...and not e.g. swap files --- release.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release.js b/release.js index edb0fcc..6ce95f8 100644 --- a/release.js +++ b/release.js @@ -15,8 +15,10 @@ var commonTasks, stableTasks, } }; -fs.readdirSync( "./lib" ).forEach(function( module ) { - require( "./lib/" + module )( Release ); +fs.readdirSync( "./lib" ).forEach(function( filename ) { + if ( filename.slice( -3 ) === ".js" ) { + require( "./lib/" + filename )( Release ); + } }); commonTasks = [ From 28c14a36fadb4ad112ce254da64862c638c83a8e Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 26 Oct 2018 15:36:30 -0400 Subject: [PATCH 56/83] Build: Introduce npm script for cleanup --- README.md | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7082206..e8a3a10 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ cd $cdn git push -f cd - -rm -rf __release/ +npm run clean node release.js --remote=$project ``` diff --git a/package.json b/package.json index b44ff17..95b1a75 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "grunt-contrib-jshint": "~0.7.2" }, "scripts": { - "test": "grunt" + "test": "grunt", + "clean": "rm -rf __release/" }, "repository": "jquery/jquery-release", "license": "MIT" From cb14b9b547d75ceb59d2aec4231c8bfea05e0a2f Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 26 Oct 2018 15:46:14 -0400 Subject: [PATCH 57/83] Build: Make isTest skip git commits and expose it as --dry-run --- README.md | 4 +++- docs/usage.txt | 5 ++++- lib/bootstrap.js | 5 ++++- lib/cdn.js | 3 ++- lib/npm.js | 20 ++++++++++---------- lib/repo.js | 6 ++++-- 6 files changed, 27 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e8a3a10..a6c6627 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ node release.js --remote=jquery/ You can do a test run of the release script by using a different remote repository. **It is recommended to perform tests from a fresh clone of the project being released.** The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs. +You can also explicitly specify `--dry-run` to skip actions that affect external state. + When working on features of this script, adapt the following to simplify testing a bit, replacing the paths for `project` and `cdn`: ```bash @@ -41,7 +43,7 @@ git push -f cd - npm run clean -node release.js --remote=$project +node --dry-run release.js --remote=$project ``` You need local clones of [fake-project](https://github.com/jquery/fake-project) and [fake-cdn](https://github.com/jquery/fake-cdn) (private, see note above), then update both variables to point to those. diff --git a/docs/usage.txt b/docs/usage.txt index 8d12e49..358017e 100644 --- a/docs/usage.txt +++ b/docs/usage.txt @@ -1,6 +1,9 @@ -Usage: node release.js [--pre-release=version] [--branch=branch] --remote=repo +Usage: node release.js [--dry-run] [--pre-release=version] [--branch=branch] --remote=repo OPTIONS + --dry-run + Executes in test mode, skipping npm publish and CDN push. + --pre-release=version Creates a pre-release instead of a stable release. Since the version number can't be determined automatically, it must be diff --git a/lib/bootstrap.js b/lib/bootstrap.js index a38d90e..3012900 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -41,6 +41,9 @@ Release.define({ Release._parseRemote(); Release.branch = Release.args.branch || "master"; Release.preRelease = Release.args.preRelease || false; + if ( Release.args.dryRun || Release.args.isTest ) { + Release.isTest = true; + } if ( Release.preRelease && !semver.valid( Release.preRelease) ) { Release.abort( "Invalid --pre-release argument, not valid semver: " + @@ -54,7 +57,7 @@ Release.define({ console.log(); if ( Release.isTest ) { - console.log( "This is a test release. npm will not be updated." ); + console.log( "This is a test release. GitHub and npm will not be updated." ); } else { console.log( "This is a real release. GitHub and npm will be updated." ); } diff --git a/lib/cdn.js b/lib/cdn.js index 1b9300a..0937577 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -66,7 +66,8 @@ module.exports = function( Release ) { _pushToCdn: function() { Release.chdir( projectCdn() ); - Release.exec( "git push", "Error pushing to CDN." ); + Release.exec( "git push" + (Release.isTest ? " --dry-run" : ""), + "Error pushing to CDN." ); console.log(); } }); diff --git a/lib/npm.js b/lib/npm.js index 15dcb06..5f5c3ed 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -68,9 +68,10 @@ module.exports = function( Release ) { Release.chdir( Release.dir.repo ); - var name = Release.readPackage().name, - npmTags = Release.npmTags(), - npmCommand = "npm publish --tag " + npmTags.pop(); + var npmPublish, + newVersion = Release.readPackage().name + "@" + Release.newVersion, + safety = Release.isTest ? " --dry-run" : "", + npmTags = Release.npmTags(); if ( Release.isTest ) { console.log( "Actual release would now publish to npm using:" ); @@ -78,16 +79,15 @@ module.exports = function( Release ) { console.log( "Publishing to npm, running:" ); } - console.log( " " + chalk.cyan( npmCommand ) ); - if ( !Release.isTest ) { - Release.exec( npmCommand ); - } + npmPublish = "npm publish" + safety + " --tag " + npmTags.pop(); + console.log( " " + chalk.cyan( npmPublish ) ); + Release.exec( npmPublish ); while ( npmTags.length ) { - npmCommand = "npm dist-tag add " + name + "@" + Release.newVersion + " " + npmTags.pop(); - console.log( " " + chalk.cyan( npmCommand ) ); + npmPublish = "npm dist-tag add " + newVersion + " " + npmTags.pop(); + console.log( " " + chalk.cyan( npmPublish ) ); if ( !Release.isTest ) { - Release.exec( npmCommand ); + Release.exec( npmPublish ); } } diff --git a/lib/repo.js b/lib/repo.js index d7e2b74..b2bf5c6 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -255,7 +255,8 @@ Release.define({ _pushRelease: function() { Release.chdir( Release.dir.repo ); console.log( "Pushing release to git repo..." ); - Release.exec( "git push --tags", "Error pushing tags to git repo." ); + Release.exec( "git push" + (Release.isTest ? " --dry-run " : "") + " --tags", + "Error pushing tags to git repo." ); }, _updateBranchVersion: function() { @@ -276,7 +277,8 @@ Release.define({ _pushBranch: function() { Release.chdir( Release.dir.repo ); console.log( "Pushing " + chalk.cyan( Release.branch ) + " to GitHub..." ); - Release.exec( "git push", "Error pushing to GitHub." ); + Release.exec( "git push" + (Release.isTest ? " --dry-run " : ""), + "Error pushing to GitHub." ); } }); From bd92153cb5955b607e7ecbb42dd78b8406094f0b Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 26 Oct 2018 15:47:51 -0400 Subject: [PATCH 58/83] Util: Drive all command invocation through Release.(raw)Exec --- lib/git.js | 8 ++++---- lib/npm.js | 5 ++--- lib/util.js | 6 +++++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/git.js b/lib/git.js index 71605ea..6a03032 100644 --- a/lib/git.js +++ b/lib/git.js @@ -2,12 +2,12 @@ module.exports = function( Release ) { Release.define({ gitLog: function( format ) { - var command = "git log " + Release.prevVersion + ".." + Release.newVersion + " " + - "--format=\"" + format + "\"", + var commitRange = Release.prevVersion + ".." + Release.newVersion, + gitLog = "git log --format=\"" + format + "\" " + commitRange, result = Release.exec({ - command: command, + command: gitLog, silent: true - }, "Error getting git log, command was: " + command ); + }, "Error getting git log, command was: " + gitLog ); result = result.split( /\r?\n/ ); if ( result[ result.length - 1 ] === "" ) { diff --git a/lib/npm.js b/lib/npm.js index 5f5c3ed..c905c8a 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -1,5 +1,4 @@ -var chalk = require( "chalk" ), - shell = require( "shelljs" ); +var chalk = require( "chalk" ); module.exports = function( Release ) { Release.define({ @@ -17,7 +16,7 @@ module.exports = function( Release ) { }, _getNpmOwners: function( npmPackage ) { - var result = shell.exec( "npm owner ls " + npmPackage, { silent: true } ); + var result = Release.rawExec( "npm owner ls " + npmPackage, { silent: true } ); if ( result.code !== 0 ) { // The npm package may not exist yet diff --git a/lib/util.js b/lib/util.js index 30f9003..7a1c553 100644 --- a/lib/util.js +++ b/lib/util.js @@ -4,6 +4,10 @@ var shell = require( "shelljs" ), module.exports = function( Release ) { Release.define({ + rawExec: function( command, options ) { + return shell.exec( command, options ); + }, + exec: function( _options, errorMessage ) { var result, command = _options.command || _options, @@ -15,7 +19,7 @@ Release.define({ errorMessage = errorMessage || "Error executing command: " + command; - result = shell.exec( command, options ); + result = Release.rawExec( command, options ); if ( result.code !== 0 ) { Release.abort( errorMessage ); } From c0b5db2e421128f2d44aa8a58681f1d8a14b4378 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 26 Oct 2018 15:48:24 -0400 Subject: [PATCH 59/83] GitHub: Improve error message --- lib/github.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github.js b/lib/github.js index e95864a..9dffc0c 100644 --- a/lib/github.js +++ b/lib/github.js @@ -27,7 +27,7 @@ Release.define({ })[ 0 ]; if ( !milestone ) { - Release.abort( "No milestone found." ); + Release.abort( "Milestone not found: " + version ); } callback( milestone.number ); From 07d4ac8859f99d6318f43c172469d7d6eb21132d Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 26 Oct 2018 15:49:13 -0400 Subject: [PATCH 60/83] CDN: Make fake remote repository location configurable --- README.md | 8 +++----- lib/cdn.js | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a6c6627..75afa27 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ node release.js --remote=jquery/ ### Testing the Release Script -***This only applies to those with access to some private repos. You can also use any other repo with a release script.*** - You can do a test run of the release script by using a different remote repository. **It is recommended to perform tests from a fresh clone of the project being released.** The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs. You can also explicitly specify `--dry-run` to skip actions that affect external state. @@ -43,13 +41,13 @@ git push -f cd - npm run clean -node --dry-run release.js --remote=$project +env TEST_REMOTE=$cdn node --dry-run release.js --remote=$project ``` -You need local clones of [fake-project](https://github.com/jquery/fake-project) and [fake-cdn](https://github.com/jquery/fake-cdn) (private, see note above), then update both variables to point to those. - Save as `test-release.sh` in the checkout of this repo, make it executable with `chmod +x test-release.sh`, then run with `./test-release.sh`. +***If you have access to the private repositories [fake-project](https://github.com/jquery/fake-project) and [fake-cdn](https://github.com/jquery/fake-cdn)***, you can use them by dropping the `--dry-run` argument and updating the `TEST_REMOTE` environment variable to "git@github.com:jquery/fake-cdn.git". + ### Full Usage Options See the [usage documentation](/docs/usage.txt) for the full set of options. You can also run the script with no parameters to see the usage. diff --git a/lib/cdn.js b/lib/cdn.js index 0937577..b07f3ba 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -4,7 +4,7 @@ var shell = require( "shelljs" ), module.exports = function( Release ) { var realRemote = "git@github.com:jquery/codeorigin.jquery.com.git", - testRemote = "git@github.com:jquery/fake-cdn.git"; + testRemote = process.env.TEST_REMOTE || "git@github.com:jquery/fake-cdn.git"; function projectCdn() { var project = Release.readPackage().name, From 21b0f6fa6e35bd61d9d05ff6356a2c7c71ec990f Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Tue, 30 Oct 2018 10:41:48 -0400 Subject: [PATCH 61/83] Release: Clarify filename suffix test --- release.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.js b/release.js index 6ce95f8..6a69dd4 100644 --- a/release.js +++ b/release.js @@ -16,7 +16,7 @@ var commonTasks, stableTasks, }; fs.readdirSync( "./lib" ).forEach(function( filename ) { - if ( filename.slice( -3 ) === ".js" ) { + if ( filename.endsWith( ".js" ) ) { require( "./lib/" + filename )( Release ); } }); From 1ef3335b73a0753d409a16eea7732866d13bdfd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Thu, 10 Oct 2019 23:33:35 +0200 Subject: [PATCH 62/83] Refactor the project * switch from JSHint to ESLint * get rid of Grunt * update most dependencies * assume Node.js >=10, test on it instead of 0.10 Closes gh-101 --- .eslintignore | 1 + .eslintrc.json | 18 + .gitignore | 2 - .jshintrc | 16 - .npmrc | 1 + .travis.yml | 4 +- Gruntfile.js | 16 - lib/bootstrap.js | 24 +- lib/cdn.js | 15 +- lib/changelog.js | 18 +- lib/contributors.js | 24 +- lib/git.js | 8 +- lib/github.js | 44 +- lib/npm.js | 16 +- lib/prompt.js | 11 +- lib/repo.js | 31 +- lib/trac.js | 16 +- lib/util.js | 6 +- node_modules/.bin/semver | 2 +- node_modules/ansi-styles/index.js | 165 ++ node_modules/ansi-styles/license | 9 + node_modules/ansi-styles/package.json | 88 + node_modules/ansi-styles/readme.md | 147 ++ node_modules/chalk/index.js | 248 ++- node_modules/chalk/index.js.flow | 93 + node_modules/chalk/license | 20 +- node_modules/chalk/node_modules/.bin/has-ansi | 1 - .../chalk/node_modules/.bin/strip-ansi | 1 - .../chalk/node_modules/.bin/supports-color | 1 - .../chalk/node_modules/ansi-styles/index.js | 56 - .../node_modules/ansi-styles/package.json | 80 - .../chalk/node_modules/ansi-styles/readme.md | 86 - .../node_modules/escape-string-regexp/license | 21 - .../escape-string-regexp/package.json | 70 - .../chalk/node_modules/has-ansi/cli.js | 45 - .../chalk/node_modules/has-ansi/index.js | 4 - .../chalk/node_modules/has-ansi/license | 21 - .../has-ansi/node_modules/ansi-regex/index.js | 4 - .../has-ansi/node_modules/ansi-regex/license | 21 - .../node_modules/ansi-regex/package.json | 86 - .../node_modules/ansi-regex/readme.md | 33 - .../has-ansi/node_modules/get-stdin/index.js | 49 - .../node_modules/get-stdin/package.json | 64 - .../has-ansi/node_modules/get-stdin/readme.md | 44 - .../chalk/node_modules/has-ansi/package.json | 92 - .../chalk/node_modules/has-ansi/readme.md | 45 - .../chalk/node_modules/strip-ansi/cli.js | 47 - .../chalk/node_modules/strip-ansi/index.js | 6 - .../node_modules/ansi-regex/index.js | 4 - .../node_modules/ansi-regex/license | 21 - .../node_modules/ansi-regex/package.json | 86 - .../node_modules/ansi-regex/readme.md | 33 - .../node_modules/strip-ansi/package.json | 89 - .../chalk/node_modules/strip-ansi/readme.md | 43 - .../chalk/node_modules/supports-color/cli.js | 29 - .../node_modules/supports-color/index.js | 47 - .../chalk/node_modules/supports-color/license | 21 - .../node_modules/supports-color/package.json | 85 - .../node_modules/supports-color/readme.md | 46 - node_modules/chalk/package.json | 126 +- node_modules/chalk/readme.md | 269 ++- node_modules/chalk/templates.js | 128 ++ node_modules/chalk/types/index.d.ts | 97 + node_modules/changelogplease/LICENSE.txt | 2 +- node_modules/changelogplease/README.md | 25 +- node_modules/changelogplease/index.js | 104 +- .../node_modules/git-tools/package.json | 36 - node_modules/changelogplease/package.json | 64 +- node_modules/color-convert/CHANGELOG.md | 54 + node_modules/color-convert/LICENSE | 21 + node_modules/color-convert/README.md | 68 + node_modules/color-convert/conversions.js | 868 ++++++++ node_modules/color-convert/index.js | 78 + node_modules/color-convert/package.json | 80 + node_modules/color-convert/route.js | 97 + node_modules/color-name/.eslintrc.json | 43 + node_modules/color-name/.npmignore | 107 + node_modules/color-name/LICENSE | 8 + node_modules/color-name/README.md | 11 + node_modules/color-name/index.js | 152 ++ node_modules/color-name/package.json | 52 + node_modules/color-name/test.js | 7 + .../escape-string-regexp/index.js | 2 +- .../license | 0 .../escape-string-regexp/package.json | 81 + .../escape-string-regexp/readme.md | 8 +- .../node_modules => }/git-tools/.npmignore | 0 .../git-tools/LICENSE-MIT.txt | 0 .../node_modules => }/git-tools/README.md | 0 .../node_modules => }/git-tools/git-tools.js | 0 node_modules/git-tools/package.json | 52 + node_modules/github-request/lib/request.js | 2 +- node_modules/github-request/package.json | 67 +- node_modules/has-flag/index.js | 8 + node_modules/has-flag/license | 9 + node_modules/has-flag/package.json | 75 + node_modules/has-flag/readme.md | 70 + node_modules/isexe/.npmignore | 2 + node_modules/isexe/LICENSE | 15 + node_modules/isexe/README.md | 51 + node_modules/isexe/index.js | 57 + node_modules/isexe/mode.js | 41 + node_modules/isexe/package.json | 59 + node_modules/isexe/test/basic.js | 221 ++ node_modules/isexe/windows.js | 42 + node_modules/semver/.npmignore | 1 - node_modules/semver/CHANGELOG.md | 70 + node_modules/semver/LICENSE | 36 +- node_modules/semver/Makefile | 24 - node_modules/semver/README.md | 471 +++- node_modules/semver/bin/semver | 124 -- node_modules/semver/bin/semver.js | 174 ++ node_modules/semver/foot.js | 6 - node_modules/semver/head.js | 2 - node_modules/semver/package.json | 72 +- node_modules/semver/range.bnf | 16 + node_modules/semver/semver.browser.js | 1007 --------- node_modules/semver/semver.browser.js.gz | Bin 6903 -> 0 bytes node_modules/semver/semver.js | 1929 +++++++++++------ node_modules/semver/semver.min.js | 1 - node_modules/semver/semver.min.js.gz | Bin 3231 -> 0 bytes node_modules/semver/test/amd.js | 15 - node_modules/semver/test/gtr.js | 173 -- node_modules/semver/test/index.js | 556 ----- node_modules/semver/test/ltr.js | 174 -- node_modules/semver/test/no-module.js | 19 - node_modules/shelljs/package.json | 61 +- node_modules/supports-color/browser.js | 5 + node_modules/supports-color/index.js | 131 ++ node_modules/supports-color/license | 9 + node_modules/supports-color/package.json | 84 + node_modules/supports-color/readme.md | 66 + node_modules/which/CHANGELOG.md | 152 ++ node_modules/which/LICENSE | 32 +- node_modules/which/README.md | 48 +- node_modules/which/bin/which | 52 +- node_modules/which/package.json | 72 +- node_modules/which/which.js | 179 +- package.json | 16 +- release.js | 10 +- 140 files changed, 6668 insertions(+), 4902 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json delete mode 100644 .jshintrc create mode 100644 .npmrc delete mode 100644 Gruntfile.js create mode 100644 node_modules/ansi-styles/index.js create mode 100644 node_modules/ansi-styles/license create mode 100644 node_modules/ansi-styles/package.json create mode 100644 node_modules/ansi-styles/readme.md create mode 100644 node_modules/chalk/index.js.flow delete mode 120000 node_modules/chalk/node_modules/.bin/has-ansi delete mode 120000 node_modules/chalk/node_modules/.bin/strip-ansi delete mode 120000 node_modules/chalk/node_modules/.bin/supports-color delete mode 100644 node_modules/chalk/node_modules/ansi-styles/index.js delete mode 100644 node_modules/chalk/node_modules/ansi-styles/package.json delete mode 100644 node_modules/chalk/node_modules/ansi-styles/readme.md delete mode 100644 node_modules/chalk/node_modules/escape-string-regexp/license delete mode 100644 node_modules/chalk/node_modules/escape-string-regexp/package.json delete mode 100755 node_modules/chalk/node_modules/has-ansi/cli.js delete mode 100644 node_modules/chalk/node_modules/has-ansi/index.js delete mode 100644 node_modules/chalk/node_modules/has-ansi/license delete mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js delete mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license delete mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json delete mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md delete mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js delete mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json delete mode 100644 node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md delete mode 100644 node_modules/chalk/node_modules/has-ansi/package.json delete mode 100644 node_modules/chalk/node_modules/has-ansi/readme.md delete mode 100755 node_modules/chalk/node_modules/strip-ansi/cli.js delete mode 100644 node_modules/chalk/node_modules/strip-ansi/index.js delete mode 100644 node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js delete mode 100644 node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license delete mode 100644 node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json delete mode 100644 node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md delete mode 100644 node_modules/chalk/node_modules/strip-ansi/package.json delete mode 100644 node_modules/chalk/node_modules/strip-ansi/readme.md delete mode 100755 node_modules/chalk/node_modules/supports-color/cli.js delete mode 100644 node_modules/chalk/node_modules/supports-color/index.js delete mode 100644 node_modules/chalk/node_modules/supports-color/license delete mode 100644 node_modules/chalk/node_modules/supports-color/package.json delete mode 100644 node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/chalk/templates.js create mode 100644 node_modules/chalk/types/index.d.ts delete mode 100644 node_modules/changelogplease/node_modules/git-tools/package.json create mode 100644 node_modules/color-convert/CHANGELOG.md create mode 100644 node_modules/color-convert/LICENSE create mode 100644 node_modules/color-convert/README.md create mode 100644 node_modules/color-convert/conversions.js create mode 100644 node_modules/color-convert/index.js create mode 100644 node_modules/color-convert/package.json create mode 100644 node_modules/color-convert/route.js create mode 100644 node_modules/color-name/.eslintrc.json create mode 100644 node_modules/color-name/.npmignore create mode 100644 node_modules/color-name/LICENSE create mode 100644 node_modules/color-name/README.md create mode 100644 node_modules/color-name/index.js create mode 100644 node_modules/color-name/package.json create mode 100644 node_modules/color-name/test.js rename node_modules/{chalk/node_modules => }/escape-string-regexp/index.js (78%) rename node_modules/{chalk/node_modules/ansi-styles => escape-string-regexp}/license (100%) create mode 100644 node_modules/escape-string-regexp/package.json rename node_modules/{chalk/node_modules => }/escape-string-regexp/readme.md (69%) rename node_modules/{changelogplease/node_modules => }/git-tools/.npmignore (100%) rename node_modules/{changelogplease/node_modules => }/git-tools/LICENSE-MIT.txt (100%) rename node_modules/{changelogplease/node_modules => }/git-tools/README.md (100%) rename node_modules/{changelogplease/node_modules => }/git-tools/git-tools.js (100%) create mode 100644 node_modules/git-tools/package.json create mode 100644 node_modules/has-flag/index.js create mode 100644 node_modules/has-flag/license create mode 100644 node_modules/has-flag/package.json create mode 100644 node_modules/has-flag/readme.md create mode 100644 node_modules/isexe/.npmignore create mode 100644 node_modules/isexe/LICENSE create mode 100644 node_modules/isexe/README.md create mode 100644 node_modules/isexe/index.js create mode 100644 node_modules/isexe/mode.js create mode 100644 node_modules/isexe/package.json create mode 100644 node_modules/isexe/test/basic.js create mode 100644 node_modules/isexe/windows.js delete mode 100644 node_modules/semver/.npmignore create mode 100644 node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/semver/Makefile delete mode 100755 node_modules/semver/bin/semver create mode 100755 node_modules/semver/bin/semver.js delete mode 100644 node_modules/semver/foot.js delete mode 100644 node_modules/semver/head.js create mode 100644 node_modules/semver/range.bnf delete mode 100644 node_modules/semver/semver.browser.js delete mode 100644 node_modules/semver/semver.browser.js.gz delete mode 100644 node_modules/semver/semver.min.js delete mode 100644 node_modules/semver/semver.min.js.gz delete mode 100644 node_modules/semver/test/amd.js delete mode 100644 node_modules/semver/test/gtr.js delete mode 100644 node_modules/semver/test/index.js delete mode 100644 node_modules/semver/test/ltr.js delete mode 100644 node_modules/semver/test/no-module.js create mode 100644 node_modules/supports-color/browser.js create mode 100644 node_modules/supports-color/index.js create mode 100644 node_modules/supports-color/license create mode 100644 node_modules/supports-color/package.json create mode 100644 node_modules/supports-color/readme.md create mode 100644 node_modules/which/CHANGELOG.md diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..706d608 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +__release/** diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..2b60cd3 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "root": true, + + "extends": "jquery", + + "parserOptions": { + "ecmaVersion": 2018 + }, + + "env": { + "es6": true, + "node": true + }, + + "rules": { + "strict": [ "error", "global" ] + } +} diff --git a/.gitignore b/.gitignore index 73a3a6e..245c836 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ -node_modules/grunt -node_modules/grunt-contrib-jshint test-*.sh package-lock.json diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index e79eeee..0000000 --- a/.jshintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "boss": true, - "curly": true, - "eqeqeq": true, - "eqnull": true, - "expr": true, - "immed": true, - "noarg": true, - "quotmark": "double", - "smarttabs": true, - "trailing": true, - "undef": true, - "unused": true, - - "node": true -} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..cffe8cd --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +save-exact=true diff --git a/.travis.yml b/.travis.yml index 6ef04eb..4555503 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,3 @@ language: node_js node_js: - - "0.10" -before_script: - - npm install -g grunt-cli + - "10" diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 713337b..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = function( grunt ) { - -grunt.loadNpmTasks( "grunt-contrib-jshint" ); - -grunt.initConfig({ - jshint: { - options: { - jshintrc: true - }, - all: [ "release.js", "lib/*.js" ] - } -}); - -grunt.registerTask( "default", [ "jshint" ] ); - -}; diff --git a/lib/bootstrap.js b/lib/bootstrap.js index 3012900..d7792f2 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -1,3 +1,5 @@ +"use strict"; + var fs = require( "fs" ), path = require( "path" ), semver = require( "semver" ), @@ -5,7 +7,7 @@ var fs = require( "fs" ), module.exports = function( Release ) { -Release.define({ +Release.define( { isTest: true, _showUsage: function() { @@ -13,30 +15,30 @@ Release.define({ }, _checkExecutables: function() { - [ "git", "npm", "grunt", "curl" ].forEach(function( command ) { + [ "git", "npm", "curl" ].forEach( function( command ) { try { which.sync( command ); - } catch( e ) { + } catch ( e ) { Release.abort( "Missing required executable: " + command ); } - }); + } ); }, _parseArguments: function() { Release.args = {}; - process.argv.forEach(function( arg ) { + process.argv.forEach( function( arg ) { var name, value, matches = /--([^=]+)(=(.+))?/.exec( arg ); if ( matches ) { - name = matches[ 1 ].replace( /-([a-z])/gi, function( all, letter ) { + name = matches[ 1 ].replace( /-([a-z])/gi, function( _all, letter ) { return letter.toUpperCase(); - }); + } ); value = matches[ 3 ] || true; Release.args[ name ] = value; } - }); + } ); Release._parseRemote(); Release.branch = Release.args.branch || "master"; @@ -45,13 +47,13 @@ Release.define({ Release.isTest = true; } - if ( Release.preRelease && !semver.valid( Release.preRelease) ) { + if ( Release.preRelease && !semver.valid( Release.preRelease ) ) { Release.abort( "Invalid --pre-release argument, not valid semver: " + Release.preRelease ); } console.log(); - console.log( "\tRelease type: " + (Release.preRelease ? "pre-release" : "stable") ); + console.log( "\tRelease type: " + ( Release.preRelease ? "pre-release" : "stable" ) ); console.log( "\tRemote: " + Release.remote ); console.log( "\tBranch: " + Release.branch ); console.log(); @@ -98,6 +100,6 @@ Release.define({ console.log( "Creating directory..." ); fs.mkdirSync( Release.dir.base ); } -}); +} ); }; diff --git a/lib/cdn.js b/lib/cdn.js index b07f3ba..d5e5745 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -1,3 +1,5 @@ +"use strict"; + var shell = require( "shelljs" ), fs = require( "fs" ), chalk = require( "chalk" ); @@ -29,7 +31,7 @@ module.exports = function( Release ) { return jqueryCdn + "/" + project + "/" + Release.newVersion; } - Release.define({ + Release.define( { cdnPublish: "dist/cdn", _cloneCdnRepo: function() { var local = Release.dir.base + "/codeorigin.jquery.com", @@ -54,21 +56,22 @@ module.exports = function( Release ) { commitMessage = npmPackage + ": Added version " + Release.newVersion; Release.chdir( Release.dir.base ); - console.log( "Copying files from " + chalk.cyan( releaseCdn ) + " to " + chalk.cyan( targetCdn ) + "." ); + console.log( "Copying files from " + chalk.cyan( releaseCdn ) + + " to " + chalk.cyan( targetCdn ) + "." ); shell.mkdir( "-p", targetCdn ); shell.cp( "-r", releaseCdn + "/*", targetCdn ); console.log( "Adding files..." ); Release.chdir( targetCdn ); - Release.exec( "git add ." , "Error adding files." ); - Release.exec( "git commit -m \"" + commitMessage + "\"" , "Error commiting files." ); + Release.exec( "git add .", "Error adding files." ); + Release.exec( "git commit -m \"" + commitMessage + "\"", "Error commiting files." ); }, _pushToCdn: function() { Release.chdir( projectCdn() ); - Release.exec( "git push" + (Release.isTest ? " --dry-run" : ""), + Release.exec( "git push" + ( Release.isTest ? " --dry-run" : "" ), "Error pushing to CDN." ); console.log(); } - }); + } ); }; diff --git a/lib/changelog.js b/lib/changelog.js index 54560c9..3cf039a 100644 --- a/lib/changelog.js +++ b/lib/changelog.js @@ -1,13 +1,15 @@ +"use strict"; + var fs = require( "fs" ), changelogplease = require( "changelogplease" ), chalk = require( "chalk" ); module.exports = function( Release ) { -Release.define({ +Release.define( { _generateChangelog: function( callback ) { - Release._generateCommitChangelog(function( commitChangelog ) { - Release._generateIssueChangelog(function( issueChangelog ) { + Release._generateCommitChangelog( function( commitChangelog ) { + Release._generateIssueChangelog( function( issueChangelog ) { var changelogPath = Release.dir.base + "/changelog", changelog = Release.changelogShell() + commitChangelog + @@ -19,8 +21,8 @@ Release.define({ console.log( "Stored changelog in " + chalk.cyan( changelogPath ) + "." ); callback(); - }); - }); + } ); + } ); }, changelogShell: function() { @@ -34,7 +36,7 @@ Release.define({ _generateCommitChangelog: function( callback ) { console.log( "Adding commits..." ); - changelogplease({ + changelogplease( { ticketUrl: Release._ticketUrl() + "{id}", commitUrl: Release._repositoryUrl() + "/commit/{id}", repo: Release.dir.repo, @@ -45,7 +47,7 @@ Release.define({ } callback( log ); - }); + } ); }, _generateIssueChangelog: function( callback ) { @@ -53,6 +55,6 @@ Release.define({ Release._generateTracChangelog( callback ) : Release._generateGithubChangelog( callback ); } -}); +} ); }; diff --git a/lib/contributors.js b/lib/contributors.js index 1a50f96..ff016a1 100644 --- a/lib/contributors.js +++ b/lib/contributors.js @@ -1,3 +1,5 @@ +"use strict"; + var fs = require( "fs" ), chalk = require( "chalk" ); @@ -5,38 +7,38 @@ module.exports = function( Release ) { function unique( arr ) { var obj = {}; - arr.forEach(function( item ) { + arr.forEach( function( item ) { obj[ item ] = 1; - }); + } ); return Object.keys( obj ); } -Release.define({ +Release.define( { _gatherContributors: function( callback ) { var contributorsPath = Release.dir.base + "/contributors.txt"; console.log( "Adding reporters and commenters from issues..." ); - Release._gatherIssueContributors(function( contributors ) { + Release._gatherIssueContributors( function( contributors ) { console.log( "Adding committers and authors..." ); Release.chdir( Release.dir.repo ); contributors = contributors.concat( Release.gitLog( "%aN%n%cN" ) ); console.log( "Sorting contributors..." ); - contributors = unique( contributors ).sort(function( a, b ) { + contributors = unique( contributors ).sort( function( a, b ) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1; - }); + } ); console.log( "Adding people thanked in commits..." ); contributors = contributors.concat( - Release.gitLog( "%b%n%s" ).filter(function( line ) { - return (/thank/i).test( line ); - })); + Release.gitLog( "%b%n%s" ).filter( function( line ) { + return ( /thank/i ).test( line ); + } ) ); fs.writeFileSync( contributorsPath, contributors.join( "\n" ) ); console.log( "Stored contributors in " + chalk.cyan( contributorsPath ) + "." ); callback(); - }); + } ); }, _gatherIssueContributors: function( callback ) { @@ -44,6 +46,6 @@ Release.define({ Release._gatherTracContributors( callback ) : Release._gatherGithubIssueContributors( callback ); } -}); +} ); }; diff --git a/lib/git.js b/lib/git.js index 6a03032..4c93e54 100644 --- a/lib/git.js +++ b/lib/git.js @@ -1,10 +1,12 @@ +"use strict"; + module.exports = function( Release ) { -Release.define({ +Release.define( { gitLog: function( format ) { var commitRange = Release.prevVersion + ".." + Release.newVersion, gitLog = "git log --format=\"" + format + "\" " + commitRange, - result = Release.exec({ + result = Release.exec( { command: gitLog, silent: true }, "Error getting git log, command was: " + gitLog ); @@ -16,6 +18,6 @@ Release.define({ return result; } -}); +} ); }; diff --git a/lib/github.js b/lib/github.js index 9dffc0c..5efd80b 100644 --- a/lib/github.js +++ b/lib/github.js @@ -1,9 +1,11 @@ +"use strict"; + var querystring = require( "querystring" ); var github = require( "github-request" ); module.exports = function( Release ) { -Release.define({ +Release.define( { _githubApiPath: function( path ) { var repoUrl = Release._packageUrl( "bugs" ); var repo = repoUrl.match( /github\.com\/([^/]+\/[^/]+)/ )[ 1 ]; @@ -11,7 +13,7 @@ Release.define({ }, _githubMilestone: function( callback ) { - github.requestAll({ + github.requestAll( { path: Release._githubApiPath( "milestones" ) }, function( error, milestones ) { if ( error ) { @@ -22,25 +24,25 @@ Release.define({ /^\d+\.\d+\.\d+/.exec( Release.newVersion )[ 0 ] : Release.newVersion; - var milestone = milestones.filter(function( milestone ) { + var milestone = milestones.filter( function( milestone ) { return milestone.title === version; - })[ 0 ]; + } )[ 0 ]; if ( !milestone ) { Release.abort( "Milestone not found: " + version ); } callback( milestone.number ); - }); + } ); }, _generateGithubChangelog: function( callback ) { - Release._githubMilestone(function( milestone ) { - github.requestAll({ + Release._githubMilestone( function( milestone ) { + github.requestAll( { path: Release._githubApiPath( "issues?" + querystring.stringify( { milestone: milestone, state: "closed" - } ) ), + } ) ) }, function( error, issues ) { if ( error ) { return Release.abort( "Error getting issues.", error ); @@ -49,46 +51,46 @@ Release.define({ var changelog = issues // Remove pull requests from results - .filter(function( issue ) { + .filter( function( issue ) { return !issue.pull_request; - }) + } ) // Convert each issue to text - .map(function( issue ) { + .map( function( issue ) { var component = "(none)"; - issue.labels.forEach(function( label ) { + issue.labels.forEach( function( label ) { if ( /^component:/i.test( label.name ) ) { component = label.name.substring( 11 ); } - }); + } ); return [ "#" + issue.number, component, issue.title ] - .sort(function( a, b ) { + .sort( function( a, b ) { return a.component > b.component ? 1 : -1; - }) + } ) .join( "\t" ); - }) + } ) // Concatenate the issues into a string .join( "\n" ) + "\n"; callback( changelog ); - }); - }); + } ); + } ); }, _gatherGithubIssueContributors: function( callback ) { // TODO - process.nextTick(function() { + process.nextTick( function() { callback( [] ); - }); + } ); } -}); +} ); }; diff --git a/lib/npm.js b/lib/npm.js index c905c8a..cc2b659 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -1,9 +1,11 @@ +"use strict"; + var chalk = require( "chalk" ); module.exports = function( Release ) { - Release.define({ + Release.define( { _getNpmUser: function() { - var user = Release.exec({ + var user = Release.exec( { command: "npm whoami", silent: true }, "Error getting npm user." ); @@ -22,8 +24,8 @@ module.exports = function( Release ) { // The npm package may not exist yet if ( result.output.split( "\n" ).some( function( line ) { - return (/ERR! 404/).test( line ); - }) + return ( /ERR! 404/ ).test( line ); + } ) ) { return []; } @@ -31,9 +33,9 @@ module.exports = function( Release ) { Release.abort( "Error getting npm owners." ); } - return result.output.trim().split( "\n" ).map(function( owner ) { + return result.output.trim().split( "\n" ).map( function( owner ) { return owner.split( " " )[ 0 ]; - }); + } ); }, _checkNpmCredentials: function() { @@ -92,5 +94,5 @@ module.exports = function( Release ) { console.log(); } - }); + } ); }; diff --git a/lib/prompt.js b/lib/prompt.js index 825211e..cb57a5e 100644 --- a/lib/prompt.js +++ b/lib/prompt.js @@ -1,13 +1,15 @@ +"use strict"; + var chalk = require( "chalk" ); module.exports = function( Release ) { -Release.define({ +Release.define( { prompt: function( fn ) { process.stdin.once( "data", function( chunk ) { process.stdin.pause(); fn( chunk.toString().trim() ); - }); + } ); process.stdin.resume(); }, @@ -17,9 +19,10 @@ Release.define({ }, confirmReview: function( fn ) { - console.log( chalk.yellow( "Please review the output and generated files as a sanity check." ) ); + console.log( chalk.yellow( + "Please review the output and generated files as a sanity check." ) ); Release.confirm( fn ); } -}); +} ); }; diff --git a/lib/repo.js b/lib/repo.js index b2bf5c6..8be1ec1 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -1,9 +1,11 @@ +"use strict"; + var fs = require( "fs" ), chalk = require( "chalk" ); module.exports = function( Release ) { -Release.define({ +Release.define( { _jsonFiles: [ "package.json", "bower.json" ], _cloneRepo: function() { var projectRelease, releaseDependencies; @@ -67,7 +69,7 @@ Release.define({ .pop(); Release.chdir( Release.dir.repo ); - result = Release.exec({ + result = Release.exec( { command: "grunt authors", silent: true }, "Error getting list of authors." ); @@ -148,9 +150,9 @@ Release.define({ }, _setVersion: function( version ) { - Release._jsonFiles.forEach(function( file ) { + Release._jsonFiles.forEach( function( file ) { Release._versionJSON( file, version ); - }); + } ); }, _getVersions: function() { @@ -193,7 +195,8 @@ Release.define({ console.log( "We are going from " + chalk.cyan( Release.prevVersion ) + " to " + chalk.cyan( Release.newVersion ) + "." ); - console.log( "After the release, the version will be " + chalk.cyan( Release.nextVersion ) + "." ); + console.log( "After the release, the version will be " + + chalk.cyan( Release.nextVersion ) + "." ); }, _createReleaseBranch: function( fn ) { @@ -211,25 +214,25 @@ Release.define({ json = Release.readPackage(); json.author.url = json.author.url.replace( "master", Release.newVersion ); if ( json.licenses ) { - json.licenses.forEach(function( license ) { + json.licenses.forEach( function( license ) { license.url = license.url.replace( "master", Release.newVersion ); - }); + } ); } Release.writePackage( json ); - Release.generateArtifacts(function( paths ) { + Release.generateArtifacts( function( paths ) { Release._createTag( paths ); fn(); - }); + } ); }, _createTag: function( paths ) { var jsonFiles = []; - Release._jsonFiles.forEach(function( name ) { + Release._jsonFiles.forEach( function( name ) { if ( fs.existsSync( name ) ) { jsonFiles.push( name ); } - }); + } ); // Ensure that at least one file is in the array so that `git add` won't error paths = paths.concat( jsonFiles ); @@ -255,7 +258,7 @@ Release.define({ _pushRelease: function() { Release.chdir( Release.dir.repo ); console.log( "Pushing release to git repo..." ); - Release.exec( "git push" + (Release.isTest ? " --dry-run " : "") + " --tags", + Release.exec( "git push" + ( Release.isTest ? " --dry-run " : "" ) + " --tags", "Error pushing tags to git repo." ); }, @@ -277,9 +280,9 @@ Release.define({ _pushBranch: function() { Release.chdir( Release.dir.repo ); console.log( "Pushing " + chalk.cyan( Release.branch ) + " to GitHub..." ); - Release.exec( "git push" + (Release.isTest ? " --dry-run " : ""), + Release.exec( "git push" + ( Release.isTest ? " --dry-run " : "" ), "Error pushing to GitHub." ); } -}); +} ); }; diff --git a/lib/trac.js b/lib/trac.js index 848decc..31c86fa 100644 --- a/lib/trac.js +++ b/lib/trac.js @@ -1,37 +1,39 @@ +"use strict"; + module.exports = function( Release ) { -Release.define({ +Release.define( { trac: function( path ) { var tracUrl = Release._packageUrl( "bugs" ); - return Release.exec({ + return Release.exec( { command: "curl -s '" + tracUrl + path + "&format=tab'", silent: true }, "Error getting Trac data." ); }, _generateTracChangelog: function( callback ) { - process.nextTick(function() { + process.nextTick( function() { console.log( "Adding Trac tickets..." ); var changelog = Release.trac( "/query?milestone=" + Release.newVersion + "&resolution=fixed" + "&col=id&col=component&col=summary&order=component" ) + "\n"; callback( changelog ); - }); + } ); }, _gatherTracContributors: function( callback ) { var url = "/report/" + Release.contributorReportId + "?V=" + Release.tracMilestone() + "&max=-1"; - process.nextTick(function() { + process.nextTick( function() { callback( Release.trac( url ) .split( /\r?\n/ ) // Remove header and trailing newline .slice( 1, -1 ) ); - }); + } ); } -}); +} ); }; diff --git a/lib/util.js b/lib/util.js index 7a1c553..214295b 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,9 +1,11 @@ +"use strict"; + var shell = require( "shelljs" ), chalk = require( "chalk" ); module.exports = function( Release ) { -Release.define({ +Release.define( { rawExec: function( command, options ) { return shell.exec( command, options ); }, @@ -74,6 +76,6 @@ Release.define({ method( next ); } } -}); +} ); }; diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver index 317eb29..5aaadf4 120000 --- a/node_modules/.bin/semver +++ b/node_modules/.bin/semver @@ -1 +1 @@ -../semver/bin/semver \ No newline at end of file +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js new file mode 100644 index 0000000..90a871c --- /dev/null +++ b/node_modules/ansi-styles/index.js @@ -0,0 +1,165 @@ +'use strict'; +const colorConvert = require('color-convert'); + +const wrapAnsi16 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => function () { + const rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Fix humans + styles.color.grey = styles.color.gray; + + for (const groupName of Object.keys(styles)) { + const group = styles[groupName]; + + for (const styleName of Object.keys(group)) { + const style = group[styleName]; + + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + } + + const ansi2ansi = n => n; + const rgb2rgb = (r, g, b) => [r, g, b]; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + for (let key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== 'object') { + continue; + } + + const suite = colorConvert[key]; + + if (key === 'ansi16') { + key = 'ansi'; + } + + if ('ansi16' in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + + if ('ansi256' in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + + if ('rgb' in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/node_modules/ansi-styles/license b/node_modules/ansi-styles/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/ansi-styles/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..676858d --- /dev/null +++ b/node_modules/ansi-styles/package.json @@ -0,0 +1,88 @@ +{ + "_from": "ansi-styles@^3.2.1", + "_id": "ansi-styles@3.2.1", + "_inBundle": false, + "_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "_location": "/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-styles@^3.2.1", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "^3.2.1", + "saveSpec": null, + "fetchSpec": "^3.2.1" + }, + "_requiredBy": [ + "/chalk", + "/slice-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "_shasum": "41fbb20243e50b12be0f04b8dedbf07520ce841d", + "_spec": "ansi-styles@^3.2.1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "ava": { + "require": "babel-polyfill" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "bundleDependencies": false, + "dependencies": { + "color-convert": "^1.9.0" + }, + "deprecated": false, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "ava": "*", + "babel-polyfill": "^6.23.0", + "svg-term-cli": "^2.1.1", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-styles#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", + "test": "xo && ava" + }, + "version": "3.2.1" +} diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000..3158e2d --- /dev/null +++ b/node_modules/ansi-styles/readme.md @@ -0,0 +1,147 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + + + + +## Install + +``` +$ npm install ansi-styles +``` + + +## Usage + +```js +const style = require('ansi-styles'); + +console.log(`${style.green.open}Hello world!${style.green.close}`); + + +// Color conversion between 16/256/truecolor +// NOTE: If conversion goes to 16 colors or 256 colors, the original color +// may be degraded to fit that color palette. This means terminals +// that do not support 16 million colors will best-match the +// original color. +console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); +console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); +console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); +``` + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(Not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(Not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` ("bright black") +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` +- `bgBlackBright` +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` + + +## Advanced usage + +By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `style.modifier` +- `style.color` +- `style.bgColor` + +###### Example + +```js +console.log(style.color.green.open); +``` + +Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. + +###### Example + +```js +console.log(style.codes.get(36)); +//=> 39 +``` + + +## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) + +`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. + +To use these, call the associated conversion function with the intended output, for example: + +```js +style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code +style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code + +style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code +style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code + +style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code +style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code +``` + + +## Related + +- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/chalk/index.js b/node_modules/chalk/index.js index 4138a64..1cc5fa8 100644 --- a/node_modules/chalk/index.js +++ b/node_modules/chalk/index.js @@ -1,100 +1,228 @@ 'use strict'; -var escapeStringRegexp = require('escape-string-regexp'); -var ansiStyles = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasAnsi = require('has-ansi'); -var supportsColor = require('supports-color'); -var defineProps = Object.defineProperties; +const escapeStringRegexp = require('escape-string-regexp'); +const ansiStyles = require('ansi-styles'); +const stdoutColor = require('supports-color').stdout; + +const template = require('./templates.js'); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} function Chalk(options) { - // detect mode if not set manually - this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); } -// use bright blue on Windows as the normal blue color is illegible -if (process.platform === 'win32') { - ansiStyles.blue.open = '\u001b[94m'; +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; } -function build(_styles) { - var builder = function builder() { +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { return applyStyle.apply(builder, arguments); }; + builder._styles = _styles; - builder.enabled = this.enabled; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - builder.__proto__ = proto; - return builder; -} + builder._empty = _empty; -var styles = (function () { - var ret = {}; + const self = this; - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); - ret[key] = { - get: function () { - return build.call(this, this._styles.concat(key)); - } - }; + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } }); - return ret; -})(); + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; -var proto = defineProps(function chalk() {}, styles); + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} function applyStyle() { - // support varags, but simply cast to string in case there's only one arg - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + if (argsLen > 1) { - // don't slice `arguments`, it prevents v8 optimizations - for (var a = 1; a < argsLen; a++) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { str += ' ' + args[a]; } } - if (!this.enabled || !str) { - return str; + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; } - /*jshint validthis: true */ - var nestedStyles = this._styles; + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } - var i = nestedStyles.length; - while (i--) { - var code = ansiStyles[nestedStyles[i]]; + for (const code of this._styles.slice().reverse()) { // Replace any instances already present with a re-opening code // otherwise only the part of the string until said closing code // will be colored, and the rest will simply be 'plain'. str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); } + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + return str; } -function init() { - var ret = {}; +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - return build.call(this, [name]); - } - }; - }); + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } - return ret; + return template(chalk, parts.join('')); } -defineProps(Chalk.prototype, init()); +Object.defineProperties(Chalk.prototype, styles); -module.exports = new Chalk(); -module.exports.styles = ansiStyles; -module.exports.hasColor = hasAnsi; -module.exports.stripColor = stripAnsi; -module.exports.supportsColor = supportsColor; +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript diff --git a/node_modules/chalk/index.js.flow b/node_modules/chalk/index.js.flow new file mode 100644 index 0000000..622caaa --- /dev/null +++ b/node_modules/chalk/index.js.flow @@ -0,0 +1,93 @@ +// @flow strict + +type TemplateStringsArray = $ReadOnlyArray; + +export type Level = $Values<{ + None: 0, + Basic: 1, + Ansi256: 2, + TrueColor: 3 +}>; + +export type ChalkOptions = {| + enabled?: boolean, + level?: Level +|}; + +export type ColorSupport = {| + level: Level, + hasBasic: boolean, + has256: boolean, + has16m: boolean +|}; + +export interface Chalk { + (...text: string[]): string, + (text: TemplateStringsArray, ...placeholders: string[]): string, + constructor(options?: ChalkOptions): Chalk, + enabled: boolean, + level: Level, + rgb(r: number, g: number, b: number): Chalk, + hsl(h: number, s: number, l: number): Chalk, + hsv(h: number, s: number, v: number): Chalk, + hwb(h: number, w: number, b: number): Chalk, + bgHex(color: string): Chalk, + bgKeyword(color: string): Chalk, + bgRgb(r: number, g: number, b: number): Chalk, + bgHsl(h: number, s: number, l: number): Chalk, + bgHsv(h: number, s: number, v: number): Chalk, + bgHwb(h: number, w: number, b: number): Chalk, + hex(color: string): Chalk, + keyword(color: string): Chalk, + + +reset: Chalk, + +bold: Chalk, + +dim: Chalk, + +italic: Chalk, + +underline: Chalk, + +inverse: Chalk, + +hidden: Chalk, + +strikethrough: Chalk, + + +visible: Chalk, + + +black: Chalk, + +red: Chalk, + +green: Chalk, + +yellow: Chalk, + +blue: Chalk, + +magenta: Chalk, + +cyan: Chalk, + +white: Chalk, + +gray: Chalk, + +grey: Chalk, + +blackBright: Chalk, + +redBright: Chalk, + +greenBright: Chalk, + +yellowBright: Chalk, + +blueBright: Chalk, + +magentaBright: Chalk, + +cyanBright: Chalk, + +whiteBright: Chalk, + + +bgBlack: Chalk, + +bgRed: Chalk, + +bgGreen: Chalk, + +bgYellow: Chalk, + +bgBlue: Chalk, + +bgMagenta: Chalk, + +bgCyan: Chalk, + +bgWhite: Chalk, + +bgBlackBright: Chalk, + +bgRedBright: Chalk, + +bgGreenBright: Chalk, + +bgYellowBright: Chalk, + +bgBlueBright: Chalk, + +bgMagentaBright: Chalk, + +bgCyanBright: Chalk, + +bgWhiteBrigh: Chalk, + + supportsColor: ColorSupport +}; + +declare module.exports: Chalk; diff --git a/node_modules/chalk/license b/node_modules/chalk/license index 654d0bf..e7af2f7 100644 --- a/node_modules/chalk/license +++ b/node_modules/chalk/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +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. diff --git a/node_modules/chalk/node_modules/.bin/has-ansi b/node_modules/chalk/node_modules/.bin/has-ansi deleted file mode 120000 index c1e7413..0000000 --- a/node_modules/chalk/node_modules/.bin/has-ansi +++ /dev/null @@ -1 +0,0 @@ -../has-ansi/cli.js \ No newline at end of file diff --git a/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/chalk/node_modules/.bin/strip-ansi deleted file mode 120000 index b65c9f8..0000000 --- a/node_modules/chalk/node_modules/.bin/strip-ansi +++ /dev/null @@ -1 +0,0 @@ -../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/chalk/node_modules/.bin/supports-color b/node_modules/chalk/node_modules/.bin/supports-color deleted file mode 120000 index af0f05e..0000000 --- a/node_modules/chalk/node_modules/.bin/supports-color +++ /dev/null @@ -1 +0,0 @@ -../supports-color/cli.js \ No newline at end of file diff --git a/node_modules/chalk/node_modules/ansi-styles/index.js b/node_modules/chalk/node_modules/ansi-styles/index.js deleted file mode 100644 index caf9e11..0000000 --- a/node_modules/chalk/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -var styles = module.exports = { - modifiers: { - reset: [0, 0], - bold: [1, 22], // 21 isn't widely supported and 22 does the same thing - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - colors: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39] - }, - bgColors: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] - } -}; - -// fix humans -styles.colors.grey = styles.colors.gray; - -Object.keys(styles).forEach(function (groupName) { - var group = styles[groupName]; - - Object.keys(group).forEach(function (styleName) { - var style = group[styleName]; - - styles[styleName] = group[styleName] = { - open: '\u001b[' + style[0] + 'm', - close: '\u001b[' + style[1] + 'm' - }; - }); - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); -}); diff --git a/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index e670f25..0000000 --- a/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "ansi-styles", - "version": "2.0.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/ansi-styles" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "mocha": "*" - }, - "gitHead": "da6541334e1681cb803f891fab8abf4313cc4bc1", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "homepage": "https://github.com/sindresorhus/ansi-styles", - "_id": "ansi-styles@2.0.1", - "_shasum": "b033f57f93e2d28adeb8bc11138fa13da0fd20a3", - "_from": "ansi-styles@>=2.0.1 <3.0.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - }, - "dist": { - "shasum": "b033f57f93e2d28adeb8bc11138fa13da0fd20a3", - "tarball": "http://registry.npmjs.org/ansi-styles/-/ansi-styles-2.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 89ec6a7..0000000 --- a/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,86 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/sindresorhus/ansi-styles.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![](screenshot.png) - - -## Install - -```sh -$ npm install --save ansi-styles -``` - - -## Usage - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green.open + 'Hello world!' + ansi.green.close); -``` - - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `gray` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` - - -## Advanced usage - -By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `ansi.modifiers` -- `ansi.colors` -- `ansi.bgColors` - - -###### Example - -```js -console.log(ansi.colors.green.open); -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/escape-string-regexp/license b/node_modules/chalk/node_modules/escape-string-regexp/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/chalk/node_modules/escape-string-regexp/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/escape-string-regexp/package.json b/node_modules/chalk/node_modules/escape-string-regexp/package.json deleted file mode 100644 index 749f5de..0000000 --- a/node_modules/chalk/node_modules/escape-string-regexp/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "escape-string-regexp", - "version": "1.0.3", - "description": "Escape RegExp special characters", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/escape-string-regexp" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "regex", - "regexp", - "re", - "regular", - "expression", - "escape", - "string", - "str", - "special", - "characters" - ], - "devDependencies": { - "mocha": "*" - }, - "gitHead": "1e446e6b4449b5f1f8868cd31bf8fd25ee37fb4b", - "bugs": { - "url": "https://github.com/sindresorhus/escape-string-regexp/issues" - }, - "homepage": "https://github.com/sindresorhus/escape-string-regexp", - "_id": "escape-string-regexp@1.0.3", - "_shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5", - "_from": "escape-string-regexp@>=1.0.2 <2.0.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - }, - "dist": { - "shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5", - "tarball": "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/chalk/node_modules/has-ansi/cli.js b/node_modules/chalk/node_modules/has-ansi/cli.js deleted file mode 100755 index 0386a82..0000000 --- a/node_modules/chalk/node_modules/has-ansi/cli.js +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var stdin = require('get-stdin'); -var pkg = require('./package.json'); -var hasAnsi = require('./'); -var argv = process.argv.slice(2); -var input = argv[0]; - -function help() { - console.log([ - '', - ' ' + pkg.description, - '', - ' Usage', - ' has-ansi ', - ' echo | has-ansi', - '', - ' Exits with code 0 if input has ANSI escape codes and 1 if not' - ].join('\n')); -} - -function init(data) { - process.exit(hasAnsi(data) ? 0 : 1); -} - -if (argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -if (process.stdin.isTTY) { - if (!input) { - help(); - return; - } - - init(input); -} else { - stdin(init); -} diff --git a/node_modules/chalk/node_modules/has-ansi/index.js b/node_modules/chalk/node_modules/has-ansi/index.js deleted file mode 100644 index 98fae06..0000000 --- a/node_modules/chalk/node_modules/has-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -var ansiRegex = require('ansi-regex'); -var re = new RegExp(ansiRegex().source); // remove the `g` flag -module.exports = re.test.bind(re); diff --git a/node_modules/chalk/node_modules/has-ansi/license b/node_modules/chalk/node_modules/has-ansi/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/chalk/node_modules/has-ansi/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js deleted file mode 100644 index 2fcdd1e..0000000 --- a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function () { - return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g; -}; diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json deleted file mode 100644 index 8d70330..0000000 --- a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "ansi-regex", - "version": "1.1.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/ansi-regex" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha test/test.js", - "view-supported": "node test/viewCodes.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "mocha": "*" - }, - "gitHead": "47fb974630af70998157b30fad6eb5e5bd7c7cd6", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-regex/issues" - }, - "homepage": "https://github.com/sindresorhus/ansi-regex", - "_id": "ansi-regex@1.1.1", - "_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", - "_from": "ansi-regex@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - }, - "dist": { - "shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", - "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md b/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md deleted file mode 100644 index ae876e7..0000000 --- a/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) - -> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -```sh -$ npm install --save ansi-regex -``` - - -## Usage - -```js -var ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001b[4mcake\u001b[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001b[4mcake\u001b[0m'.match(ansiRegex()); -//=> ['\u001b[4m', '\u001b[0m'] -``` - -*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.* - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js b/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js deleted file mode 100644 index 0f1aeb3..0000000 --- a/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -module.exports = function (cb) { - var stdin = process.stdin; - var ret = ''; - - if (stdin.isTTY) { - setImmediate(cb, ''); - return; - } - - stdin.setEncoding('utf8'); - - stdin.on('readable', function () { - var chunk; - - while (chunk = stdin.read()) { - ret += chunk; - } - }); - - stdin.on('end', function () { - cb(ret); - }); -}; - -module.exports.buffer = function (cb) { - var stdin = process.stdin; - var ret = []; - var len = 0; - - if (stdin.isTTY) { - setImmediate(cb, new Buffer('')); - return; - } - - stdin.on('readable', function () { - var chunk; - - while (chunk = stdin.read()) { - ret.push(chunk); - len += chunk.length; - } - }); - - stdin.on('end', function () { - cb(Buffer.concat(ret, len)); - }); -}; diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json b/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json deleted file mode 100644 index e0e5c64..0000000 --- a/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "get-stdin", - "version": "4.0.1", - "description": "Easier stdin", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/get-stdin" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "node test.js && node test-buffer.js && echo unicorns | node test-real.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "std", - "stdin", - "stdio", - "concat", - "buffer", - "stream", - "process", - "stream" - ], - "devDependencies": { - "ava": "0.0.4", - "buffer-equal": "0.0.1" - }, - "gitHead": "65c744975229b25d6cc5c7546f49b6ad9099553f", - "bugs": { - "url": "https://github.com/sindresorhus/get-stdin/issues" - }, - "homepage": "https://github.com/sindresorhus/get-stdin", - "_id": "get-stdin@4.0.1", - "_shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe", - "_from": "get-stdin@>=4.0.1 <5.0.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "dist": { - "shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe", - "tarball": "http://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md b/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md deleted file mode 100644 index bc1d32a..0000000 --- a/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# get-stdin [![Build Status](https://travis-ci.org/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stdin) - -> Easier stdin - - -## Install - -```sh -$ npm install --save get-stdin -``` - - -## Usage - -```js -// example.js -var stdin = require('get-stdin'); - -stdin(function (data) { - console.log(data); - //=> unicorns -}); -``` - -```sh -$ echo unicorns | node example.js -unicorns -``` - - -## API - -### stdin(callback) - -Get `stdin` as a string. - -### stdin.buffer(callback) - -Get `stdin` as a buffer. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/has-ansi/package.json b/node_modules/chalk/node_modules/has-ansi/package.json deleted file mode 100644 index 43582f8..0000000 --- a/node_modules/chalk/node_modules/has-ansi/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "has-ansi", - "version": "1.0.3", - "description": "Check if a string has ANSI escape codes", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/has-ansi" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "bin": { - "has-ansi": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "cli", - "bin", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern", - "has" - ], - "dependencies": { - "ansi-regex": "^1.1.0", - "get-stdin": "^4.0.1" - }, - "devDependencies": { - "mocha": "*" - }, - "gitHead": "416428ed16f8e9718aec54cea083173af6019917", - "bugs": { - "url": "https://github.com/sindresorhus/has-ansi/issues" - }, - "homepage": "https://github.com/sindresorhus/has-ansi", - "_id": "has-ansi@1.0.3", - "_shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538", - "_from": "has-ansi@>=1.0.3 <2.0.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - }, - "dist": { - "shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538", - "tarball": "http://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/chalk/node_modules/has-ansi/readme.md b/node_modules/chalk/node_modules/has-ansi/readme.md deleted file mode 100644 index 0fa149a..0000000 --- a/node_modules/chalk/node_modules/has-ansi/readme.md +++ /dev/null @@ -1,45 +0,0 @@ -# has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi) - -> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -```sh -$ npm install --save has-ansi -``` - - -## Usage - -```js -var hasAnsi = require('has-ansi'); - -hasAnsi('\u001b[4mcake\u001b[0m'); -//=> true - -hasAnsi('cake'); -//=> false -``` - - -## CLI - -```sh -$ npm install --global has-ansi -``` - -``` -$ has-ansi --help - - Usage - has-ansi - echo | has-ansi - - Exits with code 0 if input has ANSI escape codes and 1 if not -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/strip-ansi/cli.js b/node_modules/chalk/node_modules/strip-ansi/cli.js deleted file mode 100755 index b83f63b..0000000 --- a/node_modules/chalk/node_modules/strip-ansi/cli.js +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var pkg = require('./package.json'); -var stripAnsi = require('./'); -var argv = process.argv.slice(2); -var input = argv[0]; - -function help() { - console.log([ - '', - ' ' + pkg.description, - '', - ' Usage', - ' strip-ansi > ', - ' cat | strip-ansi > ', - '', - ' Example', - ' strip-ansi unicorn.txt > unicorn-stripped.txt' - ].join('\n')); -} - -function init(data) { - process.stdout.write(stripAnsi(data)); -} - -if (argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -if (!input && process.stdin.isTTY) { - help(); - return; -} - -if (input) { - init(fs.readFileSync(input, 'utf8')); -} else { - process.stdin.setEncoding('utf8'); - process.stdin.on('data', init); -} diff --git a/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/chalk/node_modules/strip-ansi/index.js deleted file mode 100644 index 099480f..0000000 --- a/node_modules/chalk/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -var ansiRegex = require('ansi-regex')(); - -module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; diff --git a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js deleted file mode 100644 index 2fcdd1e..0000000 --- a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function () { - return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g; -}; diff --git a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json deleted file mode 100644 index 8d70330..0000000 --- a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "ansi-regex", - "version": "1.1.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/ansi-regex" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha test/test.js", - "view-supported": "node test/viewCodes.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "mocha": "*" - }, - "gitHead": "47fb974630af70998157b30fad6eb5e5bd7c7cd6", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-regex/issues" - }, - "homepage": "https://github.com/sindresorhus/ansi-regex", - "_id": "ansi-regex@1.1.1", - "_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", - "_from": "ansi-regex@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - }, - "dist": { - "shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", - "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md deleted file mode 100644 index ae876e7..0000000 --- a/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) - -> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -```sh -$ npm install --save ansi-regex -``` - - -## Usage - -```js -var ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001b[4mcake\u001b[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001b[4mcake\u001b[0m'.match(ansiRegex()); -//=> ['\u001b[4m', '\u001b[0m'] -``` - -*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.* - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/chalk/node_modules/strip-ansi/package.json deleted file mode 100644 index 44c71ff..0000000 --- a/node_modules/chalk/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "strip-ansi", - "version": "2.0.1", - "description": "Strip ANSI escape codes", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/strip-ansi" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bin": { - "strip-ansi": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^1.0.0" - }, - "devDependencies": { - "mocha": "*" - }, - "gitHead": "1eff0936c01f89efa312d9d51deed137259871a1", - "bugs": { - "url": "https://github.com/sindresorhus/strip-ansi/issues" - }, - "homepage": "https://github.com/sindresorhus/strip-ansi", - "_id": "strip-ansi@2.0.1", - "_shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e", - "_from": "strip-ansi@>=2.0.1 <3.0.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "dist": { - "shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e", - "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/chalk/node_modules/strip-ansi/readme.md deleted file mode 100644 index 53ec264..0000000 --- a/node_modules/chalk/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,43 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/sindresorhus/strip-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -```sh -$ npm install --save strip-ansi -``` - - -## Usage - -```js -var stripAnsi = require('strip-ansi'); - -stripAnsi('\u001b[4mcake\u001b[0m'); -//=> 'cake' -``` - - -## CLI - -```sh -$ npm install --global strip-ansi -``` - -```sh -$ strip-ansi --help - - Usage - strip-ansi > - cat | strip-ansi > - - Example - strip-ansi unicorn.txt > unicorn-stripped.txt -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/supports-color/cli.js b/node_modules/chalk/node_modules/supports-color/cli.js deleted file mode 100755 index e746987..0000000 --- a/node_modules/chalk/node_modules/supports-color/cli.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var pkg = require('./package.json'); -var supportsColor = require('./'); -var argv = process.argv.slice(2); - -function help() { - console.log([ - '', - ' ' + pkg.description, - '', - ' Usage', - ' supports-color', - '', - ' Exits with code 0 if color is supported and 1 if not' - ].join('\n')); -} - -if (argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -process.exit(supportsColor ? 0 : 1); diff --git a/node_modules/chalk/node_modules/supports-color/index.js b/node_modules/chalk/node_modules/supports-color/index.js deleted file mode 100644 index 2c294c2..0000000 --- a/node_modules/chalk/node_modules/supports-color/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -var argv = process.argv; - -module.exports = (function () { - if ('FORCE_COLOR' in process.env) { - return true; - } - - if (argv.indexOf('--no-color') !== -1 || - argv.indexOf('--no-colors') !== -1 || - argv.indexOf('--color=false') !== -1) { - return false; - } - - if (argv.indexOf('--color') !== -1 || - argv.indexOf('--colors') !== -1 || - argv.indexOf('--color=true') !== -1 || - argv.indexOf('--color=always') !== -1) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if ('UPSTART_JOB' in process.env) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -})(); diff --git a/node_modules/chalk/node_modules/supports-color/license b/node_modules/chalk/node_modules/supports-color/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/chalk/node_modules/supports-color/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/supports-color/package.json b/node_modules/chalk/node_modules/supports-color/package.json deleted file mode 100644 index 2318240..0000000 --- a/node_modules/chalk/node_modules/supports-color/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "supports-color", - "version": "1.3.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/supports-color" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "bin": { - "supports-color": "cli.js" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "cli", - "bin", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect" - ], - "devDependencies": { - "mocha": "*", - "require-uncached": "^1.0.2" - }, - "gitHead": "6977091035fc1634eace9470a35e21262d84356a", - "bugs": { - "url": "https://github.com/sindresorhus/supports-color/issues" - }, - "homepage": "https://github.com/sindresorhus/supports-color", - "_id": "supports-color@1.3.0", - "_shasum": "ca7def134d8bf8163e1c92905a49a2e4439b72a0", - "_from": "supports-color@>=1.3.0 <2.0.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "dist": { - "shasum": "ca7def134d8bf8163e1c92905a49a2e4439b72a0", - "tarball": "http://registry.npmjs.org/supports-color/-/supports-color-1.3.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.3.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/chalk/node_modules/supports-color/readme.md b/node_modules/chalk/node_modules/supports-color/readme.md deleted file mode 100644 index fe6016f..0000000 --- a/node_modules/chalk/node_modules/supports-color/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color) - -> Detect whether a terminal supports color - - -## Install - -``` -$ npm install --save supports-color -``` - - -## Usage - -```js -var supportsColor = require('supports-color'); - -if (supportsColor) { - console.log('Terminal supports color'); -} -``` - -It obeys the `--color` and `--no-color` CLI flags. - -For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. - - -## CLI - -``` -$ npm install --global supports-color -``` - -``` -$ supports-color --help - - Usage - supports-color - - Exits with code 0 if color is supported and 1 if not -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json index 999624b..daf9db9 100644 --- a/node_modules/chalk/package.json +++ b/node_modules/chalk/package.json @@ -1,32 +1,62 @@ { - "name": "chalk", - "version": "1.0.0", - "description": "Terminal string styling done right. Much color.", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/chalk" + "_from": "chalk@2.4.2", + "_id": "chalk@2.4.2", + "_inBundle": false, + "_integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "_location": "/chalk", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "chalk@2.4.2", + "name": "chalk", + "escapedName": "chalk", + "rawSpec": "2.4.2", + "saveSpec": null, + "fetchSpec": "2.4.2" }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } + "_requiredBy": [ + "/", + "/@babel/highlight", + "/eslint", + "/inquirer" ], - "engines": { - "node": ">=0.10.0" + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "_shasum": "cd42541677a54333cf541a49108c1432b44c9424", + "_spec": "chalk@2.4.2", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" }, - "scripts": { - "test": "mocha", - "bench": "matcha benchmark.js" + "bundleDependencies": false, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "deprecated": false, + "description": "Terminal string styling done right", + "devDependencies": { + "ava": "*", + "coveralls": "^3.0.0", + "execa": "^0.9.0", + "flow-bin": "^0.68.0", + "import-fresh": "^2.0.0", + "matcha": "^0.7.0", + "nyc": "^11.0.2", + "resolve-from": "^4.0.0", + "typescript": "^2.5.3", + "xo": "*" + }, + "engines": { + "node": ">=4" }, "files": [ - "index.js" + "index.js", + "templates.js", + "types/index.d.ts", + "index.js.flow" ], + "homepage": "https://github.com/chalk/chalk#readme", "keywords": [ "color", "colour", @@ -35,7 +65,9 @@ "console", "cli", "string", + "str", "ansi", + "style", "styles", "tty", "formatting", @@ -48,36 +80,26 @@ "command-line", "text" ], - "dependencies": { - "ansi-styles": "^2.0.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^1.0.3", - "strip-ansi": "^2.0.1", - "supports-color": "^1.3.0" - }, - "devDependencies": { - "matcha": "^0.6.0", - "mocha": "*" - }, - "gitHead": "8864d3563313ed15574a38dd5c9d5966080c46ce", - "bugs": { - "url": "https://github.com/sindresorhus/chalk/issues" - }, - "homepage": "https://github.com/sindresorhus/chalk", - "_id": "chalk@1.0.0", - "_shasum": "b3cf4ed0ff5397c99c75b8f679db2f52831f96dc", - "_from": "chalk@*", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" + "license": "MIT", + "name": "chalk", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" }, - "dist": { - "shasum": "b3cf4ed0ff5397c99c75b8f679db2f52831f96dc", - "tarball": "http://registry.npmjs.org/chalk/-/chalk-1.0.0.tgz" + "scripts": { + "bench": "matcha benchmark.js", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava" }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.0.0.tgz", - "readme": "ERROR: No README data found!" + "types": "types/index.d.ts", + "version": "2.4.2", + "xo": { + "envs": [ + "node", + "mocha" + ], + "ignores": [ + "test/_flow.js" + ] + } } diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md index 43c7064..d298e2c 100644 --- a/node_modules/chalk/readme.md +++ b/node_modules/chalk/readme.md @@ -1,84 +1,116 @@


- chalk +
+ Chalk +


> Terminal string styling done right -[![Build Status](https://travis-ci.org/sindresorhus/chalk.svg?branch=master)](https://travis-ci.org/sindresorhus/chalk) [![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg?style=flat)](https://www.youtube.com/watch?v=Sm368W0OsHo) +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) -[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. +### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) -**Chalk is a clean and focused alternative.** + -![screenshot](https://github.com/sindresorhus/ansi-styles/raw/master/screenshot.png) +## Highlights -## Why - -- Highly performant -- Doesn't extend `String.prototype` - Expressive API +- Highly performant - Ability to nest styles -- Clean and focused +- [256/Truecolor color support](#256-and-truecolor-color-support) - Auto-detects color support +- Doesn't extend `String.prototype` +- Clean and focused - Actively maintained -- [Used by ~3000 modules](https://www.npmjs.com/browse/depended/chalk) +- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 ## Install -``` -$ npm install --save chalk +```console +$ npm install chalk ``` +
+ + + ## Usage +```js +const chalk = require('chalk'); + +console.log(chalk.blue('Hello world!')); +``` + Chalk comes with an easy to use composable API where you just chain and nest the styles you want. ```js -var chalk = require('chalk'); - -// style a string -chalk.blue('Hello world!'); +const chalk = require('chalk'); +const log = console.log; -// combine styled and normal strings -chalk.blue('Hello') + 'World' + chalk.red('!'); +// Combine styled and normal strings +log(chalk.blue('Hello') + ' World' + chalk.red('!')); -// compose multiple styles using the chainable API -chalk.blue.bgRed.bold('Hello world!'); +// Compose multiple styles using the chainable API +log(chalk.blue.bgRed.bold('Hello world!')); -// pass in multiple arguments -chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); +// Pass in multiple arguments +log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); -// nest styles -chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); +// Nest styles +log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); -// nest styles of the same type even (color, underline, background) -chalk.green( +// Nest styles of the same type even (color, underline, background) +log(chalk.green( 'I am a green line ' + chalk.blue.underline.bold('with a blue substring') + ' that becomes green again!' -); +)); + +// ES2015 template literal +log(` +CPU: ${chalk.red('90%')} +RAM: ${chalk.green('40%')} +DISK: ${chalk.yellow('70%')} +`); + +// ES2015 tagged template literal +log(chalk` +CPU: {red ${cpu.totalPercent}%} +RAM: {green ${ram.used / ram.total * 100}%} +DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} +`); + +// Use RGB colors in terminal emulators that support it. +log(chalk.keyword('orange')('Yay for orange colored text!')); +log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); +log(chalk.hex('#DEADED').bold('Bold gray!')); ``` -Easily define your own themes. +Easily define your own themes: ```js -var chalk = require('chalk'); -var error = chalk.bold.red; +const chalk = require('chalk'); + +const error = chalk.bold.red; +const warning = chalk.keyword('orange'); + console.log(error('Error!')); +console.log(warning('Warning!')); ``` -Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). +Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): ```js -var name = 'Sindre'; +const name = 'Sindre'; console.log(chalk.green('Hello %s'), name); -//=> Hello Sindre +//=> 'Hello Sindre' ``` @@ -88,61 +120,46 @@ console.log(chalk.green('Hello %s'), name); Example: `chalk.red.bold.underline('Hello', 'world');` -Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `Chalk.red.yellow.green` is equivalent to `Chalk.green`. +Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. Multiple arguments will be separated by space. ### chalk.enabled -Color support is automatically detected, but you can override it by setting the `enabled` property. You should however only do this in your own code as it applies globally to all chalk consumers. +Color support is automatically detected, as is the level (see `chalk.level`). However, if you'd like to simply enable/disable Chalk, you can do so via the `.enabled` property. -If you need to change this in a reusable module create a new instance: +Chalk is enabled by default unless explicitly disabled via the constructor or `chalk.level` is `0`. + +If you need to change this in a reusable module, create a new instance: ```js -var ctx = new chalk.constructor({enabled: false}); +const ctx = new chalk.constructor({enabled: false}); ``` -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color). Used internally and handled for you, but exposed for convenience. - -Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. +### chalk.level -### chalk.styles +Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers. -Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). - -Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own. +If you need to change this in a reusable module, create a new instance: ```js -var chalk = require('chalk'); - -console.log(chalk.styles.red); -//=> {open: '\u001b[31m', close: '\u001b[39m'} - -console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close); +const ctx = new chalk.constructor({level: 0}); ``` -### chalk.hasColor(string) +Levels are as follows: -Check whether a string [has color](https://github.com/sindresorhus/has-ansi). +0. All colors disabled +1. Basic color support (16 colors) +2. 256 color support +3. Truecolor support (16 million colors) -### chalk.stripColor(string) +### chalk.supportsColor -[Strip color](https://github.com/sindresorhus/strip-ansi) from a string. +Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience. -Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported. +Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. -Example: - -```js -var chalk = require('chalk'); -var styledString = getText(); - -if (!chalk.supportsColor) { - styledString = chalk.stripColor(styledString); -} -``` +Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. ## Styles @@ -152,11 +169,12 @@ if (!chalk.supportsColor) { - `reset` - `bold` - `dim` -- `italic` *(not widely supported)* +- `italic` *(Not widely supported)* - `underline` - `inverse` - `hidden` -- `strikethrough` *(not widely supported)* +- `strikethrough` *(Not widely supported)* +- `visible` (Text is emitted only if enabled) ### Colors @@ -164,11 +182,18 @@ if (!chalk.supportsColor) { - `red` - `green` - `yellow` -- `blue` *(on Windows the bright version is used as normal blue is illegible)* +- `blue` *(On Windows the bright version is used since normal blue is illegible)* - `magenta` - `cyan` - `white` -- `gray` +- `gray` ("bright black") +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` ### Background colors @@ -180,18 +205,110 @@ if (!chalk.supportsColor) { - `bgMagenta` - `bgCyan` - `bgWhite` +- `bgBlackBright` +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` -## 256-colors +## Tagged template literal -Chalk does not support support anything other than the base eight colors, which guarantees it will work on all terminals and systems. Some terminals, specifically `xterm` compliant ones, will support the full range of 8-bit colors. For this the lower level [ansi-256-colors](https://github.com/jbnicolai/ansi-256-colors) package can be used. +Chalk can be used as a [tagged template literal](http://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals). + +```js +const chalk = require('chalk'); + +const miles = 18; +const calculateFeet = miles => miles * 5280; + +console.log(chalk` + There are {bold 5280 feet} in a mile. + In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}. +`); +``` + +Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`). + +Template styles are chained exactly like normal Chalk styles. The following two statements are equivalent: + +```js +console.log(chalk.bold.rgb(10, 100, 200)('Hello!')); +console.log(chalk`{bold.rgb(10,100,200) Hello!}`); +``` + +Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters. + +All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped. + + +## 256 and Truecolor color support + +Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps. + +Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red). + +Examples: + +- `chalk.hex('#DEADED').underline('Hello, world!')` +- `chalk.keyword('orange')('Some orange text')` +- `chalk.rgb(15, 100, 204).inverse('Hello!')` + +Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors). + +- `chalk.bgHex('#DEADED').underline('Hello, world!')` +- `chalk.bgKeyword('orange')('Some orange text')` +- `chalk.bgRgb(15, 100, 204).inverse('Hello!')` + +The following color models can be used: + +- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')` +- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')` +- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')` +- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')` +- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')` +- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')` +- `ansi16` +- `ansi256` ## Windows -If you're on Windows, do yourself a favor and use [`cmder`](http://bliker.github.io/cmder/) instead of `cmd.exe`. +If you're on Windows, do yourself a favor and use [`cmder`](http://cmder.net/) instead of `cmd.exe`. + + +## Origin story + +[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative. + + +## Related + +- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module +- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal +- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color +- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes +- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes +- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models +- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal +- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings +- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings +- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT diff --git a/node_modules/chalk/templates.js b/node_modules/chalk/templates.js new file mode 100644 index 0000000..dbdf9b2 --- /dev/null +++ b/node_modules/chalk/templates.js @@ -0,0 +1,128 @@ +'use strict'; +const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; +const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; +const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; +const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + +const ESCAPES = new Map([ + ['n', '\n'], + ['r', '\r'], + ['t', '\t'], + ['b', '\b'], + ['f', '\f'], + ['v', '\v'], + ['0', '\0'], + ['\\', '\\'], + ['e', '\u001B'], + ['a', '\u0007'] +]); + +function unescape(c) { + if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; +} + +function parseArguments(name, args) { + const results = []; + const chunks = args.trim().split(/\s*,\s*/g); + let matches; + + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if ((matches = chunk.match(STRING_REGEX))) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + + return results; +} + +function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + + const results = []; + let matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + + if (matches[2]) { + const args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; +} + +function buildStyle(chalk, styles) { + const enabled = {}; + + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + + let current = chalk; + for (const styleName of Object.keys(enabled)) { + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; +} + +module.exports = (chalk, tmp) => { + const styles = []; + const chunks = []; + let chunk = []; + + // eslint-disable-next-line max-params + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + const str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({inverse, styles: parseStyle(style)}); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + + chunks.push(chunk.join('')); + + if (styles.length > 0) { + const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); +}; diff --git a/node_modules/chalk/types/index.d.ts b/node_modules/chalk/types/index.d.ts new file mode 100644 index 0000000..b4e4dc5 --- /dev/null +++ b/node_modules/chalk/types/index.d.ts @@ -0,0 +1,97 @@ +// Type definitions for Chalk +// Definitions by: Thomas Sauer + +export const enum Level { + None = 0, + Basic = 1, + Ansi256 = 2, + TrueColor = 3 +} + +export interface ChalkOptions { + enabled?: boolean; + level?: Level; +} + +export interface ChalkConstructor { + new (options?: ChalkOptions): Chalk; + (options?: ChalkOptions): Chalk; +} + +export interface ColorSupport { + level: Level; + hasBasic: boolean; + has256: boolean; + has16m: boolean; +} + +export interface Chalk { + (...text: string[]): string; + (text: TemplateStringsArray, ...placeholders: string[]): string; + constructor: ChalkConstructor; + enabled: boolean; + level: Level; + rgb(r: number, g: number, b: number): this; + hsl(h: number, s: number, l: number): this; + hsv(h: number, s: number, v: number): this; + hwb(h: number, w: number, b: number): this; + bgHex(color: string): this; + bgKeyword(color: string): this; + bgRgb(r: number, g: number, b: number): this; + bgHsl(h: number, s: number, l: number): this; + bgHsv(h: number, s: number, v: number): this; + bgHwb(h: number, w: number, b: number): this; + hex(color: string): this; + keyword(color: string): this; + + readonly reset: this; + readonly bold: this; + readonly dim: this; + readonly italic: this; + readonly underline: this; + readonly inverse: this; + readonly hidden: this; + readonly strikethrough: this; + + readonly visible: this; + + readonly black: this; + readonly red: this; + readonly green: this; + readonly yellow: this; + readonly blue: this; + readonly magenta: this; + readonly cyan: this; + readonly white: this; + readonly gray: this; + readonly grey: this; + readonly blackBright: this; + readonly redBright: this; + readonly greenBright: this; + readonly yellowBright: this; + readonly blueBright: this; + readonly magentaBright: this; + readonly cyanBright: this; + readonly whiteBright: this; + + readonly bgBlack: this; + readonly bgRed: this; + readonly bgGreen: this; + readonly bgYellow: this; + readonly bgBlue: this; + readonly bgMagenta: this; + readonly bgCyan: this; + readonly bgWhite: this; + readonly bgBlackBright: this; + readonly bgRedBright: this; + readonly bgGreenBright: this; + readonly bgYellowBright: this; + readonly bgBlueBright: this; + readonly bgMagentaBright: this; + readonly bgCyanBright: this; + readonly bgWhiteBright: this; +} + +declare const chalk: Chalk & { supportsColor: ColorSupport }; + +export default chalk diff --git a/node_modules/changelogplease/LICENSE.txt b/node_modules/changelogplease/LICENSE.txt index 2354819..6ca2fdd 100644 --- a/node_modules/changelogplease/LICENSE.txt +++ b/node_modules/changelogplease/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2014 Scott González http://scottgonzalez.com +Copyright Scott González http://scottgonzalez.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/node_modules/changelogplease/README.md b/node_modules/changelogplease/README.md index e00a038..fa5b4c1 100644 --- a/node_modules/changelogplease/README.md +++ b/node_modules/changelogplease/README.md @@ -34,7 +34,8 @@ changelog({ ### changelog( options, callback ) * `options` (Object): Options for creating the changelog. - * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id. + * `ticketTypes` (Array): Which ticket types to look for when parsing logs. See [`Changelog.ticketParsers`](#changelogticketparsers) for a list of available types. Ticket references are parsed in the order specified. Defaults to `["github"]`. + * `ticketUrl` (String or Object): Template(s) for ticket/issue URLs; `{id}` will be replaced with the ticket ID. When specifying multiple values for `ticketTypes`, `ticketUrl` must be an object with the ticket type as the keys and the URL templates as the values. * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash. * `repo` (String): Path to the repository. * `committish` (String): The range of commits for the changelog. @@ -58,10 +59,30 @@ Be aware that these methods are not currently documented because they may change submit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't feel comfortable hacking in your own changes (or even if you do). +### Changelog.ticketParsers + +Changelogplease supports multiple issue trackers. `Changelog.ticketParsers` defines the list of supported ticket types and allows user-defined parsers to be added. + +#### Built-in parsers + +* github: The github parser supports all forms of GitHub issue references: `#123`, `gh-123`, and `account/repo#123`. Because GitHub supports the short form `#123`, this parser can be used for other issue trackers as well. +* jira: JIRA issues must be in the form `PROJECT-123`, with the project reference in all caps. + +#### Custom parsers + +Custom parsers can be implemented by adding a new property to `Changelog.ticketParsers`. The key is the name of the parser and the value is a function which receives two parameters: + +* `commit` (String): The full commit message. +* `ticketUrl` (Function; `function( ticketId )`): A function which accepts a ticket ID and returns the URL for the specified ticket. + +The function must return an array of objects each containing two values: + +* `url`: The URL for the ticket (generated by invoking the `ticketUrl` method). +* `label`: The label for the ticket. ## License -Copyright 2014 Scott González. Released under the terms of the MIT license. +Copyright Scott González. Released under the terms of the MIT license. --- diff --git a/node_modules/changelogplease/index.js b/node_modules/changelogplease/index.js index 9455ee5..992cd50 100644 --- a/node_modules/changelogplease/index.js +++ b/node_modules/changelogplease/index.js @@ -17,6 +17,22 @@ function Changelog( options ) { this.options = options; this.repo = new Repo( this.options.repo ); + if ( !this.options.ticketTypes ) { + + // GitHub is the default because it's common + // and also handles the generic form of #XXX + this.options.ticketTypes = [ "github" ]; + } + + // Normalize ticketUrl to a hash + if ( typeof this.options.ticketUrl === "string" ) { + this.options.ticketUrl = { + _default: this.options.ticketUrl + }; + } + + this.createTicketUrlParsers(); + // Bind all methods to the instance for ( var method in this ) { if ( typeof this[ method ] === "function" ) { @@ -25,6 +41,62 @@ function Changelog( options ) { } } +Changelog.ticketParsers = { + github: function ( commit, ticketUrl ) { + var tickets = []; + + // Sane global exec with iteration over matches + commit.replace( + /Fix(?:e[sd])? ((?:[a-zA-Z0-9_-]{1,39}\/[a-zA-Z0-9_-]{1,100}#)|#|gh-)(\d+)/g, + function ( match, refType, ticketId ) { + var ticketRef = { + url: ticketUrl( ticketId ), + label: "#" + ticketId + }; + + // If the refType has anything before the #, assume it's a GitHub ref + if ( /.#$/.test( refType ) ) { + refType = refType.replace( /#$/, "" ); + ticketRef.url = "https://github.com/" + refType + "/issues/" + ticketId; + ticketRef.label = refType + ticketRef.label; + } + + tickets.push( ticketRef ); + } + ); + + return tickets; + }, + + jira: function ( commit, ticketUrl ) { + var tickets = []; + + // Sane global exec with iteration over matches + commit.replace( + /Fix(?:e[sd])? ([A-Z][A-Z0-9_]+-\d+)/g, + function ( match, ticketId ) { + var ticketRef = { + url: ticketUrl( ticketId ), + label: ticketId + }; + + tickets.push( ticketRef ); + } + ); + + return tickets; + } +}; + +Changelog.prototype.createTicketUrlParsers = function() { + this.ticketUrls = {}; + Object.keys( this.options.ticketUrl ).forEach(function( type ) { + this.ticketUrls[ type ] = function( id ) { + return this.options.ticketUrl[ type ].replace( "{id}", id ); + }.bind( this ); + }, this ); +}; + Changelog.prototype.parse = function( callback ) { this.getLog(function( error, log ) { if ( error ) { @@ -35,10 +107,6 @@ Changelog.prototype.parse = function( callback ) { }.bind( this )); }; -Changelog.prototype.ticketUrl = function( id ) { - return this.options.ticketUrl.replace( "{id}", id ); -}; - Changelog.prototype.getLog = function( callback ) { var commitUrl = this.options.commitUrl.replace( "{id}", "%H" ); @@ -88,28 +156,16 @@ Changelog.prototype.parseCommits = function( commits ) { }; Changelog.prototype.parseCommit = function( commit ) { - var ticketUrl = this.ticketUrl; var tickets = []; - // Sane global exec with iteration over matches - commit.replace( - /Fix(?:e[sd])? ((?:[a-zA-Z0-9_-]{1,39}\/[a-zA-Z0-9_-]{1,100}#)|#|gh-)(\d+)/g, - function( match, refType, ticketId ) { - var ticketRef = { - url: ticketUrl( ticketId ), - label: "#" + ticketId - }; - - // If the refType has anything before the #, assume it's a GitHub ref - if ( /.#$/.test( refType ) ) { - refType = refType.replace( /#$/, "" ); - ticketRef.url = "https://github.com/" + refType + "/issues/" + ticketId; - ticketRef.label = refType + ticketRef.label; - } - - tickets.push( ticketRef ); - } - ); + this.options.ticketTypes.forEach( function( ticketType ) { + tickets = tickets.concat( + Changelog.ticketParsers[ ticketType ]( + commit, + this.ticketUrls[ ticketType ] || this.ticketUrls._default + ) + ); + }, this ); // Only keep the summary for the changelog; drop the body var parsed = "* " + commit.split( /\r?\n/ )[ 0 ]; diff --git a/node_modules/changelogplease/node_modules/git-tools/package.json b/node_modules/changelogplease/node_modules/git-tools/package.json deleted file mode 100644 index 8fb790b..0000000 --- a/node_modules/changelogplease/node_modules/git-tools/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "git-tools", - "version": "0.1.0", - "description": "Tools for parsing data out of git repositories.", - "keywords": [ - "git" - ], - "homepage": "https://github.com/scottgonzalez/node-git-tools", - "bugs": { - "url": "https://github.com/scottgonzalez/node-git-tools/issues" - }, - "author": { - "name": "Scott González", - "email": "scott.gonzalez@gmail.com", - "url": "http://scottgonzalez.com" - }, - "main": "git-tools.js", - "repository": { - "type": "git", - "url": "git://github.com/scottgonzalez/node-git-tools.git" - }, - "devDependencies": { - "grunt": "~0.4.0", - "grunt-contrib-jshint": "~0.1.1", - "grunt-contrib-nodeunit": "~0.1.2", - "rimraf": "~2.1.4" - }, - "readme": "# node-git-tools\n\nTools for parsing data out of git repositories.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## About\n\nThe goal of node-git-tools is to provide a set of tools that can be used to\neasily write custom git commands or other scripts that are tightly integrated\nwith git.\n\nI expect the API to grow over time and will happily entertain any feature\nrequests. If there is anything you'd like added, just file an issue.\n\n## Installation\n\n```sh\nnpm install git-tools\n```\n\n## Usage\n\n```js\nvar Repo = require( \"git-tools\" );\nvar repo = new Repo( \"path/to/repo\" );\nrepo.authors(function( error, authors ) {\n\tconsole.log( authors );\n});\n```\n\n\n\n## API\n\n### Repo.clone( options, callback )\n\nClones a repository and returns the new `Repo` instance.\n\n* `options` (Object): Options for cloning the repository.\n * `repo` (String): The repository to clone from.\n * `path` (String): The path to clone into.\n * extra: Additional options can be provided, as documented below.\n* `callback` (Function; `function( error, repo )`): Function to invoke after cloning the repository.\n * `repo` (Object): A new `Repo` instance for the cloned repository.\n\nThis function accepts arbitrary options to pass to `git clone`.\nFor example, to create a bare repository:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tbare: true\n});\n```\n\nOr to create a repo with limited history:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tdepth: 5\n});\n```\n\n\n\n### Repo.isRepo( path, callback )\n\nDetermines if the specified path is a git repository.\n\n* `path` (String): The path to check.\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n*Note: This is equivalent to creating a `Repo` instance with `path` and calling `isRepo()` on the instance.*\n\n\n\n### activeDays( [committish], callback )\n\nGets the number of active days (unique days of authorship). Includes activity\nby day, month, year, and the entire history.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, activeDays )`): Function to invoke after getting active days.\n * `activeDays` (Object): Summary of active days.\n\nThe `activeDays` object has the following form:\n\n```js\n{\n\tactiveDays: Number,\n\tcommits: Number,\n\tdates: {\n\t\t\"YYYY-MM-DD\": Number( commits ),\n\t\t...\n\t},\n\tyears: {\n\t\t\"YYYY\": {\n\t\t\tactiveDays: Number,\n\t\t\tcommits: Number,\n\t\t\tmonths: {\n\t\t\t\t\"M\": {\n\t\t\t\t\tactiveDays: Number,\n\t\t\t\t\tcommits: Number,\n\t\t\t\t\tdays: {\n\t\t\t\t\t\t\"D\": {\n\t\t\t\t\t\t\tcommits: Number\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t...\n\t\t\t}\n\t\t},\n\t\t...\n\t}\n}\n```\n\n\n\n### age( callback )\n\nGets the age of the repository.\n\n* `callback` (Function; `function( error, age )`): Function to invoke after getting the age.\n * `age` (String): The age of the repository.\n\n\n\n### authors( [committish], callback )\n\nGets all authors, sorted by number of commits.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, authors )`): Function to invoke after getting authors.\n * `authors` (Array): All authors, sorted by number of commits.\n\nEach author object contains the following properties:\n\n* `email` (String): Author's email address.\n* `name` (String): Author's name.\n* `commits` (Number): Number of commits.\n* `commitsPercent` (Number): Percentage of commits.\n\n\n\n### blame( options, callback )\n\nDetermine what revision and author last modified each line of a file.\n\n* `options` (Object): Options for the blame.\n * `path` (String): The path to the file to run the blame for.\n * `committish` (String; default: `\"HEAD\"`): Revision or range to blame against.\n* `callback` (Function; `function( error, blame )`): Function to invoke after blaming the file.\n * `blame` (Array): Commit information for each line.\n\nEach blame item contains the following properties:\n\n* `commit`: SHA of commit that most recently modified the line.\n* `path`: Path to the file at the time of the most recent modification to the line.\n* `lineNumber`: Line number within the file.\n* `content`: Contents of the line.\n\n\n\n### branches( callback )\n\nGets all branches in order of most recent commit.\n\n* `callback` (Function; `function( error, branches )`): Function to invoke after getting branches.\n * `branches` (Array): All branches, sorted by most recent commit date.\n\nEach branch object contains the following properties:\n\n* `name` (String): Branch name.\n* `sha` (String): SHA-1 of most recent commit.\n* `date` (Date): Author date of most recent commit.\n* `subject` (String): Subject (first line) of most recent commit.\n* `author` (Object): Author of most recent commit.\n * `email` (String): Author's email address.\n * `name` (String): Author's name.\n\n\n\n### config( name, callback )\n\nGets the value of a configuration option.\n\n* `name` (String): The name of the configuration option.\n* `callback` (Function; `function( error, value )`): Function to invoke after getting the configuration option.\n * `value` (String|null): The value for the configuration option, or `null` if no value is set.\n\n\n\n### currentBranch( callback )\n\nGets the name of the currently checked out branch, if any.\n\n* `callback` (Function; `function( error, branch )`): Function to invoke after getting the branch.\n * `branch` (String|null): Branch name, or `null` if in detached HEAD state.\n\n\n\n### isRepo( callback )\n\nDetermines if the specified path is a git repository.\n\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n\n\n### remotes( callback )\n\nGets all remote repositories.\n\n* `callback` (Function; `function( error, remotes )`): Function to invoke after getting the remotes.\n * `remotes` (Array): All remote repositories.\n\nEach remote object contains the following properties:\n\n* `name` (String): Remote name.\n* `url` (String): URL for the remote repository.\n\n\n\n### resolveCommittish( committish, callback )\n\nResolves a committish to a SHA1.\n\n* `committish` (String): Any committish to resolve.\n* `callback` (Function; `function( error, sha )`): Function to invoke after resolving the comittish.\n * `sha`: SHA1 of the resolved committish.\n\n\n\n### tags( callback )\n\nGets all tags in reverse chronological order.\n\nLightweight tags are sorted by author date and annotated tags are sorted by tagger date.\n\n* `callback` (Function; `function( error, tags )`): Function to invoke after getting tags.\n * `tags` (Array): All tags, sorted by date.\n\nEach tag object contains the following properties:\n\n* `name` (String): Tag name.\n* `sha` (String): SHA-1 for the tag. For lightweight tags, this is the SHA-1 of the commit.\n* `date` (Date): Author date for ligthweight tags, tagger date for annotated tags.\n\n\n\n## License\n\nCopyright 2013 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n", - "readmeFilename": "README.md", - "_id": "git-tools@0.1.0", - "dist": { - "shasum": "42709aabce667e87ee789f8167dbe0191db9a10b" - }, - "_from": "git-tools@0.1.0", - "_resolved": "https://registry.npmjs.org/git-tools/-/git-tools-0.1.0.tgz" -} diff --git a/node_modules/changelogplease/package.json b/node_modules/changelogplease/package.json index 30a5f79..56060e4 100644 --- a/node_modules/changelogplease/package.json +++ b/node_modules/changelogplease/package.json @@ -1,41 +1,57 @@ { - "name": "changelogplease", - "version": "1.1.1", - "description": "Generate changelogs from git commit messages", + "_from": "changelogplease@1.2.0", + "_id": "changelogplease@1.2.0", + "_inBundle": false, + "_integrity": "sha1-1o0CqlS6oZAzJRLUfx1bR+cSNQ4=", + "_location": "/changelogplease", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "changelogplease@1.2.0", + "name": "changelogplease", + "escapedName": "changelogplease", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.2.0.tgz", + "_shasum": "d68d02aa54baa190332512d47f1d5b47e712350e", + "_spec": "changelogplease@1.2.0", "author": { "name": "Scott González", "email": "scott.gonzalez@gmail.com", "url": "http://scottgonzalez.com" }, - "license": "MIT", - "main": "index.js", - "homepage": "https://github.com/scottgonzalez/changelogplease", - "repository": { - "type": "git", - "url": "git://github.com/scottgonzalez/changelogplease.git" - }, "bugs": { "url": "https://github.com/scottgonzalez/changelogplease/issues" }, - "keywords": [ - "changelog", - "release" - ], - "scripts": { - "test": "nodeunit tests" - }, + "bundleDependencies": false, "dependencies": { "git-tools": "0.1.0" }, + "deprecated": false, + "description": "Generate changelogs from git commit messages", "devDependencies": { "nodeunit": "0.8.6" }, - "readme": "# Changelog, please\n\nGenerate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## Installation\n\n```\nnpm install changelogplease\n```\n\n## Usage\n\n```javascript\nvar changelog = require( \"changelogplease\" );\nchangelog({\n\tticketUrl: \"https://github.com/scottgonzalez/changelogplease/issues/{id}\",\n\tcommitUrl: \"https://github.com/scottgonzalez/changelogplease/commit/{id}\",\n\trepo: \"/path/to/repo\",\n\tcommittish: \"1.2.3..1.2.4\"\n}, function( error, log ) {\n\tif ( error ) {\n\t\tconsole.log( error );\n\t\treturn;\n\t}\n\n\tconsole.log( log );\n});\n```\n\n## API\n\n### changelog( options, callback )\n\n* `options` (Object): Options for creating the changelog.\n * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.\n * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.\n * `repo` (String): Path to the repository.\n * `committish` (String): The range of commits for the changelog.\n * `sort` (Boolean, Function): Function for sorting commits. By default commits are sorted alphabetically so they are grouped by component. A value of `false` disables sorting.\n* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.\n * `log` (String): Generated changelog, written in markdown.\n\n### Changelog\n\n`changelog( options, callback )` is a shorthand for the following:\n\n```js\nvar Changelog = require( \"changelogplease\" ).Changelog;\nvar instance = new Changelog( options );\ninstance.parse( callback );\n```\n\nChangelog generation is tailored to a specific format based on the needs of the various jQuery\nprojects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.\nBe aware that these methods are not currently documented because they may change. Feel free to\nsubmit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't\nfeel comfortable hacking in your own changes (or even if you do).\n\n\n## License\n\nCopyright 2014 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n", - "readmeFilename": "README.md", - "_id": "changelogplease@1.1.1", - "dist": { - "shasum": "2904aae4883e6e0f64bc3e1fc436ba3717c8b22d" + "homepage": "https://github.com/scottgonzalez/changelogplease", + "keywords": [ + "changelog", + "release" + ], + "license": "MIT", + "main": "index.js", + "name": "changelogplease", + "repository": { + "type": "git", + "url": "git://github.com/scottgonzalez/changelogplease.git" + }, + "scripts": { + "test": "nodeunit tests" }, - "_from": "changelogplease@1.1.1", - "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.1.1.tgz" + "version": "1.2.0" } diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md new file mode 100644 index 0000000..0a7bce4 --- /dev/null +++ b/node_modules/color-convert/CHANGELOG.md @@ -0,0 +1,54 @@ +# 1.0.0 - 2016-01-07 + +- Removed: unused speed test +- Added: Automatic routing between previously unsupported conversions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `convert()` class +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: all functions to lookup dictionary +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: `ansi` to `ansi256` +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Fixed: argument grouping for functions requiring only one argument +([#27](https://github.com/Qix-/color-convert/pull/27)) + +# 0.6.0 - 2015-07-23 + +- Added: methods to handle +[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: + - rgb2ansi16 + - rgb2ansi + - hsl2ansi16 + - hsl2ansi + - hsv2ansi16 + - hsv2ansi + - hwb2ansi16 + - hwb2ansi + - cmyk2ansi16 + - cmyk2ansi + - keyword2ansi16 + - keyword2ansi + - ansi162rgb + - ansi162hsl + - ansi162hsv + - ansi162hwb + - ansi162cmyk + - ansi162keyword + - ansi2rgb + - ansi2hsl + - ansi2hsv + - ansi2hwb + - ansi2cmyk + - ansi2keyword +([#18](https://github.com/harthur/color-convert/pull/18)) + +# 0.5.3 - 2015-06-02 + +- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` +([#15](https://github.com/harthur/color-convert/issues/15)) + +--- + +Check out commit logs for older releases diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE new file mode 100644 index 0000000..5b4c386 --- /dev/null +++ b/node_modules/color-convert/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011-2016 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/color-convert/README.md b/node_modules/color-convert/README.md new file mode 100644 index 0000000..d4b08fc --- /dev/null +++ b/node_modules/color-convert/README.md @@ -0,0 +1,68 @@ +# color-convert + +[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) + +Color-convert is a color conversion library for JavaScript and node. +It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): + +```js +var convert = require('color-convert'); + +convert.rgb.hsl(140, 200, 100); // [96, 48, 59] +convert.keyword.rgb('blue'); // [0, 0, 255] + +var rgbChannels = convert.rgb.channels; // 3 +var cmykChannels = convert.cmyk.channels; // 4 +var ansiChannels = convert.ansi16.channels; // 1 +``` + +# Install + +```console +$ npm install color-convert +``` + +# API + +Simply get the property of the _from_ and _to_ conversion that you're looking for. + +All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. + +All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). + +```js +var convert = require('color-convert'); + +// Hex to LAB +convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] +convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] + +// RGB to CMYK +convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] +convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] +``` + +### Arrays +All functions that accept multiple arguments also support passing an array. + +Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) + +```js +var convert = require('color-convert'); + +convert.rgb.hex(123, 45, 67); // '7B2D43' +convert.rgb.hex([123, 45, 67]); // '7B2D43' +``` + +## Routing + +Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). + +Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). + +# Contribute + +If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. + +# License +Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js new file mode 100644 index 0000000..3217200 --- /dev/null +++ b/node_modules/color-convert/conversions.js @@ -0,0 +1,868 @@ +/* MIT license */ +var cssKeywords = require('color-name'); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +var reverseKeywords = {}; +for (var key in cssKeywords) { + if (cssKeywords.hasOwnProperty(key)) { + reverseKeywords[cssKeywords[key]] = key; + } +} + +var convert = module.exports = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +// hide .channels and .labels properties +for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); + } +} + +convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + var rdif; + var gdif; + var bdif; + var h; + var s; + + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var v = Math.max(r, g, b); + var diff = v - Math.min(r, g, b); + var diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +/** + * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + * */ +function comparativeDistance(x, y) { + return ( + Math.pow(x[0] - y[0], 2) + + Math.pow(x[1] - y[1], 2) + + Math.pow(x[2] - y[2], 2) + ); +} + +convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in cssKeywords) { + if (cssKeywords.hasOwnProperty(keyword)) { + var value = cssKeywords[keyword]; + + // Compute comparative distance + var distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + + // assume sRGB + r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); + g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); + b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); + + var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - (s * f)); + var t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + + // wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); // linear interpolation + + var r; + var g; + var b; + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // assume sRGB + r = r > 0.0031308 + ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + + // we use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + var ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + var color = args % 10; + + // handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = ((color & 1) * mult) * 255; + var g = (((color >> 1) & 1) * mult) * 255; + var b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // handle greyscale + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = (integer >> 16) & 0xFF; + var g = (integer >> 8) & 0xFF; + var b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = (max - min); + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = (h % 1) * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js new file mode 100644 index 0000000..e65b5d7 --- /dev/null +++ b/node_modules/color-convert/index.js @@ -0,0 +1,78 @@ +var conversions = require('./conversions'); +var route = require('./route'); + +var convert = {}; + +var models = Object.keys(conversions); + +function wrapRaw(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + return fn(args); + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + var result = fn(args); + + // we're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(function (fromModel) { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + var routes = route(fromModel); + var routeModels = Object.keys(routes); + + routeModels.forEach(function (toModel) { + var fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json new file mode 100644 index 0000000..343dd8b --- /dev/null +++ b/node_modules/color-convert/package.json @@ -0,0 +1,80 @@ +{ + "_from": "color-convert@^1.9.0", + "_id": "color-convert@1.9.3", + "_inBundle": false, + "_integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "_location": "/color-convert", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "color-convert@^1.9.0", + "name": "color-convert", + "escapedName": "color-convert", + "rawSpec": "^1.9.0", + "saveSpec": null, + "fetchSpec": "^1.9.0" + }, + "_requiredBy": [ + "/ansi-styles" + ], + "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "_shasum": "bb71850690e1f136567de629d2d5471deda4c1e8", + "_spec": "color-convert@^1.9.0", + "author": { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + "bugs": { + "url": "https://github.com/Qix-/color-convert/issues" + }, + "bundleDependencies": false, + "dependencies": { + "color-name": "1.1.3" + }, + "deprecated": false, + "description": "Plain color conversion functions", + "devDependencies": { + "chalk": "1.1.1", + "xo": "0.11.2" + }, + "files": [ + "index.js", + "conversions.js", + "css-keywords.js", + "route.js" + ], + "homepage": "https://github.com/Qix-/color-convert#readme", + "keywords": [ + "color", + "colour", + "convert", + "converter", + "conversion", + "rgb", + "hsl", + "hsv", + "hwb", + "cmyk", + "ansi", + "ansi16" + ], + "license": "MIT", + "name": "color-convert", + "repository": { + "type": "git", + "url": "git+https://github.com/Qix-/color-convert.git" + }, + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "version": "1.9.3", + "xo": { + "rules": { + "default-case": 0, + "no-inline-comments": 0, + "operator-linebreak": 0 + } + } +} diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js new file mode 100644 index 0000000..0a1fdea --- /dev/null +++ b/node_modules/color-convert/route.js @@ -0,0 +1,97 @@ +var conversions = require('./conversions'); + +/* + this function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + var graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + var models = Object.keys(conversions); + + for (var len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; // unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + var path = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + + var cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + + var models = Object.keys(graph); + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + + if (node.parent === null) { + // no possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + diff --git a/node_modules/color-name/.eslintrc.json b/node_modules/color-name/.eslintrc.json new file mode 100644 index 0000000..c50c250 --- /dev/null +++ b/node_modules/color-name/.eslintrc.json @@ -0,0 +1,43 @@ +{ + "env": { + "browser": true, + "node": true, + "commonjs": true, + "es6": true + }, + "extends": "eslint:recommended", + "rules": { + "strict": 2, + "indent": 0, + "linebreak-style": 0, + "quotes": 0, + "semi": 0, + "no-cond-assign": 1, + "no-constant-condition": 1, + "no-duplicate-case": 1, + "no-empty": 1, + "no-ex-assign": 1, + "no-extra-boolean-cast": 1, + "no-extra-semi": 1, + "no-fallthrough": 1, + "no-func-assign": 1, + "no-global-assign": 1, + "no-implicit-globals": 2, + "no-inner-declarations": ["error", "functions"], + "no-irregular-whitespace": 2, + "no-loop-func": 1, + "no-multi-str": 1, + "no-mixed-spaces-and-tabs": 1, + "no-proto": 1, + "no-sequences": 1, + "no-throw-literal": 1, + "no-unmodified-loop-condition": 1, + "no-useless-call": 1, + "no-void": 1, + "no-with": 2, + "wrap-iife": 1, + "no-redeclare": 1, + "no-unused-vars": ["error", { "vars": "all", "args": "none" }], + "no-sparse-arrays": 1 + } +} diff --git a/node_modules/color-name/.npmignore b/node_modules/color-name/.npmignore new file mode 100644 index 0000000..3854c07 --- /dev/null +++ b/node_modules/color-name/.npmignore @@ -0,0 +1,107 @@ +//this will affect all the git repos +git config --global core.excludesfile ~/.gitignore + + +//update files since .ignore won't if already tracked +git rm --cached + +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +# Icon? +ehthumbs.db +Thumbs.db +.cache +.project +.settings +.tmproj +*.esproj +nbproject + +# Numerous always-ignore extensions # +##################################### +*.diff +*.err +*.orig +*.rej +*.swn +*.swo +*.swp +*.vi +*~ +*.sass-cache +*.grunt +*.tmp + +# Dreamweaver added files # +########################### +_notes +dwsync.xml + +# Komodo # +########################### +*.komodoproject +.komodotools + +# Node # +##################### +node_modules + +# Bower # +##################### +bower_components + +# Folders to ignore # +##################### +.hg +.svn +.CVS +intermediate +publish +.idea +.graphics +_test +_archive +uploads +tmp + +# Vim files to ignore # +####################### +.VimballRecord +.netrwhist + +bundle.* + +_demo \ No newline at end of file diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE new file mode 100644 index 0000000..4d9802a --- /dev/null +++ b/node_modules/color-name/LICENSE @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/color-name/README.md b/node_modules/color-name/README.md new file mode 100644 index 0000000..3611a6b --- /dev/null +++ b/node_modules/color-name/README.md @@ -0,0 +1,11 @@ +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js new file mode 100644 index 0000000..e42aa68 --- /dev/null +++ b/node_modules/color-name/index.js @@ -0,0 +1,152 @@ +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json new file mode 100644 index 0000000..ff36ab8 --- /dev/null +++ b/node_modules/color-name/package.json @@ -0,0 +1,52 @@ +{ + "_from": "color-name@1.1.3", + "_id": "color-name@1.1.3", + "_inBundle": false, + "_integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "_location": "/color-name", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-name@1.1.3", + "name": "color-name", + "escapedName": "color-name", + "rawSpec": "1.1.3", + "saveSpec": null, + "fetchSpec": "1.1.3" + }, + "_requiredBy": [ + "/color-convert" + ], + "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "_shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25", + "_spec": "color-name@1.1.3", + "author": { + "name": "DY", + "email": "dfcreative@gmail.com" + }, + "bugs": { + "url": "https://github.com/dfcreative/color-name/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A list of color names and its values", + "homepage": "https://github.com/dfcreative/color-name", + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "license": "MIT", + "main": "index.js", + "name": "color-name", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/dfcreative/color-name.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.1.3" +} diff --git a/node_modules/color-name/test.js b/node_modules/color-name/test.js new file mode 100644 index 0000000..7a08746 --- /dev/null +++ b/node_modules/color-name/test.js @@ -0,0 +1,7 @@ +'use strict' + +var names = require('./'); +var assert = require('assert'); + +assert.deepEqual(names.red, [255,0,0]); +assert.deepEqual(names.aliceblue, [240,248,255]); diff --git a/node_modules/chalk/node_modules/escape-string-regexp/index.js b/node_modules/escape-string-regexp/index.js similarity index 78% rename from node_modules/chalk/node_modules/escape-string-regexp/index.js rename to node_modules/escape-string-regexp/index.js index ac6572c..7834bf9 100644 --- a/node_modules/chalk/node_modules/escape-string-regexp/index.js +++ b/node_modules/escape-string-regexp/index.js @@ -7,5 +7,5 @@ module.exports = function (str) { throw new TypeError('Expected a string'); } - return str.replace(matchOperatorsRe, '\\$&'); + return str.replace(matchOperatorsRe, '\\$&'); }; diff --git a/node_modules/chalk/node_modules/ansi-styles/license b/node_modules/escape-string-regexp/license similarity index 100% rename from node_modules/chalk/node_modules/ansi-styles/license rename to node_modules/escape-string-regexp/license diff --git a/node_modules/escape-string-regexp/package.json b/node_modules/escape-string-regexp/package.json new file mode 100644 index 0000000..a8fa921 --- /dev/null +++ b/node_modules/escape-string-regexp/package.json @@ -0,0 +1,81 @@ +{ + "_from": "escape-string-regexp@^1.0.5", + "_id": "escape-string-regexp@1.0.5", + "_inBundle": false, + "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "_location": "/escape-string-regexp", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "escape-string-regexp@^1.0.5", + "name": "escape-string-regexp", + "escapedName": "escape-string-regexp", + "rawSpec": "^1.0.5", + "saveSpec": null, + "fetchSpec": "^1.0.5" + }, + "_requiredBy": [ + "/chalk", + "/figures" + ], + "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "_shasum": "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4", + "_spec": "escape-string-regexp@^1.0.5", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/escape-string-regexp/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Escape RegExp special characters", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", + "keywords": [ + "escape", + "regex", + "regexp", + "re", + "regular", + "expression", + "string", + "str", + "special", + "characters" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + } + ], + "name": "escape-string-regexp", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.5" +} diff --git a/node_modules/chalk/node_modules/escape-string-regexp/readme.md b/node_modules/escape-string-regexp/readme.md similarity index 69% rename from node_modules/chalk/node_modules/escape-string-regexp/readme.md rename to node_modules/escape-string-regexp/readme.md index 808a963..87ac82d 100644 --- a/node_modules/chalk/node_modules/escape-string-regexp/readme.md +++ b/node_modules/escape-string-regexp/readme.md @@ -5,7 +5,7 @@ ## Install -```sh +``` $ npm install --save escape-string-regexp ``` @@ -13,10 +13,10 @@ $ npm install --save escape-string-regexp ## Usage ```js -var escapeStringRegexp = require('escape-string-regexp'); +const escapeStringRegexp = require('escape-string-regexp'); -var escapedString = escapeStringRegexp('how much $ for a unicorn?'); -//=> how much \$ for a unicorn\? +const escapedString = escapeStringRegexp('how much $ for a unicorn?'); +//=> 'how much \$ for a unicorn\?' new RegExp(escapedString); ``` diff --git a/node_modules/changelogplease/node_modules/git-tools/.npmignore b/node_modules/git-tools/.npmignore similarity index 100% rename from node_modules/changelogplease/node_modules/git-tools/.npmignore rename to node_modules/git-tools/.npmignore diff --git a/node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt b/node_modules/git-tools/LICENSE-MIT.txt similarity index 100% rename from node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt rename to node_modules/git-tools/LICENSE-MIT.txt diff --git a/node_modules/changelogplease/node_modules/git-tools/README.md b/node_modules/git-tools/README.md similarity index 100% rename from node_modules/changelogplease/node_modules/git-tools/README.md rename to node_modules/git-tools/README.md diff --git a/node_modules/changelogplease/node_modules/git-tools/git-tools.js b/node_modules/git-tools/git-tools.js similarity index 100% rename from node_modules/changelogplease/node_modules/git-tools/git-tools.js rename to node_modules/git-tools/git-tools.js diff --git a/node_modules/git-tools/package.json b/node_modules/git-tools/package.json new file mode 100644 index 0000000..d1240f0 --- /dev/null +++ b/node_modules/git-tools/package.json @@ -0,0 +1,52 @@ +{ + "_from": "git-tools@0.1.0", + "_id": "git-tools@0.1.0", + "_inBundle": false, + "_integrity": "sha1-QnCaq85mfofueJ+BZ9vgGR25oQs=", + "_location": "/git-tools", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "git-tools@0.1.0", + "name": "git-tools", + "escapedName": "git-tools", + "rawSpec": "0.1.0", + "saveSpec": null, + "fetchSpec": "0.1.0" + }, + "_requiredBy": [ + "/changelogplease" + ], + "_resolved": "https://registry.npmjs.org/git-tools/-/git-tools-0.1.0.tgz", + "_shasum": "42709aabce667e87ee789f8167dbe0191db9a10b", + "_spec": "git-tools@0.1.0", + "author": { + "name": "Scott González", + "email": "scott.gonzalez@gmail.com", + "url": "http://scottgonzalez.com" + }, + "bugs": { + "url": "https://github.com/scottgonzalez/node-git-tools/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Tools for parsing data out of git repositories.", + "devDependencies": { + "grunt": "~0.4.0", + "grunt-contrib-jshint": "~0.1.1", + "grunt-contrib-nodeunit": "~0.1.2", + "rimraf": "~2.1.4" + }, + "homepage": "https://github.com/scottgonzalez/node-git-tools", + "keywords": [ + "git" + ], + "main": "git-tools.js", + "name": "git-tools", + "repository": { + "type": "git", + "url": "git://github.com/scottgonzalez/node-git-tools.git" + }, + "version": "0.1.0" +} diff --git a/node_modules/github-request/lib/request.js b/node_modules/github-request/lib/request.js index 9f0f518..8a5a736 100644 --- a/node_modules/github-request/lib/request.js +++ b/node_modules/github-request/lib/request.js @@ -34,7 +34,7 @@ function request(settings, data, callback) { }, settings); settings.headers = extend({ "user-agent": userAgent, - "content-length": typeof data === "string" ? data.length : 0 + "content-length": typeof data === "string" ? Buffer.byteLength(data, "utf8") : 0 }, settings.headers || {}); var req = https.request(extend({ diff --git a/node_modules/github-request/package.json b/node_modules/github-request/package.json index 08bb6cc..614b232 100644 --- a/node_modules/github-request/package.json +++ b/node_modules/github-request/package.json @@ -1,46 +1,47 @@ { - "name": "github-request", - "version": "1.2.3", - "description": "Simplified GitHub API requests.", - "keywords": [ - "github", - "request" - ], - "homepage": "https://github.com/scottgonzalez/github-request", - "bugs": { - "url": "https://github.com/scottgonzalez/github-request/issues" + "_from": "github-request@1.2.4", + "_id": "github-request@1.2.4", + "_inBundle": false, + "_integrity": "sha1-SPZN26rSH9gF+12X9aVUh0R7+0k=", + "_location": "/github-request", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "github-request@1.2.4", + "name": "github-request", + "escapedName": "github-request", + "rawSpec": "1.2.4", + "saveSpec": null, + "fetchSpec": "1.2.4" }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/github-request/-/github-request-1.2.4.tgz", + "_shasum": "48f64ddbaad21fd805fb5d97f5a55487447bfb49", + "_spec": "github-request@1.2.4", "author": { "name": "Scott González", "email": "scott.gonzalez@gmail.com", "url": "http://scottgonzalez.com" }, + "bugs": { + "url": "https://github.com/scottgonzalez/github-request/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Simplified GitHub API requests.", + "homepage": "https://github.com/scottgonzalez/github-request", + "keywords": [ + "github", + "request" + ], "main": "./lib/request.js", + "name": "github-request", "repository": { "type": "git", "url": "git://github.com/scottgonzalez/github-request.git" }, - "gitHead": "e94973a48cdffb0f9c7f10b134c03ead1ecc506e", - "_id": "github-request@1.2.3", - "scripts": {}, - "_shasum": "cb0a34cb0ad07caf417072bff88a8b59f1738389", - "_from": "github-request@1.2.3", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "scott.gonzalez", - "email": "scott.gonzalez@gmail.com" - }, - "maintainers": [ - { - "name": "scott.gonzalez", - "email": "scott.gonzalez@gmail.com" - } - ], - "dist": { - "shasum": "cb0a34cb0ad07caf417072bff88a8b59f1738389", - "tarball": "http://registry.npmjs.org/github-request/-/github-request-1.2.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/github-request/-/github-request-1.2.3.tgz", - "readme": "ERROR: No README data found!" + "version": "1.2.4" } diff --git a/node_modules/has-flag/index.js b/node_modules/has-flag/index.js new file mode 100644 index 0000000..5139728 --- /dev/null +++ b/node_modules/has-flag/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const pos = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; diff --git a/node_modules/has-flag/license b/node_modules/has-flag/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/has-flag/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/has-flag/package.json b/node_modules/has-flag/package.json new file mode 100644 index 0000000..2ef0c43 --- /dev/null +++ b/node_modules/has-flag/package.json @@ -0,0 +1,75 @@ +{ + "_from": "has-flag@^3.0.0", + "_id": "has-flag@3.0.0", + "_inBundle": false, + "_integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "_location": "/has-flag", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "has-flag@^3.0.0", + "name": "has-flag", + "escapedName": "has-flag", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/supports-color" + ], + "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "_shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd", + "_spec": "has-flag@^3.0.0", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/has-flag/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if argv has a specific flag", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/has-flag#readme", + "keywords": [ + "has", + "check", + "detect", + "contains", + "find", + "flag", + "cli", + "command-line", + "argv", + "process", + "arg", + "args", + "argument", + "arguments", + "getopt", + "minimist", + "optimist" + ], + "license": "MIT", + "name": "has-flag", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-flag.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/has-flag/readme.md b/node_modules/has-flag/readme.md new file mode 100644 index 0000000..677893c --- /dev/null +++ b/node_modules/has-flag/readme.md @@ -0,0 +1,70 @@ +# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) + +> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag + +Correctly stops looking after an `--` argument terminator. + + +## Install + +``` +$ npm install has-flag +``` + + +## Usage + +```js +// foo.js +const hasFlag = require('has-flag'); + +hasFlag('unicorn'); +//=> true + +hasFlag('--unicorn'); +//=> true + +hasFlag('f'); +//=> true + +hasFlag('-f'); +//=> true + +hasFlag('foo=bar'); +//=> true + +hasFlag('foo'); +//=> false + +hasFlag('rainbow'); +//=> false +``` + +``` +$ node foo.js -f --unicorn --foo=bar -- --rainbow +``` + + +## API + +### hasFlag(flag, [argv]) + +Returns a boolean for whether the flag exists. + +#### flag + +Type: `string` + +CLI flag to look for. The `--` prefix is optional. + +#### argv + +Type: `string[]`
+Default: `process.argv` + +CLI arguments. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore new file mode 100644 index 0000000..c1cb757 --- /dev/null +++ b/node_modules/isexe/.npmignore @@ -0,0 +1,2 @@ +.nyc_output/ +coverage/ diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/isexe/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md new file mode 100644 index 0000000..35769e8 --- /dev/null +++ b/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable, and a normal file. + +Uses `fs.stat` and tests against the `PATHEXT` environment variable on +Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.stat`, unless +`options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id +* `gid` Number to use as the group id +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js new file mode 100644 index 0000000..553fb32 --- /dev/null +++ b/node_modules/isexe/index.js @@ -0,0 +1,57 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js new file mode 100644 index 0000000..1995ea4 --- /dev/null +++ b/node_modules/isexe/mode.js @@ -0,0 +1,41 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json new file mode 100644 index 0000000..31783ce --- /dev/null +++ b/node_modules/isexe/package.json @@ -0,0 +1,59 @@ +{ + "_from": "isexe@^2.0.0", + "_id": "isexe@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "_location": "/isexe", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "isexe@^2.0.0", + "name": "isexe", + "escapedName": "isexe", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "_shasum": "e8fbf374dc556ff8947a10dcb0572d633f2cfa10", + "_spec": "isexe@^2.0.0", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Minimal module to check if a file is executable.", + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "isexe", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.0.0" +} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js new file mode 100644 index 0000000..d926df6 --- /dev/null +++ b/node_modules/isexe/test/basic.js @@ -0,0 +1,221 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.test('directory is not executable', function (t) { + isexe(__dirname, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js new file mode 100644 index 0000000..3499673 --- /dev/null +++ b/node_modules/isexe/windows.js @@ -0,0 +1,42 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} diff --git a/node_modules/semver/.npmignore b/node_modules/semver/.npmignore deleted file mode 100644 index 7300fbc..0000000 --- a/node_modules/semver/.npmignore +++ /dev/null @@ -1 +0,0 @@ -# nada diff --git a/node_modules/semver/CHANGELOG.md b/node_modules/semver/CHANGELOG.md new file mode 100644 index 0000000..f567dd3 --- /dev/null +++ b/node_modules/semver/CHANGELOG.md @@ -0,0 +1,70 @@ +# changes log + +## 6.2.0 + +* Coerce numbers to strings when passed to semver.coerce() +* Add `rtl` option to coerce from right to left + +## 6.1.3 + +* Handle X-ranges properly in includePrerelease mode + +## 6.1.2 + +* Do not throw when testing invalid version strings + +## 6.1.1 + +* Add options support for semver.coerce() +* Handle undefined version passed to Range.test + +## 6.1.0 + +* Add semver.compareBuild function +* Support `*` in semver.intersects + +## 6.0 + +* Fix `intersects` logic. + + This is technically a bug fix, but since it is also a change to behavior + that may require users updating their code, it is marked as a major + version increment. + +## 5.7 + +* Add `minVersion` method + +## 5.6 + +* Move boolean `loose` param to an options object, with + backwards-compatibility protection. +* Add ability to opt out of special prerelease version handling with + the `includePrerelease` option flag. + +## 5.5 + +* Add version coercion capabilities + +## 5.4 + +* Add intersection checking + +## 5.3 + +* Add `minSatisfying` method + +## 5.2 + +* Add `prerelease(v)` that returns prerelease components + +## 5.1 + +* Add Backus-Naur for ranges +* Remove excessively cute inspection methods + +## 5.0 + +* Remove AMD/Browserified build artifacts +* Fix ltr and gtr when using the `*` range +* Fix for range `*` with a prerelease identifier diff --git a/node_modules/semver/LICENSE b/node_modules/semver/LICENSE index 0c44ae7..19129e3 100644 --- a/node_modules/semver/LICENSE +++ b/node_modules/semver/LICENSE @@ -1,27 +1,15 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. +The ISC License -The BSD License +Copyright (c) Isaac Z. Schlueter and Contributors -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +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. -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/semver/Makefile b/node_modules/semver/Makefile deleted file mode 100644 index 5717ccf..0000000 --- a/node_modules/semver/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -files = semver.browser.js \ - semver.min.js \ - semver.browser.js.gz \ - semver.min.js.gz - -all: $(files) - -clean: - rm -f $(files) - -semver.browser.js: head.js semver.js foot.js - ( cat head.js; \ - cat semver.js | \ - egrep -v '^ *\/\* nomin \*\/' | \ - perl -pi -e 's/debug\([^\)]+\)//g'; \ - cat foot.js ) > semver.browser.js - -semver.min.js: semver.browser.js - uglifyjs -m semver.min.js - -%.gz: % - gzip --stdout -9 <$< >$@ - -.PHONY: all clean diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md index ef04659..2293a14 100644 --- a/node_modules/semver/README.md +++ b/node_modules/semver/README.md @@ -1,142 +1,443 @@ semver(1) -- The semantic versioner for npm =========================================== +## Install + +```bash +npm install semver +```` + ## Usage - $ npm install semver +As a node module: + +```js +const semver = require('semver') - semver.valid('1.2.3') // '1.2.3' - semver.valid('a.b.c') // null - semver.clean(' =v1.2.3 ') // '1.2.3' - semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true - semver.gt('1.2.3', '9.8.7') // false - semver.lt('1.2.3', '9.8.7') // true +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` As a command-line utility: - $ semver -h +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely - Usage: semver [ [...]] [-r | -i | -d ] - Test if version(s) satisfy the supplied range(s), and sort them. +-p --include-prerelease + Always include prerelease versions in range matching - Multiple versions or ranges may be supplied, unless increment - or decrement options are specified. In that case, only a single - version may be used, and it is incremented by the specified level +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) - Program exits successfully if any valid version satisfies - all supplied ranges, and prints all satisfying versions. +--rtl + Coerce version strings right to left - If no versions are valid, or ranges are not satisfied, - then exits failure. +--ltr + Coerce version strings left to right (default) - Versions are printed in ascending order, so supplying - multiple versions to the utility will just sort them. +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` ## Versions -A "version" is described by the v2.0.0 specification found at -. +A "version" is described by the `v2.0.0` specification found at +. A leading `"="` or `"v"` character is stripped off and ignored. ## Ranges -The following range styles are supported: - -* `1.2.3` A specific version. When nothing else will do. Note that - build metadata is still ignored, so `1.2.3+build2012` will satisfy - this range. -* `>1.2.3` Greater than a specific version. -* `<1.2.3` Less than a specific version. If there is no prerelease - tag on the version range, then no prerelease version will be allowed - either, even though these are technically "less than". -* `>=1.2.3` Greater than or equal to. Note that prerelease versions - are NOT equal to their "normal" equivalents, so `1.2.3-beta` will - not satisfy this range, but `2.3.0-beta` will. -* `<=1.2.3` Less than or equal to. In this case, prerelease versions - ARE allowed, so `1.2.3-beta` would satisfy. +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + * `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` -* `~1.2.3` := `>=1.2.3-0 <1.3.0-0` "Reasonably close to 1.2.3". When - using tilde operators, prerelease versions are supported as well, - but a prerelease of the next significant digit will NOT be - satisfactory, so `1.3.0-beta` will not satisfy `~1.2.3`. -* `^1.2.3` := `>=1.2.3-0 <2.0.0-0` "Compatible with 1.2.3". When - using caret operators, anything from the specified version (including - prerelease) will be supported up to, but not including, the next - major version (or its prereleases). `1.5.1` will satisfy `^1.2.3`, - while `1.2.2` and `2.0.0-beta` will not. -* `^0.1.3` := `>=0.1.3-0 <0.2.0-0` "Compatible with 0.1.3". 0.x.x versions are - special: the first non-zero component indicates potentially breaking changes, - meaning the caret operator matches any version with the same first non-zero - component starting at the specified version. -* `^0.0.2` := `=0.0.2` "Only the version 0.0.2 is considered compatible" -* `~1.2` := `>=1.2.0-0 <1.3.0-0` "Any version starting with 1.2" -* `^1.2` := `>=1.2.0-0 <2.0.0-0` "Any version compatible with 1.2" -* `1.2.x` := `>=1.2.0-0 <1.3.0-0` "Any version starting with 1.2" -* `~1` := `>=1.0.0-0 <2.0.0-0` "Any version starting with 1" -* `^1` := `>=1.0.0-0 <2.0.0-0` "Any version compatible with 1" -* `1.x` := `>=1.0.0-0 <2.0.0-0` "Any version starting with 1" - - -Ranges can be joined with either a space (which implies "and") or a -`||` (which implies "or"). + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero element in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` ## Functions -All methods and classes take a final `loose` boolean argument that, if -true, will be more forgiving about not-quite-valid semver strings. -The resulting output will always be 100% strict, of course. +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. Strict-mode Comparators and Ranges will be strict about the SemVer strings that they parse. -* valid(v): Return the parsed version, or null if it's not valid. -* inc(v, release): Return the version incremented by the release type - (major, minor, patch, or prerelease), or null if it's not valid. +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. ### Comparison -* gt(v1, v2): `v1 > v2` -* gte(v1, v2): `v1 >= v2` -* lt(v1, v2): `v1 < v2` -* lte(v1, v2): `v1 <= v2` -* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent, +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings. -* neq(v1, v2): `v1 != v2` The opposite of eq. -* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call the corresponding function above. `"==="` and `"!=="` do simple string comparison, but are included for completeness. Throws if an invalid comparison string is provided. -* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if - v2 is greater. Sorts in ascending order if passed to Array.sort(). -* rcompare(v1, v2): The reverse of compare. Sorts an array of versions - in descending order when passed to Array.sort(). +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators +* `intersects(comparator)`: Return true if the comparators intersect ### Ranges -* validRange(range): Return the valid range or null if it's not valid -* satisfies(version, range): Return true if the version satisfies the +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the range. -* maxSatisfying(versions, range): Return the highest version in the list - that satisfies the range, or null if none of them do. -* gtr(version, range): Return true if version is greater than all the +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the versions possible in the range. -* ltr(version, range): Return true if version is less than all the +* `ltr(version, range)`: Return `true` if version is less than all the versions possible in the range. -* outside(version, range, hilo): Return true if the version is outside +* `outside(version, range, hilo)`: Return true if the version is outside the bounds of the range in either the high or low direction. The `hilo` argument must be either the string `'>'` or `'<'`. (This is the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect Note that, since ranges may be non-contiguous, a version might not be greater than a range, less than a range, *or* satisfy a range! For example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because 2.0.1 satisfies, which is higher), nor less than the -range (since 1.2.8 satisfies, which is lower), and it also does not +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not satisfy the range. If you want to know if a version satisfies or does not satisfy a range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version, options)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` diff --git a/node_modules/semver/bin/semver b/node_modules/semver/bin/semver deleted file mode 100755 index 88b4c7d..0000000 --- a/node_modules/semver/bin/semver +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - , versions = [] - , range = [] - , gt = [] - , lt = [] - , eq = [] - , inc = null - , version = require("../package.json").version - , loose = false - , semver = require("../semver") - , reverse = false - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var i = a.indexOf('=') - if (i !== -1) { - a = a.slice(0, i) - argv.unshift(a.slice(i + 1)) - } - switch (a) { - case "-rv": case "-rev": case "--rev": case "--reverse": - reverse = true - break - case "-l": case "--loose": - loose = true - break - case "-v": case "--version": - versions.push(argv.shift()) - break - case "-i": case "--inc": case "--increment": - switch (argv[0]) { - case "major": case "minor": case "patch": case "prerelease": - inc = argv.shift() - break - default: - inc = "patch" - break - } - break - case "-r": case "--range": - range.push(argv.shift()) - break - case "-h": case "--help": case "-?": - return help() - default: - versions.push(a) - break - } - } - - versions = versions.filter(function (v) { - return semver.valid(v, loose) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) - return failInc() - - for (var i = 0, l = range.length; i < l ; i ++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], loose) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error("--inc can only be used on a single version with no range") - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? "rcompare" : "compare" - versions.sort(function (a, b) { - return semver[compare](a, b, loose) - }).map(function (v) { - return semver.clean(v, loose) - }).map(function (v) { - return inc ? semver.inc(v, inc, loose) : v - }).forEach(function (v,i,_) { console.log(v) }) -} - -function help () { - console.log(["SemVer " + version - ,"" - ,"A JavaScript implementation of the http://semver.org/ specification" - ,"Copyright Isaac Z. Schlueter" - ,"" - ,"Usage: semver [options] [ [...]]" - ,"Prints valid versions sorted by SemVer precedence" - ,"" - ,"Options:" - ,"-r --range " - ," Print versions that match the specified range." - ,"" - ,"-i --increment []" - ," Increment a version by the specified level. Level can" - ," be one of: major, minor, patch, or prerelease" - ," Default level is 'patch'." - ," Only one version may be specified." - ,"" - ,"-l --loose" - ," Interpret versions and ranges loosely" - ,"" - ,"Program exits successfully if any valid version satisfies" - ,"all supplied ranges, and prints all satisfying versions." - ,"" - ,"If no satisfying versions are found, then exits failure." - ,"" - ,"Versions are printed in ascending order, so supplying" - ,"multiple versions to the utility will just sort them." - ].join("\n")) -} diff --git a/node_modules/semver/bin/semver.js b/node_modules/semver/bin/semver.js new file mode 100755 index 0000000..666034a --- /dev/null +++ b/node_modules/semver/bin/semver.js @@ -0,0 +1,174 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var rtl = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '--rtl': + rtl = true + break + case '--ltr': + rtl = false + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v, options) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + '--rtl', + ' Coerce version strings right to left', + '', + '--ltr', + ' Coerce version strings left to right (default)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/node_modules/semver/foot.js b/node_modules/semver/foot.js deleted file mode 100644 index 8f83c20..0000000 --- a/node_modules/semver/foot.js +++ /dev/null @@ -1,6 +0,0 @@ - -})( - typeof exports === 'object' ? exports : - typeof define === 'function' && define.amd ? {} : - semver = {} -); diff --git a/node_modules/semver/head.js b/node_modules/semver/head.js deleted file mode 100644 index 6536865..0000000 --- a/node_modules/semver/head.js +++ /dev/null @@ -1,2 +0,0 @@ -;(function(exports) { - diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json index 6415fd6..7973e43 100644 --- a/node_modules/semver/package.json +++ b/node_modules/semver/package.json @@ -1,32 +1,60 @@ { - "name": "semver", - "version": "2.2.1", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "browser": "semver.browser.js", - "min": "semver.min.js", - "scripts": { - "test": "tap test/*.js", - "prepublish": "make" + "_from": "semver@6.3.0", + "_id": "semver@6.3.0", + "_inBundle": false, + "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "_location": "/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "semver@6.3.0", + "name": "semver", + "escapedName": "semver", + "rawSpec": "6.3.0", + "saveSpec": null, + "fetchSpec": "6.3.0" + }, + "_requiredBy": [ + "/", + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "_shasum": "ee0a64c8af5e8ceea67687b133761e1becbd1d3d", + "_spec": "semver@6.3.0", + "bin": { + "semver": "./bin/semver.js" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" }, + "bundleDependencies": false, + "deprecated": false, + "description": "The semantic version parser used by npm.", "devDependencies": { - "tap": "0.x >=0.0.4", - "uglify-js": "~2.3.6" + "tap": "^14.3.1" }, - "license": "BSD", + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", "repository": { "type": "git", - "url": "git://github.com/isaacs/node-semver.git" + "url": "git+https://github.com/npm/node-semver.git" }, - "bin": { - "semver": "./bin/semver" + "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" }, - "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // '1.2.3'\n semver.valid('a.b.c') // null\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver [ [...]] [-r | -i | -d ]\n Test if version(s) satisfy the supplied range(s), and sort them.\n\n Multiple versions or ranges may be supplied, unless increment\n or decrement options are specified. In that case, only a single\n version may be used, and it is incremented by the specified level\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA \"version\" is described by the v2.0.0 specification found at\n.\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `1.2.3` A specific version. When nothing else will do. Note that\n build metadata is still ignored, so `1.2.3+build2012` will satisfy\n this range.\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than a specific version. If there is no prerelease\n tag on the version range, then no prerelease version will be allowed\n either, even though these are technically \"less than\".\n* `>=1.2.3` Greater than or equal to. Note that prerelease versions\n are NOT equal to their \"normal\" equivalents, so `1.2.3-beta` will\n not satisfy this range, but `2.3.0-beta` will.\n* `<=1.2.3` Less than or equal to. In this case, prerelease versions\n ARE allowed, so `1.2.3-beta` would satisfy.\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3-0 <1.3.0-0` \"Reasonably close to 1.2.3\". When\n using tilde operators, prerelease versions are supported as well,\n but a prerelease of the next significant digit will NOT be\n satisfactory, so `1.3.0-beta` will not satisfy `~1.2.3`.\n* `^1.2.3` := `>=1.2.3-0 <2.0.0-0` \"Compatible with 1.2.3\". When\n using caret operators, anything from the specified version (including\n prerelease) will be supported up to, but not including, the next\n major version (or its prereleases). `1.5.1` will satisfy `^1.2.3`,\n while `1.2.2` and `2.0.0-beta` will not.\n* `^0.1.3` := `>=0.1.3-0 <0.2.0-0` \"Compatible with 0.1.3\". 0.x.x versions are\n special: the first non-zero component indicates potentially breaking changes,\n meaning the caret operator matches any version with the same first non-zero\n component starting at the specified version.\n* `^0.0.2` := `=0.0.2` \"Only the version 0.0.2 is considered compatible\"\n* `~1.2` := `>=1.2.0-0 <1.3.0-0` \"Any version starting with 1.2\"\n* `^1.2` := `>=1.2.0-0 <2.0.0-0` \"Any version compatible with 1.2\"\n* `1.2.x` := `>=1.2.0-0 <1.3.0-0` \"Any version starting with 1.2\"\n* `~1` := `>=1.0.0-0 <2.0.0-0` \"Any version starting with 1\"\n* `^1` := `>=1.0.0-0 <2.0.0-0` \"Any version compatible with 1\"\n* `1.x` := `>=1.0.0-0 <2.0.0-0` \"Any version starting with 1\"\n\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\nAll methods and classes take a final `loose` boolean argument that, if\ntrue, will be more forgiving about not-quite-valid semver strings.\nThe resulting output will always be 100% strict, of course.\n\nStrict-mode Comparators and Ranges will be strict about the SemVer\nstrings that they parse.\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or prerelease), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n* gtr(version, range): Return true if version is greater than all the\n versions possible in the range.\n* ltr(version, range): Return true if version is less than all the\n versions possible in the range.\n* outside(version, range, hilo): Return true if the version is outside\n the bounds of the range in either the high or low direction. The\n `hilo` argument must be either the string `'>'` or `'<'`. (This is\n the function called by `gtr` and `ltr`.)\n\nNote that, since ranges may be non-contiguous, a version might not be\ngreater than a range, less than a range, *or* satisfy a range! For\nexample, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`\nuntil `2.0.0`, so the version `1.2.10` would not be greater than the\nrange (because 2.0.1 satisfies, which is higher), nor less than the\nrange (since 1.2.8 satisfies, which is lower), and it also does not\nsatisfy the range.\n\nIf you want to know if a version satisfies or does not satisfy a\nrange, use the `satisfies(version, range)` function.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-semver/issues" + "tap": { + "check-coverage": true }, - "homepage": "https://github.com/isaacs/node-semver", - "_id": "semver@2.2.1", - "_from": "semver@2.2.1" + "version": "6.3.0" } diff --git a/node_modules/semver/range.bnf b/node_modules/semver/range.bnf new file mode 100644 index 0000000..d4c6ae0 --- /dev/null +++ b/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/semver/semver.browser.js b/node_modules/semver/semver.browser.js deleted file mode 100644 index e05ecc1..0000000 --- a/node_modules/semver/semver.browser.js +++ /dev/null @@ -1,1007 +0,0 @@ -;(function(exports) { - -// export the class if we are in a Node-like system. -if (typeof module === 'object' && module.exports === exports) - exports = module.exports = SemVer; - -// The debug function is excluded entirely from the minified version. - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0'; - -// The actual regexps go on exports.re -var re = exports.re = []; -var src = exports.src = []; -var R = 0; - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; -var NUMERICIDENTIFIERLOOSE = R++; -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; - - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++; -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')'; - -var MAINVERSIONLOOSE = R++; -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++; -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - -var PRERELEASEIDENTIFIERLOOSE = R++; -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++; -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; - -var PRERELEASELOOSE = R++; -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++; -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; - - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++; -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?'; - -src[FULL] = '^' + FULLPLAIN + '$'; - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?'; - -var LOOSE = R++; -src[LOOSE] = '^' + LOOSEPLAIN + '$'; - -var GTLT = R++; -src[GTLT] = '((?:<|>)?=?)'; - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++; -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; -var XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; - -var XRANGEPLAIN = R++; -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:(' + src[PRERELEASE] + ')' + - ')?)?)?'; - -var XRANGEPLAINLOOSE = R++; -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:(' + src[PRERELEASELOOSE] + ')' + - ')?)?)?'; - -// >=2.x, for example, means >=2.0.0-0 -// <1.x would be the same as "<1.0.0-0", though. -var XRANGE = R++; -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; -var XRANGELOOSE = R++; -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++; -src[LONETILDE] = '(?:~>?)'; - -var TILDETRIM = R++; -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); -var tildeTrimReplace = '$1~'; - -var TILDE = R++; -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; -var TILDELOOSE = R++; -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++; -src[LONECARET] = '(?:\\^)'; - -var CARETTRIM = R++; -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); -var caretTrimReplace = '$1^'; - -var CARET = R++; -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; -var CARETLOOSE = R++; -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++; -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; -var COMPARATOR = R++; -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++; -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); -var comparatorTrimReplace = '$1$2$3'; - - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++; -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$'; - -var HYPHENRANGELOOSE = R++; -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$'; - -// Star ranges basically just allow anything at all. -var STAR = R++; -src[STAR] = '(<|>)?=?\\s*\\*'; - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - ; - if (!re[i]) - re[i] = new RegExp(src[i]); -} - -exports.parse = parse; -function parse(version, loose) { - var r = loose ? re[LOOSE] : re[FULL]; - return (r.test(version)) ? new SemVer(version, loose) : null; -} - -exports.valid = valid; -function valid(version, loose) { - var v = parse(version, loose); - return v ? v.version : null; -} - - -exports.clean = clean; -function clean(version, loose) { - var s = parse(version, loose); - return s ? s.version : null; -} - -exports.SemVer = SemVer; - -function SemVer(version, loose) { - if (version instanceof SemVer) { - if (version.loose === loose) - return version; - else - version = version.version; - } - - if (!(this instanceof SemVer)) - return new SemVer(version, loose); - - ; - this.loose = loose; - var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); - - if (!m) - throw new TypeError('Invalid Version: ' + version); - - this.raw = version; - - // these are actually numbers - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - - // numberify any prerelease numeric ids - if (!m[4]) - this.prerelease = []; - else - this.prerelease = m[4].split('.').map(function(id) { - return (/^[0-9]+$/.test(id)) ? +id : id; - }); - - this.build = m[5] ? m[5].split('.') : []; - this.format(); -} - -SemVer.prototype.format = function() { - this.version = this.major + '.' + this.minor + '.' + this.patch; - if (this.prerelease.length) - this.version += '-' + this.prerelease.join('.'); - return this.version; -}; - -SemVer.prototype.inspect = function() { - return ''; -}; - -SemVer.prototype.toString = function() { - return this.version; -}; - -SemVer.prototype.compare = function(other) { - ; - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return this.compareMain(other) || this.comparePre(other); -}; - -SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch); -}; - -SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) - return -1; - else if (!this.prerelease.length && other.prerelease.length) - return 1; - else if (!this.prerelease.lenth && !other.prerelease.length) - return 0; - - var i = 0; - do { - var a = this.prerelease[i]; - var b = other.prerelease[i]; - ; - if (a === undefined && b === undefined) - return 0; - else if (b === undefined) - return 1; - else if (a === undefined) - return -1; - else if (a === b) - continue; - else - return compareIdentifiers(a, b); - } while (++i); -}; - -SemVer.prototype.inc = function(release) { - switch (release) { - case 'major': - this.major++; - this.minor = -1; - case 'minor': - this.minor++; - this.patch = -1; - case 'patch': - this.patch++; - this.prerelease = []; - break; - case 'prerelease': - if (this.prerelease.length === 0) - this.prerelease = [0]; - else { - var i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) // didn't increment anything - this.prerelease.push(0); - } - break; - - default: - throw new Error('invalid increment argument: ' + release); - } - this.format(); - return this; -}; - -exports.inc = inc; -function inc(version, release, loose) { - try { - return new SemVer(version, loose).inc(release).version; - } catch (er) { - return null; - } -} - -exports.compareIdentifiers = compareIdentifiers; - -var numeric = /^[0-9]+$/; -function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - - if (anum && bnum) { - a = +a; - b = +b; - } - - return (anum && !bnum) ? -1 : - (bnum && !anum) ? 1 : - a < b ? -1 : - a > b ? 1 : - 0; -} - -exports.rcompareIdentifiers = rcompareIdentifiers; -function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); -} - -exports.compare = compare; -function compare(a, b, loose) { - return new SemVer(a, loose).compare(b); -} - -exports.compareLoose = compareLoose; -function compareLoose(a, b) { - return compare(a, b, true); -} - -exports.rcompare = rcompare; -function rcompare(a, b, loose) { - return compare(b, a, loose); -} - -exports.sort = sort; -function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compare(a, b, loose); - }); -} - -exports.rsort = rsort; -function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.rcompare(a, b, loose); - }); -} - -exports.gt = gt; -function gt(a, b, loose) { - return compare(a, b, loose) > 0; -} - -exports.lt = lt; -function lt(a, b, loose) { - return compare(a, b, loose) < 0; -} - -exports.eq = eq; -function eq(a, b, loose) { - return compare(a, b, loose) === 0; -} - -exports.neq = neq; -function neq(a, b, loose) { - return compare(a, b, loose) !== 0; -} - -exports.gte = gte; -function gte(a, b, loose) { - return compare(a, b, loose) >= 0; -} - -exports.lte = lte; -function lte(a, b, loose) { - return compare(a, b, loose) <= 0; -} - -exports.cmp = cmp; -function cmp(a, op, b, loose) { - var ret; - switch (op) { - case '===': ret = a === b; break; - case '!==': ret = a !== b; break; - case '': case '=': case '==': ret = eq(a, b, loose); break; - case '!=': ret = neq(a, b, loose); break; - case '>': ret = gt(a, b, loose); break; - case '>=': ret = gte(a, b, loose); break; - case '<': ret = lt(a, b, loose); break; - case '<=': ret = lte(a, b, loose); break; - default: throw new TypeError('Invalid operator: ' + op); - } - return ret; -} - -exports.Comparator = Comparator; -function Comparator(comp, loose) { - if (comp instanceof Comparator) { - if (comp.loose === loose) - return comp; - else - comp = comp.value; - } - - if (!(this instanceof Comparator)) - return new Comparator(comp, loose); - - ; - this.loose = loose; - this.parse(comp); - - if (this.semver === ANY) - this.value = ''; - else - this.value = this.operator + this.semver.version; -} - -var ANY = {}; -Comparator.prototype.parse = function(comp) { - var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var m = comp.match(r); - - if (!m) - throw new TypeError('Invalid comparator: ' + comp); - - this.operator = m[1]; - // if it literally is just '>' or '' then allow anything. - if (!m[2]) - this.semver = ANY; - else { - this.semver = new SemVer(m[2], this.loose); - - // <1.2.3-rc DOES allow 1.2.3-beta (has prerelease) - // >=1.2.3 DOES NOT allow 1.2.3-beta - // <=1.2.3 DOES allow 1.2.3-beta - // However, <1.2.3 does NOT allow 1.2.3-beta, - // even though `1.2.3-beta < 1.2.3` - // The assumption is that the 1.2.3 version has something you - // *don't* want, so we push the prerelease down to the minimum. - if (this.operator === '<' && !this.semver.prerelease.length) { - this.semver.prerelease = ['0']; - this.semver.format(); - } - } -}; - -Comparator.prototype.inspect = function() { - return ''; -}; - -Comparator.prototype.toString = function() { - return this.value; -}; - -Comparator.prototype.test = function(version) { - ; - return (this.semver === ANY) ? true : - cmp(version, this.operator, this.semver, this.loose); -}; - - -exports.Range = Range; -function Range(range, loose) { - if ((range instanceof Range) && range.loose === loose) - return range; - - if (!(this instanceof Range)) - return new Range(range, loose); - - this.loose = loose; - - // First, split based on boolean or || - this.raw = range; - this.set = range.split(/\s*\|\|\s*/).map(function(range) { - return this.parseRange(range.trim()); - }, this).filter(function(c) { - // throw out any that are not relevant for whatever reason - return c.length; - }); - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range); - } - - this.format(); -} - -Range.prototype.inspect = function() { - return ''; -}; - -Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(' ').trim(); - }).join('||').trim(); - return this.range; -}; - -Range.prototype.toString = function() { - return this.range; -}; - -Range.prototype.parseRange = function(range) { - var loose = this.loose; - range = range.trim(); - ; - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - ; - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); - ; - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace); - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace); - - // normalize spaces - range = range.split(/\s+/).join(' '); - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var set = range.split(' ').map(function(comp) { - return parseComparator(comp, loose); - }).join(' ').split(/\s+/); - if (this.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function(comp) { - return !!comp.match(compRe); - }); - } - set = set.map(function(comp) { - return new Comparator(comp, loose); - }); - - return set; -}; - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators; -function toComparators(range, loose) { - return new Range(range, loose).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(' ').trim().split(' '); - }); -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator(comp, loose) { - ; - comp = replaceCarets(comp, loose); - ; - comp = replaceTildes(comp, loose); - ; - comp = replaceXRanges(comp, loose); - ; - comp = replaceStars(comp, loose); - ; - return comp; -} - -function isX(id) { - return !id || id.toLowerCase() === 'x' || id === '*'; -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceTilde(comp, loose); - }).join(' '); -} - -function replaceTilde(comp, loose) { - var r = loose ? re[TILDELOOSE] : re[TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - ; - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - else if (isX(p)) - // ~1.2 == >=1.2.0- <1.3.0- - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - else if (pr) { - ; - if (pr.charAt(0) !== '-') - pr = '-' + pr; - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - // ~1.2.3 == >=1.2.3-0 <1.3.0-0 - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - - ; - return ret; - }); -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceCaret(comp, loose); - }).join(' '); -} - -function replaceCaret(comp, loose) { - var r = loose ? re[CARETLOOSE] : re[CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - ; - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - else if (isX(p)) { - if (M === '0') - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - else - ret = '>=' + M + '.' + m + '.0-0 <' + (+M + 1) + '.0.0-0'; - } else if (pr) { - ; - if (pr.charAt(0) !== '-') - pr = '-' + pr; - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p + pr; - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0-0'; - } else { - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p; - else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + (+M + 1) + '.0.0-0'; - } - - ; - return ret; - }); -} - -function replaceXRanges(comp, loose) { - ; - return comp.split(/\s+/).map(function(comp) { - return replaceXRange(comp, loose); - }).join(' '); -} - -function replaceXRange(comp, loose) { - comp = comp.trim(); - var r = loose ? re[XRANGELOOSE] : re[XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - ; - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - - if (gtlt === '=' && anyX) - gtlt = ''; - - if (gtlt && anyX) { - // replace X with 0, and then append the -0 min-prerelease - if (xM) - M = 0; - if (xm) - m = 0; - if (xp) - p = 0; - - if (gtlt === '>') { - // >1 => >=2.0.0-0 - // >1.2 => >=1.3.0-0 - // >1.2.3 => >= 1.2.4-0 - gtlt = '>='; - if (xM) { - // no change - } else if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else if (xp) { - m = +m + 1; - p = 0; - } - } - - - ret = gtlt + M + '.' + m + '.' + p + '-0'; - } else if (xM) { - // allow any - ret = '*'; - } else if (xm) { - // append '-0' onto the version, otherwise - // '1.x.x' matches '2.0.0-beta', since the tag - // *lowers* the version value - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - } else if (xp) { - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - } - - ; - - return ret; - }); -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars(comp, loose) { - ; - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], ''); -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0-0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0-0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0-0 <3.5.0-0 -function hyphenReplace($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - - if (isX(fM)) - from = ''; - else if (isX(fm)) - from = '>=' + fM + '.0.0-0'; - else if (isX(fp)) - from = '>=' + fM + '.' + fm + '.0-0'; - else - from = '>=' + from; - - if (isX(tM)) - to = ''; - else if (isX(tm)) - to = '<' + (+tM + 1) + '.0.0-0'; - else if (isX(tp)) - to = '<' + tM + '.' + (+tm + 1) + '.0-0'; - else if (tpr) - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; - else - to = '<=' + to; - - return (from + ' ' + to).trim(); -} - - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function(version) { - if (!version) - return false; - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version)) - return true; - } - return false; -}; - -function testSet(set, version) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) - return false; - } - return true; -} - -exports.satisfies = satisfies; -function satisfies(version, range, loose) { - try { - range = new Range(range, loose); - } catch (er) { - return false; - } - return range.test(version); -} - -exports.maxSatisfying = maxSatisfying; -function maxSatisfying(versions, range, loose) { - return versions.filter(function(version) { - return satisfies(version, range, loose); - }).sort(function(a, b) { - return rcompare(a, b, loose); - })[0] || null; -} - -exports.validRange = validRange; -function validRange(range, loose) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, loose).range || '*'; - } catch (er) { - return null; - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr; -function ltr(version, range, loose) { - return outside(version, range, '<', loose); -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr; -function gtr(version, range, loose) { - return outside(version, range, '>', loose); -} - -exports.outside = outside; -function outside(version, range, hilo, loose) { - version = new SemVer(version, loose); - range = new Range(range, loose); - - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break; - case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, loose)) { - return false; - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; - - var high = null; - var low = null; - - comparators.forEach(function(comparator) { - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, loose)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, loose)) { - low = comparator; - } - }); - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false; - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; - } - } - return true; -} - -// Use the define() function if we're in AMD land -if (typeof define === 'function' && define.amd) - define(exports); - -})( - typeof exports === 'object' ? exports : - typeof define === 'function' && define.amd ? {} : - semver = {} -); diff --git a/node_modules/semver/semver.browser.js.gz b/node_modules/semver/semver.browser.js.gz deleted file mode 100644 index b9549f809a288bfd8e6786eb0d3b825a3164e97c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6903 zcmV<;+t<&@lf?d)w<# zVk)OXCPkRZ=uTW_X-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HSqhVd*8n(+I z;uFNW``)FqWasv`I!l2rPhq32;XZ_549ul#KMap)4y8;v)%SyY%~+$%(Y^DAP)A@3 zZBLk<(nWBeCNp@4D5ld*ZVrkt$JcA%ag6@%ra9{}=Vn6Xti!pNpw93b(;wO{Ak-18 zj(pu=di2M^?J1FX$7j>tvoj8_T%*eC2IJq;&MRkLp4jZk(-Jw|UsP`=mSlpbS+2O4{#@)+J7In{o3kadksn#Wl2 ztkUalwb$L+UK_8zIT=((=&QpTe2wxANNQ+H&?Kzy^7}FO*E=?m3MTVw%DW|N7+%WU z&CDqDJ7CqUPz(1m%h|k0sGK=;LK4hqfR-TpFhH$9mCE^T5$bnLbof_Htb-P;Qzpca z+v96k6Z7&TXM=;TeiXu9QvGTI7|D8sjrH`VRFS%cTjhN?%QxPRb#56?yc7ciP8W#{ z&{a6QqU&yK`)Y1c7x=Tbnu8{n zE^?E!iAc?ZFFvR1Do$t58#SN?dRj0u%{7SK7h~uNijtI5=Qn9MucX41pnplm>ytA-m@Mn=G0obpy_fAxfWutb==N$D0jhT?VE4N z1U?>fgF6hY`ANO(jPKBQd(J-JF&_s<--`&-$(&2l+=7FMx)Fs-xndZ^bR%CO*1wtt xrsPAfiw+oLaesY{`Rz6@P4TvcT%kW`_~n7xn7avI9@e1G{{ew7Wq_Jz004nDTzUWi diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js index 9e9470d..636fa43 100644 --- a/node_modules/semver/semver.js +++ b/node_modules/semver/semver.js @@ -1,29 +1,40 @@ -// export the class if we are in a Node-like system. -if (typeof module === 'object' && module.exports === exports) - exports = module.exports = SemVer; - -// The debug function is excluded entirely from the minified version. -/* nomin */ var debug; -/* nomin */ if (typeof process === 'object' && - /* nomin */ process.env && - /* nomin */ process.env.NODE_DEBUG && - /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) - /* nomin */ debug = function() { - /* nomin */ var args = Array.prototype.slice.call(arguments, 0); - /* nomin */ args.unshift('SEMVER'); - /* nomin */ console.log.apply(console, args); - /* nomin */ }; -/* nomin */ else - /* nomin */ debug = function() {}; +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} // Note: this is the semver.org version of the spec that it implements // Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0'; +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 // The actual regexps go on exports.re -var re = exports.re = []; -var src = exports.src = []; -var R = 0; +var re = exports.re = [] +var src = exports.src = [] +var t = exports.tokens = {} +var R = 0 + +function tok (n) { + t[n] = R++ +} // The following Regular Expressions can be used for tokenizing, // validating, and parsing SemVer version strings. @@ -31,71 +42,67 @@ var R = 0; // ## Numeric Identifier // A single `0`, or a non-zero digit followed by zero or more digits. -var NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; -var NUMERICIDENTIFIERLOOSE = R++; -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' // ## Non-numeric Identifier // Zero or more digits, followed by a letter or hyphen, and then zero or // more letters, digits, or hyphens. -var NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; - +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' // ## Main Version // Three dot-separated numeric identifiers. -var MAINVERSION = R++; -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')'; +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' -var MAINVERSIONLOOSE = R++; -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. -var PRERELEASEIDENTIFIER = R++; -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - -var PRERELEASEIDENTIFIERLOOSE = R++; -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. -var PRERELEASE = R++; -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' -var PRERELEASELOOSE = R++; -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. -var BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. -var BUILD = R++; -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; - +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' // ## Full Version String // A main version, followed optionally by a pre-release version and @@ -106,571 +113,939 @@ src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + // capturing group, because it should not ever be used in version // comparison. -var FULL = R++; -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?'; +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' -src[FULL] = '^' + FULLPLAIN + '$'; +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty // common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?'; +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' -var LOOSE = R++; -src[LOOSE] = '^' + LOOSEPLAIN + '$'; +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' -var GTLT = R++; -src[GTLT] = '((?:<|>)?=?)'; +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' // Something like "2.*" or "1.2.x". // Note that "x.x" is a valid xRange identifer, meaning "any version" // Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++; -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; -var XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; - -var XRANGEPLAIN = R++; -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:(' + src[PRERELEASE] + ')' + - ')?)?)?'; - -var XRANGEPLAINLOOSE = R++; -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:(' + src[PRERELEASELOOSE] + ')' + - ')?)?)?'; - -// >=2.x, for example, means >=2.0.0-0 -// <1.x would be the same as "<1.0.0-0", though. -var XRANGE = R++; -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; -var XRANGELOOSE = R++; -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') // Tilde ranges. // Meaning is "reasonably at or greater than" -var LONETILDE = R++; -src[LONETILDE] = '(?:~>?)'; +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' -var TILDETRIM = R++; -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); -var tildeTrimReplace = '$1~'; +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +var tildeTrimReplace = '$1~' -var TILDE = R++; -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; -var TILDELOOSE = R++; -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' // Caret ranges. // Meaning is "at least and backwards compatible with" -var LONECARET = R++; -src[LONECARET] = '(?:\\^)'; +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' -var CARETTRIM = R++; -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); -var caretTrimReplace = '$1^'; +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +var caretTrimReplace = '$1^' -var CARET = R++; -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; -var CARETLOOSE = R++; -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' // A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++; -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; -var COMPARATOR = R++; -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++; -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' // this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); -var comparatorTrimReplace = '$1$2$3'; - +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' // Something like `1.2.3 - 1.2.4` // Note that these all use the loose form, because they'll be // checked against either the strict or loose comparator form // later. -var HYPHENRANGE = R++; -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$'; + '(' + src[t.XRANGEPLAIN] + ')' + + '\\s*$' -var HYPHENRANGELOOSE = R++; -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$'; + '(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s*$' // Star ranges basically just allow anything at all. -var STAR = R++; -src[STAR] = '(<|>)?=?\\s*\\*'; +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' // Compile to actual regexp objects. // All are flag-free, unless they were created above with a flag. for (var i = 0; i < R; i++) { - debug(i, src[i]); - if (!re[i]) - re[i] = new RegExp(src[i]); + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } } -exports.parse = parse; -function parse(version, loose) { - var r = loose ? re[LOOSE] : re[FULL]; - return (r.test(version)) ? new SemVer(version, loose) : null; -} +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } -exports.valid = valid; -function valid(version, loose) { - var v = parse(version, loose); - return v ? v.version : null; + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } } +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} -exports.clean = clean; -function clean(version, loose) { - var s = parse(version, loose); - return s ? s.version : null; +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null } -exports.SemVer = SemVer; +exports.SemVer = SemVer -function SemVer(version, loose) { +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } if (version instanceof SemVer) { - if (version.loose === loose) - return version; - else - version = version.version; + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') } - if (!(this instanceof SemVer)) - return new SemVer(version, loose); + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose - debug('SemVer', version, loose); - this.loose = loose; - var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - if (!m) - throw new TypeError('Invalid Version: ' + version); + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } - this.raw = version; + this.raw = version // these are actually numbers - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } // numberify any prerelease numeric ids - if (!m[4]) - this.prerelease = []; - else - this.prerelease = m[4].split('.').map(function(id) { - return (/^[0-9]+$/.test(id)) ? +id : id; - }); + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } - this.build = m[5] ? m[5].split('.') : []; - this.format(); + this.build = m[5] ? m[5].split('.') : [] + this.format() } -SemVer.prototype.format = function() { - this.version = this.major + '.' + this.minor + '.' + this.patch; - if (this.prerelease.length) - this.version += '-' + this.prerelease.join('.'); - return this.version; -}; - -SemVer.prototype.inspect = function() { - return ''; -}; +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} -SemVer.prototype.toString = function() { - return this.version; -}; +SemVer.prototype.toString = function () { + return this.version +} -SemVer.prototype.compare = function(other) { - debug('SemVer.compare', this.version, this.loose, other); - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } - return this.compareMain(other) || this.comparePre(other); -}; + return this.compareMain(other) || this.comparePre(other) +} -SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch); -}; + compareIdentifiers(this.patch, other.patch) +} -SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) - return -1; - else if (!this.prerelease.length && other.prerelease.length) - return 1; - else if (!this.prerelease.lenth && !other.prerelease.length) - return 0; - - var i = 0; + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 do { - var a = this.prerelease[i]; - var b = other.prerelease[i]; - debug('prerelease compare', i, a, b); - if (a === undefined && b === undefined) - return 0; - else if (b === undefined) - return 1; - else if (a === undefined) - return -1; - else if (a === b) - continue; - else - return compareIdentifiers(a, b); - } while (++i); -}; - -SemVer.prototype.inc = function(release) { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + case 'major': - this.major++; - this.minor = -1; + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break case 'minor': - this.minor++; - this.patch = -1; + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break case 'patch': - this.patch++; - this.prerelease = []; - break; - case 'prerelease': - if (this.prerelease.length === 0) - this.prerelease = [0]; - else { - var i = this.prerelease.length; + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length while (--i >= 0) { if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; + this.prerelease[i]++ + i = -2 } } - if (i === -1) // didn't increment anything - this.prerelease.push(0); + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } } - break; + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break default: - throw new Error('invalid increment argument: ' + release); + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined } - this.format(); - return this; -}; -exports.inc = inc; -function inc(version, release, loose) { try { - return new SemVer(version, loose).inc(release).version; + return new SemVer(version, loose).inc(release, identifier).version } catch (er) { - return null; + return null } } -exports.compareIdentifiers = compareIdentifiers; +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers -var numeric = /^[0-9]+$/; -function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) if (anum && bnum) { - a = +a; - b = +b; + a = +a + b = +b } - return (anum && !bnum) ? -1 : - (bnum && !anum) ? 1 : - a < b ? -1 : - a > b ? 1 : - 0; + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch } -exports.rcompareIdentifiers = rcompareIdentifiers; -function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) } -exports.compare = compare; -function compare(a, b, loose) { - return new SemVer(a, loose).compare(b); +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) } -exports.compareLoose = compareLoose; -function compareLoose(a, b) { - return compare(a, b, true); +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) } -exports.rcompare = rcompare; -function rcompare(a, b, loose) { - return compare(b, a, loose); +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) } -exports.sort = sort; -function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compare(a, b, loose); - }); +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(a, b, loose) + }) } -exports.rsort = rsort; -function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.rcompare(a, b, loose); - }); +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(b, a, loose) + }) } -exports.gt = gt; -function gt(a, b, loose) { - return compare(a, b, loose) > 0; +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 } -exports.lt = lt; -function lt(a, b, loose) { - return compare(a, b, loose) < 0; +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 } -exports.eq = eq; -function eq(a, b, loose) { - return compare(a, b, loose) === 0; +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 } -exports.neq = neq; -function neq(a, b, loose) { - return compare(a, b, loose) !== 0; +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 } -exports.gte = gte; -function gte(a, b, loose) { - return compare(a, b, loose) >= 0; +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 } -exports.lte = lte; -function lte(a, b, loose) { - return compare(a, b, loose) <= 0; +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 } -exports.cmp = cmp; -function cmp(a, op, b, loose) { - var ret; +exports.cmp = cmp +function cmp (a, op, b, loose) { switch (op) { - case '===': ret = a === b; break; - case '!==': ret = a !== b; break; - case '': case '=': case '==': ret = eq(a, b, loose); break; - case '!=': ret = neq(a, b, loose); break; - case '>': ret = gt(a, b, loose); break; - case '>=': ret = gte(a, b, loose); break; - case '<': ret = lt(a, b, loose); break; - case '<=': ret = lte(a, b, loose); break; - default: throw new TypeError('Invalid operator: ' + op); + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) } - return ret; } -exports.Comparator = Comparator; -function Comparator(comp, loose) { +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (comp instanceof Comparator) { - if (comp.loose === loose) - return comp; - else - comp = comp.value; + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) } - if (!(this instanceof Comparator)) - return new Comparator(comp, loose); + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) - debug('comparator', comp, loose); - this.loose = loose; - this.parse(comp); + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } - if (this.semver === ANY) - this.value = ''; - else - this.value = this.operator + this.semver.version; + debug('comp', this) } -var ANY = {}; -Comparator.prototype.parse = function(comp) { - var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var m = comp.match(r); +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } - if (!m) - throw new TypeError('Invalid comparator: ' + comp); + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } - this.operator = m[1]; // if it literally is just '>' or '' then allow anything. - if (!m[2]) - this.semver = ANY; - else { - this.semver = new SemVer(m[2], this.loose); - - // <1.2.3-rc DOES allow 1.2.3-beta (has prerelease) - // >=1.2.3 DOES NOT allow 1.2.3-beta - // <=1.2.3 DOES allow 1.2.3-beta - // However, <1.2.3 does NOT allow 1.2.3-beta, - // even though `1.2.3-beta < 1.2.3` - // The assumption is that the 1.2.3 version has something you - // *don't* want, so we push the prerelease down to the minimum. - if (this.operator === '<' && !this.semver.prerelease.length) { - this.semver.prerelease = ['0']; - this.semver.format(); + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false } } -}; -Comparator.prototype.inspect = function() { - return ''; -}; + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } -Comparator.prototype.toString = function() { - return this.value; -}; + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } -Comparator.prototype.test = function(version) { - debug('Comparator.test', version, this.loose); - return (this.semver === ANY) ? true : - cmp(version, this.operator, this.semver, this.loose); -}; + var rangeTmp + if (this.operator === '') { + if (this.value === '') { + return true + } + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } -exports.Range = Range; -function Range(range, loose) { - if ((range instanceof Range) && range.loose === loose) - return range; + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} - if (!(this instanceof Range)) - return new Range(range, loose); +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } - this.loose = loose; + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease // First, split based on boolean or || - this.raw = range; - this.set = range.split(/\s*\|\|\s*/).map(function(range) { - return this.parseRange(range.trim()); - }, this).filter(function(c) { + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { // throw out any that are not relevant for whatever reason - return c.length; - }); + return c.length + }) if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range); + throw new TypeError('Invalid SemVer Range: ' + range) } - this.format(); + this.format() } -Range.prototype.inspect = function() { - return ''; -}; - -Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(' ').trim(); - }).join('||').trim(); - return this.range; -}; +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} -Range.prototype.toString = function() { - return this.range; -}; +Range.prototype.toString = function () { + return this.range +} -Range.prototype.parseRange = function(range) { - var loose = this.loose; - range = range.trim(); - debug('range', range, loose); +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug('hyphen replace', range); + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); - debug('comparator trim', range, re[COMPARATORTRIM]); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace); + range = range.replace(re[t.CARETTRIM], caretTrimReplace) // normalize spaces - range = range.split(/\s+/).join(' '); + range = range.split(/\s+/).join(' ') // At this point, the range is completely trimmed and // ready to be split into comparators. - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var set = range.split(' ').map(function(comp) { - return parseComparator(comp, loose); - }).join(' ').split(/\s+/); - if (this.loose) { + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { // in loose mode, throw out any that are not valid comparators - set = set.filter(function(comp) { - return !!comp.match(compRe); - }); + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) +} + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() } - set = set.map(function(comp) { - return new Comparator(comp, loose); - }); - return set; -}; + return result +} // Mostly just for testing and legacy API reasons -exports.toComparators = toComparators; -function toComparators(range, loose) { - return new Range(range, loose).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(' ').trim().split(' '); - }); +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) } // comprised of xranges, tildes, stars, and gtlt's at this point. // already replaced the hyphen ranges // turn into a set of JUST comparators. -function parseComparator(comp, loose) { - debug('comp', comp); - comp = replaceCarets(comp, loose); - debug('caret', comp); - comp = replaceTildes(comp, loose); - debug('tildes', comp); - comp = replaceXRanges(comp, loose); - debug('xrange', comp); - comp = replaceStars(comp, loose); - debug('stars', comp); - return comp; +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp } -function isX(id) { - return !id || id.toLowerCase() === 'x' || id === '*'; +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' } // ~, ~> --> * (any, kinda silly) @@ -679,39 +1054,38 @@ function isX(id) { // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceTilde(comp, loose); - }).join(' '); -} - -function replaceTilde(comp, loose) { - var r = loose ? re[TILDELOOSE] : re[TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - else if (isX(p)) - // ~1.2 == >=1.2.0- <1.3.0- - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - else if (pr) { - debug('replaceTilde pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - // ~1.2.3 == >=1.2.3-0 <1.3.0-0 - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - - debug('tilde return', ret); - return ret; - }); +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) } // ^ --> * (any, kinda silly) @@ -720,292 +1094,503 @@ function replaceTilde(comp, loose) { // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 // ^1.2.3 --> >=1.2.3 <2.0.0 // ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceCaret(comp, loose); - }).join(' '); -} - -function replaceCaret(comp, loose) { - var r = loose ? re[CARETLOOSE] : re[CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - else if (isX(p)) { - if (M === '0') - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - else - ret = '>=' + M + '.' + m + '.0-0 <' + (+M + 1) + '.0.0-0'; +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } } else if (pr) { - debug('replaceCaret pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; + debug('replaceCaret pr', pr) if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p + pr; - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0-0'; + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } } else { + debug('no pr') if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p; - else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + (+M + 1) + '.0.0-0'; + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } } - debug('caret return', ret); - return ret; - }); + debug('caret return', ret) + return ret + }) } -function replaceXRanges(comp, loose) { - debug('replaceXRanges', comp, loose); - return comp.split(/\s+/).map(function(comp) { - return replaceXRange(comp, loose); - }).join(' '); +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') } -function replaceXRange(comp, loose) { - comp = comp.trim(); - var r = loose ? re[XRANGELOOSE] : re[XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - - if (gtlt === '=' && anyX) - gtlt = ''; +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } - if (gtlt && anyX) { - // replace X with 0, and then append the -0 min-prerelease - if (xM) - M = 0; - if (xm) - m = 0; - if (xp) - p = 0; + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 if (gtlt === '>') { - // >1 => >=2.0.0-0 - // >1.2 => >=1.3.0-0 - // >1.2.3 => >= 1.2.4-0 - gtlt = '>='; - if (xM) { - // no change - } else if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else if (xp) { - m = +m + 1; - p = 0; + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 } } - - ret = gtlt + M + '.' + m + '.' + p + '-0'; - } else if (xM) { - // allow any - ret = '*'; + ret = gtlt + M + '.' + m + '.' + p + pr } else if (xm) { - // append '-0' onto the version, otherwise - // '1.x.x' matches '2.0.0-beta', since the tag - // *lowers* the version value - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr } else if (xp) { - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr } - debug('xRange return', ret); + debug('xRange return', ret) - return ret; - }); + return ret + }) } // Because * is AND-ed with everything else in the comparator, // and '' means "any version", just remove the *s entirely. -function replaceStars(comp, loose) { - debug('replaceStars', comp, loose); +function replaceStars (comp, options) { + debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], ''); + return comp.trim().replace(re[t.STAR], '') } -// This function is passed to string.replace(re[HYPHENRANGE]) +// This function is passed to string.replace(re[t.HYPHENRANGE]) // M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0-0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0-0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0-0 <3.5.0-0 -function hyphenReplace($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - - if (isX(fM)) - from = ''; - else if (isX(fm)) - from = '>=' + fM + '.0.0-0'; - else if (isX(fp)) - from = '>=' + fM + '.' + fm + '.0-0'; - else - from = '>=' + from; - - if (isX(tM)) - to = ''; - else if (isX(tm)) - to = '<' + (+tM + 1) + '.0.0-0'; - else if (isX(tp)) - to = '<' + tM + '.' + (+tm + 1) + '.0-0'; - else if (tpr) - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; - else - to = '<=' + to; - - return (from + ' ' + to).trim(); -} +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + return (from + ' ' + to).trim() +} // if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function(version) { - if (!version) - return false; +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version)) - return true; + if (testSet(this.set[i], version, this.options)) { + return true + } } - return false; -}; + return false +} -function testSet(set, version) { +function testSet (set, version, options) { for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) - return false; + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false } - return true; + + return true } -exports.satisfies = satisfies; -function satisfies(version, range, loose) { +exports.satisfies = satisfies +function satisfies (version, range, options) { try { - range = new Range(range, loose); + range = new Range(range, options) } catch (er) { - return false; + return false } - return range.test(version); + return range.test(version) } -exports.maxSatisfying = maxSatisfying; -function maxSatisfying(versions, range, loose) { - return versions.filter(function(version) { - return satisfies(version, range, loose); - }).sort(function(a, b) { - return rcompare(a, b, loose); - })[0] || null; +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null } -exports.validRange = validRange; -function validRange(range, loose) { +exports.validRange = validRange +function validRange (range, options) { try { // Return '*' instead of '' so that truthiness works. // This will throw if it's invalid anyway - return new Range(range, loose).range || '*'; + return new Range(range, options).range || '*' } catch (er) { - return null; + return null } } // Determine if version is less than all the versions possible in the range -exports.ltr = ltr; -function ltr(version, range, loose) { - return outside(version, range, '<', loose); +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) } // Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr; -function gtr(version, range, loose) { - return outside(version, range, '>', loose); +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) } -exports.outside = outside; -function outside(version, range, hilo, loose) { - version = new SemVer(version, loose); - range = new Range(range, loose); +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) - var gtfn, ltefn, ltfn, comp, ecomp; + var gtfn, ltefn, ltfn, comp, ecomp switch (hilo) { case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break; + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break; + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); + throw new TypeError('Must provide a hilo val of "<" or ">"') } // If it satisifes the range it is not outside - if (satisfies(version, range, loose)) { - return false; + if (satisfies(version, range, options)) { + return false } // From now on, variable terms are as if we're in "gtr" mode. // but note that everything is flipped for the "ltr" function. for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; - - var high = null; - var low = null; - - comparators.forEach(function(comparator) { - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, loose)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, loose)) { - low = comparator; + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') } - }); + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) // If the edge version comparator has a operator then our version // isn't outside it if (high.operator === comp || high.operator === ecomp) { - return false; + return false } // If the lowest version comparator has an operator and our version // is less than it then it isn't higher than the range if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { - return false; + return false } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; + return false } } - return true; + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null } -// Use the define() function if we're in AMD land -if (typeof define === 'function' && define.amd) - define(exports); +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version, options) { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) { + return null + } + + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) +} diff --git a/node_modules/semver/semver.min.js b/node_modules/semver/semver.min.js deleted file mode 100644 index c2164c3..0000000 --- a/node_modules/semver/semver.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=H;e.SEMVER_SPEC_VERSION="2.0.0";var r=e.re=[];var t=e.src=[];var n=0;var i=n++;t[i]="0|[1-9]\\d*";var s=n++;t[s]="[0-9]+";var o=n++;t[o]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var a=n++;t[a]="("+t[i]+")\\."+"("+t[i]+")\\."+"("+t[i]+")";var f=n++;t[f]="("+t[s]+")\\."+"("+t[s]+")\\."+"("+t[s]+")";var u=n++;t[u]="(?:"+t[i]+"|"+t[o]+")";var l=n++;t[l]="(?:"+t[s]+"|"+t[o]+")";var c=n++;t[c]="(?:-("+t[u]+"(?:\\."+t[u]+")*))";var p=n++;t[p]="(?:-?("+t[l]+"(?:\\."+t[l]+")*))";var h=n++;t[h]="[0-9A-Za-z-]+";var v=n++;t[v]="(?:\\+("+t[h]+"(?:\\."+t[h]+")*))";var m=n++;var g="v?"+t[a]+t[c]+"?"+t[v]+"?";t[m]="^"+g+"$";var w="[v=\\s]*"+t[f]+t[p]+"?"+t[v]+"?";var d=n++;t[d]="^"+w+"$";var y=n++;t[y]="((?:<|>)?=?)";var $=n++;t[$]=t[s]+"|x|X|\\*";var j=n++;t[j]=t[i]+"|x|X|\\*";var b=n++;t[b]="[v=\\s]*("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:("+t[c]+")"+")?)?)?";var E=n++;t[E]="[v=\\s]*("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:("+t[p]+")"+")?)?)?";var k=n++;t[k]="^"+t[y]+"\\s*"+t[b]+"$";var x=n++;t[x]="^"+t[y]+"\\s*"+t[E]+"$";var R=n++;t[R]="(?:~>?)";var S=n++;t[S]="(\\s*)"+t[R]+"\\s+";r[S]=new RegExp(t[S],"g");var V="$1~";var I=n++;t[I]="^"+t[R]+t[b]+"$";var A=n++;t[A]="^"+t[R]+t[E]+"$";var C=n++;t[C]="(?:\\^)";var T=n++;t[T]="(\\s*)"+t[C]+"\\s+";r[T]=new RegExp(t[T],"g");var M="$1^";var z=n++;t[z]="^"+t[C]+t[b]+"$";var P=n++;t[P]="^"+t[C]+t[E]+"$";var Z=n++;t[Z]="^"+t[y]+"\\s*("+w+")$|^$";var q=n++;t[q]="^"+t[y]+"\\s*("+g+")$|^$";var L=n++;t[L]="(\\s*)"+t[y]+"\\s*("+w+"|"+t[b]+")";r[L]=new RegExp(t[L],"g");var X="$1$2$3";var _=n++;t[_]="^\\s*("+t[b]+")"+"\\s+-\\s+"+"("+t[b]+")"+"\\s*$";var N=n++;t[N]="^\\s*("+t[E]+")"+"\\s+-\\s+"+"("+t[E]+")"+"\\s*$";var O=n++;t[O]="(<|>)?=?\\s*\\*";for(var B=0;B'};H.prototype.toString=function(){return this.version};H.prototype.compare=function(e){if(!(e instanceof H))e=new H(e,this.loose);return this.compareMain(e)||this.comparePre(e)};H.prototype.compareMain=function(e){if(!(e instanceof H))e=new H(e,this.loose);return Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)};H.prototype.comparePre=function(e){if(!(e instanceof H))e=new H(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.lenth&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Q(t,n)}while(++r)};H.prototype.inc=function(e){switch(e){case"major":this.major++;this.minor=-1;case"minor":this.minor++;this.patch=-1;case"patch":this.patch++;this.prerelease=[];break;case"prerelease":if(this.prerelease.length===0)this.prerelease=[0];else{var r=this.prerelease.length;while(--r>=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1)this.prerelease.push(0)}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=J;function J(e,r,t){try{return new H(e,t).inc(r).version}catch(n){return null}}e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,r){var t=K.test(e);var n=K.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:er?1:0}e.rcompareIdentifiers=U;function U(e,r){return Q(r,e)}e.compare=W;function W(e,r,t){return new H(e,t).compare(r)}e.compareLoose=Y;function Y(e,r){return W(e,r,true)}e.rcompare=er;function er(e,r,t){return W(r,e,t)}e.sort=rr;function rr(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=tr;function tr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=nr;function nr(e,r,t){return W(e,r,t)>0}e.lt=ir;function ir(e,r,t){return W(e,r,t)<0}e.eq=sr;function sr(e,r,t){return W(e,r,t)===0}e.neq=or;function or(e,r,t){return W(e,r,t)!==0}e.gte=ar;function ar(e,r,t){return W(e,r,t)>=0}e.lte=fr;function fr(e,r,t){return W(e,r,t)<=0}e.cmp=ur;function ur(e,r,t,n){var i;switch(r){case"===":i=e===t;break;case"!==":i=e!==t;break;case"":case"=":case"==":i=sr(e,t,n);break;case"!=":i=or(e,t,n);break;case">":i=nr(e,t,n);break;case">=":i=ar(e,t,n);break;case"<":i=ir(e,t,n);break;case"<=":i=fr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=lr;function lr(e,r){if(e instanceof lr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof lr))return new lr(e,r);this.loose=r;this.parse(e);if(this.semver===cr)this.value="";else this.value=this.operator+this.semver.version}var cr={};lr.prototype.parse=function(e){var t=this.loose?r[Z]:r[q];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(!n[2])this.semver=cr;else{this.semver=new H(n[2],this.loose);if(this.operator==="<"&&!this.semver.prerelease.length){this.semver.prerelease=["0"];this.semver.format()}}};lr.prototype.inspect=function(){return''};lr.prototype.toString=function(){return this.value};lr.prototype.test=function(e){return this.semver===cr?true:ur(e,this.operator,this.semver,this.loose)};e.Range=pr;function pr(e,r){if(e instanceof pr&&e.loose===r)return e;if(!(this instanceof pr))return new pr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}pr.prototype.inspect=function(){return''};pr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};pr.prototype.toString=function(){return this.range};pr.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[N]:r[_];e=e.replace(n,Er);e=e.replace(r[L],X);e=e.replace(r[S],V);e=e.replace(r[T],M);e=e.split(/\s+/).join(" ");var i=t?r[Z]:r[q];var s=e.split(" ").map(function(e){return vr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new lr(e,t)});return s};e.toComparators=hr;function hr(e,r){return new pr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function vr(e,r){e=dr(e,r);e=gr(e,r);e=$r(e,r);e=br(e,r);return e}function mr(e){return!e||e.toLowerCase()==="x"||e==="*"}function gr(e,r){return e.trim().split(/\s+/).map(function(e){return wr(e,r)}).join(" ")}function wr(e,t){var n=t?r[A]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n))s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0";return s})}function dr(e,r){return e.trim().split(/\s+/).map(function(e){return yr(e,r)}).join(" ")}function yr(e,t){var n=t?r[P]:r[z];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n)){if(r==="0")s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else s=">="+r+"."+t+".0-0 <"+(+r+1)+".0.0-0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s="="+r+"."+t+"."+n+i;else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0-0"}else{if(r==="0"){if(t==="0")s="="+r+"."+t+"."+n;else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+(+r+1)+".0.0-0"}return s})}function $r(e,r){return e.split(/\s+/).map(function(e){return jr(e,r)}).join(" ")}function jr(e,t){e=e.trim();var n=t?r[x]:r[k];return e.replace(n,function(e,r,t,n,i,s){var o=mr(t);var a=o||mr(n);var f=a||mr(i);var u=f;if(r==="="&&u)r="";if(r&&u){if(o)t=0;if(a)n=0;if(f)i=0;if(r===">"){r=">=";if(o){}else if(a){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}e=r+t+"."+n+"."+i+"-0"}else if(o){e="*"}else if(a){e=">="+t+".0.0-0 <"+(+t+1)+".0.0-0"}else if(f){e=">="+t+"."+n+".0-0 <"+t+"."+(+n+1)+".0-0"}return e})}function br(e,t){return e.trim().replace(r[O],"")}function Er(e,r,t,n,i,s,o,a,f,u,l,c,p){if(mr(t))r="";else if(mr(n))r=">="+t+".0.0-0";else if(mr(i))r=">="+t+"."+n+".0-0";else r=">="+r;if(mr(f))a="";else if(mr(u))a="<"+(+f+1)+".0.0-0";else if(mr(l))a="<"+f+"."+(+u+1)+".0-0";else if(c)a="<="+f+"."+u+"."+l+"-"+c;else a="<="+a;return(r+" "+a).trim()}pr.prototype.test=function(e){if(!e)return false;for(var r=0;r<",t)}e.gtr=Ir;function Ir(e,r,t){return Ar(e,r,">",t)}e.outside=Ar;function Ar(e,r,t,n){e=new H(e,n);r=new pr(r,n);var i,s,o,a,f;switch(t){case">":i=nr;s=fr;o=ir;a=">";f=">=";break;case"<":i=ir;s=ar;o=nr;a="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(xr(e,r,n)){return false}for(var u=0;u<0Rk(CTh zLlPaDWI)g_k<{OQyTF13DavtrA8tHjk-N_>7K_DV7gBqg$AJu!xXs-~IBm=Olqb{H zb#j?UoH6Dk7gs!x&d!b|_4r+y2$=zkyPVaCFNeH$di472=;YJsyQ9NT@Njzk_6>8M z_xioQGraLdOEBIOoQ)^yO~P9y0`nTPzWNMV?0G{u4kyg%FUPyx|4h!$FP~}+88I_p zj{Cs!G(91D0(3-={qEO;?uYJ#9st^%kPe@)K49C9ha-88dw$+?ya(R3?384uMmDQq z8{f5TPO>@5js`~a5+9Nh77;8eVOaw#AXuPbT{T(`e0Wjg>o@nQO9Ckgq$Ds>5>Z7W zsz}U9VouHmKY};A#^*Q0zR?QL&poAaUeP$OXuMV;_%vhA%?JVh#KTE=j(WRM51{lK zlzw!)ndfY4(OahpiE)Yy6m(JY zL~DWQ63B`9ZR>>3j_%SnB0J8^ah3ELbGCQ?)|!q<)3Gt-WKy;DfB**-fMw(%0S-+R ze_cbHmTSmS{BR^_QUrEzfW5Z$1$ae&IR{>Z?ejvbyy2slp!rkrV zM?!uf<}GN4DCv(?qlp^a4(u7klyWh3Bb5a7&C| zO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WsozTR2im8?7D!6fYrjf*D^cVAWVy7z zf!6)Nsb#<^d9ilCY^qY#SwO1-J2{|hiTdSoBn3OOG@jL`bf5_ko%)t^1_H;H!0{%5 zeG*7=nT3~}9ausK*8N=hjTK}}Yl$d-7JJ!T;Yqr}quVs7tfpd^;7zBGxp6qvsd4=Z z4Uj$}V};yP$h`vj(7oA{*Lfzvs^kVH((+sLFiKjmBrWLLK~W3uFZP`$F5Yp`GGif9 z2`m%nIRtvXC+v;ndAUADBBto$d}4k$2CHO#5{8cvHnc}Rc)<>^fCW&q4^x)n2i7Cd z*3;cZU>?w*fblZNmzdPXq=3;Keqi4j!68<8pVp=a`1V#>AePItBJJ+%WZ)MwQr$Vm zsEW{ZXD4|;rjh{4?~e4hba+l07r`m3i9P@N($$Z+vt1)n{#w%fka9$%!Q+&U7OMeW RDlNcw{{@FyvE;8Q005c_M5F)! diff --git a/node_modules/semver/test/amd.js b/node_modules/semver/test/amd.js deleted file mode 100644 index a604134..0000000 --- a/node_modules/semver/test/amd.js +++ /dev/null @@ -1,15 +0,0 @@ -var tap = require('tap'); -var test = tap.test; - -test('amd', function(t) { - global.define = define; - define.amd = true; - var defined = null; - function define(stuff) { - defined = stuff; - } - var fromRequire = require('../'); - t.ok(defined, 'amd function called'); - t.equal(fromRequire, defined, 'amd stuff same as require stuff'); - t.end(); -}); diff --git a/node_modules/semver/test/gtr.js b/node_modules/semver/test/gtr.js deleted file mode 100644 index cb6199e..0000000 --- a/node_modules/semver/test/gtr.js +++ /dev/null @@ -1,173 +0,0 @@ -var tap = require('tap'); -var test = tap.test; -var semver = require('../semver.js'); -var gtr = semver.gtr; - -test('\ngtr tests', function(t) { - // [range, version, loose] - // Version should be greater than range - [ - ['~1.2.2', '1.3.0'], - ['~0.6.1-1', '0.7.1-1'], - ['1.0.0 - 2.0.0', '2.0.1'], - ['1.0.0', '1.0.1-beta1'], - ['1.0.0', '2.0.0'], - ['<=2.0.0', '2.1.1'], - ['<=2.0.0', '3.2.9'], - ['<2.0.0', '2.0.0'], - ['0.1.20 || 1.2.4', '1.2.5'], - ['2.x.x', '3.0.0'], - ['1.2.x', '1.3.0'], - ['1.2.x || 2.x', '3.0.0'], - ['2.*.*', '5.0.1'], - ['1.2.*', '1.3.3'], - ['1.2.* || 2.*', '4.0.0'], - ['2', '3.0.0'], - ['2.3', '2.4.2'], - ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.5.5'], - ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0 - ['~1', '2.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '2.2.4'], - ['~> 1', '3.2.3'], - ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0 - ['~ 1.0', '1.1.0'], - ['<1.2', '1.2.0'], - ['< 1.2', '1.2.1'], - ['1', '2.0.0beta', true], - ['~v0.5.4-pre', '0.6.0'], - ['~v0.5.4-pre', '0.6.1-pre'], - ['=0.7.x', '0.8.0'], - ['=0.7.x', '0.8.0-asdf'], - ['<=0.7.x', '0.7.0'], - ['~1.2.2', '1.3.0'], - ['1.0.0 - 2.0.0', '2.2.3'], - ['1.0.0', '1.0.1'], - ['<=2.0.0', '3.0.0'], - ['<=2.0.0', '2.9999.9999'], - ['<=2.0.0', '2.2.9'], - ['<2.0.0', '2.9999.9999'], - ['<2.0.0', '2.2.9'], - ['2.x.x', '3.1.3'], - ['1.2.x', '1.3.3'], - ['1.2.x || 2.x', '3.1.3'], - ['2.*.*', '3.1.3'], - ['1.2.*', '1.3.3'], - ['1.2.* || 2.*', '3.1.3'], - ['2', '3.1.2'], - ['2.3', '2.4.1'], - ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 - ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0 - ['~1', '2.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '2.2.3'], - ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0 - ['<1', '1.0.0'], - ['1', '2.0.0beta', true], - ['<1', '1.0.0beta', true], - ['< 1', '1.0.0beta', true], - ['=0.7.x', '0.8.2'], - ['<=0.7.x', '0.7.2'] - ].forEach(function(tuple) { - var range = tuple[0]; - var version = tuple[1]; - var loose = tuple[2] || false; - var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')'; - t.ok(gtr(version, range, loose), msg); - }); - t.end(); -}); - -test('\nnegative gtr tests', function(t) { - // [range, version, loose] - // Version should NOT be greater than range - [ - ['~0.6.1-1', '0.6.1-1'], - ['1.0.0 - 2.0.0', '1.2.3'], - ['1.0.0 - 2.0.0', '0.9.9'], - ['1.0.0', '1.0.0'], - ['>=*', '0.2.4'], - ['', '1.0.0', true], - ['*', '1.2.3'], - ['*', 'v1.2.3-foo'], - ['>=1.0.0', '1.0.0'], - ['>=1.0.0', '1.0.1'], - ['>=1.0.0', '1.1.0'], - ['>1.0.0', '1.0.1'], - ['>1.0.0', '1.1.0'], - ['<=2.0.0', '2.0.0'], - ['<=2.0.0', '1.9999.9999'], - ['<=2.0.0', '0.2.9'], - ['<2.0.0', '1.9999.9999'], - ['<2.0.0', '0.2.9'], - ['>= 1.0.0', '1.0.0'], - ['>= 1.0.0', '1.0.1'], - ['>= 1.0.0', '1.1.0'], - ['> 1.0.0', '1.0.1'], - ['> 1.0.0', '1.1.0'], - ['<= 2.0.0', '2.0.0'], - ['<= 2.0.0', '1.9999.9999'], - ['<= 2.0.0', '0.2.9'], - ['< 2.0.0', '1.9999.9999'], - ['<\t2.0.0', '0.2.9'], - ['>=0.1.97', 'v0.1.97'], - ['>=0.1.97', '0.1.97'], - ['0.1.20 || 1.2.4', '1.2.4'], - ['0.1.20 || >1.2.4', '1.2.4'], - ['0.1.20 || 1.2.4', '1.2.3'], - ['0.1.20 || 1.2.4', '0.1.20'], - ['>=0.2.3 || <0.0.1', '0.0.0'], - ['>=0.2.3 || <0.0.1', '0.2.3'], - ['>=0.2.3 || <0.0.1', '0.2.4'], - ['||', '1.3.4'], - ['2.x.x', '2.1.3'], - ['1.2.x', '1.2.3'], - ['1.2.x || 2.x', '2.1.3'], - ['1.2.x || 2.x', '1.2.3'], - ['x', '1.2.3'], - ['2.*.*', '2.1.3'], - ['1.2.*', '1.2.3'], - ['1.2.* || 2.*', '2.1.3'], - ['1.2.* || 2.*', '1.2.3'], - ['1.2.* || 2.*', '1.2.3'], - ['*', '1.2.3'], - ['2', '2.1.2'], - ['2.3', '2.3.1'], - ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.4.5'], - ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0 - ['~1', '1.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '1.2.3'], - ['~> 1', '1.2.3'], - ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0 - ['~ 1.0', '1.0.2'], - ['>=1', '1.0.0'], - ['>= 1', '1.0.0'], - ['<1.2', '1.1.1'], - ['< 1.2', '1.1.1'], - ['1', '1.0.0beta', true], - ['~v0.5.4-pre', '0.5.5'], - ['~v0.5.4-pre', '0.5.4'], - ['=0.7.x', '0.7.2'], - ['>=0.7.x', '0.7.2'], - ['=0.7.x', '0.7.0-asdf'], - ['>=0.7.x', '0.7.0-asdf'], - ['<=0.7.x', '0.6.2'], - ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'], - ['>=0.2.3 <=0.2.4', '0.2.4'], - ['1.0.0 - 2.0.0', '2.0.0'], - ['^1', '0.0.0-0'], - ['^3.0.0', '2.0.0'], - ['^1.0.0 || ~2.0.1', '2.0.0'], - ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'], - ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true], - ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true], - ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'] - ].forEach(function(tuple) { - var range = tuple[0]; - var version = tuple[1]; - var loose = tuple[2] || false; - var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')'; - t.notOk(gtr(version, range, loose), msg); - }); - t.end(); -}); diff --git a/node_modules/semver/test/index.js b/node_modules/semver/test/index.js deleted file mode 100644 index e6c9cef..0000000 --- a/node_modules/semver/test/index.js +++ /dev/null @@ -1,556 +0,0 @@ -var tap = require('tap'); -var test = tap.test; -var semver = require('../semver.js'); -var eq = semver.eq; -var gt = semver.gt; -var lt = semver.lt; -var neq = semver.neq; -var cmp = semver.cmp; -var gte = semver.gte; -var lte = semver.lte; -var satisfies = semver.satisfies; -var validRange = semver.validRange; -var inc = semver.inc; -var replaceStars = semver.replaceStars; -var toComparators = semver.toComparators; -var SemVer = semver.SemVer; -var Range = semver.Range; - -test('\ncomparison tests', function(t) { - // [version1, version2] - // version1 should be greater than version2 - [['0.0.0', '0.0.0-foo'], - ['0.0.1', '0.0.0'], - ['1.0.0', '0.9.9'], - ['0.10.0', '0.9.0'], - ['0.99.0', '0.10.0'], - ['2.0.0', '1.2.3'], - ['v0.0.0', '0.0.0-foo', true], - ['v0.0.1', '0.0.0', true], - ['v1.0.0', '0.9.9', true], - ['v0.10.0', '0.9.0', true], - ['v0.99.0', '0.10.0', true], - ['v2.0.0', '1.2.3', true], - ['0.0.0', 'v0.0.0-foo', true], - ['0.0.1', 'v0.0.0', true], - ['1.0.0', 'v0.9.9', true], - ['0.10.0', 'v0.9.0', true], - ['0.99.0', 'v0.10.0', true], - ['2.0.0', 'v1.2.3', true], - ['1.2.3', '1.2.3-asdf'], - ['1.2.3', '1.2.3-4'], - ['1.2.3', '1.2.3-4-foo'], - ['1.2.3-5-foo', '1.2.3-5'], - ['1.2.3-5', '1.2.3-4'], - ['1.2.3-5-foo', '1.2.3-5-Foo'], - ['3.0.0', '2.7.2+asdf'], - ['1.2.3-a.10', '1.2.3-a.5'], - ['1.2.3-a.b', '1.2.3-a.5'], - ['1.2.3-a.b', '1.2.3-a'], - ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'] - ].forEach(function(v) { - var v0 = v[0]; - var v1 = v[1]; - var loose = v[2]; - t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')"); - t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')"); - t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')"); - t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')"); - t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')"); - t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')"); - t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')"); - t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')"); - t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')"); - t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')"); - t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')"); - }); - t.end(); -}); - -test('\nequality tests', function(t) { - // [version1, version2] - // version1 should be equivalent to version2 - [['1.2.3', 'v1.2.3', true], - ['1.2.3', '=1.2.3', true], - ['1.2.3', 'v 1.2.3', true], - ['1.2.3', '= 1.2.3', true], - ['1.2.3', ' v1.2.3', true], - ['1.2.3', ' =1.2.3', true], - ['1.2.3', ' v 1.2.3', true], - ['1.2.3', ' = 1.2.3', true], - ['1.2.3-0', 'v1.2.3-0', true], - ['1.2.3-0', '=1.2.3-0', true], - ['1.2.3-0', 'v 1.2.3-0', true], - ['1.2.3-0', '= 1.2.3-0', true], - ['1.2.3-0', ' v1.2.3-0', true], - ['1.2.3-0', ' =1.2.3-0', true], - ['1.2.3-0', ' v 1.2.3-0', true], - ['1.2.3-0', ' = 1.2.3-0', true], - ['1.2.3-1', 'v1.2.3-1', true], - ['1.2.3-1', '=1.2.3-1', true], - ['1.2.3-1', 'v 1.2.3-1', true], - ['1.2.3-1', '= 1.2.3-1', true], - ['1.2.3-1', ' v1.2.3-1', true], - ['1.2.3-1', ' =1.2.3-1', true], - ['1.2.3-1', ' v 1.2.3-1', true], - ['1.2.3-1', ' = 1.2.3-1', true], - ['1.2.3-beta', 'v1.2.3-beta', true], - ['1.2.3-beta', '=1.2.3-beta', true], - ['1.2.3-beta', 'v 1.2.3-beta', true], - ['1.2.3-beta', '= 1.2.3-beta', true], - ['1.2.3-beta', ' v1.2.3-beta', true], - ['1.2.3-beta', ' =1.2.3-beta', true], - ['1.2.3-beta', ' v 1.2.3-beta', true], - ['1.2.3-beta', ' = 1.2.3-beta', true], - ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true], - ['1.2.3+build', ' = 1.2.3+otherbuild', true], - ['1.2.3-beta+build', '1.2.3-beta+otherbuild'], - ['1.2.3+build', '1.2.3+otherbuild'], - [' v1.2.3+build', '1.2.3+otherbuild'] - ].forEach(function(v) { - var v0 = v[0]; - var v1 = v[1]; - var loose = v[2]; - t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')"); - t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')"); - t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')'); - t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')'); - t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')'); - t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')'); - t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')"); - t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')"); - t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')"); - t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')"); - }); - t.end(); -}); - - -test('\nrange tests', function(t) { - // [range, version] - // version should be included by range - [['1.0.0 - 2.0.0', '1.2.3'], - ['1.0.0', '1.0.0'], - ['>=*', '0.2.4'], - ['', '1.0.0'], - ['*', '1.2.3'], - ['*', 'v1.2.3-foo', true], - ['>=1.0.0', '1.0.0'], - ['>=1.0.0', '1.0.1'], - ['>=1.0.0', '1.1.0'], - ['>1.0.0', '1.0.1'], - ['>1.0.0', '1.1.0'], - ['<=2.0.0', '2.0.0'], - ['<=2.0.0', '1.9999.9999'], - ['<=2.0.0', '0.2.9'], - ['<2.0.0', '1.9999.9999'], - ['<2.0.0', '0.2.9'], - ['>= 1.0.0', '1.0.0'], - ['>= 1.0.0', '1.0.1'], - ['>= 1.0.0', '1.1.0'], - ['> 1.0.0', '1.0.1'], - ['> 1.0.0', '1.1.0'], - ['<= 2.0.0', '2.0.0'], - ['<= 2.0.0', '1.9999.9999'], - ['<= 2.0.0', '0.2.9'], - ['< 2.0.0', '1.9999.9999'], - ['<\t2.0.0', '0.2.9'], - ['>=0.1.97', 'v0.1.97', true], - ['>=0.1.97', '0.1.97'], - ['0.1.20 || 1.2.4', '1.2.4'], - ['>=0.2.3 || <0.0.1', '0.0.0'], - ['>=0.2.3 || <0.0.1', '0.2.3'], - ['>=0.2.3 || <0.0.1', '0.2.4'], - ['||', '1.3.4'], - ['2.x.x', '2.1.3'], - ['1.2.x', '1.2.3'], - ['1.2.x || 2.x', '2.1.3'], - ['1.2.x || 2.x', '1.2.3'], - ['x', '1.2.3'], - ['2.*.*', '2.1.3'], - ['1.2.*', '1.2.3'], - ['1.2.* || 2.*', '2.1.3'], - ['1.2.* || 2.*', '1.2.3'], - ['*', '1.2.3'], - ['2', '2.1.2'], - ['2.3', '2.3.1'], - ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.4.5'], - ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0, - ['~1', '1.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '1.2.3'], - ['~> 1', '1.2.3'], - ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0, - ['~ 1.0', '1.0.2'], - ['~ 1.0.3', '1.0.12'], - ['>=1', '1.0.0'], - ['>= 1', '1.0.0'], - ['<1.2', '1.1.1'], - ['< 1.2', '1.1.1'], - ['1', '1.0.0beta', true], - ['~v0.5.4-pre', '0.5.5'], - ['~v0.5.4-pre', '0.5.4'], - ['=0.7.x', '0.7.2'], - ['>=0.7.x', '0.7.2'], - ['=0.7.x', '0.7.0-asdf'], - ['>=0.7.x', '0.7.0-asdf'], - ['<=0.7.x', '0.6.2'], - ['~1.2.1 >=1.2.3', '1.2.3'], - ['~1.2.1 =1.2.3', '1.2.3'], - ['~1.2.1 1.2.3', '1.2.3'], - ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'], - ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'], - ['~1.2.1 1.2.3', '1.2.3'], - ['>=1.2.1 1.2.3', '1.2.3'], - ['1.2.3 >=1.2.1', '1.2.3'], - ['>=1.2.3 >=1.2.1', '1.2.3'], - ['>=1.2.1 >=1.2.3', '1.2.3'], - ['<=1.2.3', '1.2.3-beta'], - ['>1.2', '1.3.0-beta'], - ['>=1.2', '1.2.8'], - ['^1.2.3', '1.8.1'], - ['^1.2.3', '1.2.3-beta'], - ['^0.1.2', '0.1.2'], - ['^0.1', '0.1.2'], - ['^1.2', '1.4.2'], - ['^1.2 ^1', '1.4.2'], - ['^1.2', '1.2.0-pre'], - ['^1.2.3', '1.2.3-pre'] - ].forEach(function(v) { - var range = v[0]; - var ver = v[1]; - var loose = v[2]; - t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver); - }); - t.end(); -}); - -test('\nnegative range tests', function(t) { - // [range, version] - // version should not be included by range - [['1.0.0 - 2.0.0', '2.2.3'], - ['1.0.0', '1.0.1'], - ['>=1.0.0', '0.0.0'], - ['>=1.0.0', '0.0.1'], - ['>=1.0.0', '0.1.0'], - ['>1.0.0', '0.0.1'], - ['>1.0.0', '0.1.0'], - ['<=2.0.0', '3.0.0'], - ['<=2.0.0', '2.9999.9999'], - ['<=2.0.0', '2.2.9'], - ['<2.0.0', '2.9999.9999'], - ['<2.0.0', '2.2.9'], - ['>=0.1.97', 'v0.1.93', true], - ['>=0.1.97', '0.1.93'], - ['0.1.20 || 1.2.4', '1.2.3'], - ['>=0.2.3 || <0.0.1', '0.0.3'], - ['>=0.2.3 || <0.0.1', '0.2.2'], - ['2.x.x', '1.1.3'], - ['2.x.x', '3.1.3'], - ['1.2.x', '1.3.3'], - ['1.2.x || 2.x', '3.1.3'], - ['1.2.x || 2.x', '1.1.3'], - ['2.*.*', '1.1.3'], - ['2.*.*', '3.1.3'], - ['1.2.*', '1.3.3'], - ['1.2.* || 2.*', '3.1.3'], - ['1.2.* || 2.*', '1.1.3'], - ['2', '1.1.2'], - ['2.3', '2.4.1'], - ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.3.9'], - ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0 - ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0 - ['~1', '0.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '2.2.3'], - ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0 - ['<1', '1.0.0'], - ['>=1.2', '1.1.1'], - ['1', '2.0.0beta', true], - ['~v0.5.4-beta', '0.5.4-alpha'], - ['<1', '1.0.0beta', true], - ['< 1', '1.0.0beta', true], - ['=0.7.x', '0.8.2'], - ['>=0.7.x', '0.6.2'], - ['<=0.7.x', '0.7.2'], - ['<1.2.3', '1.2.3-beta'], - ['=1.2.3', '1.2.3-beta'], - ['>1.2', '1.2.8'], - ['^1.2.3', '2.0.0-alpha'], - ['^1.2.3', '1.2.2'], - ['^1.2', '1.1.9'], - // invalid ranges never satisfied! - ['blerg', '1.2.3'], - ['git+https://user:password0123@github.com/foo', '123.0.0', true], - ['^1.2.3', '2.0.0-pre'] - ].forEach(function(v) { - var range = v[0]; - var ver = v[1]; - var loose = v[2]; - var found = satisfies(ver, range, loose); - t.ok(!found, ver + ' not satisfied by ' + range); - }); - t.end(); -}); - -test('\nincrement versions test', function(t) { - // [version, inc, result] - // inc(version, inc) -> result - [['1.2.3', 'major', '2.0.0'], - ['1.2.3', 'minor', '1.3.0'], - ['1.2.3', 'patch', '1.2.4'], - ['1.2.3tag', 'major', '2.0.0', true], - ['1.2.3-tag', 'major', '2.0.0'], - ['1.2.3', 'fake', null], - ['fake', 'major', null], - ['1.2.3', 'prerelease', '1.2.3-0'], - ['1.2.3-0', 'prerelease', '1.2.3-1'], - ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'], - ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'], - ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'], - ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'], - ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'], - ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'], - ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'], - ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'], - ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'], - ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'], - ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'], - ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'], - ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'], - ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'], - ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'] - ].forEach(function(v) { - var pre = v[0]; - var what = v[1]; - var wanted = v[2]; - var loose = v[3]; - var found = inc(pre, what, loose); - t.equal(found, wanted, 'inc(' + pre + ', ' + what + ') === ' + wanted); - }); - - t.end(); -}); - -test('\nvalid range test', function(t) { - // [range, result] - // validRange(range) -> result - // translate ranges into their canonical form - [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'], - ['1.0.0', '1.0.0'], - ['>=*', '>=0.0.0-0'], - ['', '*'], - ['*', '*'], - ['*', '*'], - ['>=1.0.0', '>=1.0.0'], - ['>1.0.0', '>1.0.0'], - ['<=2.0.0', '<=2.0.0'], - ['1', '>=1.0.0-0 <2.0.0-0'], - ['<=2.0.0', '<=2.0.0'], - ['<=2.0.0', '<=2.0.0'], - ['<2.0.0', '<2.0.0-0'], - ['<2.0.0', '<2.0.0-0'], - ['>= 1.0.0', '>=1.0.0'], - ['>= 1.0.0', '>=1.0.0'], - ['>= 1.0.0', '>=1.0.0'], - ['> 1.0.0', '>1.0.0'], - ['> 1.0.0', '>1.0.0'], - ['<= 2.0.0', '<=2.0.0'], - ['<= 2.0.0', '<=2.0.0'], - ['<= 2.0.0', '<=2.0.0'], - ['< 2.0.0', '<2.0.0-0'], - ['< 2.0.0', '<2.0.0-0'], - ['>=0.1.97', '>=0.1.97'], - ['>=0.1.97', '>=0.1.97'], - ['0.1.20 || 1.2.4', '0.1.20||1.2.4'], - ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'], - ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'], - ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'], - ['||', '||'], - ['2.x.x', '>=2.0.0-0 <3.0.0-0'], - ['1.2.x', '>=1.2.0-0 <1.3.0-0'], - ['1.2.x || 2.x', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'], - ['1.2.x || 2.x', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'], - ['x', '*'], - ['2.*.*', '>=2.0.0-0 <3.0.0-0'], - ['1.2.*', '>=1.2.0-0 <1.3.0-0'], - ['1.2.* || 2.*', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'], - ['*', '*'], - ['2', '>=2.0.0-0 <3.0.0-0'], - ['2.3', '>=2.3.0-0 <2.4.0-0'], - ['~2.4', '>=2.4.0-0 <2.5.0-0'], - ['~2.4', '>=2.4.0-0 <2.5.0-0'], - ['~>3.2.1', '>=3.2.1-0 <3.3.0-0'], - ['~1', '>=1.0.0-0 <2.0.0-0'], - ['~>1', '>=1.0.0-0 <2.0.0-0'], - ['~> 1', '>=1.0.0-0 <2.0.0-0'], - ['~1.0', '>=1.0.0-0 <1.1.0-0'], - ['~ 1.0', '>=1.0.0-0 <1.1.0-0'], - ['^0', '>=0.0.0-0 <1.0.0-0'], - ['^ 1', '>=1.0.0-0 <2.0.0-0'], - ['^0.1', '>=0.1.0-0 <0.2.0-0'], - ['^1.0', '>=1.0.0-0 <2.0.0-0'], - ['^1.2', '>=1.2.0-0 <2.0.0-0'], - ['^0.0.1', '=0.0.1'], - ['^0.0.1-beta', '=0.0.1-beta'], - ['^0.1.2', '>=0.1.2-0 <0.2.0-0'], - ['^1.2.3', '>=1.2.3-0 <2.0.0-0'], - ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0-0'], - ['<1', '<1.0.0-0'], - ['< 1', '<1.0.0-0'], - ['>=1', '>=1.0.0-0'], - ['>= 1', '>=1.0.0-0'], - ['<1.2', '<1.2.0-0'], - ['< 1.2', '<1.2.0-0'], - ['1', '>=1.0.0-0 <2.0.0-0'], - ['>01.02.03', '>1.2.3', true], - ['>01.02.03', null], - ['~1.2.3beta', '>=1.2.3-beta <1.3.0-0', true], - ['~1.2.3beta', null], - ['^ 1.2 ^ 1', '>=1.2.0-0 <2.0.0-0 >=1.0.0-0 <2.0.0-0'] - ].forEach(function(v) { - var pre = v[0]; - var wanted = v[1]; - var loose = v[2]; - var found = validRange(pre, loose); - - t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted); - }); - - t.end(); -}); - -test('\ncomparators test', function(t) { - // [range, comparators] - // turn range into a set of individual comparators - [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]], - ['1.0.0', [['1.0.0']]], - ['>=*', [['>=0.0.0-0']]], - ['', [['']]], - ['*', [['']]], - ['*', [['']]], - ['>=1.0.0', [['>=1.0.0']]], - ['>=1.0.0', [['>=1.0.0']]], - ['>=1.0.0', [['>=1.0.0']]], - ['>1.0.0', [['>1.0.0']]], - ['>1.0.0', [['>1.0.0']]], - ['<=2.0.0', [['<=2.0.0']]], - ['1', [['>=1.0.0-0', '<2.0.0-0']]], - ['<=2.0.0', [['<=2.0.0']]], - ['<=2.0.0', [['<=2.0.0']]], - ['<2.0.0', [['<2.0.0-0']]], - ['<2.0.0', [['<2.0.0-0']]], - ['>= 1.0.0', [['>=1.0.0']]], - ['>= 1.0.0', [['>=1.0.0']]], - ['>= 1.0.0', [['>=1.0.0']]], - ['> 1.0.0', [['>1.0.0']]], - ['> 1.0.0', [['>1.0.0']]], - ['<= 2.0.0', [['<=2.0.0']]], - ['<= 2.0.0', [['<=2.0.0']]], - ['<= 2.0.0', [['<=2.0.0']]], - ['< 2.0.0', [['<2.0.0-0']]], - ['<\t2.0.0', [['<2.0.0-0']]], - ['>=0.1.97', [['>=0.1.97']]], - ['>=0.1.97', [['>=0.1.97']]], - ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]], - ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]], - ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]], - ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]], - ['||', [[''], ['']]], - ['2.x.x', [['>=2.0.0-0', '<3.0.0-0']]], - ['1.2.x', [['>=1.2.0-0', '<1.3.0-0']]], - ['1.2.x || 2.x', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]], - ['1.2.x || 2.x', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]], - ['x', [['']]], - ['2.*.*', [['>=2.0.0-0', '<3.0.0-0']]], - ['1.2.*', [['>=1.2.0-0', '<1.3.0-0']]], - ['1.2.* || 2.*', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]], - ['1.2.* || 2.*', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]], - ['*', [['']]], - ['2', [['>=2.0.0-0', '<3.0.0-0']]], - ['2.3', [['>=2.3.0-0', '<2.4.0-0']]], - ['~2.4', [['>=2.4.0-0', '<2.5.0-0']]], - ['~2.4', [['>=2.4.0-0', '<2.5.0-0']]], - ['~>3.2.1', [['>=3.2.1-0', '<3.3.0-0']]], - ['~1', [['>=1.0.0-0', '<2.0.0-0']]], - ['~>1', [['>=1.0.0-0', '<2.0.0-0']]], - ['~> 1', [['>=1.0.0-0', '<2.0.0-0']]], - ['~1.0', [['>=1.0.0-0', '<1.1.0-0']]], - ['~ 1.0', [['>=1.0.0-0', '<1.1.0-0']]], - ['~ 1.0.3', [['>=1.0.3-0', '<1.1.0-0']]], - ['~> 1.0.3', [['>=1.0.3-0', '<1.1.0-0']]], - ['<1', [['<1.0.0-0']]], - ['< 1', [['<1.0.0-0']]], - ['>=1', [['>=1.0.0-0']]], - ['>= 1', [['>=1.0.0-0']]], - ['<1.2', [['<1.2.0-0']]], - ['< 1.2', [['<1.2.0-0']]], - ['1', [['>=1.0.0-0', '<2.0.0-0']]], - ['1 2', [['>=1.0.0-0', '<2.0.0-0', '>=2.0.0-0', '<3.0.0-0']]], - ['1.2 - 3.4.5', [['>=1.2.0-0', '<=3.4.5']]], - ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0-0']]] - ].forEach(function(v) { - var pre = v[0]; - var wanted = v[1]; - var found = toComparators(v[0]); - var jw = JSON.stringify(wanted); - t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw); - }); - - t.end(); -}); - -test('\nstrict vs loose version numbers', function(t) { - [['=1.2.3', '1.2.3'], - ['01.02.03', '1.2.3'], - ['1.2.3-beta.01', '1.2.3-beta.1'], - [' =1.2.3', '1.2.3'], - ['1.2.3foo', '1.2.3-foo'] - ].forEach(function(v) { - var loose = v[0]; - var strict = v[1]; - t.throws(function() { - new SemVer(loose); - }); - var lv = new SemVer(loose, true); - t.equal(lv.version, strict); - t.ok(eq(loose, strict, true)); - t.throws(function() { - eq(loose, strict); - }); - t.throws(function() { - new SemVer(strict).compare(loose); - }); - }); - t.end(); -}); - -test('\nstrict vs loose ranges', function(t) { - [['>=01.02.03', '>=1.2.3'], - ['~1.02.03beta', '>=1.2.3-beta <1.3.0-0'] - ].forEach(function(v) { - var loose = v[0]; - var comps = v[1]; - t.throws(function() { - new Range(loose); - }); - t.equal(new Range(loose, true).range, comps); - }); - t.end(); -}); - -test('\nmax satisfying', function(t) { - [[['1.2.3', '1.2.4'], '1.2', '1.2.4'], - [['1.2.4', '1.2.3'], '1.2', '1.2.4'], - [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'], - [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true] - ].forEach(function(v) { - var versions = v[0]; - var range = v[1]; - var expect = v[2]; - var loose = v[3]; - var actual = semver.maxSatisfying(versions, range, loose); - t.equal(actual, expect); - }); - t.end(); -}); diff --git a/node_modules/semver/test/ltr.js b/node_modules/semver/test/ltr.js deleted file mode 100644 index a4f503a..0000000 --- a/node_modules/semver/test/ltr.js +++ /dev/null @@ -1,174 +0,0 @@ -var tap = require('tap'); -var test = tap.test; -var semver = require('../semver.js'); -var ltr = semver.ltr; - -test('\nltr tests', function(t) { - // [range, version, loose] - // Version should be less than range - [ - ['~1.2.2', '1.2.1'], - ['~0.6.1-1', '0.6.1-0'], - ['1.0.0 - 2.0.0', '0.0.1'], - ['1.0.0-beta.2', '1.0.0-beta.1'], - ['1.0.0', '0.0.0'], - ['>=2.0.0', '1.1.1'], - ['>=2.0.0', '1.2.9'], - ['>2.0.0', '2.0.0'], - ['0.1.20 || 1.2.4', '0.1.5'], - ['2.x.x', '1.0.0'], - ['1.2.x', '1.1.0'], - ['1.2.x || 2.x', '1.0.0'], - ['2.*.*', '1.0.1'], - ['1.2.*', '1.1.3'], - ['1.2.* || 2.*', '1.1.9999'], - ['2', '1.0.0'], - ['2.3', '2.2.2'], - ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.3.5'], - ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0 - ['~1', '0.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '0.2.4'], - ['~> 1', '0.2.3'], - ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0 - ['~ 1.0', '0.1.0'], - ['>1.2', '1.2.0'], - ['> 1.2', '1.2.1'], - ['1', '0.0.0beta', true], - ['~v0.5.4-pre', '0.5.4-alpha'], - ['~v0.5.4-pre', '0.5.4-alpha'], - ['=0.7.x', '0.6.0'], - ['=0.7.x', '0.6.0-asdf'], - ['>=0.7.x', '0.6.0'], - ['~1.2.2', '1.2.1'], - ['1.0.0 - 2.0.0', '0.2.3'], - ['1.0.0', '0.0.1'], - ['>=2.0.0', '1.0.0'], - ['>=2.0.0', '1.9999.9999'], - ['>=2.0.0', '1.2.9'], - ['>2.0.0', '2.0.0'], - ['>2.0.0', '1.2.9'], - ['2.x.x', '1.1.3'], - ['1.2.x', '1.1.3'], - ['1.2.x || 2.x', '1.1.3'], - ['2.*.*', '1.1.3'], - ['1.2.*', '1.1.3'], - ['1.2.* || 2.*', '1.1.3'], - ['2', '1.9999.9999'], - ['2.3', '2.2.1'], - ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0 - ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0 - ['~1', '0.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '0.2.3'], - ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0 - ['>1', '1.0.0'], - ['2', '1.0.0beta', true], - ['>1', '1.0.0beta', true], - ['> 1', '1.0.0beta', true], - ['=0.7.x', '0.6.2'], - ['>=0.7.x', '0.6.2'] - ].forEach(function(tuple) { - var range = tuple[0]; - var version = tuple[1]; - var loose = tuple[2] || false; - var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')'; - t.ok(ltr(version, range, loose), msg); - }); - t.end(); -}); - -test('\nnegative ltr tests', function(t) { - // [range, version, loose] - // Version should NOT be greater than range - [ - ['~ 1.0', '1.1.0'], - ['~0.6.1-1', '0.6.1-1'], - ['1.0.0 - 2.0.0', '1.2.3'], - ['1.0.0 - 2.0.0', '2.9.9'], - ['1.0.0', '1.0.0'], - ['>=*', '0.2.4'], - ['', '1.0.0', true], - ['*', '1.2.3'], - ['*', 'v1.2.3-foo'], - ['>=1.0.0', '1.0.0'], - ['>=1.0.0', '1.0.1'], - ['>=1.0.0', '1.1.0'], - ['>1.0.0', '1.0.1'], - ['>1.0.0', '1.1.0'], - ['<=2.0.0', '2.0.0'], - ['<=2.0.0', '1.9999.9999'], - ['<=2.0.0', '0.2.9'], - ['<2.0.0', '1.9999.9999'], - ['<2.0.0', '0.2.9'], - ['>= 1.0.0', '1.0.0'], - ['>= 1.0.0', '1.0.1'], - ['>= 1.0.0', '1.1.0'], - ['> 1.0.0', '1.0.1'], - ['> 1.0.0', '1.1.0'], - ['<= 2.0.0', '2.0.0'], - ['<= 2.0.0', '1.9999.9999'], - ['<= 2.0.0', '0.2.9'], - ['< 2.0.0', '1.9999.9999'], - ['<\t2.0.0', '0.2.9'], - ['>=0.1.97', 'v0.1.97'], - ['>=0.1.97', '0.1.97'], - ['0.1.20 || 1.2.4', '1.2.4'], - ['0.1.20 || >1.2.4', '1.2.4'], - ['0.1.20 || 1.2.4', '1.2.3'], - ['0.1.20 || 1.2.4', '0.1.20'], - ['>=0.2.3 || <0.0.1', '0.0.0'], - ['>=0.2.3 || <0.0.1', '0.2.3'], - ['>=0.2.3 || <0.0.1', '0.2.4'], - ['||', '1.3.4'], - ['2.x.x', '2.1.3'], - ['1.2.x', '1.2.3'], - ['1.2.x || 2.x', '2.1.3'], - ['1.2.x || 2.x', '1.2.3'], - ['x', '1.2.3'], - ['2.*.*', '2.1.3'], - ['1.2.*', '1.2.3'], - ['1.2.* || 2.*', '2.1.3'], - ['1.2.* || 2.*', '1.2.3'], - ['1.2.* || 2.*', '1.2.3'], - ['*', '1.2.3'], - ['2', '2.1.2'], - ['2.3', '2.3.1'], - ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.4.5'], - ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0 - ['~1', '1.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '1.2.3'], - ['~> 1', '1.2.3'], - ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0 - ['~ 1.0', '1.0.2'], - ['>=1', '1.0.0'], - ['>= 1', '1.0.0'], - ['<1.2', '1.1.1'], - ['< 1.2', '1.1.1'], - ['1', '1.0.0beta', true], - ['~v0.5.4-pre', '0.5.5'], - ['~v0.5.4-pre', '0.5.4'], - ['=0.7.x', '0.7.2'], - ['>=0.7.x', '0.7.2'], - ['=0.7.x', '0.7.0-asdf'], - ['>=0.7.x', '0.7.0-asdf'], - ['<=0.7.x', '0.6.2'], - ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'], - ['>=0.2.3 <=0.2.4', '0.2.4'], - ['1.0.0 - 2.0.0', '2.0.0'], - ['^1', '1.0.0-0'], - ['^3.0.0', '4.0.0'], - ['^1.0.0 || ~2.0.1', '2.0.0'], - ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'], - ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true], - ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true], - ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'] - ].forEach(function(tuple) { - var range = tuple[0]; - var version = tuple[1]; - var loose = tuple[2] || false; - var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')'; - t.notOk(ltr(version, range, loose), msg); - }); - t.end(); -}); diff --git a/node_modules/semver/test/no-module.js b/node_modules/semver/test/no-module.js deleted file mode 100644 index 96d1cd1..0000000 --- a/node_modules/semver/test/no-module.js +++ /dev/null @@ -1,19 +0,0 @@ -var tap = require('tap'); -var test = tap.test; - -test('no module system', function(t) { - var fs = require('fs'); - var vm = require('vm'); - var head = fs.readFileSync(require.resolve('../head.js'), 'utf8'); - var src = fs.readFileSync(require.resolve('../'), 'utf8'); - var foot = fs.readFileSync(require.resolve('../foot.js'), 'utf8'); - vm.runInThisContext(head + src + foot, 'semver.js'); - - // just some basic poking to see if it did some stuff - t.type(global.semver, 'object'); - t.type(global.semver.SemVer, 'function'); - t.type(global.semver.Range, 'function'); - t.ok(global.semver.satisfies('1.2.3', '1.2')); - t.end(); -}); - diff --git a/node_modules/shelljs/package.json b/node_modules/shelljs/package.json index a947948..e64905d 100644 --- a/node_modules/shelljs/package.json +++ b/node_modules/shelljs/package.json @@ -1,11 +1,47 @@ { - "name": "shelljs", - "version": "0.2.6", + "_from": "shelljs@0.2.6", + "_id": "shelljs@0.2.6", + "_inBundle": false, + "_integrity": "sha1-kEktcv/MgVmXa6umL7D2iE8MM3g=", + "_location": "/shelljs", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "shelljs@0.2.6", + "name": "shelljs", + "escapedName": "shelljs", + "rawSpec": "0.2.6", + "saveSpec": null, + "fetchSpec": "0.2.6" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz", + "_shasum": "90492d72ffcc8159976baba62fb0f6884f0c3378", + "_spec": "shelljs@0.2.6", "author": { "name": "Artur Adib", "email": "aadib@mozilla.com" }, + "bin": { + "shjs": "./bin/shjs" + }, + "bugs": { + "url": "https://github.com/arturadib/shelljs/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, "description": "Portable Unix shell commands for Node.js", + "devDependencies": { + "jshint": "~2.1.11" + }, + "engines": { + "node": ">=0.8.0" + }, + "homepage": "http://github.com/arturadib/shelljs", "keywords": [ "unix", "shell", @@ -14,28 +50,15 @@ "jake", "synchronous" ], + "main": "./shell.js", + "name": "shelljs", + "optionalDependencies": {}, "repository": { "type": "git", "url": "git://github.com/arturadib/shelljs.git" }, - "homepage": "http://github.com/arturadib/shelljs", - "main": "./shell.js", "scripts": { "test": "node scripts/run-tests" }, - "bin": { - "shjs": "./bin/shjs" - }, - "dependencies": {}, - "devDependencies": { - "jshint": "~2.1.11" - }, - "optionalDependencies": {}, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs)\n\nShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts!\n\nThe project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like:\n\n+ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader\n+ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger\n+ [JSHint](http://jshint.com) - Most popular JavaScript linter\n+ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers\n+ [Yeoman](http://yeoman.io/) - Web application stack and development tool\n+ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation\n\nand [many more](https://npmjs.org/browse/depended/shelljs).\n\n## Installing\n\nVia npm:\n\n```bash\n$ npm install [-g] shelljs\n```\n\nIf the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to\nrun ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder:\n\n```bash\n$ shjs my_script\n```\n\nYou can also just copy `shell.js` into your project's directory, and `require()` accordingly.\n\n\n## Examples\n\n### JavaScript\n\n```javascript\nrequire('shelljs/global');\n\nif (!which('git')) {\n echo('Sorry, this script requires git');\n exit(1);\n}\n\n// Copy files to release dir\nmkdir('-p', 'out/Release');\ncp('-R', 'stuff/*', 'out/Release');\n\n// Replace macros in each .js file\ncd('lib');\nls('*.js').forEach(function(file) {\n sed('-i', 'BUILD_VERSION', 'v0.1.2', file);\n sed('-i', /.*REMOVE_THIS_LINE.*\\n/, '', file);\n sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\\n/, cat('macro.js'), file);\n});\ncd('..');\n\n// Run external tool synchronously\nif (exec('git commit -am \"Auto-commit\"').code !== 0) {\n echo('Error: Git commit failed');\n exit(1);\n}\n```\n\n### CoffeeScript\n\n```coffeescript\nrequire 'shelljs/global'\n\nif not which 'git'\n echo 'Sorry, this script requires git'\n exit 1\n\n# Copy files to release dir\nmkdir '-p', 'out/Release'\ncp '-R', 'stuff/*', 'out/Release'\n\n# Replace macros in each .js file\ncd 'lib'\nfor file in ls '*.js'\n sed '-i', 'BUILD_VERSION', 'v0.1.2', file\n sed '-i', /.*REMOVE_THIS_LINE.*\\n/, '', file\n sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\\n/, cat 'macro.js', file\ncd '..'\n\n# Run external tool synchronously\nif (exec 'git commit -am \"Auto-commit\"').code != 0\n echo 'Error: Git commit failed'\n exit 1\n```\n\n## Global vs. Local\n\nThe example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`.\n\nExample:\n\n```javascript\nvar shell = require('shelljs');\nshell.echo('hello world');\n```\n\n## Make tool\n\nA convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script.\n\nExample (CoffeeScript):\n\n```coffeescript\nrequire 'shelljs/make'\n\ntarget.all = ->\n target.bundle()\n target.docs()\n\ntarget.bundle = ->\n cd __dirname\n mkdir 'build'\n cd 'lib'\n (cat '*.js').to '../build/output.js'\n\ntarget.docs = ->\n cd __dirname\n mkdir 'docs'\n cd 'lib'\n for file in ls '*.js'\n text = grep '//@', file # extract special comments\n text.replace '//@', '' # remove comment tags\n text.to 'docs/my_docs.md'\n```\n\nTo run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`, and so on.\n\n\n\n\n\n\n## Command reference\n\n\nAll commands run synchronously, unless otherwise stated.\n\n\n### cd('dir')\nChanges to directory `dir` for the duration of the script\n\n\n### pwd()\nReturns the current directory.\n\n\n### ls([options ,] path [,path ...])\n### ls([options ,] path_array)\nAvailable options:\n\n+ `-R`: recursive\n+ `-A`: all files (include files beginning with `.`, except for `.` and `..`)\n\nExamples:\n\n```javascript\nls('projs/*.js');\nls('-R', '/users/me', '/tmp');\nls('-R', ['/users/me', '/tmp']); // same as above\n```\n\nReturns array of files in the given path, or in current directory if no path provided.\n\n\n### find(path [,path ...])\n### find(path_array)\nExamples:\n\n```javascript\nfind('src', 'lib');\nfind(['src', 'lib']); // same as above\nfind('.').filter(function(file) { return file.match(/\\.js$/); });\n```\n\nReturns array of all files (however deep) in the given paths.\n\nThe main difference from `ls('-R', path)` is that the resulting file names\ninclude the base directories, e.g. `lib/resources/file1` instead of just `file1`.\n\n\n### cp([options ,] source [,source ...], dest)\n### cp([options ,] source_array, dest)\nAvailable options:\n\n+ `-f`: force\n+ `-r, -R`: recursive\n\nExamples:\n\n```javascript\ncp('file1', 'dir1');\ncp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');\ncp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above\n```\n\nCopies files. The wildcard `*` is accepted.\n\n\n### rm([options ,] file [, file ...])\n### rm([options ,] file_array)\nAvailable options:\n\n+ `-f`: force\n+ `-r, -R`: recursive\n\nExamples:\n\n```javascript\nrm('-rf', '/tmp/*');\nrm('some_file.txt', 'another_file.txt');\nrm(['some_file.txt', 'another_file.txt']); // same as above\n```\n\nRemoves files. The wildcard `*` is accepted.\n\n\n### mv(source [, source ...], dest')\n### mv(source_array, dest')\nAvailable options:\n\n+ `f`: force\n\nExamples:\n\n```javascript\nmv('-f', 'file', 'dir/');\nmv('file1', 'file2', 'dir/');\nmv(['file1', 'file2'], 'dir/'); // same as above\n```\n\nMoves files. The wildcard `*` is accepted.\n\n\n### mkdir([options ,] dir [, dir ...])\n### mkdir([options ,] dir_array)\nAvailable options:\n\n+ `p`: full path (will create intermediate dirs if necessary)\n\nExamples:\n\n```javascript\nmkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');\nmkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above\n```\n\nCreates directories.\n\n\n### test(expression)\nAvailable expression primaries:\n\n+ `'-b', 'path'`: true if path is a block device\n+ `'-c', 'path'`: true if path is a character device\n+ `'-d', 'path'`: true if path is a directory\n+ `'-e', 'path'`: true if path exists\n+ `'-f', 'path'`: true if path is a regular file\n+ `'-L', 'path'`: true if path is a symboilc link\n+ `'-p', 'path'`: true if path is a pipe (FIFO)\n+ `'-S', 'path'`: true if path is a socket\n\nExamples:\n\n```javascript\nif (test('-d', path)) { /* do something with dir */ };\nif (!test('-f', path)) continue; // skip if it's a regular file\n```\n\nEvaluates expression using the available primaries and returns corresponding value.\n\n\n### cat(file [, file ...])\n### cat(file_array)\n\nExamples:\n\n```javascript\nvar str = cat('file*.txt');\nvar str = cat('file1', 'file2');\nvar str = cat(['file1', 'file2']); // same as above\n```\n\nReturns a string containing the given file, or a concatenated string\ncontaining the files if more than one file is given (a new line character is\nintroduced between each file). Wildcard `*` accepted.\n\n\n### 'string'.to(file)\n\nExamples:\n\n```javascript\ncat('input.txt').to('output.txt');\n```\n\nAnalogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as\nthose returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_\n\n\n### 'string'.toEnd(file)\n\nExamples:\n\n```javascript\ncat('input.txt').toEnd('output.txt');\n```\n\nAnalogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as\nthose returned by `cat`, `grep`, etc).\n\n\n### sed([options ,] search_regex, replace_str, file)\nAvailable options:\n\n+ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_\n\nExamples:\n\n```javascript\nsed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');\nsed(/.*DELETE_THIS_LINE.*\\n/, '', 'source.js');\n```\n\nReads an input string from `file` and performs a JavaScript `replace()` on the input\nusing the given search regex and replacement string. Returns the new string after replacement.\n\n\n### grep([options ,] regex_filter, file [, file ...])\n### grep([options ,] regex_filter, file_array)\nAvailable options:\n\n+ `-v`: Inverse the sense of the regex and print the lines not matching the criteria.\n\nExamples:\n\n```javascript\ngrep('-v', 'GLOBAL_VARIABLE', '*.js');\ngrep('GLOBAL_VARIABLE', '*.js');\n```\n\nReads input string from given files and returns a string containing all lines of the\nfile that match the given `regex_filter`. Wildcard `*` accepted.\n\n\n### which(command)\n\nExamples:\n\n```javascript\nvar nodeExec = which('node');\n```\n\nSearches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions.\nReturns string containing the absolute path to the command.\n\n\n### echo(string [,string ...])\n\nExamples:\n\n```javascript\necho('hello world');\nvar str = echo('hello world');\n```\n\nPrints string to stdout, and returns string with additional utility methods\nlike `.to()`.\n\n\n### pushd([options,] [dir | '-N' | '+N'])\n\nAvailable options:\n\n+ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.\n\nArguments:\n\n+ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.\n+ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.\n+ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.\n\nExamples:\n\n```javascript\n// process.cwd() === '/usr'\npushd('/etc'); // Returns /etc /usr\npushd('+1'); // Returns /usr /etc\n```\n\nSave the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.\n\n### popd([options,] ['-N' | '+N'])\n\nAvailable options:\n\n+ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.\n\nArguments:\n\n+ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.\n+ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.\n\nExamples:\n\n```javascript\necho(process.cwd()); // '/usr'\npushd('/etc'); // '/etc /usr'\necho(process.cwd()); // '/etc'\npopd(); // '/usr'\necho(process.cwd()); // '/usr'\n```\n\nWhen no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.\n\n### dirs([options | '+N' | '-N'])\n\nAvailable options:\n\n+ `-c`: Clears the directory stack by deleting all of the elements.\n\nArguments:\n\n+ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.\n+ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.\n\nDisplay the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.\n\nSee also: pushd, popd\n\n\n### exit(code)\nExits the current process with the given exit code.\n\n### env['VAR_NAME']\nObject containing environment variables (both getter and setter). Shortcut to process.env.\n\n### exec(command [, options] [, callback])\nAvailable options (all `false` by default):\n\n+ `async`: Asynchronous execution. Defaults to true if a callback is provided.\n+ `silent`: Do not echo program output to console.\n\nExamples:\n\n```javascript\nvar version = exec('node --version', {silent:true}).output;\n\nvar child = exec('some_long_running_process', {async:true});\nchild.stdout.on('data', function(data) {\n /* ... do something with data ... */\n});\n\nexec('some_long_running_process', function(code, output) {\n console.log('Exit code:', code);\n console.log('Program output:', output);\n});\n```\n\nExecutes the given `command` _synchronously_, unless otherwise specified.\nWhen in synchronous mode returns the object `{ code:..., output:... }`, containing the program's\n`output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and\nthe `callback` gets the arguments `(code, output)`.\n\n**Note:** For long-lived processes, it's best to run `exec()` asynchronously as\nthe current synchronous implementation uses a lot of CPU. This should be getting\nfixed soon.\n\n\n### chmod(octal_mode || octal_string, file)\n### chmod(symbolic_mode, file)\n\nAvailable options:\n\n+ `-v`: output a diagnostic for every file processed\n+ `-c`: like verbose but report only when a change is made\n+ `-R`: change files and directories recursively\n\nExamples:\n\n```javascript\nchmod(755, '/Users/brandon');\nchmod('755', '/Users/brandon'); // same as above\nchmod('u+x', '/Users/brandon');\n```\n\nAlters the permissions of a file or directory by either specifying the\nabsolute permissions in octal form or expressing the changes in symbols.\nThis command tries to mimic the POSIX behavior as much as possible.\nNotable exceptions:\n\n+ In symbolic modes, 'a-r' and '-r' are identical. No consideration is\n given to the umask.\n+ There is no \"quiet\" option since default behavior is to run silent.\n\n\n## Non-Unix commands\n\n\n### tempdir()\n\nExamples:\n\n```javascript\nvar tmp = tempdir(); // \"/tmp\" for most *nix platforms\n```\n\nSearches and returns string containing a writeable, platform-dependent temporary directory.\nFollows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir).\n\n\n### error()\nTests if error occurred in the last command. Returns `null` if no error occurred,\notherwise returns string explaining the error\n\n\n## Configuration\n\n\n### config.silent\nExample:\n\n```javascript\nvar silentState = config.silent; // save old silent state\nconfig.silent = true;\n/* ... */\nconfig.silent = silentState; // restore old silent state\n```\n\nSuppresses all command output if `true`, except for `echo()` calls.\nDefault is `false`.\n\n### config.fatal\nExample:\n\n```javascript\nconfig.fatal = true;\ncp('this_file_does_not_exist', '/dev/null'); // dies here\n/* more commands... */\n```\n\nIf `true` the script will die on errors. Default is `false`.\n", - "readmeFilename": "README.md", - "_id": "shelljs@0.2.6", - "_from": "shelljs@" + "version": "0.2.6" } diff --git a/node_modules/supports-color/browser.js b/node_modules/supports-color/browser.js new file mode 100644 index 0000000..62afa3a --- /dev/null +++ b/node_modules/supports-color/browser.js @@ -0,0 +1,5 @@ +'use strict'; +module.exports = { + stdout: false, + stderr: false +}; diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js new file mode 100644 index 0000000..1704131 --- /dev/null +++ b/node_modules/supports-color/index.js @@ -0,0 +1,131 @@ +'use strict'; +const os = require('os'); +const hasFlag = require('has-flag'); + +const env = process.env; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = true; +} +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + const min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; diff --git a/node_modules/supports-color/license b/node_modules/supports-color/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/supports-color/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/supports-color/package.json b/node_modules/supports-color/package.json new file mode 100644 index 0000000..2055b81 --- /dev/null +++ b/node_modules/supports-color/package.json @@ -0,0 +1,84 @@ +{ + "_from": "supports-color@^5.3.0", + "_id": "supports-color@5.5.0", + "_inBundle": false, + "_integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "_location": "/supports-color", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "supports-color@^5.3.0", + "name": "supports-color", + "escapedName": "supports-color", + "rawSpec": "^5.3.0", + "saveSpec": null, + "fetchSpec": "^5.3.0" + }, + "_requiredBy": [ + "/chalk" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "_shasum": "e2e69a44ac8772f78a1ec0b35b689df6530efc8f", + "_spec": "supports-color@^5.3.0", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "bundleDependencies": false, + "dependencies": { + "has-flag": "^3.0.0" + }, + "deprecated": false, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "ava": "^0.25.0", + "import-fresh": "^2.0.0", + "xo": "^0.20.0" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "browser.js" + ], + "homepage": "https://github.com/chalk/supports-color#readme", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect", + "truecolor", + "16m" + ], + "license": "MIT", + "name": "supports-color", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "5.5.0" +} diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md new file mode 100644 index 0000000..f6e4019 --- /dev/null +++ b/node_modules/supports-color/readme.md @@ -0,0 +1,66 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install supports-color +``` + + +## Usage + +```js +const supportsColor = require('supports-color'); + +if (supportsColor.stdout) { + console.log('Terminal stdout supports color'); +} + +if (supportsColor.stdout.has256) { + console.log('Terminal stdout supports 256 colors'); +} + +if (supportsColor.stderr.has16m) { + console.log('Terminal stderr supports 16 million colors (truecolor)'); +} +``` + + +## API + +Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. + +The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: + +- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) +- `.level = 2` and `.has256 = true`: 256 color support +- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) + + +## Info + +It obeys the `--color` and `--no-color` CLI flags. + +Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. + +Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md new file mode 100644 index 0000000..3d83d26 --- /dev/null +++ b/node_modules/which/CHANGELOG.md @@ -0,0 +1,152 @@ +# Changes + + +## 1.3.1 + +* update deps +* update travis + +## v1.3.0 + +* Add nothrow option to which.sync +* update tap + +## v1.2.14 + +* appveyor: drop node 5 and 0.x +* travis-ci: add node 6, drop 0.x + +## v1.2.13 + +* test: Pass missing option to pass on windows +* update tap +* update isexe to 2.0.0 +* neveragain.tech pledge request + +## v1.2.12 + +* Removed unused require + +## v1.2.11 + +* Prevent changelog script from being included in package + +## v1.2.10 + +* Use env.PATH only, not env.Path + +## v1.2.9 + +* fix for paths starting with ../ +* Remove unused `is-absolute` module + +## v1.2.8 + +* bullet items in changelog that contain (but don't start with) # + +## v1.2.7 + +* strip 'update changelog' changelog entries out of changelog + +## v1.2.6 + +* make the changelog bulleted + +## v1.2.5 + +* make a changelog, and keep it up to date +* don't include tests in package +* Properly handle relative-path executables +* appveyor +* Attach error code to Not Found error +* Make tests pass on Windows + +## v1.2.4 + +* Fix typo + +## v1.2.3 + +* update isexe, fix regression in pathExt handling + +## v1.2.2 + +* update deps, use isexe module, test windows + +## v1.2.1 + +* Sometimes windows PATH entries are quoted +* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. +* doc cli + +## v1.2.0 + +* Add support for opt.all and -as cli flags +* test the bin +* update travis +* Allow checking for multiple programs in bin/which +* tap 2 + +## v1.1.2 + +* travis +* Refactored and fixed undefined error on Windows +* Support strict mode + +## v1.1.1 + +* test +g exes against secondary groups, if available +* Use windows exe semantics on cygwin & msys +* cwd should be first in path on win32, not last +* Handle lower-case 'env.Path' on Windows +* Update docs +* use single-quotes + +## v1.1.0 + +* Add tests, depend on is-absolute + +## v1.0.9 + +* which.js: root is allowed to execute files owned by anyone + +## v1.0.8 + +* don't use graceful-fs + +## v1.0.7 + +* add license to package.json + +## v1.0.6 + +* isc license + +## 1.0.5 + +* Awful typo + +## 1.0.4 + +* Test for path absoluteness properly +* win: Allow '' as a pathext if cmd has a . in it + +## 1.0.3 + +* Remove references to execPath +* Make `which.sync()` work on Windows by honoring the PATHEXT variable. +* Make `isExe()` always return true on Windows. +* MIT + +## 1.0.2 + +* Only files can be exes + +## 1.0.1 + +* Respect the PATHEXT env for win32 support +* should 0755 the bin +* binary +* guts +* package +* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE index 05a4010..19129e3 100644 --- a/node_modules/which/LICENSE +++ b/node_modules/which/LICENSE @@ -1,23 +1,15 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. +The ISC License -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: +Copyright (c) Isaac Z. Schlueter and Contributors -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +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", 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" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/which/README.md b/node_modules/which/README.md index ff1eb53..8c0b0cb 100644 --- a/node_modules/which/README.md +++ b/node_modules/which/README.md @@ -1,5 +1,51 @@ -The "which" util from npm's guts. +# which + +Like the unix `which` utility. Finds the first instance of a specified executable in the PATH environment variable. Does not cache the results, so `hash -r` is not needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// if nothrow option is used, returns null if not found +resolved = which.sync('node', {nothrow: true}) + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which index 8432ce2..7cee372 100755 --- a/node_modules/which/bin/which +++ b/node_modules/which/bin/which @@ -1,14 +1,52 @@ #!/usr/bin/env node var which = require("../") -if (process.argv.length < 3) { - console.error("Usage: which ") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') process.exit(1) } -which(process.argv[2], function (er, thing) { - if (er) { - console.error(er.message) - process.exit(er.errno || 127) +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } } - console.log(thing) + return false }) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json index f3b5c64..64895fb 100644 --- a/node_modules/which/package.json +++ b/node_modules/which/package.json @@ -1,35 +1,65 @@ { + "_from": "which@1.3.1", + "_id": "which@1.3.1", + "_inBundle": false, + "_integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "_location": "/which", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "which@1.3.1", + "name": "which", + "escapedName": "which", + "rawSpec": "1.3.1", + "saveSpec": null, + "fetchSpec": "1.3.1" + }, + "_requiredBy": [ + "/", + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "_shasum": "a45043d54f5805316da8d62f9f50918d3da70b0a", + "_spec": "which@1.3.1", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me" }, - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "1.0.5", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "main": "which.js", "bin": { "which": "./bin/which" }, - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": {}, - "readme": "The \"which\" util from npm's guts.\n\nFinds the first instance of a specified executable in the PATH\nenvironment variable. Does not cache the results, so `hash -r` is not\nneeded when the PATH changes.\n", - "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/node-which/issues" }, - "homepage": "https://github.com/isaacs/node-which", - "_id": "which@1.0.5", - "dist": { - "shasum": "195619a6ad7e8fefd0aa76445a6d4c8d370a322c" + "bundleDependencies": false, + "dependencies": { + "isexe": "^2.0.0" + }, + "deprecated": false, + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.6.2", + "tap": "^12.0.1" + }, + "files": [ + "which.js", + "bin/which" + ], + "homepage": "https://github.com/isaacs/node-which#readme", + "license": "ISC", + "main": "which.js", + "name": "which", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "scripts": { + "changelog": "bash gen-changelog.sh", + "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", + "test": "tap test/*.js --cov" }, - "_from": "which@1.0.5", - "_resolved": "https://registry.npmjs.org/which/-/which-1.0.5.tgz" + "version": "1.3.1" } diff --git a/node_modules/which/which.js b/node_modules/which/which.js index db7e8f7..4347f91 100644 --- a/node_modules/which/which.js +++ b/node_modules/which/which.js @@ -1,58 +1,90 @@ module.exports = which which.sync = whichSync -var path = require("path") - , fs - , COLON = process.platform === "win32" ? ";" : ":" - , isExe - -try { - fs = require("graceful-fs") -} catch (ex) { - fs = require("fs") +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er } -if (process.platform == "win32") { - // On windows, there is no good way to check that a file is executable - isExe = function isExe () { return true } -} else { - isExe = function isExe (mod, uid, gid) { - //console.error(mod, uid, gid); - //console.error("isExe?", (mod & 0111).toString(8)) - var ret = (mod & 0001) - || (mod & 0010) && process.getgid && gid === process.getgid() - || (mod & 0100) && process.getuid && uid === process.getuid() - //console.error("isExe?", ret) - return ret +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') } -} + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} -function which (cmd, cb) { - if (isAbsolute(cmd)) return cb(null, cmd) - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} } - //console.error("pathEnv", pathEnv) + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + ;(function F (i, l) { - if (i === l) return cb(new Error("not found: "+cmd)) - var p = path.resolve(pathEnv[i], cmd) + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } ;(function E (ii, ll) { if (ii === ll) return F(i + 1, l) var ext = pathExt[ii] - //console.error(p + ext) - fs.stat(p + ext, function (er, stat) { - if (!er && - stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) { - //console.error("yes, exe!", p + ext) - return cb(null, p + ext) + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) } return E(ii + 1, ll) }) @@ -60,45 +92,44 @@ function which (cmd, cb) { })(0, pathEnv.length) } -function whichSync (cmd) { - if (isAbsolute(cmd)) return cmd - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") - } +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + for (var i = 0, l = pathEnv.length; i < l; i ++) { - var p = path.join(pathEnv[i], cmd) + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } for (var j = 0, ll = pathExt.length; j < ll; j ++) { var cur = p + pathExt[j] - var stat - try { stat = fs.statSync(cur) } catch (ex) {} - if (stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) return cur + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} } } - throw new Error("not found: "+cmd) -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute + if (opt.all && found.length) + return found - return isAbsolute -} + if (opt.nothrow) + return null -function absUnix (p) { - return p.charAt(0) === "/" || p === "" + throw getNotFoundError(cmd) } diff --git a/package.json b/package.json index 95b1a75..569beaa 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,18 @@ { "dependencies": { - "chalk": "1.0.0", - "changelogplease": "1.1.1", - "github-request": "1.2.3", - "semver": "2.2.1", + "chalk": "2.4.2", + "changelogplease": "1.2.0", + "github-request": "1.2.4", + "semver": "6.3.0", "shelljs": "0.2.6", - "which": "1.0.5" + "which": "1.3.1" }, "devDependencies": { - "grunt": "0.4.1", - "grunt-contrib-jshint": "~0.7.2" + "eslint": "6.5.1", + "eslint-config-jquery": "2.0.0" }, "scripts": { - "test": "grunt", + "test": "eslint .", "clean": "rm -rf __release/" }, "repository": "jquery/jquery-release", diff --git a/release.js b/release.js index 6a69dd4..2e2c616 100644 --- a/release.js +++ b/release.js @@ -1,5 +1,7 @@ #!/usr/bin/env node +"use strict"; + var commonTasks, stableTasks, fs = require( "fs" ), Release = { @@ -15,11 +17,11 @@ var commonTasks, stableTasks, } }; -fs.readdirSync( "./lib" ).forEach(function( filename ) { +fs.readdirSync( "./lib" ).forEach( function( filename ) { if ( filename.endsWith( ".js" ) ) { require( "./lib/" + filename )( Release ); } -}); +} ); commonTasks = [ Release._checkExecutables, @@ -53,7 +55,7 @@ commonTasks = [ function( fn ) { if ( Release.cdnPublish ) { Release._section( "publishing to jQuery CDN" )(); - Release.walk([ + Release.walk( [ Release._copyCdnArtifacts, Release.confirmReview, Release._pushToCdn @@ -97,4 +99,4 @@ Release.walk( commonTasks, function() { } Release.walk( stableTasks, Release.complete ); -}); +} ); From ff3a435776155f3e23115109eb433cde9c14fe85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Mon, 2 Mar 2020 20:32:09 +0100 Subject: [PATCH 63/83] Build:util: await methods passed to Release.walk, test on Node 12 Changes: 1. Test on Node.js 12 instead of 10 2. Make `Release.walk` an async function, `await` each provided method. This makes it possible to easier integrate with asynchronous flows in various steps. 3. Throw on unhandled rejections, making jquery-release quit if any of the async steps passed to `Release.walk` ends up in a rejected state. --- .travis.yml | 2 +- lib/util.js | 6 +++--- release.js | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4555503..cdcdfc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,3 @@ language: node_js node_js: - - "10" + - "12" diff --git a/lib/util.js b/lib/util.js index 214295b..10695c6 100644 --- a/lib/util.js +++ b/lib/util.js @@ -58,7 +58,7 @@ Release.define( { }; }, - walk: function( methods, fn ) { + walk: async function( methods, fn ) { var method = methods.shift(); function next() { @@ -70,10 +70,10 @@ Release.define( { } if ( !method.length ) { - method(); + await method(); next(); } else { - method( next ); + await method( next ); } } } ); diff --git a/release.js b/release.js index 2e2c616..93da9cf 100644 --- a/release.js +++ b/release.js @@ -2,6 +2,12 @@ "use strict"; +// Stop the release process if any of the asynchronous operations fails. +process.on( "unhandledRejection", reason => { + console.error( "Unhandled rejection:", reason ); + throw reason; +} ); + var commonTasks, stableTasks, fs = require( "fs" ), Release = { From 00c8febe74daa43b86ef558bd09f7b0d6861eaa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Fri, 13 Mar 2020 22:00:03 +0100 Subject: [PATCH 64/83] npm: Support two-factor authentication: ask for a one-time password Keywords: 2FA, OTP, npm Closes gh-104 --- lib/npm.js | 21 +- lib/prompt.js | 14 +- node_modules/ansi-colors/LICENSE | 21 + node_modules/ansi-colors/README.md | 279 +++ node_modules/ansi-colors/index.js | 117 ++ node_modules/ansi-colors/package.json | 152 ++ node_modules/ansi-colors/symbols.js | 46 + node_modules/ansi-colors/types/index.d.ts | 161 ++ node_modules/enquirer/CHANGELOG.md | 121 ++ node_modules/enquirer/LICENSE | 21 + node_modules/enquirer/README.md | 1747 +++++++++++++++++ node_modules/enquirer/index.d.ts | 150 ++ node_modules/enquirer/index.js | 250 +++ node_modules/enquirer/lib/ansi.js | 116 ++ node_modules/enquirer/lib/combos.js | 75 + node_modules/enquirer/lib/completer.js | 52 + node_modules/enquirer/lib/interpolate.js | 266 +++ node_modules/enquirer/lib/keypress.js | 243 +++ node_modules/enquirer/lib/placeholder.js | 63 + node_modules/enquirer/lib/prompt.js | 485 +++++ .../enquirer/lib/prompts/autocomplete.js | 109 + .../enquirer/lib/prompts/basicauth.js | 41 + node_modules/enquirer/lib/prompts/confirm.js | 13 + node_modules/enquirer/lib/prompts/editable.js | 136 ++ node_modules/enquirer/lib/prompts/form.js | 196 ++ node_modules/enquirer/lib/prompts/index.js | 28 + node_modules/enquirer/lib/prompts/input.js | 55 + .../enquirer/lib/prompts/invisible.js | 11 + node_modules/enquirer/lib/prompts/list.js | 36 + .../enquirer/lib/prompts/multiselect.js | 11 + node_modules/enquirer/lib/prompts/numeral.js | 1 + node_modules/enquirer/lib/prompts/password.js | 18 + node_modules/enquirer/lib/prompts/quiz.js | 37 + node_modules/enquirer/lib/prompts/scale.js | 237 +++ node_modules/enquirer/lib/prompts/select.js | 139 ++ node_modules/enquirer/lib/prompts/snippet.js | 185 ++ node_modules/enquirer/lib/prompts/sort.js | 37 + node_modules/enquirer/lib/prompts/survey.js | 163 ++ node_modules/enquirer/lib/prompts/text.js | 1 + node_modules/enquirer/lib/prompts/toggle.js | 109 + node_modules/enquirer/lib/render.js | 33 + node_modules/enquirer/lib/roles.js | 46 + node_modules/enquirer/lib/state.js | 69 + node_modules/enquirer/lib/styles.js | 144 ++ node_modules/enquirer/lib/symbols.js | 66 + node_modules/enquirer/lib/theme.js | 11 + node_modules/enquirer/lib/timer.js | 38 + node_modules/enquirer/lib/types/array.js | 658 +++++++ node_modules/enquirer/lib/types/auth.js | 29 + node_modules/enquirer/lib/types/boolean.js | 88 + node_modules/enquirer/lib/types/index.js | 7 + node_modules/enquirer/lib/types/number.js | 86 + node_modules/enquirer/lib/types/string.js | 185 ++ node_modules/enquirer/lib/utils.js | 268 +++ node_modules/enquirer/package.json | 148 ++ package.json | 1 + 56 files changed, 7835 insertions(+), 5 deletions(-) create mode 100644 node_modules/ansi-colors/LICENSE create mode 100644 node_modules/ansi-colors/README.md create mode 100644 node_modules/ansi-colors/index.js create mode 100644 node_modules/ansi-colors/package.json create mode 100644 node_modules/ansi-colors/symbols.js create mode 100644 node_modules/ansi-colors/types/index.d.ts create mode 100644 node_modules/enquirer/CHANGELOG.md create mode 100644 node_modules/enquirer/LICENSE create mode 100644 node_modules/enquirer/README.md create mode 100644 node_modules/enquirer/index.d.ts create mode 100644 node_modules/enquirer/index.js create mode 100644 node_modules/enquirer/lib/ansi.js create mode 100644 node_modules/enquirer/lib/combos.js create mode 100644 node_modules/enquirer/lib/completer.js create mode 100644 node_modules/enquirer/lib/interpolate.js create mode 100644 node_modules/enquirer/lib/keypress.js create mode 100644 node_modules/enquirer/lib/placeholder.js create mode 100644 node_modules/enquirer/lib/prompt.js create mode 100644 node_modules/enquirer/lib/prompts/autocomplete.js create mode 100644 node_modules/enquirer/lib/prompts/basicauth.js create mode 100644 node_modules/enquirer/lib/prompts/confirm.js create mode 100644 node_modules/enquirer/lib/prompts/editable.js create mode 100644 node_modules/enquirer/lib/prompts/form.js create mode 100644 node_modules/enquirer/lib/prompts/index.js create mode 100644 node_modules/enquirer/lib/prompts/input.js create mode 100644 node_modules/enquirer/lib/prompts/invisible.js create mode 100644 node_modules/enquirer/lib/prompts/list.js create mode 100644 node_modules/enquirer/lib/prompts/multiselect.js create mode 100644 node_modules/enquirer/lib/prompts/numeral.js create mode 100644 node_modules/enquirer/lib/prompts/password.js create mode 100644 node_modules/enquirer/lib/prompts/quiz.js create mode 100644 node_modules/enquirer/lib/prompts/scale.js create mode 100644 node_modules/enquirer/lib/prompts/select.js create mode 100644 node_modules/enquirer/lib/prompts/snippet.js create mode 100644 node_modules/enquirer/lib/prompts/sort.js create mode 100644 node_modules/enquirer/lib/prompts/survey.js create mode 100644 node_modules/enquirer/lib/prompts/text.js create mode 100644 node_modules/enquirer/lib/prompts/toggle.js create mode 100644 node_modules/enquirer/lib/render.js create mode 100644 node_modules/enquirer/lib/roles.js create mode 100644 node_modules/enquirer/lib/state.js create mode 100644 node_modules/enquirer/lib/styles.js create mode 100644 node_modules/enquirer/lib/symbols.js create mode 100644 node_modules/enquirer/lib/theme.js create mode 100644 node_modules/enquirer/lib/timer.js create mode 100644 node_modules/enquirer/lib/types/array.js create mode 100644 node_modules/enquirer/lib/types/auth.js create mode 100644 node_modules/enquirer/lib/types/boolean.js create mode 100644 node_modules/enquirer/lib/types/index.js create mode 100644 node_modules/enquirer/lib/types/number.js create mode 100644 node_modules/enquirer/lib/types/string.js create mode 100644 node_modules/enquirer/lib/utils.js create mode 100644 node_modules/enquirer/package.json diff --git a/lib/npm.js b/lib/npm.js index cc2b659..77d6bda 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -62,7 +62,17 @@ module.exports = function( Release ) { return tags; }, - _publishNpm: function() { + // Ask for a one-time password for 2FA-enabled accounts; + // returns OTP as string if provided, undefined otherwise. + _getNpmOtp: async function() { + var otp = await Release.promptFor( + "Enter one-time password if you have 2FA enabled and press Enter.\n" + + "Otherwise, just press Enter." ); + + return otp || undefined; + }, + + _publishNpm: async function() { if ( !Release.npmPublish ) { return; } @@ -71,8 +81,9 @@ module.exports = function( Release ) { var npmPublish, newVersion = Release.readPackage().name + "@" + Release.newVersion, - safety = Release.isTest ? " --dry-run" : "", - npmTags = Release.npmTags(); + safety = Release.isTest ? "--dry-run" : "", + npmTags = Release.npmTags(), + otp = await Release._getNpmOtp(); if ( Release.isTest ) { console.log( "Actual release would now publish to npm using:" ); @@ -80,7 +91,9 @@ module.exports = function( Release ) { console.log( "Publishing to npm, running:" ); } - npmPublish = "npm publish" + safety + " --tag " + npmTags.pop(); + npmPublish = `npm publish ${ safety } ${ + otp ? `--otp ${ otp }` : "" + } --tag ${ npmTags.pop() }`; console.log( " " + chalk.cyan( npmPublish ) ); Release.exec( npmPublish ); diff --git a/lib/prompt.js b/lib/prompt.js index cb57a5e..9884d95 100644 --- a/lib/prompt.js +++ b/lib/prompt.js @@ -1,6 +1,7 @@ "use strict"; -var chalk = require( "chalk" ); +var chalk = require( "chalk" ), + { prompt } = require( "enquirer" ); module.exports = function( Release ) { @@ -13,6 +14,17 @@ Release.define( { process.stdin.resume(); }, + // prints a given message, provide back the entered string after trimming. + // Also, returns a promise resolving to that string. + promptFor: async function( message ) { + var { input } = await prompt( { + type: "input", + name: "input", + message + } ); + return input; + }, + confirm: function( fn ) { console.log( chalk.yellow( "Press enter to continue, or ctrl+c to cancel." ) ); Release.prompt( fn ); diff --git a/node_modules/ansi-colors/LICENSE b/node_modules/ansi-colors/LICENSE new file mode 100644 index 0000000..8749cc7 --- /dev/null +++ b/node_modules/ansi-colors/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present, Brian Woodward. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/ansi-colors/README.md b/node_modules/ansi-colors/README.md new file mode 100644 index 0000000..4d27647 --- /dev/null +++ b/node_modules/ansi-colors/README.md @@ -0,0 +1,279 @@ +# ansi-colors [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) + +> Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs). + +Please consider following this project's author, [Brian Woodward](https://github.com/doowb), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save ansi-colors +``` + +![image](https://user-images.githubusercontent.com/383994/39635445-8a98a3a6-4f8b-11e8-89c1-068c45d4fff8.png) + +## Why use this? + +ansi-colors is _the fastest Node.js library for terminal styling_. A more performant drop-in replacement for chalk, with no dependencies. + +* _Blazing fast_ - Fastest terminal styling library in node.js, 10-20x faster than chalk! + +* _Drop-in replacement_ for [chalk](https://github.com/chalk/chalk). +* _No dependencies_ (Chalk has 7 dependencies in its tree!) + +* _Safe_ - Does not modify the `String.prototype` like [colors](https://github.com/Marak/colors.js). +* Supports [nested colors](#nested-colors), **and does not have the [nested styling bug](#nested-styling-bug) that is present in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur)**. +* Supports [chained colors](#chained-colors). +* [Toggle color support](#toggle-color-support) on or off. + +## Usage + +```js +const c = require('ansi-colors'); + +console.log(c.red('This is a red string!')); +console.log(c.green('This is a red string!')); +console.log(c.cyan('This is a cyan string!')); +console.log(c.yellow('This is a yellow string!')); +``` + +![image](https://user-images.githubusercontent.com/383994/39653848-a38e67da-4fc0-11e8-89ae-98c65ebe9dcf.png) + +## Chained colors + +```js +console.log(c.bold.red('this is a bold red message')); +console.log(c.bold.yellow.italic('this is a bold yellow italicized message')); +console.log(c.green.bold.underline('this is a bold green underlined message')); +``` + +![image](https://user-images.githubusercontent.com/383994/39635780-7617246a-4f8c-11e8-89e9-05216cc54e38.png) + +## Nested colors + +```js +console.log(c.yellow(`foo ${c.red.bold('red')} bar ${c.cyan('cyan')} baz`)); +``` + +![image](https://user-images.githubusercontent.com/383994/39635817-8ed93d44-4f8c-11e8-8afd-8c3ea35f5fbe.png) + +### Nested styling bug + +`ansi-colors` does not have the nested styling bug found in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur). + +```js +const { bold, red } = require('ansi-styles'); +console.log(bold(`foo ${red.dim('bar')} baz`)); + +const colorette = require('colorette'); +console.log(colorette.bold(`foo ${colorette.red(colorette.dim('bar'))} baz`)); + +const kleur = require('kleur'); +console.log(kleur.bold(`foo ${kleur.red.dim('bar')} baz`)); + +const chalk = require('chalk'); +console.log(chalk.bold(`foo ${chalk.red.dim('bar')} baz`)); +``` + +**Results in the following** + +(sans icons and labels) + +![image](https://user-images.githubusercontent.com/383994/47280326-d2ee0580-d5a3-11e8-9611-ea6010f0a253.png) + +## Toggle color support + +Easily enable/disable colors. + +```js +const c = require('ansi-colors'); + +// disable colors manually +c.enabled = false; + +// or use a library to automatically detect support +c.enabled = require('color-support').hasBasic; + +console.log(c.red('I will only be colored red if the terminal supports colors')); +``` + +## Strip ANSI codes + +Use the `.unstyle` method to strip ANSI codes from a string. + +```js +console.log(c.unstyle(c.blue.bold('foo bar baz'))); +//=> 'foo bar baz' +``` + +## Available styles + +**Note** that bright and bright-background colors are not always supported. + +| Colors | Background Colors | Bright Colors | Bright Background Colors | +| ------- | ----------------- | ------------- | ------------------------ | +| black | bgBlack | blackBright | bgBlackBright | +| red | bgRed | redBright | bgRedBright | +| green | bgGreen | greenBright | bgGreenBright | +| yellow | bgYellow | yellowBright | bgYellowBright | +| blue | bgBlue | blueBright | bgBlueBright | +| magenta | bgMagenta | magentaBright | bgMagentaBright | +| cyan | bgCyan | cyanBright | bgCyanBright | +| white | bgWhite | whiteBright | bgWhiteBright | +| gray | | | | +| grey | | | | + +_(`gray` is the U.S. spelling, `grey` is more commonly used in the Canada and U.K.)_ + +### Style modifiers + +* dim +* **bold** + +* hidden +* _italic_ + +* underline +* inverse +* ~~strikethrough~~ + +* reset + +## Performance + +**Libraries tested** + +* ansi-colors v3.0.4 +* chalk v2.4.1 + +### Mac + +> MacBook Pro, Intel Core i7, 2.3 GHz, 16 GB. + +**Load time** + +Time it takes to load the first time `require()` is called: + +* ansi-colors - `1.915ms` +* chalk - `12.437ms` + +**Benchmarks** + +``` +# All Colors + ansi-colors x 173,851 ops/sec ±0.42% (91 runs sampled) + chalk x 9,944 ops/sec ±2.53% (81 runs sampled))) + +# Chained colors + ansi-colors x 20,791 ops/sec ±0.60% (88 runs sampled) + chalk x 2,111 ops/sec ±2.34% (83 runs sampled) + +# Nested colors + ansi-colors x 59,304 ops/sec ±0.98% (92 runs sampled) + chalk x 4,590 ops/sec ±2.08% (82 runs sampled) +``` + +### Windows + +> Windows 10, Intel Core i7-7700k CPU @ 4.2 GHz, 32 GB + +**Load time** + +Time it takes to load the first time `require()` is called: + +* ansi-colors - `1.494ms` +* chalk - `11.523ms` + +**Benchmarks** + +``` +# All Colors + ansi-colors x 193,088 ops/sec ±0.51% (95 runs sampled)) + chalk x 9,612 ops/sec ±3.31% (77 runs sampled))) + +# Chained colors + ansi-colors x 26,093 ops/sec ±1.13% (94 runs sampled) + chalk x 2,267 ops/sec ±2.88% (80 runs sampled)) + +# Nested colors + ansi-colors x 67,747 ops/sec ±0.49% (93 runs sampled) + chalk x 4,446 ops/sec ±3.01% (82 runs sampled)) +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [ansi-wrap](https://www.npmjs.com/package/ansi-wrap): Create ansi colors by passing the open and close codes. | [homepage](https://github.com/jonschlinkert/ansi-wrap "Create ansi colors by passing the open and close codes.") +* [strip-color](https://www.npmjs.com/package/strip-color): Strip ANSI color codes from a string. No dependencies. | [homepage](https://github.com/jonschlinkert/strip-color "Strip ANSI color codes from a string. No dependencies.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 42 | [doowb](https://github.com/doowb) | +| 38 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [lukeed](https://github.com/lukeed) | +| 2 | [Silic0nS0ldier](https://github.com/Silic0nS0ldier) | +| 1 | [dwieeb](https://github.com/dwieeb) | +| 1 | [jorgebucaran](https://github.com/jorgebucaran) | +| 1 | [madhavarshney](https://github.com/madhavarshney) | +| 1 | [chapterjason](https://github.com/chapterjason) | + +### Author + +**Brian Woodward** + +* [GitHub Profile](https://github.com/doowb) +* [Twitter Profile](https://twitter.com/doowb) +* [LinkedIn Profile](https://linkedin.com/in/woodwardbrian) + +Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! + + + + + +### License + +Copyright © 2019, [Brian Woodward](https://github.com/doowb). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 03, 2019._ \ No newline at end of file diff --git a/node_modules/ansi-colors/index.js b/node_modules/ansi-colors/index.js new file mode 100644 index 0000000..ce09969 --- /dev/null +++ b/node_modules/ansi-colors/index.js @@ -0,0 +1,117 @@ +'use strict'; + +const colors = { enabled: true, visible: true, styles: {}, keys: {} }; + +if ('FORCE_COLOR' in process.env) { + colors.enabled = process.env.FORCE_COLOR !== '0'; +} + +const ansi = style => { + style.open = `\u001b[${style.codes[0]}m`; + style.close = `\u001b[${style.codes[1]}m`; + style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'); + return style; +}; + +const wrap = (style, str, nl) => { + let { open, close, regex } = style; + str = open + (str.includes(close) ? str.replace(regex, close + open) : str) + close; + // see https://github.com/chalk/chalk/pull/92, thanks to the + // chalk contributors for this fix. However, we've confirmed that + // this issue is also present in Windows terminals + return nl ? str.replace(/\r?\n/g, `${close}$&${open}`) : str; +}; + +const style = (input, stack) => { + if (input === '' || input == null) return ''; + if (colors.enabled === false) return input; + if (colors.visible === false) return ''; + let str = '' + input; + let nl = str.includes('\n'); + let n = stack.length; + while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl); + return str; +}; + +const define = (name, codes, type) => { + colors.styles[name] = ansi({ name, codes }); + let t = colors.keys[type] || (colors.keys[type] = []); + t.push(name); + + Reflect.defineProperty(colors, name, { + get() { + let color = input => style(input, color.stack); + Reflect.setPrototypeOf(color, colors); + color.stack = this.stack ? this.stack.concat(name) : [name]; + return color; + } + }); +}; + +define('reset', [0, 0], 'modifier'); +define('bold', [1, 22], 'modifier'); +define('dim', [2, 22], 'modifier'); +define('italic', [3, 23], 'modifier'); +define('underline', [4, 24], 'modifier'); +define('inverse', [7, 27], 'modifier'); +define('hidden', [8, 28], 'modifier'); +define('strikethrough', [9, 29], 'modifier'); + +define('black', [30, 39], 'color'); +define('red', [31, 39], 'color'); +define('green', [32, 39], 'color'); +define('yellow', [33, 39], 'color'); +define('blue', [34, 39], 'color'); +define('magenta', [35, 39], 'color'); +define('cyan', [36, 39], 'color'); +define('white', [37, 39], 'color'); +define('gray', [90, 39], 'color'); +define('grey', [90, 39], 'color'); + +define('bgBlack', [40, 49], 'bg'); +define('bgRed', [41, 49], 'bg'); +define('bgGreen', [42, 49], 'bg'); +define('bgYellow', [43, 49], 'bg'); +define('bgBlue', [44, 49], 'bg'); +define('bgMagenta', [45, 49], 'bg'); +define('bgCyan', [46, 49], 'bg'); +define('bgWhite', [47, 49], 'bg'); + +define('blackBright', [90, 39], 'bright'); +define('redBright', [91, 39], 'bright'); +define('greenBright', [92, 39], 'bright'); +define('yellowBright', [93, 39], 'bright'); +define('blueBright', [94, 39], 'bright'); +define('magentaBright', [95, 39], 'bright'); +define('cyanBright', [96, 39], 'bright'); +define('whiteBright', [97, 39], 'bright'); + +define('bgBlackBright', [100, 49], 'bgBright'); +define('bgRedBright', [101, 49], 'bgBright'); +define('bgGreenBright', [102, 49], 'bgBright'); +define('bgYellowBright', [103, 49], 'bgBright'); +define('bgBlueBright', [104, 49], 'bgBright'); +define('bgMagentaBright', [105, 49], 'bgBright'); +define('bgCyanBright', [106, 49], 'bgBright'); +define('bgWhiteBright', [107, 49], 'bgBright'); + +/* eslint-disable no-control-regex */ +// this is a modified, optimized version of +// https://github.com/chalk/ansi-regex (MIT License) +const re = colors.ansiRegex = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g; + +colors.hasColor = colors.hasAnsi = str => { + re.lastIndex = 0; + return !!str && typeof str === 'string' && re.test(str); +}; + +colors.unstyle = str => { + re.lastIndex = 0; + return typeof str === 'string' ? str.replace(re, '') : str; +}; + +colors.none = colors.clear = colors.noop = str => str; // no-op, for programmatic usage +colors.stripColor = colors.unstyle; +colors.symbols = require('./symbols'); +colors.define = define; +module.exports = colors; diff --git a/node_modules/ansi-colors/package.json b/node_modules/ansi-colors/package.json new file mode 100644 index 0000000..ea2e441 --- /dev/null +++ b/node_modules/ansi-colors/package.json @@ -0,0 +1,152 @@ +{ + "_from": "ansi-colors@^3.2.1", + "_id": "ansi-colors@3.2.4", + "_inBundle": false, + "_integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "_location": "/ansi-colors", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-colors@^3.2.1", + "name": "ansi-colors", + "escapedName": "ansi-colors", + "rawSpec": "^3.2.1", + "saveSpec": null, + "fetchSpec": "^3.2.1" + }, + "_requiredBy": [ + "/enquirer" + ], + "_resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "_shasum": "e3a3da4bfbae6c86a9c285625de124a234026fbf", + "_spec": "ansi-colors@^3.2.1", + "_where": "/Users/mgolebiowski/projects/public/jquery/jquery-release/node_modules/enquirer", + "author": { + "name": "Brian Woodward", + "url": "https://github.com/doowb" + }, + "bugs": { + "url": "https://github.com/doowb/ansi-colors/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jason Schilling", + "url": "https://sourecode.de" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Jordan", + "url": "https://github.com/Silic0nS0ldier" + } + ], + "deprecated": false, + "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", + "devDependencies": { + "decache": "^4.4.0", + "gulp-format-md": "^1.0.0", + "justified": "^1.0.1", + "mocha": "^5.2.0", + "text-table": "^0.2.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "symbols.js", + "types/index.d.ts" + ], + "homepage": "https://github.com/doowb/ansi-colors", + "keywords": [ + "ansi", + "bgblack", + "bgBlack", + "bgblue", + "bgBlue", + "bgcyan", + "bgCyan", + "bggreen", + "bgGreen", + "bgmagenta", + "bgMagenta", + "bgred", + "bgRed", + "bgwhite", + "bgWhite", + "bgyellow", + "bgYellow", + "black", + "blue", + "bold", + "clorox", + "colors", + "cyan", + "dim", + "gray", + "green", + "grey", + "hidden", + "inverse", + "italic", + "kleur", + "magenta", + "red", + "reset", + "strikethrough", + "underline", + "white", + "yellow" + ], + "license": "MIT", + "main": "index.js", + "name": "ansi-colors", + "repository": { + "type": "git", + "url": "git+https://github.com/doowb/ansi-colors.git" + }, + "scripts": { + "test": "mocha" + }, + "types": "./types/index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "data": { + "author": { + "linkedin": "woodwardbrian", + "twitter": "doowb" + } + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "ansi-wrap", + "strip-color" + ] + }, + "reflinks": [ + "chalk", + "colorette", + "colors", + "kleur" + ] + }, + "version": "3.2.4" +} diff --git a/node_modules/ansi-colors/symbols.js b/node_modules/ansi-colors/symbols.js new file mode 100644 index 0000000..9643d8d --- /dev/null +++ b/node_modules/ansi-colors/symbols.js @@ -0,0 +1,46 @@ +'use strict'; + +const isWindows = process.platform === 'win32'; +const isLinux = process.platform === 'linux'; + +const windows = { + bullet: '•', + check: '√', + cross: '×', + ellipsis: '...', + heart: '❤', + info: 'i', + line: '─', + middot: '·', + minus: '-', + plus: '+', + question: '?', + questionSmall: '﹖', + pointer: '>', + pointerSmall: '»', + warning: '‼' +}; + +const other = { + ballotCross: '✘', + bullet: '•', + check: '✔', + cross: '✖', + ellipsis: '…', + heart: '❤', + info: 'ℹ', + line: '─', + middot: '·', + minus: '-', + plus: '+', + question: '?', + questionFull: '?', + questionSmall: '﹖', + pointer: isLinux ? '▸' : '❯', + pointerSmall: isLinux ? '‣' : '›', + warning: '⚠' +}; + +module.exports = isWindows ? windows : other; +Reflect.defineProperty(module.exports, 'windows', { enumerable: false, value: windows }); +Reflect.defineProperty(module.exports, 'other', { enumerable: false, value: other }); diff --git a/node_modules/ansi-colors/types/index.d.ts b/node_modules/ansi-colors/types/index.d.ts new file mode 100644 index 0000000..ca2d24a --- /dev/null +++ b/node_modules/ansi-colors/types/index.d.ts @@ -0,0 +1,161 @@ +// Imported from DefinitelyTyped project. +// TypeScript definitions for ansi-colors +// Definitions by: Rogier Schouten +// Integrated by: Jordan Mele + +interface SymbolsType { + check: string; + cross: string; + info: string; + line: string; + pointer: string; + pointerSmall: string; + question: string; + warning: string; +} + +type StyleArrayStructure = [number, number]; +interface StyleArrayProperties { + open: string; + close: string; + closeRe: string; +} + +type StyleType = StyleArrayStructure & StyleArrayProperties; + +export interface StyleFunction extends StylesType { + (s: string): string; +} + +interface StylesType { + // modifiers + reset: T; + bold: T; + dim: T; + italic: T; + underline: T; + inverse: T; + hidden: T; + strikethrough: T; + + // colors + black: T; + red: T; + green: T; + yellow: T; + blue: T; + magenta: T; + cyan: T; + white: T; + gray: T; + grey: T; + + // bright colors + blackBright: T; + redBright: T; + greenBright: T; + yellowBright: T; + blueBright: T; + magentaBright: T; + cyanBright: T; + whiteBright: T; + + // background colors + bgBlack: T; + bgRed: T; + bgGreen: T; + bgYellow: T; + bgBlue: T; + bgMagenta: T; + bgCyan: T; + bgWhite: T; + + // bright background colors + bgBlackBright: T; + bgRedBright: T; + bgGreenBright: T; + bgYellowBright: T; + bgBlueBright: T; + bgMagentaBright: T; + bgCyanBright: T; + bgWhiteBright: T; +} + +// modifiers +export const reset: StyleFunction; +export const bold: StyleFunction; +export const dim: StyleFunction; +export const italic: StyleFunction; +export const underline: StyleFunction; +export const inverse: StyleFunction; +export const hidden: StyleFunction; +export const strikethrough: StyleFunction; + +// colors +export const black: StyleFunction; +export const red: StyleFunction; +export const green: StyleFunction; +export const yellow: StyleFunction; +export const blue: StyleFunction; +export const magenta: StyleFunction; +export const cyan: StyleFunction; +export const white: StyleFunction; +export const gray: StyleFunction; +export const grey: StyleFunction; + +// bright colors +export const blackBright: StyleFunction; +export const redBright: StyleFunction; +export const greenBright: StyleFunction; +export const yellowBright: StyleFunction; +export const blueBright: StyleFunction; +export const magentaBright: StyleFunction; +export const cyanBright: StyleFunction; +export const whiteBright: StyleFunction; + +// background colors +export const bgBlack: StyleFunction; +export const bgRed: StyleFunction; +export const bgGreen: StyleFunction; +export const bgYellow: StyleFunction; +export const bgBlue: StyleFunction; +export const bgMagenta: StyleFunction; +export const bgCyan: StyleFunction; +export const bgWhite: StyleFunction; + +// bright background colors +export const bgBlackBright: StyleFunction; +export const bgRedBright: StyleFunction; +export const bgGreenBright: StyleFunction; +export const bgYellowBright: StyleFunction; +export const bgBlueBright: StyleFunction; +export const bgMagentaBright: StyleFunction; +export const bgCyanBright: StyleFunction; +export const bgWhiteBright: StyleFunction; + +export let enabled: boolean; +export let visible: boolean; +export const ansiRegex: RegExp; + +/** + * Remove styles from string + */ +export function stripColor(s: string): string; + +/** + * Remove styles from string + */ +export function strip(s: string): string; + +/** + * Remove styles from string + */ +export function unstyle(s: string): string; + +export const styles: StylesType; +export const symbols: SymbolsType; + +/** + * Outputs a string with check-symbol as prefix + */ +export function ok(...args: string[]): string; diff --git a/node_modules/enquirer/CHANGELOG.md b/node_modules/enquirer/CHANGELOG.md new file mode 100644 index 0000000..b885bd6 --- /dev/null +++ b/node_modules/enquirer/CHANGELOG.md @@ -0,0 +1,121 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## 2.3.3 - 2020-01-13 + +### Added + +- `BooleanPrompt` new example for `header` option. + +### Fixed + +- using `await` in `keypress` and returning the `number` result in the `array` type fixes an issue with tests failing only on Travis +- `autocomplete` highlighting issue +- Typos in some documentation and example comments. +- Syntax errors in example code on the README.md. + +## 2.3.4 - 2020-01-13 + +### Added + +- `MultiSelectPrompt` new example for `result` option. + +### Fixed + +- Updated typings to use `EventEmitter` class from `events` directly due to changes in `@types/node`. + +## 2.3.2 - 2019-09-17 + +### Added + +- `AuthPrompt` type for creating authentication based prompts. +- `BasicAuth` prompt as an example of creating an authentication prompt using basic username/password authentication +- Examples for different authentication prompts. +- `QuizPrompt` + +### Fixed + +- More examples were updated to fix any known bugs. +- Couple of fixes to the editable and autocomplete prompts. +- Documentation updates to highlight options available to some prompts. + +## 2.3.1 - 2019-07-12 + +### Fixed + +- Several examples were updated to align with latest code changes and to fix small bugs found in the implementation of the example. +- Some bugs found from updating examples were fixed. +- Updates to documentation to provide more information on how to use prompts and the options available. + +## 2.1.0 - 2018-11-29 + +### Fixed + +- Several improvements were made for handling custom `format`, `result` and `initial` functions defined on the options. + +## 2.0.7 - 2018-11-14 + +### Fixed + +- `validate` function now properly accepts `false` as a return value, thanks to [@g-plane](https://github.com/g-plane). + +### Added + +- Adds support for ctrl+n to add choices +- Adds support for `options.required` on all prompts. Uses the built-in `validate()` function, allowing this functionality to be overridden or customized. +- Adds support for `options.scroll` to disable scrolling in array prompts. +- Adds support for `options.onRun`, which is called when `prompt.run()` is called, after the readline instance is created. +- Adds support for `options.history` on the `Input` and `Text` prompts. +- Adds support for `options.term` to set the terminal, thanks to [@tunnckoCore](https://github.com/tunnckoCore). At the moment this is only used in a couple of edge cases with the `Survey` and `Scale` prompts to check if the terminal is Hyper. +- `options.skip` may now be a Boolean, thanks to [@tunnckoCore](https://github.com/tunnckoCore) + +## 2.0.0 - 2018-11-07 + +### Changed + +Enquire 2.0 is a bottom-up complete re-write: + +- Several prompts that were previously published as individual packages will be included in Enquirer itself. +- Why? - As users, we didn't like having to add commonly-used prompts as plugins. Enquirer 2.0 will still support custom prompts as plugins, but many prompts will also be built-in. +- Enquirer will only have a single dependency, https://github.com/doowb/ansi-colors, which itself has no other dependencies). This will make Enquirer easier to maintain and faster for users. +- Methods for registering "questions" have been removed. While it was nice to be able to preregister questions that could be called upon later, this is something that is better left to implementors, as it's relatively trivial to do with custom code. +- `options.default` is now `options.initial` + +### Added + +- Many prompts that were previously separate packages are now bundled into Enquirer itself. + + +[Unreleased]: https://github.com/enquirer/enquirer/compare/2.0.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/enquirer/LICENSE b/node_modules/enquirer/LICENSE new file mode 100644 index 0000000..681d1bf --- /dev/null +++ b/node_modules/enquirer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/enquirer/README.md b/node_modules/enquirer/README.md new file mode 100644 index 0000000..7909711 --- /dev/null +++ b/node_modules/enquirer/README.md @@ -0,0 +1,1747 @@ +

Enquirer

+ +

+ +version + + +travis + + +downloads + +

+ +
+
+ +

+Stylish CLI prompts that are user-friendly, intuitive and easy to create.
+>_ Prompts should be more like conversations than inquisitions▌ +

+ +
+ +

+(Example shows Enquirer's Survey Prompt) +Enquirer Survey Prompt
+The terminal in all examples is Hyper, theme is hyper-monokai-extended.

+See more prompt examples +

+ +
+
+ +Created by [jonschlinkert](https://github.com/jonschlinkert) and [doowb](https://github.com/doowb), Enquirer is fast, easy to use, and lightweight enough for small projects, while also being powerful and customizable enough for the most advanced use cases. + +* **Fast** - [Loads in ~4ms](#-performance) (that's about _3-4 times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps_) +* **Lightweight** - Only one dependency, the excellent [ansi-colors](https://github.com/doowb/ansi-colors) by [Brian Woodward](https://github.com/doowb). +* **Easy to implement** - Uses promises and async/await and sensible defaults to make prompts easy to create and implement. +* **Easy to use** - Thrill your users with a better experience! Navigating around input and choices is a breeze. You can even create [quizzes](examples/fun/countdown.js), or [record](examples/fun/record.js) and [playback](examples/fun/play.js) key bindings to aid with tutorials and videos. +* **Intuitive** - Keypress combos are available to simplify usage. +* **Flexible** - All prompts can be used standalone or chained together. +* **Stylish** - Easily override semantic styles and symbols for any part of the prompt. +* **Extensible** - Easily create and use custom prompts by extending Enquirer's built-in [prompts](#-prompts). +* **Pluggable** - Add advanced features to Enquirer using plugins. +* **Validation** - Optionally validate user input with any prompt. +* **Well tested** - All prompts are well-tested, and tests are easy to create without having to use brittle, hacky solutions to spy on prompts or "inject" values. +* **Examples** - There are numerous [examples](examples) available to help you get started. + +If you like Enquirer, please consider starring or tweeting about this project to show your support. Thanks! + +
+ +

+>_ Ready to start making prompts your users will love? ▌
+Enquirer Select Prompt with heartbeat example +

+ +
+
+ +## ❯ Getting started + +Get started with Enquirer, the most powerful and easy-to-use Node.js library for creating interactive CLI prompts. + +* [Install](#-install) +* [Usage](#-usage) +* [Enquirer](#-enquirer) +* [Prompts](#-prompts) + - [Built-in Prompts](#-prompts) + - [Custom Prompts](#-custom-prompts) +* [Key Bindings](#-key-bindings) +* [Options](#-options) +* [Release History](#-release-history) +* [Performance](#-performance) +* [About](#-about) + +
+ +## ❯ Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install enquirer --save +``` +Install with [yarn](https://yarnpkg.com/en/): + +```sh +$ yarn add enquirer +``` + +

+Install Enquirer with NPM +

+ +_(Requires Node.js 8.6 or higher. Please let us know if you need support for an earlier version by creating an [issue](../../issues/new).)_ + +
+ +## ❯ Usage + +### Single prompt + +The easiest way to get started with enquirer is to pass a [question object](#prompt-options) to the `prompt` method. + +```js +const { prompt } = require('enquirer'); + +const response = await prompt({ + type: 'input', + name: 'username', + message: 'What is your username?' +}); + +console.log(response); // { username: 'jonschlinkert' } +``` + +_(Examples with `await` need to be run inside an `async` function)_ + +### Multiple prompts + +Pass an array of ["question" objects](#prompt-options) to run a series of prompts. + +```js +const response = await prompt([ + { + type: 'input', + name: 'name', + message: 'What is your name?' + }, + { + type: 'input', + name: 'username', + message: 'What is your username?' + } +]); + +console.log(response); // { name: 'Edward Chan', username: 'edwardmchan' } +``` + +### Different ways to run enquirer + +#### 1. By importing the specific `built-in prompt` + +```js +const { Confirm } = require('enquirer'); + +const prompt = new Confirm({ + name: 'question', + message: 'Did you like enquirer?' +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)); +``` + +#### 2. By passing the options to `prompt` + +```js +const { prompt } = require('enquirer'); + +prompt({ + type: 'confirm', + name: 'question', + message: 'Did you like enquirer?' +}) + .then(answer => console.log('Answer:', answer)); +``` + +**Jump to**: [Getting Started](#-getting-started) · [Prompts](#-prompts) · [Options](#-options) · [Key Bindings](#-key-bindings) + +
+ +## ❯ Enquirer + +**Enquirer is a prompt runner** + +Add Enquirer to your JavaScript project with following line of code. + +```js +const Enquirer = require('enquirer'); +``` + +The main export of this library is the `Enquirer` class, which has methods and features designed to simplify running prompts. + +```js +const { prompt } = require('enquirer'); +const question = [ + { + type: 'input', + name: 'username', + message: 'What is your username?' + }, + { + type: 'password', + name: 'password', + message: 'What is your password?' + } +]; + +let answers = await prompt(question); +console.log(answers); +``` + +**Prompts control how values are rendered and returned** + +Each individual prompt is a class with special features and functionality for rendering the types of values you want to show users in the terminal, and subsequently returning the types of values you need to use in your application. + +**How can I customize prompts?** + +Below in this guide you will find information about creating [custom prompts](#-custom-prompts). For now, we'll focus on how to customize an existing prompt. + +All of the individual [prompt classes](#built-in-prompts) in this library are exposed as static properties on Enquirer. This allows them to be used directly without using `enquirer.prompt()`. + +Use this approach if you need to modify a prompt instance, or listen for events on the prompt. + +**Example** + +```js +const { Input } = require('enquirer'); +const prompt = new Input({ + name: 'username', + message: 'What is your username?' +}); + +prompt.run() + .then(answer => console.log('Username:', answer)) + .catch(console.error); +``` + +### [Enquirer](index.js#L20) + +Create an instance of `Enquirer`. + +**Params** + +* `options` **{Object}**: (optional) Options to use with all prompts. +* `answers` **{Object}**: (optional) Answers object to initialize with. + +**Example** + +```js +const Enquirer = require('enquirer'); +const enquirer = new Enquirer(); +``` + +### [register()](index.js#L42) + +Register a custom prompt type. + +**Params** + +* `type` **{String}** +* `fn` **{Function|Prompt}**: `Prompt` class, or a function that returns a `Prompt` class. +* `returns` **{Object}**: Returns the Enquirer instance + +**Example** + +```js +const Enquirer = require('enquirer'); +const enquirer = new Enquirer(); +enquirer.register('customType', require('./custom-prompt')); +``` + +### [prompt()](index.js#L78) + +Prompt function that takes a "question" object or array of question objects, and returns an object with responses from the user. + +**Params** + +* `questions` **{Array|Object}**: Options objects for one or more prompts to run. +* `returns` **{Promise}**: Promise that returns an "answers" object with the user's responses. + +**Example** + +```js +const Enquirer = require('enquirer'); +const enquirer = new Enquirer(); + +const response = await enquirer.prompt({ + type: 'input', + name: 'username', + message: 'What is your username?' +}); +console.log(response); +``` + +### [use()](index.js#L160) + +Use an enquirer plugin. + +**Params** + +* `plugin` **{Function}**: Plugin function that takes an instance of Enquirer. +* `returns` **{Object}**: Returns the Enquirer instance. + +**Example** + +```js +const Enquirer = require('enquirer'); +const enquirer = new Enquirer(); +const plugin = enquirer => { + // do stuff to enquire instance +}; +enquirer.use(plugin); +``` + +### [Enquirer#prompt](index.js#L210) + +Prompt function that takes a "question" object or array of question objects, and returns an object with responses from the user. + +**Params** + +* `questions` **{Array|Object}**: Options objects for one or more prompts to run. +* `returns` **{Promise}**: Promise that returns an "answers" object with the user's responses. + +**Example** + +```js +const { prompt } = require('enquirer'); +const response = await prompt({ + type: 'input', + name: 'username', + message: 'What is your username?' +}); +console.log(response); +``` + +
+ +## ❯ Prompts + +This section is about Enquirer's prompts: what they look like, how they work, how to run them, available options, and how to customize the prompts or create your own prompt concept. + +**Getting started with Enquirer's prompts** + +* [Prompt](#prompt) - The base `Prompt` class used by other prompts + - [Prompt Options](#prompt-options) +* [Built-in prompts](#built-in-prompts) +* [Prompt Types](#prompt-types) - The base `Prompt` class used by other prompts +* [Custom prompts](#%E2%9D%AF-custom-prompts) - Enquirer 2.0 introduced the concept of prompt "types", with the goal of making custom prompts easier than ever to create and use. + +### Prompt + +The base `Prompt` class is used to create all other prompts. + +```js +const { Prompt } = require('enquirer'); +class MyCustomPrompt extends Prompt {} +``` + +See the documentation for [creating custom prompts](#-custom-prompts) to learn more about how this works. + +#### Prompt Options + +Each prompt takes an options object (aka "question" object), that implements the following interface: + +```js +{ + // required + type: string | function, + name: string | function, + message: string | function | async function, + + // optional + skip: boolean | function | async function, + initial: string | function | async function, + format: function | async function, + result: function | async function, + validate: function | async function, +} +``` +Each property of the options object is described below: + +| **Property** | **Required?** | **Type** | **Description** | +| ------------ | ------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | yes | `string\|function` | Enquirer uses this value to determine the type of prompt to run, but it's optional when prompts are run directly. | +| `name` | yes | `string\|function` | Used as the key for the answer on the returned values (answers) object. | +| `message` | yes | `string\|function` | The message to display when the prompt is rendered in the terminal. | +| `skip` | no | `boolean\|function` | If `true` it will not ask that prompt. | +| `initial` | no | `string\|function` | The default value to return if the user does not supply a value. | +| `format` | no | `function` | Function to format user input in the terminal. | +| `result` | no | `function` | Function to format the final submitted value before it's returned. | +| `validate` | no | `function` | Function to validate the submitted value before it's returned. This function may return a boolean or a string. If a string is returned it will be used as the validation error message. | + +**Example usage** + +```js +const { prompt } = require('enquirer'); + +const question = { + type: 'input', + name: 'username', + message: 'What is your username?' +}; + +prompt(question) + .then(answer => console.log('Answer:', answer)) + .catch(console.error); +``` + +
+ +### Built-in prompts + +* [AutoComplete Prompt](#autocomplete-prompt) +* [BasicAuth Prompt](#basicauth-prompt) +* [Confirm Prompt](#confirm-prompt) +* [Form Prompt](#form-prompt) +* [Input Prompt](#input-prompt) +* [Invisible Prompt](#invisible-prompt) +* [List Prompt](#list-prompt) +* [MultiSelect Prompt](#multiselect-prompt) +* [Numeral Prompt](#numeral-prompt) +* [Password Prompt](#password-prompt) +* [Quiz Prompt](#quiz-prompt) +* [Survey Prompt](#survey-prompt) +* [Scale Prompt](#scale-prompt) +* [Select Prompt](#select-prompt) +* [Sort Prompt](#sort-prompt) +* [Snippet Prompt](#snippet-prompt) +* [Toggle Prompt](#toggle-prompt) + +### AutoComplete Prompt + +Prompt that auto-completes as the user types, and returns the selected value as a string. + +

+Enquirer AutoComplete Prompt +

+ +**Example Usage** + +```js +const { AutoComplete } = require('enquirer'); + +const prompt = new AutoComplete({ + name: 'flavor', + message: 'Pick your favorite flavor', + limit: 10, + choices: [ + 'Almond', + 'Apple', + 'Banana', + 'Blackberry', + 'Blueberry', + 'Cherry', + 'Chocolate', + 'Cinnamon', + 'Coconut', + 'Cranberry', + 'Grape', + 'Nougat', + 'Orange', + 'Pear', + 'Pineapple', + 'Raspberry', + 'Strawberry', + 'Vanilla', + 'Watermelon', + 'Wintergreen' + ] +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); +``` + +**AutoComplete Options** + +| Option | Type | Default | Description | +| ----------- | ---------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | +| `highlight` | `function` | `dim` version of primary style | The color to use when "highlighting" characters in the list that match user input. | +| `multiple` | `boolean` | `false` | Allow multiple choices to be selected. | +| `suggest` | `function` | Greedy match, returns true if choice message contains input string. | Function that filters choices. Takes user input and a choices array, and returns a list of matching choices. | +| `footer` | `function` | None | Function that displays [footer text](https://github.com/enquirer/enquirer/blob/6c2819518a1e2ed284242a99a685655fbaabfa28/examples/autocomplete/option-footer.js#L10) | + +**Related prompts** + +* [Select](#select-prompt) +* [MultiSelect](#multiselect-prompt) +* [Survey](#survey-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### BasicAuth Prompt + +Prompt that asks for username and password to authenticate the user. The default implementation of `authenticate` function in `BasicAuth` prompt is to compare the username and password with the values supplied while running the prompt. The implementer is expected to override the `authenticate` function with a custom logic such as making an API request to a server to authenticate the username and password entered and expect a token back. + +

+Enquirer BasicAuth Prompt +

+ +**Example Usage** + +```js +const { BasicAuth } = require('enquirer'); + + const prompt = new BasicAuth({ + name: 'password', + message: 'Please enter your password', + username: 'rajat-sr', + password: '123', + showPassword: true +}); + + prompt + .run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); +``` + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Confirm Prompt + +Prompt that returns `true` or `false`. + +

+Enquirer Confirm Prompt +

+ +**Example Usage** + +```js +const { Confirm } = require('enquirer'); + +const prompt = new Confirm({ + name: 'question', + message: 'Want to answer?' +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); +``` + +**Related prompts** + +* [Input](#input-prompt) +* [Numeral](#numeral-prompt) +* [Password](#password-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Form Prompt + +Prompt that allows the user to enter and submit multiple values on a single terminal screen. + +

+Enquirer Form Prompt +

+ +**Example Usage** + +```js +const { Form } = require('enquirer'); + +const prompt = new Form({ + name: 'user', + message: 'Please provide the following information:', + choices: [ + { name: 'firstname', message: 'First Name', initial: 'Jon' }, + { name: 'lastname', message: 'Last Name', initial: 'Schlinkert' }, + { name: 'username', message: 'GitHub username', initial: 'jonschlinkert' } + ] +}); + +prompt.run() + .then(value => console.log('Answer:', value)) + .catch(console.error); +``` + +**Related prompts** + +* [Input](#input-prompt) +* [Survey](#survey-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Input Prompt + +Prompt that takes user input and returns a string. + +

+Enquirer Input Prompt +

+ +**Example Usage** + +```js +const { Input } = require('enquirer'); +const prompt = new Input({ + message: 'What is your username?', + initial: 'jonschlinkert' +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.log); +``` + +You can use [data-store](https://github.com/jonschlinkert/data-store) to store [input history](https://github.com/enquirer/enquirer/blob/master/examples/input/option-history.js) that the user can cycle through (see [source](https://github.com/enquirer/enquirer/blob/8407dc3579123df5e6e20215078e33bb605b0c37/lib/prompts/input.js)). + +**Related prompts** + +* [Confirm](#confirm-prompt) +* [Numeral](#numeral-prompt) +* [Password](#password-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Invisible Prompt + +Prompt that takes user input, hides it from the terminal, and returns a string. + +

+Enquirer Invisible Prompt +

+ +**Example Usage** + +```js +const { Invisible } = require('enquirer'); +const prompt = new Invisible({ + name: 'secret', + message: 'What is your secret?' +}); + +prompt.run() + .then(answer => console.log('Answer:', { secret: answer })) + .catch(console.error); +``` + +**Related prompts** + +* [Password](#password-prompt) +* [Input](#input-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### List Prompt + +Prompt that returns a list of values, created by splitting the user input. The default split character is `,` with optional trailing whitespace. + +

+Enquirer List Prompt +

+ +**Example Usage** + +```js +const { List } = require('enquirer'); +const prompt = new List({ + name: 'keywords', + message: 'Type comma-separated keywords' +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); +``` + +**Related prompts** + +* [Sort](#sort-prompt) +* [Select](#select-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### MultiSelect Prompt + +Prompt that allows the user to select multiple items from a list of options. + +

+Enquirer MultiSelect Prompt +

+ +**Example Usage** + +```js +const { MultiSelect } = require('enquirer'); + +const prompt = new MultiSelect({ + name: 'value', + message: 'Pick your favorite colors', + limit: 7, + choices: [ + { name: 'aqua', value: '#00ffff' }, + { name: 'black', value: '#000000' }, + { name: 'blue', value: '#0000ff' }, + { name: 'fuchsia', value: '#ff00ff' }, + { name: 'gray', value: '#808080' }, + { name: 'green', value: '#008000' }, + { name: 'lime', value: '#00ff00' }, + { name: 'maroon', value: '#800000' }, + { name: 'navy', value: '#000080' }, + { name: 'olive', value: '#808000' }, + { name: 'purple', value: '#800080' }, + { name: 'red', value: '#ff0000' }, + { name: 'silver', value: '#c0c0c0' }, + { name: 'teal', value: '#008080' }, + { name: 'white', value: '#ffffff' }, + { name: 'yellow', value: '#ffff00' } + ] +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); + +// Answer: ['aqua', 'blue', 'fuchsia'] +``` + +**Example key-value pairs** + +Optionally, pass a `result` function and use the `.map` method to return an object of key-value pairs of the selected names and values: [example](./examples/multiselect/option-result.js) + +```js +const { MultiSelect } = require('enquirer'); + +const prompt = new MultiSelect({ + name: 'value', + message: 'Pick your favorite colors', + limit: 7, + choices: [ + { name: 'aqua', value: '#00ffff' }, + { name: 'black', value: '#000000' }, + { name: 'blue', value: '#0000ff' }, + { name: 'fuchsia', value: '#ff00ff' }, + { name: 'gray', value: '#808080' }, + { name: 'green', value: '#008000' }, + { name: 'lime', value: '#00ff00' }, + { name: 'maroon', value: '#800000' }, + { name: 'navy', value: '#000080' }, + { name: 'olive', value: '#808000' }, + { name: 'purple', value: '#800080' }, + { name: 'red', value: '#ff0000' }, + { name: 'silver', value: '#c0c0c0' }, + { name: 'teal', value: '#008080' }, + { name: 'white', value: '#ffffff' }, + { name: 'yellow', value: '#ffff00' } + ], + result(names) { + return this.map(names); + } +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); + +// Answer: { aqua: '#00ffff', blue: '#0000ff', fuchsia: '#ff00ff' } +``` + +**Related prompts** + +* [AutoComplete](#autocomplete-prompt) +* [Select](#select-prompt) +* [Survey](#survey-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Numeral Prompt + +Prompt that takes a number as input. + +

+Enquirer Numeral Prompt +

+ +**Example Usage** + +```js +const { NumberPrompt } = require('enquirer'); + +const prompt = new NumberPrompt({ + name: 'number', + message: 'Please enter a number' +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); +``` + +**Related prompts** + +* [Input](#input-prompt) +* [Confirm](#confirm-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Password Prompt + +Prompt that takes user input and masks it in the terminal. Also see the [invisible prompt](#invisible-prompt) + +

+Enquirer Password Prompt +

+ +**Example Usage** + +```js +const { Password } = require('enquirer'); + +const prompt = new Password({ + name: 'password', + message: 'What is your password?' +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); +``` + +**Related prompts** + +* [Input](#input-prompt) +* [Invisible](#invisible-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Quiz Prompt + +Prompt that allows the user to play multiple-choice quiz questions. + +

+Enquirer Quiz Prompt +

+ +**Example Usage** + +```js +const { Quiz } = require('enquirer'); + + const prompt = new Quiz({ + name: 'countries', + message: 'How many countries are there in the world?', + choices: ['165', '175', '185', '195', '205'], + correctChoice: 3 +}); + + prompt + .run() + .then(answer => { + if (answer.correct) { + console.log('Correct!'); + } else { + console.log(`Wrong! Correct answer is ${answer.correctAnswer}`); + } + }) + .catch(console.error); +``` + +**Quiz Options** + +| Option | Type | Required | Description | +| ----------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------ | +| `choices` | `array` | Yes | The list of possible answers to the quiz question. | +| `correctChoice`| `number` | Yes | Index of the correct choice from the `choices` array. | + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Survey Prompt + +Prompt that allows the user to provide feedback for a list of questions. + +

+Enquirer Survey Prompt +

+ +**Example Usage** + +```js +const { Survey } = require('enquirer'); + +const prompt = new Survey({ + name: 'experience', + message: 'Please rate your experience', + scale: [ + { name: '1', message: 'Strongly Disagree' }, + { name: '2', message: 'Disagree' }, + { name: '3', message: 'Neutral' }, + { name: '4', message: 'Agree' }, + { name: '5', message: 'Strongly Agree' } + ], + margin: [0, 0, 2, 1], + choices: [ + { + name: 'interface', + message: 'The website has a friendly interface.' + }, + { + name: 'navigation', + message: 'The website is easy to navigate.' + }, + { + name: 'images', + message: 'The website usually has good images.' + }, + { + name: 'upload', + message: 'The website makes it easy to upload images.' + }, + { + name: 'colors', + message: 'The website has a pleasing color palette.' + } + ] +}); + +prompt.run() + .then(value => console.log('ANSWERS:', value)) + .catch(console.error); +``` + +**Related prompts** + +* [Scale](#scale-prompt) +* [Snippet](#snippet-prompt) +* [Select](#select-prompt) + +*** + +### Scale Prompt + +A more compact version of the [Survey prompt](#survey-prompt), the Scale prompt allows the user to quickly provide feedback using a [Likert Scale](https://en.wikipedia.org/wiki/Likert_scale). + +

+Enquirer Scale Prompt +

+ +**Example Usage** + +```js +const { Scale } = require('enquirer'); +const prompt = new Scale({ + name: 'experience', + message: 'Please rate your experience', + scale: [ + { name: '1', message: 'Strongly Disagree' }, + { name: '2', message: 'Disagree' }, + { name: '3', message: 'Neutral' }, + { name: '4', message: 'Agree' }, + { name: '5', message: 'Strongly Agree' } + ], + margin: [0, 0, 2, 1], + choices: [ + { + name: 'interface', + message: 'The website has a friendly interface.', + initial: 2 + }, + { + name: 'navigation', + message: 'The website is easy to navigate.', + initial: 2 + }, + { + name: 'images', + message: 'The website usually has good images.', + initial: 2 + }, + { + name: 'upload', + message: 'The website makes it easy to upload images.', + initial: 2 + }, + { + name: 'colors', + message: 'The website has a pleasing color palette.', + initial: 2 + } + ] +}); + +prompt.run() + .then(value => console.log('ANSWERS:', value)) + .catch(console.error); +``` + +**Related prompts** + +* [AutoComplete](#autocomplete-prompt) +* [Select](#select-prompt) +* [Survey](#survey-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Select Prompt + +Prompt that allows the user to select from a list of options. + +

+Enquirer Select Prompt +

+ +**Example Usage** + +```js +const { Select } = require('enquirer'); + +const prompt = new Select({ + name: 'color', + message: 'Pick a flavor', + choices: ['apple', 'grape', 'watermelon', 'cherry', 'orange'] +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); +``` + +**Related prompts** + +* [AutoComplete](#autocomplete-prompt) +* [MultiSelect](#multiselect-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Sort Prompt + +Prompt that allows the user to sort items in a list. + +**Example** + +In this [example](https://github.com/enquirer/enquirer/raw/master/examples/sort/prompt.js), custom styling is applied to the returned values to make it easier to see what's happening. + +

+Enquirer Sort Prompt +

+ +**Example Usage** + +```js +const colors = require('ansi-colors'); +const { Sort } = require('enquirer'); +const prompt = new Sort({ + name: 'colors', + message: 'Sort the colors in order of preference', + hint: 'Top is best, bottom is worst', + numbered: true, + choices: ['red', 'white', 'green', 'cyan', 'yellow'].map(n => ({ + name: n, + message: colors[n](n) + })) +}); + +prompt.run() + .then(function(answer = []) { + console.log(answer); + console.log('Your preferred order of colors is:'); + console.log(answer.map(key => colors[key](key)).join('\n')); + }) + .catch(console.error); +``` + +**Related prompts** + +* [List](#list-prompt) +* [Select](#select-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Snippet Prompt + +Prompt that allows the user to replace placeholders in a snippet of code or text. + +

+Prompts +

+ +**Example Usage** + +```js +const semver = require('semver'); +const { Snippet } = require('enquirer'); +const prompt = new Snippet({ + name: 'username', + message: 'Fill out the fields in package.json', + required: true, + fields: [ + { + name: 'author_name', + message: 'Author Name' + }, + { + name: 'version', + validate(value, state, item, index) { + if (item && item.name === 'version' && !semver.valid(value)) { + return prompt.styles.danger('version should be a valid semver value'); + } + return true; + } + } + ], + template: `{ + "name": "\${name}", + "description": "\${description}", + "version": "\${version}", + "homepage": "https://github.com/\${username}/\${name}", + "author": "\${author_name} (https://github.com/\${username})", + "repository": "\${username}/\${name}", + "license": "\${license:ISC}" +} +` +}); + +prompt.run() + .then(answer => console.log('Answer:', answer.result)) + .catch(console.error); +``` + +**Related prompts** + +* [Survey](#survey-prompt) +* [AutoComplete](#autocomplete-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Toggle Prompt + +Prompt that allows the user to toggle between two values then returns `true` or `false`. + +

+Enquirer Toggle Prompt +

+ +**Example Usage** + +```js +const { Toggle } = require('enquirer'); + +const prompt = new Toggle({ + message: 'Want to answer?', + enabled: 'Yep', + disabled: 'Nope' +}); + +prompt.run() + .then(answer => console.log('Answer:', answer)) + .catch(console.error); +``` + +**Related prompts** + +* [Confirm](#confirm-prompt) +* [Input](#input-prompt) +* [Sort](#sort-prompt) + +**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) + +*** + +### Prompt Types + +There are 5 (soon to be 6!) type classes: + +* [ArrayPrompt](#arrayprompt) + - [Options](#options) + - [Properties](#properties) + - [Methods](#methods) + - [Choices](#choices) + - [Defining choices](#defining-choices) + - [Choice properties](#choice-properties) + - [Related prompts](#related-prompts) +* [AuthPrompt](#authprompt) +* [BooleanPrompt](#booleanprompt) +* DatePrompt (Coming Soon!) +* [NumberPrompt](#numberprompt) +* [StringPrompt](#stringprompt) + +Each type is a low-level class that may be used as a starting point for creating higher level prompts. Continue reading to learn how. + +### ArrayPrompt + +The `ArrayPrompt` class is used for creating prompts that display a list of choices in the terminal. For example, Enquirer uses this class as the basis for the [Select](#select) and [Survey](#survey) prompts. + +#### Options + +In addition to the [options](#options) available to all prompts, Array prompts also support the following options. + +| **Option** | **Required?** | **Type** | **Description** | +| ----------- | ------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `autofocus` | `no` | `string\|number` | The index or name of the choice that should have focus when the prompt loads. Only one choice may have focus at a time. | | +| `stdin` | `no` | `stream` | The input stream to use for emitting keypress events. Defaults to `process.stdin`. | +| `stdout` | `no` | `stream` | The output stream to use for writing the prompt to the terminal. Defaults to `process.stdout`. | +| | + +#### Properties + +Array prompts have the following instance properties and getters. + +| **Property name** | **Type** | **Description** | +| ----------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `choices` | `array` | Array of choices that have been normalized from choices passed on the prompt options. | +| `cursor` | `number` | Position of the cursor relative to the _user input (string)_. | +| `enabled` | `array` | Returns an array of enabled choices. | +| `focused` | `array` | Returns the currently selected choice in the visible list of choices. This is similar to the concept of focus in HTML and CSS. Focused choices are always visible (on-screen). When a list of choices is longer than the list of visible choices, and an off-screen choice is _focused_, the list will scroll to the focused choice and re-render. | +| `focused` | Gets the currently selected choice. Equivalent to `prompt.choices[prompt.index]`. | +| `index` | `number` | Position of the pointer in the _visible list (array) of choices_. | +| `limit` | `number` | The number of choices to display on-screen. | +| `selected` | `array` | Either a list of enabled choices (when `options.multiple` is true) or the currently focused choice. | +| `visible` | `string` | | + +#### Methods + +| **Method** | **Description** | +| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `pointer()` | Returns the visual symbol to use to identify the choice that currently has focus. The `❯` symbol is often used for this. The pointer is not always visible, as with the `autocomplete` prompt. | +| `indicator()` | Returns the visual symbol that indicates whether or not a choice is checked/enabled. | +| `focus()` | Sets focus on a choice, if it can be focused. | + +#### Choices + +Array prompts support the `choices` option, which is the array of choices users will be able to select from when rendered in the terminal. + +**Type**: `string|object` + +**Example** + +```js +const { prompt } = require('enquirer'); + +const questions = [{ + type: 'select', + name: 'color', + message: 'Favorite color?', + initial: 1, + choices: [ + { name: 'red', message: 'Red', value: '#ff0000' }, //<= choice object + { name: 'green', message: 'Green', value: '#00ff00' }, //<= choice object + { name: 'blue', message: 'Blue', value: '#0000ff' } //<= choice object + ] +}]; + +let answers = await prompt(questions); +console.log('Answer:', answers.color); +``` + +#### Defining choices + +Whether defined as a string or object, choices are normalized to the following interface: + +```js +{ + name: string; + message: string | undefined; + value: string | undefined; + hint: string | undefined; + disabled: boolean | string | undefined; +} +``` + +**Example** + +```js +const question = { + name: 'fruit', + message: 'Favorite fruit?', + choices: ['Apple', 'Orange', 'Raspberry'] +}; +``` + +Normalizes to the following when the prompt is run: + +```js +const question = { + name: 'fruit', + message: 'Favorite fruit?', + choices: [ + { name: 'Apple', message: 'Apple', value: 'Apple' }, + { name: 'Orange', message: 'Orange', value: 'Orange' }, + { name: 'Raspberry', message: 'Raspberry', value: 'Raspberry' } + ] +}; +``` + +#### Choice properties + +The following properties are supported on `choice` objects. + +| **Option** | **Type** | **Description** | +| ----------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | `string` | The unique key to identify a choice | +| `message` | `string` | The message to display in the terminal. `name` is used when this is undefined. | +| `value` | `string` | Value to associate with the choice. Useful for creating key-value pairs from user choices. `name` is used when this is undefined. | +| `choices` | `array` | Array of "child" choices. | +| `hint` | `string` | Help message to display next to a choice. | +| `role` | `string` | Determines how the choice will be displayed. Currently the only role supported is `separator`. Additional roles may be added in the future (like `heading`, etc). Please create a [feature request] | +| `enabled` | `boolean` | Enabled a choice by default. This is only supported when `options.multiple` is true or on prompts that support multiple choices, like [MultiSelect](#-multiselect). | +| `disabled` | `boolean\|string` | Disable a choice so that it cannot be selected. This value may either be `true`, `false`, or a message to display. | +| `indicator` | `string\|function` | Custom indicator to render for a choice (like a check or radio button). | + +#### Related prompts + +* [AutoComplete](#autocomplete-prompt) +* [Form](#form-prompt) +* [MultiSelect](#multiselect-prompt) +* [Select](#select-prompt) +* [Survey](#survey-prompt) + +*** + +### AuthPrompt + +The `AuthPrompt` is used to create prompts to log in user using any authentication method. For example, Enquirer uses this class as the basis for the [BasicAuth Prompt](#basicauth-prompt). You can also find prompt examples in `examples/auth/` folder that utilizes `AuthPrompt` to create OAuth based authentication prompt or a prompt that authenticates using time-based OTP, among others. + +`AuthPrompt` has a factory function that creates an instance of `AuthPrompt` class and it expects an `authenticate` function, as an argument, which overrides the `authenticate` function of the `AuthPrompt` class. + +#### Methods + +| **Method** | **Description** | +| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `authenticate()` | Contain all the authentication logic. This function should be overridden to implement custom authentication logic. The default `authenticate` function throws an error if no other function is provided. | + +#### Choices + +Auth prompt supports the `choices` option, which is the similar to the choices used in [Form Prompt](#form-prompt). + +**Example** + +```js +const { AuthPrompt } = require('enquirer'); + +function authenticate(value, state) { + if (value.username === this.options.username && value.password === this.options.password) { + return true; + } + return false; +} + +const CustomAuthPrompt = AuthPrompt.create(authenticate); + +const prompt = new CustomAuthPrompt({ + name: 'password', + message: 'Please enter your password', + username: 'rajat-sr', + password: '1234567', + choices: [ + { name: 'username', message: 'username' }, + { name: 'password', message: 'password' } + ] +}); + +prompt + .run() + .then(answer => console.log('Authenticated?', answer)) + .catch(console.error); +``` + +#### Related prompts + +* [BasicAuth Prompt](#basicauth-prompt) + +*** + +### BooleanPrompt + +The `BooleanPrompt` class is used for creating prompts that display and return a boolean value. + +```js +const { BooleanPrompt } = require('enquirer'); + +const prompt = new BooleanPrompt({ + header: '========================', + message: 'Do you love enquirer?', + footer: '========================', +}); + +prompt.run() + .then(answer => console.log('Selected:', answer)) + .catch(console.error); +``` + +**Returns**: `boolean` + +*** + +### NumberPrompt + +The `NumberPrompt` class is used for creating prompts that display and return a numerical value. + +```js +const { NumberPrompt } = require('enquirer'); + +const prompt = new NumberPrompt({ + header: '************************', + message: 'Input the Numbers:', + footer: '************************', +}); + +prompt.run() + .then(answer => console.log('Numbers are:', answer)) + .catch(console.error); +``` + +**Returns**: `string|number` (number, or number formatted as a string) + +*** + +### StringPrompt + +The `StringPrompt` class is used for creating prompts that display and return a string value. + +```js +const { StringPrompt } = require('enquirer'); + +const prompt = new StringPrompt({ + header: '************************', + message: 'Input the String:', + footer: '************************' +}); + +prompt.run() + .then(answer => console.log('String is:', answer)) + .catch(console.error); +``` + +**Returns**: `string` + +
+ +## ❯ Custom prompts + +With Enquirer 2.0, custom prompts are easier than ever to create and use. + +**How do I create a custom prompt?** + +Custom prompts are created by extending either: + +* Enquirer's `Prompt` class +* one of the built-in [prompts](#-prompts), or +* low-level [types](#-types). + + + +```js +const { Prompt } = require('enquirer'); + +class HaiKarate extends Prompt { + constructor(options = {}) { + super(options); + this.value = options.initial || 0; + this.cursorHide(); + } + up() { + this.value++; + this.render(); + } + down() { + this.value--; + this.render(); + } + render() { + this.clear(); // clear previously rendered prompt from the terminal + this.write(`${this.state.message}: ${this.value}`); + } +} + +// Use the prompt by creating an instance of your custom prompt class. +const prompt = new HaiKarate({ + message: 'How many sprays do you want?', + initial: 10 +}); + +prompt.run() + .then(answer => console.log('Sprays:', answer)) + .catch(console.error); +``` + +If you want to be able to specify your prompt by `type` so that it may be used alongside other prompts, you will need to first create an instance of `Enquirer`. + +```js +const Enquirer = require('enquirer'); +const enquirer = new Enquirer(); +``` + +Then use the `.register()` method to add your custom prompt. + +```js +enquirer.register('haikarate', HaiKarate); +``` + +Now you can do the following when defining "questions". + +```js +let spritzer = require('cologne-drone'); +let answers = await enquirer.prompt([ + { + type: 'haikarate', + name: 'cologne', + message: 'How many sprays do you need?', + initial: 10, + async onSubmit(name, value) { + await spritzer.activate(value); //<= activate drone + return value; + } + } +]); +``` + +
+ +## ❯ Key Bindings + +### All prompts + +These key combinations may be used with all prompts. + +| **command** | **description** | +| -------------------------------- | -------------------------------------- | +| ctrl + c | Cancel the prompt. | +| ctrl + g | Reset the prompt to its initial state. | + +
+ +### Move cursor + +These combinations may be used on prompts that support user input (eg. [input prompt](#input-prompt), [password prompt](#password-prompt), and [invisible prompt](#invisible-prompt)). + +| **command** | **description** | +| ------------------------------ | ---------------------------------------- | +| left | Move the cursor back one character. | +| right | Move the cursor forward one character. | +| ctrl + a | Move cursor to the start of the line | +| ctrl + e | Move cursor to the end of the line | +| ctrl + b | Move cursor back one character | +| ctrl + f | Move cursor forward one character | +| ctrl + x | Toggle between first and cursor position | + +
+ +### Edit Input + +These key combinations may be used on prompts that support user input (eg. [input prompt](#input-prompt), [password prompt](#password-prompt), and [invisible prompt](#invisible-prompt)). + +| **command** | **description** | +| ------------------------------ | ---------------------------------------- | +| ctrl + a | Move cursor to the start of the line | +| ctrl + e | Move cursor to the end of the line | +| ctrl + b | Move cursor back one character | +| ctrl + f | Move cursor forward one character | +| ctrl + x | Toggle between first and cursor position | + +
+ +| **command (Mac)** | **command (Windows)** | **description** | +| ----------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| delete | backspace | Delete one character to the left. | +| fn + delete | delete | Delete one character to the right. | +| option + up | alt + up | Scroll to the previous item in history ([Input prompt](#input-prompt) only, when [history is enabled](examples/input/option-history.js)). | +| option + down | alt + down | Scroll to the next item in history ([Input prompt](#input-prompt) only, when [history is enabled](examples/input/option-history.js)). | + +### Select choices + +These key combinations may be used on prompts that support _multiple_ choices, such as the [multiselect prompt](#multiselect-prompt), or the [select prompt](#select-prompt) when the `multiple` options is true. + +| **command** | **description** | +| ----------------- | -------------------------------------------------------------------------------------------------------------------- | +| space | Toggle the currently selected choice when `options.multiple` is true. | +| number | Move the pointer to the choice at the given index. Also toggles the selected choice when `options.multiple` is true. | +| a | Toggle all choices to be enabled or disabled. | +| i | Invert the current selection of choices. | +| g | Toggle the current choice group. | + +
+ +### Hide/show choices + +| **command** | **description** | +| ------------------------------- | ---------------------------------------------- | +| fn + up | Decrease the number of visible choices by one. | +| fn + down | Increase the number of visible choices by one. | + +
+ +### Move/lock Pointer + +| **command** | **description** | +| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| number | Move the pointer to the choice at the given index. Also toggles the selected choice when `options.multiple` is true. | +| up | Move the pointer up. | +| down | Move the pointer down. | +| ctrl + a | Move the pointer to the first _visible_ choice. | +| ctrl + e | Move the pointer to the last _visible_ choice. | +| shift + up | Scroll up one choice without changing pointer position (locks the pointer while scrolling). | +| shift + down | Scroll down one choice without changing pointer position (locks the pointer while scrolling). | + +
+ +| **command (Mac)** | **command (Windows)** | **description** | +| -------------------------------- | --------------------- | ---------------------------------------------------------- | +| fn + left | home | Move the pointer to the first choice in the choices array. | +| fn + right | end | Move the pointer to the last choice in the choices array. | + +
+ +## ❯ Release History + +Please see [CHANGELOG.md](CHANGELOG.md). + +## ❯ Performance + +### System specs + +MacBook Pro, Intel Core i7, 2.5 GHz, 16 GB. + +### Load time + +Time it takes for the module to load the first time (average of 3 runs): + +``` +enquirer: 4.013ms +inquirer: 286.717ms +``` + +
+ +## ❯ About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Todo + +We're currently working on documentation for the following items. Please star and watch the repository for updates! + +* [ ] Customizing symbols +* [ ] Customizing styles (palette) +* [ ] Customizing rendered input +* [ ] Customizing returned values +* [ ] Customizing key bindings +* [ ] Question validation +* [ ] Choice validation +* [ ] Skipping questions +* [ ] Async choices +* [ ] Async timers: loaders, spinners and other animations +* [ ] Links to examples +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` +```sh +$ yarn && yarn test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +#### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 283 | [jonschlinkert](https://github.com/jonschlinkert) | +| 72 | [doowb](https://github.com/doowb) | +| 32 | [rajat-sr](https://github.com/rajat-sr) | +| 20 | [318097](https://github.com/318097) | +| 15 | [g-plane](https://github.com/g-plane) | +| 12 | [pixelass](https://github.com/pixelass) | +| 5 | [satotake](https://github.com/satotake) | +| 3 | [tunnckoCore](https://github.com/tunnckoCore) | +| 3 | [sw-yx](https://github.com/sw-yx) | +| 2 | [adityavyas611](https://github.com/adityavyas611) | +| 2 | [DanielRuf](https://github.com/DanielRuf) | +| 2 | [gabel0287](https://github.com/gabel0287) | +| 1 | [AlCalzone](https://github.com/AlCalzone) | +| 1 | [ImgBotApp](https://github.com/ImgBotApp) | +| 1 | [jsonkao](https://github.com/jsonkao) | +| 1 | [knpwrs](https://github.com/knpwrs) | +| 1 | [yeskunall](https://github.com/yeskunall) | +| 1 | [mischah](https://github.com/mischah) | +| 1 | [renarsvilnis](https://github.com/renarsvilnis) | +| 1 | [sbugert](https://github.com/sbugert) | +| 1 | [stephencweiss](https://github.com/stephencweiss) | +| 1 | [skellock](https://github.com/skellock) | +| 1 | [whxaxes](https://github.com/whxaxes) | + +#### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +#### Credit + +Thanks to [derhuerst](https://github.com/derhuerst), creator of prompt libraries such as [prompt-skeleton](https://github.com/derhuerst/prompt-skeleton), which influenced some of the concepts we used in our prompts. + +#### License + +Copyright © 2018-present, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). \ No newline at end of file diff --git a/node_modules/enquirer/index.d.ts b/node_modules/enquirer/index.d.ts new file mode 100644 index 0000000..053a9e7 --- /dev/null +++ b/node_modules/enquirer/index.d.ts @@ -0,0 +1,150 @@ +import { EventEmitter } from "events"; + +interface BasePromptOptions { + name: string | (() => string) + type: string | (() => string) + message: string | (() => string) | (() => Promise) + initial?: any + required?: boolean + format?(value: string): string | Promise + result?(value: string): string | Promise + skip?: ((state: object) => boolean | Promise) | boolean + validate?(value: string): boolean | Promise | string | Promise + onSubmit?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise + onCancel?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise + stdin?: NodeJS.ReadStream + stdout?: NodeJS.WriteStream +} + +interface Choice { + name: string + message?: string + value?: string + hint?: string + disabled?: boolean | string +} + +interface ArrayPromptOptions extends BasePromptOptions { + type: + | 'autocomplete' + | 'editable' + | 'form' + | 'multiselect' + | 'select' + | 'survey' + | 'list' + | 'scale' + choices: string[] | Choice[] + maxChoices?: number + muliple?: boolean + initial?: number + delay?: number + separator?: boolean + sort?: boolean + linebreak?: boolean + edgeLength?: number + align?: 'left' | 'right' + scroll?: boolean +} + +interface BooleanPromptOptions extends BasePromptOptions { + type: 'confirm' + initial?: boolean +} + +interface StringPromptOptions extends BasePromptOptions { + type: 'input' | 'invisible' | 'list' | 'password' | 'text' + initial?: string + multiline?: boolean +} + +interface NumberPromptOptions extends BasePromptOptions { + type: 'numeral' + min?: number + max?: number + delay?: number + float?: boolean + round?: boolean + major?: number + minor?: number + initial?: number +} + +interface SnippetPromptOptions extends BasePromptOptions { + type: 'snippet' + newline?: string +} + +interface SortPromptOptions extends BasePromptOptions { + type: 'sort' + hint?: string + drag?: boolean + numbered?: boolean +} + +type PromptOptions = + | ArrayPromptOptions + | BooleanPromptOptions + | StringPromptOptions + | NumberPromptOptions + | SnippetPromptOptions + | SortPromptOptions + | BasePromptOptions + +declare class BasePrompt extends EventEmitter { + constructor(options?: PromptOptions); + + render(): void; + + run(): Promise; + } + +declare class Enquirer extends EventEmitter { + constructor(options?: object, answers?: T); + + /** + * Register a custom prompt type. + * + * @param type + * @param fn `Prompt` class, or a function that returns a `Prompt` class. + */ + register(type: string, fn: typeof BasePrompt | (() => typeof BasePrompt)): this; + + /** + * Register a custom prompt type. + */ + register(type: { [key: string]: typeof BasePrompt | (() => typeof BasePrompt) }): this; + + /** + * Prompt function that takes a "question" object or array of question objects, + * and returns an object with responses from the user. + * + * @param questions Options objects for one or more prompts to run. + */ + prompt( + questions: + | PromptOptions + | ((this: Enquirer) => PromptOptions) + | (PromptOptions | ((this: Enquirer) => PromptOptions))[] + ): Promise; + + /** + * Use an enquirer plugin. + * + * @param plugin Plugin function that takes an instance of Enquirer. + */ + use(plugin: (this: this, enquirer: this) => void): this; +} + +declare namespace Enquirer { + function prompt( + questions: + | PromptOptions + | ((this: Enquirer) => PromptOptions) + | (PromptOptions | ((this: Enquirer) => PromptOptions))[] + ): Promise; + + class Prompt extends BasePrompt {} +} + +export = Enquirer; diff --git a/node_modules/enquirer/index.js b/node_modules/enquirer/index.js new file mode 100644 index 0000000..d0ef3f6 --- /dev/null +++ b/node_modules/enquirer/index.js @@ -0,0 +1,250 @@ +'use strict'; + +const assert = require('assert'); +const Events = require('events'); +const utils = require('./lib/utils'); + +/** + * Create an instance of `Enquirer`. + * + * ```js + * const Enquirer = require('enquirer'); + * const enquirer = new Enquirer(); + * ``` + * @name Enquirer + * @param {Object} `options` (optional) Options to use with all prompts. + * @param {Object} `answers` (optional) Answers object to initialize with. + * @api public + */ + +class Enquirer extends Events { + constructor(options, answers) { + super(); + this.options = utils.merge({}, options); + this.answers = { ...answers }; + } + + /** + * Register a custom prompt type. + * + * ```js + * const Enquirer = require('enquirer'); + * const enquirer = new Enquirer(); + * enquirer.register('customType', require('./custom-prompt')); + * ``` + * @name register() + * @param {String} `type` + * @param {Function|Prompt} `fn` `Prompt` class, or a function that returns a `Prompt` class. + * @return {Object} Returns the Enquirer instance + * @api public + */ + + register(type, fn) { + if (utils.isObject(type)) { + for (let key of Object.keys(type)) this.register(key, type[key]); + return this; + } + assert.equal(typeof fn, 'function', 'expected a function'); + let name = type.toLowerCase(); + if (fn.prototype instanceof this.Prompt) { + this.prompts[name] = fn; + } else { + this.prompts[name] = fn(this.Prompt, this); + } + return this; + } + + /** + * Prompt function that takes a "question" object or array of question objects, + * and returns an object with responses from the user. + * + * ```js + * const Enquirer = require('enquirer'); + * const enquirer = new Enquirer(); + * + * const response = await enquirer.prompt({ + * type: 'input', + * name: 'username', + * message: 'What is your username?' + * }); + * console.log(response); + * ``` + * @name prompt() + * @param {Array|Object} `questions` Options objects for one or more prompts to run. + * @return {Promise} Promise that returns an "answers" object with the user's responses. + * @api public + */ + + async prompt(questions = []) { + for (let question of [].concat(questions)) { + try { + if (typeof question === 'function') question = await question.call(this); + await this.ask(utils.merge({}, this.options, question)); + } catch (err) { + return Promise.reject(err); + } + } + return this.answers; + } + + async ask(question) { + if (typeof question === 'function') { + question = await question.call(this); + } + + let opts = utils.merge({}, this.options, question); + let { type, name } = question; + let { set, get } = utils; + + if (typeof type === 'function') { + type = await type.call(this, question, this.answers); + } + + if (!type) return this.answers[name]; + + assert(this.prompts[type], `Prompt "${type}" is not registered`); + + let prompt = new this.prompts[type](opts); + let value = get(this.answers, name); + + prompt.state.answers = this.answers; + prompt.enquirer = this; + + if (name) { + prompt.on('submit', value => { + this.emit('answer', name, value, prompt); + set(this.answers, name, value); + }); + } + + // bubble events + let emit = prompt.emit.bind(prompt); + prompt.emit = (...args) => { + this.emit.call(this, ...args); + return emit(...args); + }; + + this.emit('prompt', prompt, this); + + if (opts.autofill && value != null) { + prompt.value = prompt.input = value; + + // if "autofill=show" render the prompt, otherwise stay "silent" + if (opts.autofill === 'show') { + await prompt.submit(); + } + } else { + value = prompt.value = await prompt.run(); + } + + return value; + } + + /** + * Use an enquirer plugin. + * + * ```js + * const Enquirer = require('enquirer'); + * const enquirer = new Enquirer(); + * const plugin = enquirer => { + * // do stuff to enquire instance + * }; + * enquirer.use(plugin); + * ``` + * @name use() + * @param {Function} `plugin` Plugin function that takes an instance of Enquirer. + * @return {Object} Returns the Enquirer instance. + * @api public + */ + + use(plugin) { + plugin.call(this, this); + return this; + } + + set Prompt(value) { + this._Prompt = value; + } + get Prompt() { + return this._Prompt || this.constructor.Prompt; + } + + get prompts() { + return this.constructor.prompts; + } + + static set Prompt(value) { + this._Prompt = value; + } + static get Prompt() { + return this._Prompt || require('./lib/prompt'); + } + + static get prompts() { + return require('./lib/prompts'); + } + + static get types() { + return require('./lib/types'); + } + + /** + * Prompt function that takes a "question" object or array of question objects, + * and returns an object with responses from the user. + * + * ```js + * const { prompt } = require('enquirer'); + * const response = await prompt({ + * type: 'input', + * name: 'username', + * message: 'What is your username?' + * }); + * console.log(response); + * ``` + * @name Enquirer#prompt + * @param {Array|Object} `questions` Options objects for one or more prompts to run. + * @return {Promise} Promise that returns an "answers" object with the user's responses. + * @api public + */ + + static get prompt() { + const fn = (questions, ...rest) => { + let enquirer = new this(...rest); + let emit = enquirer.emit.bind(enquirer); + enquirer.emit = (...args) => { + fn.emit(...args); + return emit(...args); + }; + return enquirer.prompt(questions); + }; + utils.mixinEmitter(fn, new Events()); + return fn; + } +} + +utils.mixinEmitter(Enquirer, new Events()); +const prompts = Enquirer.prompts; + +for (let name of Object.keys(prompts)) { + let key = name.toLowerCase(); + + let run = options => new prompts[name](options).run(); + Enquirer.prompt[key] = run; + Enquirer[key] = run; + + if (!Enquirer[name]) { + Reflect.defineProperty(Enquirer, name, { get: () => prompts[name] }); + } +} + +const exp = name => { + utils.defineExport(Enquirer, name, () => Enquirer.types[name]); +}; + +exp('ArrayPrompt'); +exp('AuthPrompt'); +exp('BooleanPrompt'); +exp('NumberPrompt'); +exp('StringPrompt'); + +module.exports = Enquirer; diff --git a/node_modules/enquirer/lib/ansi.js b/node_modules/enquirer/lib/ansi.js new file mode 100644 index 0000000..1ba1981 --- /dev/null +++ b/node_modules/enquirer/lib/ansi.js @@ -0,0 +1,116 @@ +'use strict'; + +const isTerm = process.env.TERM_PROGRAM === 'Apple_Terminal'; +const colors = require('ansi-colors'); +const utils = require('./utils'); +const ansi = module.exports = exports; +const ESC = '\u001b['; +const BEL = '\u0007'; +let hidden = false; + +const code = ansi.code = { + bell: BEL, + beep: BEL, + beginning: `${ESC}G`, + down: `${ESC}J`, + esc: ESC, + getPosition: `${ESC}6n`, + hide: `${ESC}?25l`, + line: `${ESC}2K`, + lineEnd: `${ESC}K`, + lineStart: `${ESC}1K`, + restorePosition: ESC + (isTerm ? '8' : 'u'), + savePosition: ESC + (isTerm ? '7' : 's'), + screen: `${ESC}2J`, + show: `${ESC}?25h`, + up: `${ESC}1J` +}; + +const cursor = ansi.cursor = { + get hidden() { + return hidden; + }, + + hide() { + hidden = true; + return code.hide; + }, + show() { + hidden = false; + return code.show; + }, + + forward: (count = 1) => `${ESC}${count}C`, + backward: (count = 1) => `${ESC}${count}D`, + nextLine: (count = 1) => `${ESC}E`.repeat(count), + prevLine: (count = 1) => `${ESC}F`.repeat(count), + + up: (count = 1) => count ? `${ESC}${count}A` : '', + down: (count = 1) => count ? `${ESC}${count}B` : '', + right: (count = 1) => count ? `${ESC}${count}C` : '', + left: (count = 1) => count ? `${ESC}${count}D` : '', + + to(x, y) { + return y ? `${ESC}${y + 1};${x + 1}H` : `${ESC}${x + 1}G`; + }, + + move(x = 0, y = 0) { + let res = ''; + res += (x < 0) ? cursor.left(-x) : (x > 0) ? cursor.right(x) : ''; + res += (y < 0) ? cursor.up(-y) : (y > 0) ? cursor.down(y) : ''; + return res; + }, + + restore(state = {}) { + let { after, cursor, initial, input, prompt, size, value } = state; + initial = utils.isPrimitive(initial) ? String(initial) : ''; + input = utils.isPrimitive(input) ? String(input) : ''; + value = utils.isPrimitive(value) ? String(value) : ''; + + if (size) { + let codes = ansi.cursor.up(size) + ansi.cursor.to(prompt.length); + let diff = input.length - cursor; + if (diff > 0) { + codes += ansi.cursor.left(diff); + } + return codes; + } + + if (value || after) { + let pos = (!input && !!initial) ? -initial.length : -input.length + cursor; + if (after) pos -= after.length; + if (input === '' && initial && !prompt.includes(initial)) { + pos += initial.length; + } + return ansi.cursor.move(pos); + } + } +}; + +const erase = ansi.erase = { + screen: code.screen, + up: code.up, + down: code.down, + line: code.line, + lineEnd: code.lineEnd, + lineStart: code.lineStart, + lines(n) { + let str = ''; + for (let i = 0; i < n; i++) { + str += ansi.erase.line + (i < n - 1 ? ansi.cursor.up(1) : ''); + } + if (n) str += ansi.code.beginning; + return str; + } +}; + +ansi.clear = (input = '', columns = process.stdout.columns) => { + if (!columns) return erase.line + cursor.to(0); + let width = str => [...colors.unstyle(str)].length; + let lines = input.split(/\r?\n/); + let rows = 0; + for (let line of lines) { + rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / columns); + } + return (erase.line + cursor.prevLine()).repeat(rows - 1) + erase.line + cursor.to(0); +}; diff --git a/node_modules/enquirer/lib/combos.js b/node_modules/enquirer/lib/combos.js new file mode 100644 index 0000000..5b9d86c --- /dev/null +++ b/node_modules/enquirer/lib/combos.js @@ -0,0 +1,75 @@ +'use strict'; + +/** + * Actions are mappings from keypress event names to method names + * in the prompts. + */ + +exports.ctrl = { + a: 'first', + b: 'backward', + c: 'cancel', + d: 'deleteForward', + e: 'last', + f: 'forward', + g: 'reset', + i: 'tab', + k: 'cutForward', + l: 'reset', + n: 'newItem', + m: 'cancel', + j: 'submit', + p: 'search', + r: 'remove', + s: 'save', + u: 'undo', + w: 'cutLeft', + x: 'toggleCursor', + v: 'paste' +}; + +exports.shift = { + up: 'shiftUp', + down: 'shiftDown', + left: 'shiftLeft', + right: 'shiftRight', + tab: 'prev' +}; + +exports.fn = { + up: 'pageUp', + down: 'pageDown', + left: 'pageLeft', + right: 'pageRight', + delete: 'deleteForward' +}; + +// on Windows +exports.option = { + b: 'backward', + f: 'forward', + d: 'cutRight', + left: 'cutLeft', + up: 'altUp', + down: 'altDown' +}; + +exports.keys = { + pageup: 'pageUp', // + (mac), (windows) + pagedown: 'pageDown', // + (mac), (windows) + home: 'home', // + (mac), (windows) + end: 'end', // + (mac), (windows) + cancel: 'cancel', + delete: 'deleteForward', + backspace: 'delete', + down: 'down', + enter: 'submit', + escape: 'cancel', + left: 'left', + space: 'space', + number: 'number', + return: 'submit', + right: 'right', + tab: 'next', + up: 'up' +}; diff --git a/node_modules/enquirer/lib/completer.js b/node_modules/enquirer/lib/completer.js new file mode 100644 index 0000000..4a50af0 --- /dev/null +++ b/node_modules/enquirer/lib/completer.js @@ -0,0 +1,52 @@ +'use strict'; + +const unique = arr => arr.filter((v, i) => arr.lastIndexOf(v) === i); +const compact = arr => unique(arr).filter(Boolean); + +module.exports = (action, data = {}, value = '') => { + let { past = [], present = '' } = data; + let rest, prev; + + switch (action) { + case 'prev': + case 'undo': + rest = past.slice(0, past.length - 1); + prev = past[past.length - 1] || ''; + return { + past: compact([value, ...rest]), + present: prev + }; + + case 'next': + case 'redo': + rest = past.slice(1); + prev = past[0] || ''; + return { + past: compact([...rest, value]), + present: prev + }; + + case 'save': + return { + past: compact([...past, value]), + present: '' + }; + + case 'remove': + prev = compact(past.filter(v => v !== value)); + present = ''; + + if (prev.length) { + present = prev.pop(); + } + + return { + past: prev, + present + }; + + default: { + throw new Error(`Invalid action: "${action}"`); + } + } +}; diff --git a/node_modules/enquirer/lib/interpolate.js b/node_modules/enquirer/lib/interpolate.js new file mode 100644 index 0000000..c3d9b3f --- /dev/null +++ b/node_modules/enquirer/lib/interpolate.js @@ -0,0 +1,266 @@ +'use strict'; + +const colors = require('ansi-colors'); +const clean = (str = '') => { + return typeof str === 'string' ? str.replace(/^['"]|['"]$/g, '') : ''; +}; + +/** + * This file contains the interpolation and rendering logic for + * the Snippet prompt. + */ + +class Item { + constructor(token) { + this.name = token.key; + this.field = token.field || {}; + this.value = clean(token.initial || this.field.initial || ''); + this.message = token.message || this.name; + this.cursor = 0; + this.input = ''; + this.lines = []; + } +} + +const tokenize = async(options = {}, defaults = {}, fn = token => token) => { + let unique = new Set(); + let fields = options.fields || []; + let input = options.template; + let tabstops = []; + let items = []; + let keys = []; + let line = 1; + + if (typeof input === 'function') { + input = await input(); + } + + let i = -1; + let next = () => input[++i]; + let peek = () => input[i + 1]; + let push = token => { + token.line = line; + tabstops.push(token); + }; + + push({ type: 'bos', value: '' }); + + while (i < input.length - 1) { + let value = next(); + + if (/^[^\S\n ]$/.test(value)) { + push({ type: 'text', value }); + continue; + } + + if (value === '\n') { + push({ type: 'newline', value }); + line++; + continue; + } + + if (value === '\\') { + value += next(); + push({ type: 'text', value }); + continue; + } + + if ((value === '$' || value === '#' || value === '{') && peek() === '{') { + let n = next(); + value += n; + + let token = { type: 'template', open: value, inner: '', close: '', value }; + let ch; + + while ((ch = next())) { + if (ch === '}') { + if (peek() === '}') ch += next(); + token.value += ch; + token.close = ch; + break; + } + + if (ch === ':') { + token.initial = ''; + token.key = token.inner; + } else if (token.initial !== void 0) { + token.initial += ch; + } + + token.value += ch; + token.inner += ch; + } + + token.template = token.open + (token.initial || token.inner) + token.close; + token.key = token.key || token.inner; + + if (defaults.hasOwnProperty(token.key)) { + token.initial = defaults[token.key]; + } + + token = fn(token); + push(token); + + keys.push(token.key); + unique.add(token.key); + + let item = items.find(item => item.name === token.key); + token.field = fields.find(ch => ch.name === token.key); + + if (!item) { + item = new Item(token); + items.push(item); + } + + item.lines.push(token.line - 1); + continue; + } + + let last = tabstops[tabstops.length - 1]; + if (last.type === 'text' && last.line === line) { + last.value += value; + } else { + push({ type: 'text', value }); + } + } + + push({ type: 'eos', value: '' }); + return { input, tabstops, unique, keys, items }; +}; + +module.exports = async prompt => { + let options = prompt.options; + let required = new Set(options.required === true ? [] : (options.required || [])); + let defaults = { ...options.values, ...options.initial }; + let { tabstops, items, keys } = await tokenize(options, defaults); + + let result = createFn('result', prompt, options); + let format = createFn('format', prompt, options); + let isValid = createFn('validate', prompt, options, true); + let isVal = prompt.isValue.bind(prompt); + + return async(state = {}, submitted = false) => { + let index = 0; + + state.required = required; + state.items = items; + state.keys = keys; + state.output = ''; + + let validate = async(value, state, item, index) => { + let error = await isValid(value, state, item, index); + if (error === false) { + return 'Invalid field ' + item.name; + } + return error; + }; + + for (let token of tabstops) { + let value = token.value; + let key = token.key; + + if (token.type !== 'template') { + if (value) state.output += value; + continue; + } + + if (token.type === 'template') { + let item = items.find(ch => ch.name === key); + + if (options.required === true) { + state.required.add(item.name); + } + + let val = [item.input, state.values[item.value], item.value, value].find(isVal); + let field = item.field || {}; + let message = field.message || token.inner; + + if (submitted) { + let error = await validate(state.values[key], state, item, index); + if ((error && typeof error === 'string') || error === false) { + state.invalid.set(key, error); + continue; + } + + state.invalid.delete(key); + let res = await result(state.values[key], state, item, index); + state.output += colors.unstyle(res); + continue; + } + + item.placeholder = false; + + let before = value; + value = await format(value, state, item, index); + + if (val !== value) { + state.values[key] = val; + value = prompt.styles.typing(val); + state.missing.delete(message); + + } else { + state.values[key] = void 0; + val = `<${message}>`; + value = prompt.styles.primary(val); + item.placeholder = true; + + if (state.required.has(key)) { + state.missing.add(message); + } + } + + if (state.missing.has(message) && state.validating) { + value = prompt.styles.warning(val); + } + + if (state.invalid.has(key) && state.validating) { + value = prompt.styles.danger(val); + } + + if (index === state.index) { + if (before !== value) { + value = prompt.styles.underline(value); + } else { + value = prompt.styles.heading(colors.unstyle(value)); + } + } + + index++; + } + + if (value) { + state.output += value; + } + } + + let lines = state.output.split('\n').map(l => ' ' + l); + let len = items.length; + let done = 0; + + for (let item of items) { + if (state.invalid.has(item.name)) { + item.lines.forEach(i => { + if (lines[i][0] !== ' ') return; + lines[i] = state.styles.danger(state.symbols.bullet) + lines[i].slice(1); + }); + } + + if (prompt.isValue(state.values[item.name])) { + done++; + } + } + + state.completed = ((done / len) * 100).toFixed(0); + state.output = lines.join('\n'); + return state.output; + }; +}; + +function createFn(prop, prompt, options, fallback) { + return (value, state, item, index) => { + if (typeof item.field[prop] === 'function') { + return item.field[prop].call(prompt, value, state, item, index); + } + return [fallback, value].find(v => prompt.isValue(v)); + }; +} diff --git a/node_modules/enquirer/lib/keypress.js b/node_modules/enquirer/lib/keypress.js new file mode 100644 index 0000000..15d7314 --- /dev/null +++ b/node_modules/enquirer/lib/keypress.js @@ -0,0 +1,243 @@ +'use strict'; + +const readline = require('readline'); +const combos = require('./combos'); + +/* eslint-disable no-control-regex */ +const metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/; +const fnKeyRe = /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/; +const keyName = { + /* xterm/gnome ESC O letter */ + 'OP': 'f1', + 'OQ': 'f2', + 'OR': 'f3', + 'OS': 'f4', + /* xterm/rxvt ESC [ number ~ */ + '[11~': 'f1', + '[12~': 'f2', + '[13~': 'f3', + '[14~': 'f4', + /* from Cygwin and used in libuv */ + '[[A': 'f1', + '[[B': 'f2', + '[[C': 'f3', + '[[D': 'f4', + '[[E': 'f5', + /* common */ + '[15~': 'f5', + '[17~': 'f6', + '[18~': 'f7', + '[19~': 'f8', + '[20~': 'f9', + '[21~': 'f10', + '[23~': 'f11', + '[24~': 'f12', + /* xterm ESC [ letter */ + '[A': 'up', + '[B': 'down', + '[C': 'right', + '[D': 'left', + '[E': 'clear', + '[F': 'end', + '[H': 'home', + /* xterm/gnome ESC O letter */ + 'OA': 'up', + 'OB': 'down', + 'OC': 'right', + 'OD': 'left', + 'OE': 'clear', + 'OF': 'end', + 'OH': 'home', + /* xterm/rxvt ESC [ number ~ */ + '[1~': 'home', + '[2~': 'insert', + '[3~': 'delete', + '[4~': 'end', + '[5~': 'pageup', + '[6~': 'pagedown', + /* putty */ + '[[5~': 'pageup', + '[[6~': 'pagedown', + /* rxvt */ + '[7~': 'home', + '[8~': 'end', + /* rxvt keys with modifiers */ + '[a': 'up', + '[b': 'down', + '[c': 'right', + '[d': 'left', + '[e': 'clear', + + '[2$': 'insert', + '[3$': 'delete', + '[5$': 'pageup', + '[6$': 'pagedown', + '[7$': 'home', + '[8$': 'end', + + 'Oa': 'up', + 'Ob': 'down', + 'Oc': 'right', + 'Od': 'left', + 'Oe': 'clear', + + '[2^': 'insert', + '[3^': 'delete', + '[5^': 'pageup', + '[6^': 'pagedown', + '[7^': 'home', + '[8^': 'end', + /* misc. */ + '[Z': 'tab', +} + +function isShiftKey(code) { + return ['[a', '[b', '[c', '[d', '[e', '[2$', '[3$', '[5$', '[6$', '[7$', '[8$', '[Z'].includes(code) +} + +function isCtrlKey(code) { + return [ 'Oa', 'Ob', 'Oc', 'Od', 'Oe', '[2^', '[3^', '[5^', '[6^', '[7^', '[8^'].includes(code) +} + +const keypress = (s = '', event = {}) => { + let parts; + let key = { + name: event.name, + ctrl: false, + meta: false, + shift: false, + option: false, + sequence: s, + raw: s, + ...event + }; + + if (Buffer.isBuffer(s)) { + if (s[0] > 127 && s[1] === void 0) { + s[0] -= 128; + s = '\x1b' + String(s); + } else { + s = String(s); + } + } else if (s !== void 0 && typeof s !== 'string') { + s = String(s); + } else if (!s) { + s = key.sequence || ''; + } + + key.sequence = key.sequence || s || key.name; + + if (s === '\r') { + // carriage return + key.raw = void 0; + key.name = 'return'; + } else if (s === '\n') { + // enter, should have been called linefeed + key.name = 'enter'; + } else if (s === '\t') { + // tab + key.name = 'tab'; + } else if (s === '\b' || s === '\x7f' || s === '\x1b\x7f' || s === '\x1b\b') { + // backspace or ctrl+h + key.name = 'backspace'; + key.meta = s.charAt(0) === '\x1b'; + } else if (s === '\x1b' || s === '\x1b\x1b') { + // escape key + key.name = 'escape'; + key.meta = s.length === 2; + } else if (s === ' ' || s === '\x1b ') { + key.name = 'space'; + key.meta = s.length === 2; + } else if (s <= '\x1a') { + // ctrl+letter + key.name = String.fromCharCode(s.charCodeAt(0) + 'a'.charCodeAt(0) - 1); + key.ctrl = true; + } else if (s.length === 1 && s >= '0' && s <= '9') { + // number + key.name = 'number'; + } else if (s.length === 1 && s >= 'a' && s <= 'z') { + // lowercase letter + key.name = s; + } else if (s.length === 1 && s >= 'A' && s <= 'Z') { + // shift+letter + key.name = s.toLowerCase(); + key.shift = true; + } else if ((parts = metaKeyCodeRe.exec(s))) { + // meta+character key + key.meta = true; + key.shift = /^[A-Z]$/.test(parts[1]); + } else if ((parts = fnKeyRe.exec(s))) { + let segs = [...s]; + + if (segs[0] === '\u001b' && segs[1] === '\u001b') { + key.option = true; + } + + // ansi escape sequence + // reassemble the key code leaving out leading \x1b's, + // the modifier key bitflag and any meaningless "1;" sequence + let code = [parts[1], parts[2], parts[4], parts[6]].filter(Boolean).join(''); + let modifier = (parts[3] || parts[5] || 1) - 1; + + // Parse the key modifier + key.ctrl = !!(modifier & 4); + key.meta = !!(modifier & 10); + key.shift = !!(modifier & 1); + key.code = code; + + key.name = keyName[code]; + key.shift = isShiftKey(code) || key.shift; + key.ctrl = isCtrlKey(code) || key.ctrl; + } + return key; +}; + +keypress.listen = (options = {}, onKeypress) => { + let { stdin } = options; + + if (!stdin || (stdin !== process.stdin && !stdin.isTTY)) { + throw new Error('Invalid stream passed'); + } + + let rl = readline.createInterface({ terminal: true, input: stdin }); + readline.emitKeypressEvents(stdin, rl); + + let on = (buf, key) => onKeypress(buf, keypress(buf, key), rl); + let isRaw = stdin.isRaw; + + if (stdin.isTTY) stdin.setRawMode(true); + stdin.on('keypress', on); + rl.resume(); + + let off = () => { + if (stdin.isTTY) stdin.setRawMode(isRaw); + stdin.removeListener('keypress', on); + rl.pause(); + rl.close(); + }; + + return off; +}; + +keypress.action = (buf, key, customActions) => { + let obj = { ...combos, ...customActions }; + if (key.ctrl) { + key.action = obj.ctrl[key.name]; + return key; + } + + if (key.option && obj.option) { + key.action = obj.option[key.name]; + return key; + } + + if (key.shift) { + key.action = obj.shift[key.name]; + return key; + } + + key.action = obj.keys[key.name]; + return key; +}; + +module.exports = keypress; diff --git a/node_modules/enquirer/lib/placeholder.js b/node_modules/enquirer/lib/placeholder.js new file mode 100644 index 0000000..ae2af1c --- /dev/null +++ b/node_modules/enquirer/lib/placeholder.js @@ -0,0 +1,63 @@ +'use strict'; + +const utils = require('./utils'); + +/** + * Render a placeholder value with cursor and styling based on the + * position of the cursor. + * + * @param {Object} `prompt` Prompt instance. + * @param {String} `input` Input string. + * @param {String} `initial` The initial user-provided value. + * @param {Number} `pos` Current cursor position. + * @param {Boolean} `showCursor` Render a simulated cursor using the inverse primary style. + * @return {String} Returns the styled placeholder string. + * @api public + */ + +module.exports = (prompt, options = {}) => { + prompt.cursorHide(); + + let { input = '', initial = '', pos, showCursor = true, color } = options; + let style = color || prompt.styles.placeholder; + let inverse = utils.inverse(prompt.styles.primary); + let blinker = str => inverse(prompt.styles.black(str)); + let output = input; + let char = ' '; + let reverse = blinker(char); + + if (prompt.blink && prompt.blink.off === true) { + blinker = str => str; + reverse = ''; + } + + if (showCursor && pos === 0 && initial === '' && input === '') { + return blinker(char); + } + + if (showCursor && pos === 0 && (input === initial || input === '')) { + return blinker(initial[0]) + style(initial.slice(1)); + } + + initial = utils.isPrimitive(initial) ? `${initial}` : ''; + input = utils.isPrimitive(input) ? `${input}` : ''; + + let placeholder = initial && initial.startsWith(input) && initial !== input; + let cursor = placeholder ? blinker(initial[input.length]) : reverse; + + if (pos !== input.length && showCursor === true) { + output = input.slice(0, pos) + blinker(input[pos]) + input.slice(pos + 1); + cursor = ''; + } + + if (showCursor === false) { + cursor = ''; + } + + if (placeholder) { + let raw = prompt.styles.unstyle(output + cursor); + return output + cursor + style(initial.slice(raw.length)); + } + + return output + cursor; +}; diff --git a/node_modules/enquirer/lib/prompt.js b/node_modules/enquirer/lib/prompt.js new file mode 100644 index 0000000..65f7bdd --- /dev/null +++ b/node_modules/enquirer/lib/prompt.js @@ -0,0 +1,485 @@ +'use strict'; + +const Events = require('events'); +const colors = require('ansi-colors'); +const keypress = require('./keypress'); +const timer = require('./timer'); +const State = require('./state'); +const theme = require('./theme'); +const utils = require('./utils'); +const ansi = require('./ansi'); + +/** + * Base class for creating a new Prompt. + * @param {Object} `options` Question object. + */ + +class Prompt extends Events { + constructor(options = {}) { + super(); + this.name = options.name; + this.type = options.type; + this.options = options; + theme(this); + timer(this); + this.state = new State(this); + this.initial = [options.initial, options.default].find(v => v != null); + this.stdout = options.stdout || process.stdout; + this.stdin = options.stdin || process.stdin; + this.scale = options.scale || 1; + this.term = this.options.term || process.env.TERM_PROGRAM; + this.margin = margin(this.options.margin); + this.setMaxListeners(0); + setOptions(this); + } + + async keypress(input, event = {}) { + this.keypressed = true; + let key = keypress.action(input, keypress(input, event), this.options.actions); + this.state.keypress = key; + this.emit('keypress', input, key); + this.emit('state', this.state.clone()); + let fn = this.options[key.action] || this[key.action] || this.dispatch; + if (typeof fn === 'function') { + return await fn.call(this, input, key); + } + this.alert(); + } + + alert() { + delete this.state.alert; + if (this.options.show === false) { + this.emit('alert'); + } else { + this.stdout.write(ansi.code.beep); + } + } + + cursorHide() { + this.stdout.write(ansi.cursor.hide()); + utils.onExit(() => this.cursorShow()); + } + + cursorShow() { + this.stdout.write(ansi.cursor.show()); + } + + write(str) { + if (!str) return; + if (this.stdout && this.state.show !== false) { + this.stdout.write(str); + } + this.state.buffer += str; + } + + clear(lines = 0) { + let buffer = this.state.buffer; + this.state.buffer = ''; + if ((!buffer && !lines) || this.options.show === false) return; + this.stdout.write(ansi.cursor.down(lines) + ansi.clear(buffer, this.width)); + } + + restore() { + if (this.state.closed || this.options.show === false) return; + + let { prompt, after, rest } = this.sections(); + let { cursor, initial = '', input = '', value = '' } = this; + + let size = this.state.size = rest.length; + let state = { after, cursor, initial, input, prompt, size, value }; + let codes = ansi.cursor.restore(state); + if (codes) { + this.stdout.write(codes); + } + } + + sections() { + let { buffer, input, prompt } = this.state; + prompt = colors.unstyle(prompt); + let buf = colors.unstyle(buffer); + let idx = buf.indexOf(prompt); + let header = buf.slice(0, idx); + let rest = buf.slice(idx); + let lines = rest.split('\n'); + let first = lines[0]; + let last = lines[lines.length - 1]; + let promptLine = prompt + (input ? ' ' + input : ''); + let len = promptLine.length; + let after = len < first.length ? first.slice(len + 1) : ''; + return { header, prompt: first, after, rest: lines.slice(1), last }; + } + + async submit() { + this.state.submitted = true; + this.state.validating = true; + + // this will only be called when the prompt is directly submitted + // without initializing, i.e. when the prompt is skipped, etc. Otherwize, + // "options.onSubmit" is will be handled by the "initialize()" method. + if (this.options.onSubmit) { + await this.options.onSubmit.call(this, this.name, this.value, this); + } + + let result = this.state.error || await this.validate(this.value, this.state); + if (result !== true) { + let error = '\n' + this.symbols.pointer + ' '; + + if (typeof result === 'string') { + error += result.trim(); + } else { + error += 'Invalid input'; + } + + this.state.error = '\n' + this.styles.danger(error); + this.state.submitted = false; + await this.render(); + await this.alert(); + this.state.validating = false; + this.state.error = void 0; + return; + } + + this.state.validating = false; + await this.render(); + await this.close(); + + this.value = await this.result(this.value); + this.emit('submit', this.value); + } + + async cancel(err) { + this.state.cancelled = this.state.submitted = true; + + await this.render(); + await this.close(); + + if (typeof this.options.onCancel === 'function') { + await this.options.onCancel.call(this, this.name, this.value, this); + } + + this.emit('cancel', await this.error(err)); + } + + async close() { + this.state.closed = true; + + try { + let sections = this.sections(); + let lines = Math.ceil(sections.prompt.length / this.width); + if (sections.rest) { + this.write(ansi.cursor.down(sections.rest.length)); + } + this.write('\n'.repeat(lines)); + } catch (err) { /* do nothing */ } + + this.emit('close'); + } + + start() { + if (!this.stop && this.options.show !== false) { + this.stop = keypress.listen(this, this.keypress.bind(this)); + this.once('close', this.stop); + } + } + + async skip() { + this.skipped = this.options.skip === true; + if (typeof this.options.skip === 'function') { + this.skipped = await this.options.skip.call(this, this.name, this.value); + } + return this.skipped; + } + + async initialize() { + let { format, options, result } = this; + + this.format = () => format.call(this, this.value); + this.result = () => result.call(this, this.value); + + if (typeof options.initial === 'function') { + this.initial = await options.initial.call(this, this); + } + + if (typeof options.onRun === 'function') { + await options.onRun.call(this, this); + } + + // if "options.onSubmit" is defined, we wrap the "submit" method to guarantee + // that "onSubmit" will always called first thing inside the submit + // method, regardless of how it's handled in inheriting prompts. + if (typeof options.onSubmit === 'function') { + let onSubmit = options.onSubmit.bind(this); + let submit = this.submit.bind(this); + delete this.options.onSubmit; + this.submit = async() => { + await onSubmit(this.name, this.value, this); + return submit(); + }; + } + + await this.start(); + await this.render(); + } + + render() { + throw new Error('expected prompt to have a custom render method'); + } + + run() { + return new Promise(async(resolve, reject) => { + this.once('submit', resolve); + this.once('cancel', reject); + if (await this.skip()) { + this.render = () => {}; + return this.submit(); + } + await this.initialize(); + this.emit('run'); + }); + } + + async element(name, choice, i) { + let { options, state, symbols, timers } = this; + let timer = timers && timers[name]; + state.timer = timer; + let value = options[name] || state[name] || symbols[name]; + let val = choice && choice[name] != null ? choice[name] : await value; + if (val === '') return val; + + let res = await this.resolve(val, state, choice, i); + if (!res && choice && choice[name]) { + return this.resolve(value, state, choice, i); + } + return res; + } + + async prefix() { + let element = await this.element('prefix') || this.symbols; + let timer = this.timers && this.timers.prefix; + let state = this.state; + state.timer = timer; + if (utils.isObject(element)) element = element[state.status] || element.pending; + if (!utils.hasColor(element)) { + let style = this.styles[state.status] || this.styles.pending; + return style(element); + } + return element; + } + + async message() { + let message = await this.element('message'); + if (!utils.hasColor(message)) { + return this.styles.strong(message); + } + return message; + } + + async separator() { + let element = await this.element('separator') || this.symbols; + let timer = this.timers && this.timers.separator; + let state = this.state; + state.timer = timer; + let value = element[state.status] || element.pending || state.separator; + let ele = await this.resolve(value, state); + if (utils.isObject(ele)) ele = ele[state.status] || ele.pending; + if (!utils.hasColor(ele)) { + return this.styles.muted(ele); + } + return ele; + } + + async pointer(choice, i) { + let val = await this.element('pointer', choice, i); + + if (typeof val === 'string' && utils.hasColor(val)) { + return val; + } + + if (val) { + let styles = this.styles; + let focused = this.index === i; + let style = focused ? styles.primary : val => val; + let ele = await this.resolve(val[focused ? 'on' : 'off'] || val, this.state); + let styled = !utils.hasColor(ele) ? style(ele) : ele; + return focused ? styled : ' '.repeat(ele.length); + } + } + + async indicator(choice, i) { + let val = await this.element('indicator', choice, i); + if (typeof val === 'string' && utils.hasColor(val)) { + return val; + } + if (val) { + let styles = this.styles; + let enabled = choice.enabled === true; + let style = enabled ? styles.success : styles.dark; + let ele = val[enabled ? 'on' : 'off'] || val; + return !utils.hasColor(ele) ? style(ele) : ele; + } + return ''; + } + + body() { + return null; + } + + footer() { + if (this.state.status === 'pending') { + return this.element('footer'); + } + } + + header() { + if (this.state.status === 'pending') { + return this.element('header'); + } + } + + async hint() { + if (this.state.status === 'pending' && !this.isValue(this.state.input)) { + let hint = await this.element('hint'); + if (!utils.hasColor(hint)) { + return this.styles.muted(hint); + } + return hint; + } + } + + error(err) { + return !this.state.submitted ? (err || this.state.error) : ''; + } + + format(value) { + return value; + } + + result(value) { + return value; + } + + validate(value) { + if (this.options.required === true) { + return this.isValue(value); + } + return true; + } + + isValue(value) { + return value != null && value !== ''; + } + + resolve(value, ...args) { + return utils.resolve(this, value, ...args); + } + + get base() { + return Prompt.prototype; + } + + get style() { + return this.styles[this.state.status]; + } + + get height() { + return this.options.rows || utils.height(this.stdout, 25); + } + get width() { + return this.options.columns || utils.width(this.stdout, 80); + } + get size() { + return { width: this.width, height: this.height }; + } + + set cursor(value) { + this.state.cursor = value; + } + get cursor() { + return this.state.cursor; + } + + set input(value) { + this.state.input = value; + } + get input() { + return this.state.input; + } + + set value(value) { + this.state.value = value; + } + get value() { + let { input, value } = this.state; + let result = [value, input].find(this.isValue.bind(this)); + return this.isValue(result) ? result : this.initial; + } + + static get prompt() { + return options => new this(options).run(); + } +} + +function setOptions(prompt) { + let isValidKey = key => { + return prompt[key] === void 0 || typeof prompt[key] === 'function'; + }; + + let ignore = [ + 'actions', + 'choices', + 'initial', + 'margin', + 'roles', + 'styles', + 'symbols', + 'theme', + 'timers', + 'value' + ]; + + let ignoreFn = [ + 'body', + 'footer', + 'error', + 'header', + 'hint', + 'indicator', + 'message', + 'prefix', + 'separator', + 'skip' + ]; + + for (let key of Object.keys(prompt.options)) { + if (ignore.includes(key)) continue; + if (/^on[A-Z]/.test(key)) continue; + let option = prompt.options[key]; + if (typeof option === 'function' && isValidKey(key)) { + if (!ignoreFn.includes(key)) { + prompt[key] = option.bind(prompt); + } + } else if (typeof prompt[key] !== 'function') { + prompt[key] = option; + } + } +} + +function margin(value) { + if (typeof value === 'number') { + value = [value, value, value, value]; + } + let arr = [].concat(value || []); + let pad = i => i % 2 === 0 ? '\n' : ' '; + let res = []; + for (let i = 0; i < 4; i++) { + let char = pad(i); + if (arr[i]) { + res.push(char.repeat(arr[i])); + } else { + res.push(''); + } + } + return res; +} + +module.exports = Prompt; diff --git a/node_modules/enquirer/lib/prompts/autocomplete.js b/node_modules/enquirer/lib/prompts/autocomplete.js new file mode 100644 index 0000000..d34243b --- /dev/null +++ b/node_modules/enquirer/lib/prompts/autocomplete.js @@ -0,0 +1,109 @@ +'use strict'; + +const Select = require('./select'); + +const highlight = (input, color) => { + let val = input.toLowerCase(); + return str => { + let s = str.toLowerCase(); + let i = s.indexOf(val); + let colored = color(str.slice(i, i + val.length)); + return i >= 0 ? str.slice(0, i) + colored + str.slice(i + val.length) : str; + }; +}; + +class AutoComplete extends Select { + constructor(options) { + super(options); + this.cursorShow(); + } + + moveCursor(n) { + this.state.cursor += n; + } + + dispatch(ch) { + return this.append(ch); + } + + space(ch) { + return this.options.multiple ? super.space(ch) : this.append(ch); + } + + append(ch) { + let { cursor, input } = this.state; + this.input = input.slice(0, cursor) + ch + input.slice(cursor); + this.moveCursor(1); + return this.complete(); + } + + delete() { + let { cursor, input } = this.state; + if (!input) return this.alert(); + this.input = input.slice(0, cursor - 1) + input.slice(cursor); + this.moveCursor(-1); + return this.complete(); + } + + deleteForward() { + let { cursor, input } = this.state; + if (input[cursor] === void 0) return this.alert(); + this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); + return this.complete(); + } + + async complete() { + this.completing = true; + this.choices = await this.suggest(this.input, this.state._choices); + this.state.limit = void 0; // allow getter/setter to reset limit + this.index = Math.min(Math.max(this.visible.length - 1, 0), this.index); + await this.render(); + this.completing = false; + } + + suggest(input = this.input, choices = this.state._choices) { + if (typeof this.options.suggest === 'function') { + return this.options.suggest.call(this, input, choices); + } + let str = input.toLowerCase(); + return choices.filter(ch => ch.message.toLowerCase().includes(str)); + } + + pointer() { + return ''; + } + + format() { + if (!this.focused) return this.input; + if (this.options.multiple && this.state.submitted) { + return this.selected.map(ch => this.styles.primary(ch.message)).join(', '); + } + if (this.state.submitted) { + let value = this.value = this.input = this.focused.value; + return this.styles.primary(value); + } + return this.input; + } + + async render() { + if (this.state.status !== 'pending') return super.render(); + let style = this.options.highlight + ? this.options.highlight.bind(this) + : this.styles.placeholder; + + let color = highlight(this.input, style); + let choices = this.choices; + this.choices = choices.map(ch => ({ ...ch, message: color(ch.message) })); + await super.render(); + this.choices = choices; + } + + submit() { + if (this.options.multiple) { + this.value = this.selected.map(ch => ch.name); + } + return super.submit(); + } +} + +module.exports = AutoComplete; diff --git a/node_modules/enquirer/lib/prompts/basicauth.js b/node_modules/enquirer/lib/prompts/basicauth.js new file mode 100644 index 0000000..54c5ea7 --- /dev/null +++ b/node_modules/enquirer/lib/prompts/basicauth.js @@ -0,0 +1,41 @@ +'use strict'; + +const AuthPrompt = require('../types/auth'); + +function defaultAuthenticate(value, state) { + if (value.username === this.options.username && value.password === this.options.password) { + return true; + } + return false; +} + +const factory = (authenticate = defaultAuthenticate) => { + const choices = [ + { name: 'username', message: 'username' }, + { + name: 'password', + message: 'password', + format(input) { + if (this.options.showPassword) { + return input; + } + let color = this.state.submitted ? this.styles.primary : this.styles.muted; + return color(this.symbols.asterisk.repeat(input.length)); + } + } + ]; + + class BasicAuthPrompt extends AuthPrompt.create(authenticate) { + constructor(options) { + super({ ...options, choices }); + } + + static create(authenticate) { + return factory(authenticate); + } + } + + return BasicAuthPrompt; +}; + +module.exports = factory(); diff --git a/node_modules/enquirer/lib/prompts/confirm.js b/node_modules/enquirer/lib/prompts/confirm.js new file mode 100644 index 0000000..61eae7a --- /dev/null +++ b/node_modules/enquirer/lib/prompts/confirm.js @@ -0,0 +1,13 @@ +'use strict'; + +const BooleanPrompt = require('../types/boolean'); + +class ConfirmPrompt extends BooleanPrompt { + constructor(options) { + super(options); + this.default = this.options.default || (this.initial ? '(Y/n)' : '(y/N)'); + } +} + +module.exports = ConfirmPrompt; + diff --git a/node_modules/enquirer/lib/prompts/editable.js b/node_modules/enquirer/lib/prompts/editable.js new file mode 100644 index 0000000..042e4c9 --- /dev/null +++ b/node_modules/enquirer/lib/prompts/editable.js @@ -0,0 +1,136 @@ +'use strict'; + +const Select = require('./select'); +const Form = require('./form'); +const form = Form.prototype; + +class Editable extends Select { + constructor(options) { + super({ ...options, multiple: true }); + this.align = [this.options.align, 'left'].find(v => v != null); + this.emptyError = ''; + this.values = {}; + } + + dispatch(char, key) { + let choice = this.focused; + let parent = choice.parent || {}; + if (!choice.editable && !parent.editable) { + if (char === 'a' || char === 'i') return super[char](); + } + return form.dispatch.call(this, char, key); + } + + append(char, key) { + return form.append.call(this, char, key); + } + + delete(char, key) { + return form.delete.call(this, char, key); + } + + space(char) { + return this.focused.editable ? this.append(char) : super.space(); + } + + number(char) { + return this.focused.editable ? this.append(char) : super.number(char); + } + + next() { + return this.focused.editable ? form.next.call(this) : super.next(); + } + + prev() { + return this.focused.editable ? form.prev.call(this) : super.prev(); + } + + async indicator(choice, i) { + let symbol = choice.indicator || ''; + let value = choice.editable ? symbol : super.indicator(choice, i); + return await this.resolve(value, this.state, choice, i) || ''; + } + + indent(choice) { + return choice.role === 'heading' ? '' : (choice.editable ? ' ' : ' '); + } + + async renderChoice(choice, i) { + choice.indent = ''; + if (choice.editable) return form.renderChoice.call(this, choice, i); + return super.renderChoice(choice, i); + } + + error() { + return ''; + } + + footer() { + return this.state.error; + } + + async validate() { + let result = true; + + for (let choice of this.choices) { + if (typeof choice.validate !== 'function') { + continue; + } + + if (choice.role === 'heading') { + continue; + } + + let val = choice.parent ? this.value[choice.parent.name] : this.value; + + if (choice.editable) { + val = choice.value === choice.name ? choice.initial || '' : choice.value; + } else if (!this.isDisabled(choice)) { + val = choice.enabled === true; + } + + result = await choice.validate(val, this.state); + + if (result !== true) { + break; + } + } + + if (result !== true) { + this.state.error = typeof result === 'string' ? result : 'Invalid Input'; + } + + return result; + } + + submit() { + if (this.focused.newChoice === true) return super.submit(); + if (this.choices.some(ch => ch.newChoice)) { + return this.alert(); + } + + this.value = {}; + + for (let choice of this.choices) { + let val = choice.parent ? this.value[choice.parent.name] : this.value; + + if (choice.role === 'heading') { + this.value[choice.name] = {}; + continue; + } + + if (choice.editable) { + val[choice.name] = choice.value === choice.name + ? (choice.initial || '') + : choice.value; + + } else if (!this.isDisabled(choice)) { + val[choice.name] = choice.enabled === true; + } + } + + return this.base.submit.call(this); + } +} + +module.exports = Editable; diff --git a/node_modules/enquirer/lib/prompts/form.js b/node_modules/enquirer/lib/prompts/form.js new file mode 100644 index 0000000..aad4c6c --- /dev/null +++ b/node_modules/enquirer/lib/prompts/form.js @@ -0,0 +1,196 @@ +'use strict'; + +const colors = require('ansi-colors'); +const SelectPrompt = require('./select'); +const placeholder = require('../placeholder'); + +class FormPrompt extends SelectPrompt { + constructor(options) { + super({ ...options, multiple: true }); + this.type = 'form'; + this.initial = this.options.initial; + this.align = [this.options.align, 'right'].find(v => v != null); + this.emptyError = ''; + this.values = {}; + } + + async reset(first) { + await super.reset(); + if (first === true) this._index = this.index; + this.index = this._index; + this.values = {}; + this.choices.forEach(choice => choice.reset && choice.reset()); + return this.render(); + } + + dispatch(char) { + return !!char && this.append(char); + } + + append(char) { + let choice = this.focused; + if (!choice) return this.alert(); + let { cursor, input } = choice; + choice.value = choice.input = input.slice(0, cursor) + char + input.slice(cursor); + choice.cursor++; + return this.render(); + } + + delete() { + let choice = this.focused; + if (!choice || choice.cursor <= 0) return this.alert(); + let { cursor, input } = choice; + choice.value = choice.input = input.slice(0, cursor - 1) + input.slice(cursor); + choice.cursor--; + return this.render(); + } + + deleteForward() { + let choice = this.focused; + if (!choice) return this.alert(); + let { cursor, input } = choice; + if (input[cursor] === void 0) return this.alert(); + let str = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); + choice.value = choice.input = str; + return this.render(); + } + + right() { + let choice = this.focused; + if (!choice) return this.alert(); + if (choice.cursor >= choice.input.length) return this.alert(); + choice.cursor++; + return this.render(); + } + + left() { + let choice = this.focused; + if (!choice) return this.alert(); + if (choice.cursor <= 0) return this.alert(); + choice.cursor--; + return this.render(); + } + + space(ch, key) { + return this.dispatch(ch, key); + } + + number(ch, key) { + return this.dispatch(ch, key); + } + + next() { + let ch = this.focused; + if (!ch) return this.alert(); + let { initial, input } = ch; + if (initial && initial.startsWith(input) && input !== initial) { + ch.value = ch.input = initial; + ch.cursor = ch.value.length; + return this.render(); + } + return super.next(); + } + + prev() { + let ch = this.focused; + if (!ch) return this.alert(); + if (ch.cursor === 0) return super.prev(); + ch.value = ch.input = ''; + ch.cursor = 0; + return this.render(); + } + + separator() { + return ''; + } + + format(value) { + return !this.state.submitted ? super.format(value) : ''; + } + + pointer() { + return ''; + } + + indicator(choice) { + return choice.input ? '⦿' : '⊙'; + } + + async choiceSeparator(choice, i) { + let sep = await this.resolve(choice.separator, this.state, choice, i) || ':'; + return sep ? ' ' + this.styles.disabled(sep) : ''; + } + + async renderChoice(choice, i) { + await this.onChoice(choice, i); + + let { state, styles } = this; + let { cursor, initial = '', name, hint, input = '' } = choice; + let { muted, submitted, primary, danger } = styles; + + let help = hint; + let focused = this.index === i; + let validate = choice.validate || (() => true); + let sep = await this.choiceSeparator(choice, i); + let msg = choice.message; + + if (this.align === 'right') msg = msg.padStart(this.longest + 1, ' '); + if (this.align === 'left') msg = msg.padEnd(this.longest + 1, ' '); + + // re-populate the form values (answers) object + let value = this.values[name] = (input || initial); + let color = input ? 'success' : 'dark'; + + if ((await validate.call(choice, value, this.state)) !== true) { + color = 'danger'; + } + + let style = styles[color]; + let indicator = style(await this.indicator(choice, i)) + (choice.pad || ''); + + let indent = this.indent(choice); + let line = () => [indent, indicator, msg + sep, input, help].filter(Boolean).join(' '); + + if (state.submitted) { + msg = colors.unstyle(msg); + input = submitted(input); + help = ''; + return line(); + } + + if (choice.format) { + input = await choice.format.call(this, input, choice, i); + } else { + let color = this.styles.muted; + let options = { input, initial, pos: cursor, showCursor: focused, color }; + input = placeholder(this, options); + } + + if (!this.isValue(input)) { + input = this.styles.muted(this.symbols.ellipsis); + } + + if (choice.result) { + this.values[name] = await choice.result.call(this, value, choice, i); + } + + if (focused) { + msg = primary(msg); + } + + if (choice.error) { + input += (input ? ' ' : '') + danger(choice.error.trim()); + } else if (choice.hint) { + input += (input ? ' ' : '') + muted(choice.hint.trim()); + } + + return line(); + } + + async submit() { + this.value = this.values; + return super.base.submit.call(this); + } +} + +module.exports = FormPrompt; diff --git a/node_modules/enquirer/lib/prompts/index.js b/node_modules/enquirer/lib/prompts/index.js new file mode 100644 index 0000000..a82fbfb --- /dev/null +++ b/node_modules/enquirer/lib/prompts/index.js @@ -0,0 +1,28 @@ +'use strict'; + +const utils = require('../utils'); + +const define = (key, fn) => { + utils.defineExport(exports, key, fn); + utils.defineExport(exports, key.toLowerCase(), fn); +}; + +define('AutoComplete', () => require('./autocomplete')); +define('BasicAuth', () => require('./basicauth')); +define('Confirm', () => require('./confirm')); +define('Editable', () => require('./editable')); +define('Form', () => require('./form')); +define('Input', () => require('./input')); +define('Invisible', () => require('./invisible')); +define('List', () => require('./list')); +define('MultiSelect', () => require('./multiselect')); +define('Numeral', () => require('./numeral')); +define('Password', () => require('./password')); +define('Scale', () => require('./scale')); +define('Select', () => require('./select')); +define('Snippet', () => require('./snippet')); +define('Sort', () => require('./sort')); +define('Survey', () => require('./survey')); +define('Text', () => require('./text')); +define('Toggle', () => require('./toggle')); +define('Quiz', () => require('./quiz')); diff --git a/node_modules/enquirer/lib/prompts/input.js b/node_modules/enquirer/lib/prompts/input.js new file mode 100644 index 0000000..80ba193 --- /dev/null +++ b/node_modules/enquirer/lib/prompts/input.js @@ -0,0 +1,55 @@ +'use strict'; + +const Prompt = require('../types/string'); +const completer = require('../completer'); + +class Input extends Prompt { + constructor(options) { + super(options); + let history = this.options.history; + if (history && history.store) { + let initial = history.values || this.initial; + this.autosave = !!history.autosave; + this.store = history.store; + this.data = this.store.get('values') || { past: [], present: initial }; + this.initial = this.data.present || this.data.past[this.data.past.length - 1]; + } + } + + completion(action) { + if (!this.store) return this.alert(); + this.data = completer(action, this.data, this.input); + if (!this.data.present) return this.alert(); + this.input = this.data.present; + this.cursor = this.input.length; + return this.render(); + } + + altUp() { + return this.completion('prev'); + } + + altDown() { + return this.completion('next'); + } + + prev() { + this.save(); + return super.prev(); + } + + save() { + if (!this.store) return; + this.data = completer('save', this.data, this.input); + this.store.set('values', this.data); + } + + submit() { + if (this.store && this.autosave === true) { + this.save(); + } + return super.submit(); + } +} + +module.exports = Input; diff --git a/node_modules/enquirer/lib/prompts/invisible.js b/node_modules/enquirer/lib/prompts/invisible.js new file mode 100644 index 0000000..5481062 --- /dev/null +++ b/node_modules/enquirer/lib/prompts/invisible.js @@ -0,0 +1,11 @@ +'use strict'; + +const StringPrompt = require('../types/string'); + +class InvisiblePrompt extends StringPrompt { + format() { + return ''; + } +} + +module.exports = InvisiblePrompt; diff --git a/node_modules/enquirer/lib/prompts/list.js b/node_modules/enquirer/lib/prompts/list.js new file mode 100644 index 0000000..7657c7f --- /dev/null +++ b/node_modules/enquirer/lib/prompts/list.js @@ -0,0 +1,36 @@ +'use strict'; + +const StringPrompt = require('../types/string'); + +class ListPrompt extends StringPrompt { + constructor(options = {}) { + super(options); + this.sep = this.options.separator || /, */; + this.initial = options.initial || ''; + } + + split(input = this.value) { + return input ? String(input).split(this.sep) : []; + } + + format() { + let style = this.state.submitted ? this.styles.primary : val => val; + return this.list.map(style).join(', '); + } + + async submit(value) { + let result = this.state.error || await this.validate(this.list, this.state); + if (result !== true) { + this.state.error = result; + return super.submit(); + } + this.value = this.list; + return super.submit(); + } + + get list() { + return this.split(); + } +} + +module.exports = ListPrompt; diff --git a/node_modules/enquirer/lib/prompts/multiselect.js b/node_modules/enquirer/lib/prompts/multiselect.js new file mode 100644 index 0000000..f64fcd5 --- /dev/null +++ b/node_modules/enquirer/lib/prompts/multiselect.js @@ -0,0 +1,11 @@ +'use strict'; + +const Select = require('./select'); + +class MultiSelect extends Select { + constructor(options) { + super({ ...options, multiple: true }); + } +} + +module.exports = MultiSelect; diff --git a/node_modules/enquirer/lib/prompts/numeral.js b/node_modules/enquirer/lib/prompts/numeral.js new file mode 100644 index 0000000..2a81fdd --- /dev/null +++ b/node_modules/enquirer/lib/prompts/numeral.js @@ -0,0 +1 @@ +module.exports = require('../types/number'); diff --git a/node_modules/enquirer/lib/prompts/password.js b/node_modules/enquirer/lib/prompts/password.js new file mode 100644 index 0000000..46df22d --- /dev/null +++ b/node_modules/enquirer/lib/prompts/password.js @@ -0,0 +1,18 @@ +'use strict'; + +const StringPrompt = require('../types/string'); + +class PasswordPrompt extends StringPrompt { + constructor(options) { + super(options); + this.cursorShow(); + } + + format(input = this.input) { + if (!this.keypressed) return ''; + let color = this.state.submitted ? this.styles.primary : this.styles.muted; + return color(this.symbols.asterisk.repeat(input.length)); + } +} + +module.exports = PasswordPrompt; diff --git a/node_modules/enquirer/lib/prompts/quiz.js b/node_modules/enquirer/lib/prompts/quiz.js new file mode 100644 index 0000000..2be4551 --- /dev/null +++ b/node_modules/enquirer/lib/prompts/quiz.js @@ -0,0 +1,37 @@ +'use strict'; + +const SelectPrompt = require('./select'); + +class Quiz extends SelectPrompt { + constructor(options) { + super(options); + if (typeof this.options.correctChoice !== 'number' || this.options.correctChoice < 0) { + throw new Error('Please specify the index of the correct answer from the list of choices'); + } + } + + async toChoices(value, parent) { + let choices = await super.toChoices(value, parent); + if (choices.length < 2) { + throw new Error('Please give at least two choices to the user'); + } + if (this.options.correctChoice > choices.length) { + throw new Error('Please specify the index of the correct answer from the list of choices'); + } + return choices; + } + + check(state) { + return state.index === this.options.correctChoice; + } + + async result(selected) { + return { + selectedAnswer: selected, + correctAnswer: this.options.choices[this.options.correctChoice].value, + correct: await this.check(this.state) + }; + } +} + +module.exports = Quiz; diff --git a/node_modules/enquirer/lib/prompts/scale.js b/node_modules/enquirer/lib/prompts/scale.js new file mode 100644 index 0000000..29d6829 --- /dev/null +++ b/node_modules/enquirer/lib/prompts/scale.js @@ -0,0 +1,237 @@ +'use strict'; + +const colors = require('ansi-colors'); +const ArrayPrompt = require('../types/array'); +const utils = require('../utils'); + +class LikertScale extends ArrayPrompt { + constructor(options = {}) { + super(options); + this.widths = [].concat(options.messageWidth || 50); + this.align = [].concat(options.align || 'left'); + this.linebreak = options.linebreak || false; + this.edgeLength = options.edgeLength || 3; + this.newline = options.newline || '\n '; + let start = options.startNumber || 1; + if (typeof this.scale === 'number') { + this.scaleKey = false; + this.scale = Array(this.scale).fill(0).map((v, i) => ({ name: i + start })); + } + } + + async reset() { + this.tableized = false; + await super.reset(); + return this.render(); + } + + tableize() { + if (this.tableized === true) return; + this.tableized = true; + let longest = 0; + + for (let ch of this.choices) { + longest = Math.max(longest, ch.message.length); + ch.scaleIndex = ch.initial || 2; + ch.scale = []; + + for (let i = 0; i < this.scale.length; i++) { + ch.scale.push({ index: i }); + } + } + this.widths[0] = Math.min(this.widths[0], longest + 3); + } + + async dispatch(s, key) { + if (this.multiple) { + return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); + } + this.alert(); + } + + heading(msg, item, i) { + return this.styles.strong(msg); + } + + separator() { + return this.styles.muted(this.symbols.ellipsis); + } + + right() { + let choice = this.focused; + if (choice.scaleIndex >= this.scale.length - 1) return this.alert(); + choice.scaleIndex++; + return this.render(); + } + + left() { + let choice = this.focused; + if (choice.scaleIndex <= 0) return this.alert(); + choice.scaleIndex--; + return this.render(); + } + + indent() { + return ''; + } + + format() { + if (this.state.submitted) { + let values = this.choices.map(ch => this.styles.info(ch.index)); + return values.join(', '); + } + return ''; + } + + pointer() { + return ''; + } + + /** + * Render the scale "Key". Something like: + * @return {String} + */ + + renderScaleKey() { + if (this.scaleKey === false) return ''; + if (this.state.submitted) return ''; + let scale = this.scale.map(item => ` ${item.name} - ${item.message}`); + let key = ['', ...scale].map(item => this.styles.muted(item)); + return key.join('\n'); + } + + /** + * Render the heading row for the scale. + * @return {String} + */ + + renderScaleHeading(max) { + let keys = this.scale.map(ele => ele.name); + if (typeof this.options.renderScaleHeading === 'function') { + keys = this.options.renderScaleHeading.call(this, max); + } + let diff = this.scaleLength - keys.join('').length; + let spacing = Math.round(diff / (keys.length - 1)); + let names = keys.map(key => this.styles.strong(key)); + let headings = names.join(' '.repeat(spacing)); + let padding = ' '.repeat(this.widths[0]); + return this.margin[3] + padding + this.margin[1] + headings; + } + + /** + * Render a scale indicator => ◯ or ◉ by default + */ + + scaleIndicator(choice, item, i) { + if (typeof this.options.scaleIndicator === 'function') { + return this.options.scaleIndicator.call(this, choice, item, i); + } + let enabled = choice.scaleIndex === item.index; + if (item.disabled) return this.styles.hint(this.symbols.radio.disabled); + if (enabled) return this.styles.success(this.symbols.radio.on); + return this.symbols.radio.off; + } + + /** + * Render the actual scale => ◯────◯────◉────◯────◯ + */ + + renderScale(choice, i) { + let scale = choice.scale.map(item => this.scaleIndicator(choice, item, i)); + let padding = this.term === 'Hyper' ? '' : ' '; + return scale.join(padding + this.symbols.line.repeat(this.edgeLength)); + } + + /** + * Render a choice, including scale => + * "The website is easy to navigate. ◯───◯───◉───◯───◯" + */ + + async renderChoice(choice, i) { + await this.onChoice(choice, i); + + let focused = this.index === i; + let pointer = await this.pointer(choice, i); + let hint = await choice.hint; + + if (hint && !utils.hasColor(hint)) { + hint = this.styles.muted(hint); + } + + let pad = str => this.margin[3] + str.replace(/\s+$/, '').padEnd(this.widths[0], ' '); + let newline = this.newline; + let ind = this.indent(choice); + let message = await this.resolve(choice.message, this.state, choice, i); + let scale = await this.renderScale(choice, i); + let margin = this.margin[1] + this.margin[3]; + this.scaleLength = colors.unstyle(scale).length; + this.widths[0] = Math.min(this.widths[0], this.width - this.scaleLength - margin.length); + let msg = utils.wordWrap(message, { width: this.widths[0], newline }); + let lines = msg.split('\n').map(line => pad(line) + this.margin[1]); + + if (focused) { + scale = this.styles.info(scale); + lines = lines.map(line => this.styles.info(line)); + } + + lines[0] += scale; + + if (this.linebreak) lines.push(''); + return [ind + pointer, lines.join('\n')].filter(Boolean); + } + + async renderChoices() { + if (this.state.submitted) return ''; + this.tableize(); + let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); + let visible = await Promise.all(choices); + let heading = await this.renderScaleHeading(); + return this.margin[0] + [heading, ...visible.map(v => v.join(' '))].join('\n'); + } + + async render() { + let { submitted, size } = this.state; + + let prefix = await this.prefix(); + let separator = await this.separator(); + let message = await this.message(); + + let prompt = ''; + if (this.options.promptLine !== false) { + prompt = [prefix, message, separator, ''].join(' '); + this.state.prompt = prompt; + } + + let header = await this.header(); + let output = await this.format(); + let key = await this.renderScaleKey(); + let help = await this.error() || await this.hint(); + let body = await this.renderChoices(); + let footer = await this.footer(); + let err = this.emptyError; + + if (output) prompt += output; + if (help && !prompt.includes(help)) prompt += ' ' + help; + + if (submitted && !output && !body.trim() && this.multiple && err != null) { + prompt += this.styles.danger(err); + } + + this.clear(size); + this.write([header, prompt, key, body, footer].filter(Boolean).join('\n')); + if (!this.state.submitted) { + this.write(this.margin[2]); + } + this.restore(); + } + + submit() { + this.value = {}; + for (let choice of this.choices) { + this.value[choice.name] = choice.scaleIndex; + } + return this.base.submit.call(this); + } +} + +module.exports = LikertScale; diff --git a/node_modules/enquirer/lib/prompts/select.js b/node_modules/enquirer/lib/prompts/select.js new file mode 100644 index 0000000..a17cc0b --- /dev/null +++ b/node_modules/enquirer/lib/prompts/select.js @@ -0,0 +1,139 @@ +'use strict'; + +const ArrayPrompt = require('../types/array'); +const utils = require('../utils'); + +class SelectPrompt extends ArrayPrompt { + constructor(options) { + super(options); + this.emptyError = this.options.emptyError || 'No items were selected'; + } + + async dispatch(s, key) { + if (this.multiple) { + return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); + } + this.alert(); + } + + separator() { + if (this.options.separator) return super.separator(); + let sep = this.styles.muted(this.symbols.ellipsis); + return this.state.submitted ? super.separator() : sep; + } + + pointer(choice, i) { + return (!this.multiple || this.options.pointer) ? super.pointer(choice, i) : ''; + } + + indicator(choice, i) { + return this.multiple ? super.indicator(choice, i) : ''; + } + + choiceMessage(choice, i) { + let message = this.resolve(choice.message, this.state, choice, i); + if (choice.role === 'heading' && !utils.hasColor(message)) { + message = this.styles.strong(message); + } + return this.resolve(message, this.state, choice, i); + } + + choiceSeparator() { + return ':'; + } + + async renderChoice(choice, i) { + await this.onChoice(choice, i); + + let focused = this.index === i; + let pointer = await this.pointer(choice, i); + let check = await this.indicator(choice, i) + (choice.pad || ''); + let hint = await this.resolve(choice.hint, this.state, choice, i); + + if (hint && !utils.hasColor(hint)) { + hint = this.styles.muted(hint); + } + + let ind = this.indent(choice); + let msg = await this.choiceMessage(choice, i); + let line = () => [this.margin[3], ind + pointer + check, msg, this.margin[1], hint].filter(Boolean).join(' '); + + if (choice.role === 'heading') { + return line(); + } + + if (choice.disabled) { + if (!utils.hasColor(msg)) { + msg = this.styles.disabled(msg); + } + return line(); + } + + if (focused) { + msg = this.styles.em(msg); + } + + return line(); + } + + async renderChoices() { + if (this.state.loading === 'choices') { + return this.styles.warning('Loading choices'); + } + + if (this.state.submitted) return ''; + let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); + let visible = await Promise.all(choices); + if (!visible.length) visible.push(this.styles.danger('No matching choices')); + let result = this.margin[0] + visible.join('\n'); + let header; + + if (this.options.choicesHeader) { + header = await this.resolve(this.options.choicesHeader, this.state); + } + + return [header, result].filter(Boolean).join('\n'); + } + + format() { + if (!this.state.submitted) return ''; + if (Array.isArray(this.selected)) { + return this.selected.map(choice => this.styles.primary(choice.name)).join(', '); + } + return this.styles.primary(this.selected.name); + } + + async render() { + let { submitted, size } = this.state; + + let prompt = ''; + let header = await this.header(); + let prefix = await this.prefix(); + let separator = await this.separator(); + let message = await this.message(); + + if (this.options.promptLine !== false) { + prompt = [prefix, message, separator, ''].join(' '); + this.state.prompt = prompt; + } + + let output = await this.format(); + let help = (await this.error()) || (await this.hint()); + let body = await this.renderChoices(); + let footer = await this.footer(); + + if (output) prompt += output; + if (help && !prompt.includes(help)) prompt += ' ' + help; + + if (submitted && !output && !body.trim() && this.multiple && this.emptyError != null) { + prompt += this.styles.danger(this.emptyError); + } + + this.clear(size); + this.write([header, prompt, body, footer].filter(Boolean).join('\n')); + this.write(this.margin[2]); + this.restore(); + } +} + +module.exports = SelectPrompt; diff --git a/node_modules/enquirer/lib/prompts/snippet.js b/node_modules/enquirer/lib/prompts/snippet.js new file mode 100644 index 0000000..eec6cc3 --- /dev/null +++ b/node_modules/enquirer/lib/prompts/snippet.js @@ -0,0 +1,185 @@ +'use strict'; + +const colors = require('ansi-colors'); +const interpolate = require('../interpolate'); +const Prompt = require('../prompt'); + +class SnippetPrompt extends Prompt { + constructor(options) { + super(options); + this.cursorHide(); + this.reset(true); + } + + async initialize() { + this.interpolate = await interpolate(this); + await super.initialize(); + } + + async reset(first) { + this.state.keys = []; + this.state.invalid = new Map(); + this.state.missing = new Set(); + this.state.completed = 0; + this.state.values = {}; + + if (first !== true) { + await this.initialize(); + await this.render(); + } + } + + moveCursor(n) { + let item = this.getItem(); + this.cursor += n; + item.cursor += n; + } + + dispatch(ch, key) { + if (!key.code && !key.ctrl && ch != null && this.getItem()) { + this.append(ch, key); + return; + } + this.alert(); + } + + append(ch, key) { + let item = this.getItem(); + let prefix = item.input.slice(0, this.cursor); + let suffix = item.input.slice(this.cursor); + this.input = item.input = `${prefix}${ch}${suffix}`; + this.moveCursor(1); + this.render(); + } + + delete() { + let item = this.getItem(); + if (this.cursor <= 0 || !item.input) return this.alert(); + let suffix = item.input.slice(this.cursor); + let prefix = item.input.slice(0, this.cursor - 1); + this.input = item.input = `${prefix}${suffix}`; + this.moveCursor(-1); + this.render(); + } + + increment(i) { + return i >= this.state.keys.length - 1 ? 0 : i + 1; + } + + decrement(i) { + return i <= 0 ? this.state.keys.length - 1 : i - 1; + } + + first() { + this.state.index = 0; + this.render(); + } + + last() { + this.state.index = this.state.keys.length - 1; + this.render(); + } + + right() { + if (this.cursor >= this.input.length) return this.alert(); + this.moveCursor(1); + this.render(); + } + + left() { + if (this.cursor <= 0) return this.alert(); + this.moveCursor(-1); + this.render(); + } + + prev() { + this.state.index = this.decrement(this.state.index); + this.getItem(); + this.render(); + } + + next() { + this.state.index = this.increment(this.state.index); + this.getItem(); + this.render(); + } + + up() { + this.prev(); + } + + down() { + this.next(); + } + + format(value) { + let color = this.state.completed < 100 ? this.styles.warning : this.styles.success; + if (this.state.submitted === true && this.state.completed !== 100) { + color = this.styles.danger; + } + return color(`${this.state.completed}% completed`); + } + + async render() { + let { index, keys = [], submitted, size } = this.state; + + let newline = [this.options.newline, '\n'].find(v => v != null); + let prefix = await this.prefix(); + let separator = await this.separator(); + let message = await this.message(); + + let prompt = [prefix, message, separator].filter(Boolean).join(' '); + this.state.prompt = prompt; + + let header = await this.header(); + let error = (await this.error()) || ''; + let hint = (await this.hint()) || ''; + let body = submitted ? '' : await this.interpolate(this.state); + + let key = this.state.key = keys[index] || ''; + let input = await this.format(key); + let footer = await this.footer(); + if (input) prompt += ' ' + input; + if (hint && !input && this.state.completed === 0) prompt += ' ' + hint; + + this.clear(size); + let lines = [header, prompt, body, footer, error.trim()]; + this.write(lines.filter(Boolean).join(newline)); + this.restore(); + } + + getItem(name) { + let { items, keys, index } = this.state; + let item = items.find(ch => ch.name === keys[index]); + if (item && item.input != null) { + this.input = item.input; + this.cursor = item.cursor; + } + return item; + } + + async submit() { + if (typeof this.interpolate !== 'function') await this.initialize(); + await this.interpolate(this.state, true); + + let { invalid, missing, output, values } = this.state; + if (invalid.size) { + let err = ''; + for (let [key, value] of invalid) err += `Invalid ${key}: ${value}\n`; + this.state.error = err; + return super.submit(); + } + + if (missing.size) { + this.state.error = 'Required: ' + [...missing.keys()].join(', '); + return super.submit(); + } + + let lines = colors.unstyle(output).split('\n'); + let result = lines.map(v => v.slice(1)).join('\n'); + this.value = { values, result }; + return super.submit(); + } +} + +module.exports = SnippetPrompt; diff --git a/node_modules/enquirer/lib/prompts/sort.js b/node_modules/enquirer/lib/prompts/sort.js new file mode 100644 index 0000000..b779b9b --- /dev/null +++ b/node_modules/enquirer/lib/prompts/sort.js @@ -0,0 +1,37 @@ +'use strict'; + +const hint = '(Use + to sort)'; +const Prompt = require('./select'); + +class Sort extends Prompt { + constructor(options) { + super({ ...options, reorder: false, sort: true, multiple: true }); + this.state.hint = [this.options.hint, hint].find(this.isValue.bind(this)); + } + + indicator() { + return ''; + } + + async renderChoice(choice, i) { + let str = await super.renderChoice(choice, i); + let sym = this.symbols.identicalTo + ' '; + let pre = (this.index === i && this.sorting) ? this.styles.muted(sym) : ' '; + if (this.options.drag === false) pre = ''; + if (this.options.numbered === true) { + return pre + `${i + 1} - ` + str; + } + return pre + str; + } + + get selected() { + return this.choices; + } + + submit() { + this.value = this.choices.map(choice => choice.value); + return super.submit(); + } +} + +module.exports = Sort; diff --git a/node_modules/enquirer/lib/prompts/survey.js b/node_modules/enquirer/lib/prompts/survey.js new file mode 100644 index 0000000..5d39f6b --- /dev/null +++ b/node_modules/enquirer/lib/prompts/survey.js @@ -0,0 +1,163 @@ +'use strict'; + +const ArrayPrompt = require('../types/array'); + +class Survey extends ArrayPrompt { + constructor(options = {}) { + super(options); + this.emptyError = options.emptyError || 'No items were selected'; + this.term = process.env.TERM_PROGRAM; + + if (!this.options.header) { + let header = ['', '4 - Strongly Agree', '3 - Agree', '2 - Neutral', '1 - Disagree', '0 - Strongly Disagree', '']; + header = header.map(ele => this.styles.muted(ele)); + this.state.header = header.join('\n '); + } + } + + async toChoices(...args) { + if (this.createdScales) return false; + this.createdScales = true; + let choices = await super.toChoices(...args); + for (let choice of choices) { + choice.scale = createScale(5, this.options); + choice.scaleIdx = 2; + } + return choices; + } + + dispatch() { + this.alert(); + } + + space() { + let choice = this.focused; + let ele = choice.scale[choice.scaleIdx]; + let selected = ele.selected; + choice.scale.forEach(e => (e.selected = false)); + ele.selected = !selected; + return this.render(); + } + + indicator() { + return ''; + } + + pointer() { + return ''; + } + + separator() { + return this.styles.muted(this.symbols.ellipsis); + } + + right() { + let choice = this.focused; + if (choice.scaleIdx >= choice.scale.length - 1) return this.alert(); + choice.scaleIdx++; + return this.render(); + } + + left() { + let choice = this.focused; + if (choice.scaleIdx <= 0) return this.alert(); + choice.scaleIdx--; + return this.render(); + } + + indent() { + return ' '; + } + + async renderChoice(item, i) { + await this.onChoice(item, i); + let focused = this.index === i; + let isHyper = this.term === 'Hyper'; + let n = !isHyper ? 8 : 9; + let s = !isHyper ? ' ' : ''; + let ln = this.symbols.line.repeat(n); + let sp = ' '.repeat(n + (isHyper ? 0 : 1)); + let dot = enabled => (enabled ? this.styles.success('◉') : '◯') + s; + + let num = i + 1 + '.'; + let color = focused ? this.styles.heading : this.styles.noop; + let msg = await this.resolve(item.message, this.state, item, i); + let indent = this.indent(item); + let scale = indent + item.scale.map((e, i) => dot(i === item.scaleIdx)).join(ln); + let val = i => i === item.scaleIdx ? color(i) : i; + let next = indent + item.scale.map((e, i) => val(i)).join(sp); + + let line = () => [num, msg].filter(Boolean).join(' '); + let lines = () => [line(), scale, next, ' '].filter(Boolean).join('\n'); + + if (focused) { + scale = this.styles.cyan(scale); + next = this.styles.cyan(next); + } + + return lines(); + } + + async renderChoices() { + if (this.state.submitted) return ''; + let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); + let visible = await Promise.all(choices); + if (!visible.length) visible.push(this.styles.danger('No matching choices')); + return visible.join('\n'); + } + + format() { + if (this.state.submitted) { + let values = this.choices.map(ch => this.styles.info(ch.scaleIdx)); + return values.join(', '); + } + return ''; + } + + async render() { + let { submitted, size } = this.state; + + let prefix = await this.prefix(); + let separator = await this.separator(); + let message = await this.message(); + + let prompt = [prefix, message, separator].filter(Boolean).join(' '); + this.state.prompt = prompt; + + let header = await this.header(); + let output = await this.format(); + let help = await this.error() || await this.hint(); + let body = await this.renderChoices(); + let footer = await this.footer(); + + if (output || !help) prompt += ' ' + output; + if (help && !prompt.includes(help)) prompt += ' ' + help; + + if (submitted && !output && !body && this.multiple && this.type !== 'form') { + prompt += this.styles.danger(this.emptyError); + } + + this.clear(size); + this.write([prompt, header, body, footer].filter(Boolean).join('\n')); + this.restore(); + } + + submit() { + this.value = {}; + for (let choice of this.choices) { + this.value[choice.name] = choice.scaleIdx; + } + return this.base.submit.call(this); + } +} + +function createScale(n, options = {}) { + if (Array.isArray(options.scale)) { + return options.scale.map(ele => ({ ...ele })); + } + let scale = []; + for (let i = 1; i < n + 1; i++) scale.push({ i, selected: false }); + return scale; +} + +module.exports = Survey; diff --git a/node_modules/enquirer/lib/prompts/text.js b/node_modules/enquirer/lib/prompts/text.js new file mode 100644 index 0000000..556e1db --- /dev/null +++ b/node_modules/enquirer/lib/prompts/text.js @@ -0,0 +1 @@ +module.exports = require('./input'); diff --git a/node_modules/enquirer/lib/prompts/toggle.js b/node_modules/enquirer/lib/prompts/toggle.js new file mode 100644 index 0000000..26d3394 --- /dev/null +++ b/node_modules/enquirer/lib/prompts/toggle.js @@ -0,0 +1,109 @@ +'use strict'; + +const BooleanPrompt = require('../types/boolean'); + +class TogglePrompt extends BooleanPrompt { + async initialize() { + await super.initialize(); + this.value = this.initial = !!this.options.initial; + this.disabled = this.options.disabled || 'no'; + this.enabled = this.options.enabled || 'yes'; + await this.render(); + } + + reset() { + this.value = this.initial; + this.render(); + } + + delete() { + this.alert(); + } + + toggle() { + this.value = !this.value; + this.render(); + } + + enable() { + if (this.value === true) return this.alert(); + this.value = true; + this.render(); + } + disable() { + if (this.value === false) return this.alert(); + this.value = false; + this.render(); + } + + up() { + this.toggle(); + } + down() { + this.toggle(); + } + right() { + this.toggle(); + } + left() { + this.toggle(); + } + next() { + this.toggle(); + } + prev() { + this.toggle(); + } + + dispatch(ch = '', key) { + switch (ch.toLowerCase()) { + case ' ': + return this.toggle(); + case '1': + case 'y': + case 't': + return this.enable(); + case '0': + case 'n': + case 'f': + return this.disable(); + default: { + return this.alert(); + } + } + } + + format() { + let active = str => this.styles.primary.underline(str); + let value = [ + this.value ? this.disabled : active(this.disabled), + this.value ? active(this.enabled) : this.enabled + ]; + return value.join(this.styles.muted(' / ')); + } + + async render() { + let { size } = this.state; + + let header = await this.header(); + let prefix = await this.prefix(); + let separator = await this.separator(); + let message = await this.message(); + + let output = await this.format(); + let help = (await this.error()) || (await this.hint()); + let footer = await this.footer(); + + let prompt = [prefix, message, separator, output].join(' '); + this.state.prompt = prompt; + + if (help && !prompt.includes(help)) prompt += ' ' + help; + + this.clear(size); + this.write([header, prompt, footer].filter(Boolean).join('\n')); + this.write(this.margin[2]); + this.restore(); + } +} + +module.exports = TogglePrompt; diff --git a/node_modules/enquirer/lib/render.js b/node_modules/enquirer/lib/render.js new file mode 100644 index 0000000..6a6df4a --- /dev/null +++ b/node_modules/enquirer/lib/render.js @@ -0,0 +1,33 @@ +'use strict'; + +module.exports = async(value, prompt, context = {}) => { + let { choices, multiple } = prompt.options; + let { size, submitted } = prompt.state; + + let prefix = context.prefix || await prompt.prefix(); + let separator = context.separator || await prompt.separator(); + let message = context.message || await prompt.message(); + + // ? Select your favorite colors > + // ^ ^ ^ + // prefix message separator + let promptLine = [prefix, message, separator].filter(Boolean).join(' '); + prompt.state.prompt = promptLine; + + let header = context.header || await prompt.header(); + let output = context.format || await prompt.format(value); + let help = context.help || await prompt.error() || await prompt.hint(); + let body = context.body || await prompt.body(); + let footer = context.footer || await prompt.footer(); + + if (output || !help) promptLine += ' ' + output; + if (help && !promptLine.includes(help)) promptLine += ' ' + help; + + if (submitted && choices && multiple && !output && !body) { + promptLine += prompt.styles.danger('No items were selected'); + } + + prompt.clear(size); + prompt.write([header, promptLine, body, footer].filter(Boolean).join('\n')); + prompt.restore(); +}; diff --git a/node_modules/enquirer/lib/roles.js b/node_modules/enquirer/lib/roles.js new file mode 100644 index 0000000..1d663d2 --- /dev/null +++ b/node_modules/enquirer/lib/roles.js @@ -0,0 +1,46 @@ +'use strict'; + +const utils = require('./utils'); +const roles = { + default(prompt, choice) { + return choice; + }, + checkbox(prompt, choice) { + throw new Error('checkbox role is not implemented yet'); + }, + editable(prompt, choice) { + throw new Error('editable role is not implemented yet'); + }, + expandable(prompt, choice) { + throw new Error('expandable role is not implemented yet'); + }, + heading(prompt, choice) { + choice.disabled = ''; + choice.indicator = [choice.indicator, ' '].find(v => v != null); + choice.message = choice.message || ''; + return choice; + }, + input(prompt, choice) { + throw new Error('input role is not implemented yet'); + }, + option(prompt, choice) { + return roles.default(prompt, choice); + }, + radio(prompt, choice) { + throw new Error('radio role is not implemented yet'); + }, + separator(prompt, choice) { + choice.disabled = ''; + choice.indicator = [choice.indicator, ' '].find(v => v != null); + choice.message = choice.message || prompt.symbols.line.repeat(5); + return choice; + }, + spacer(prompt, choice) { + return choice; + } +}; + +module.exports = (name, options = {}) => { + let role = utils.merge({}, roles, options.roles); + return role[name] || role.default; +}; diff --git a/node_modules/enquirer/lib/state.js b/node_modules/enquirer/lib/state.js new file mode 100644 index 0000000..501890b --- /dev/null +++ b/node_modules/enquirer/lib/state.js @@ -0,0 +1,69 @@ +'use strict'; + +const { define, width } = require('./utils'); + +class State { + constructor(prompt) { + let options = prompt.options; + define(this, '_prompt', prompt); + this.type = prompt.type; + this.name = prompt.name; + this.message = ''; + this.header = ''; + this.footer = ''; + this.error = ''; + this.hint = ''; + this.input = ''; + this.cursor = 0; + this.index = 0; + this.lines = 0; + this.tick = 0; + this.prompt = ''; + this.buffer = ''; + this.width = width(options.stdout || process.stdout); + Object.assign(this, options); + this.name = this.name || this.message; + this.message = this.message || this.name; + this.symbols = prompt.symbols; + this.styles = prompt.styles; + this.required = new Set(); + this.cancelled = false; + this.submitted = false; + } + + clone() { + let state = { ...this }; + state.status = this.status; + state.buffer = Buffer.from(state.buffer); + delete state.clone; + return state; + } + + set color(val) { + this._color = val; + } + get color() { + let styles = this.prompt.styles; + if (this.cancelled) return styles.cancelled; + if (this.submitted) return styles.submitted; + let color = this._color || styles[this.status]; + return typeof color === 'function' ? color : styles.pending; + } + + set loading(value) { + this._loading = value; + } + get loading() { + if (typeof this._loading === 'boolean') return this._loading; + if (this.loadingChoices) return 'choices'; + return false; + } + + get status() { + if (this.cancelled) return 'cancelled'; + if (this.submitted) return 'submitted'; + return 'pending'; + } +} + +module.exports = State; diff --git a/node_modules/enquirer/lib/styles.js b/node_modules/enquirer/lib/styles.js new file mode 100644 index 0000000..0a177f4 --- /dev/null +++ b/node_modules/enquirer/lib/styles.js @@ -0,0 +1,144 @@ +'use strict'; + +const utils = require('./utils'); +const colors = require('ansi-colors'); + +const styles = { + default: colors.noop, + noop: colors.noop, + + /** + * Modifiers + */ + + set inverse(custom) { + this._inverse = custom; + }, + get inverse() { + return this._inverse || utils.inverse(this.primary); + }, + + set complement(custom) { + this._complement = custom; + }, + get complement() { + return this._complement || utils.complement(this.primary); + }, + + /** + * Main color + */ + + primary: colors.cyan, + + /** + * Main palette + */ + + success: colors.green, + danger: colors.magenta, + strong: colors.bold, + warning: colors.yellow, + muted: colors.dim, + disabled: colors.gray, + dark: colors.dim.gray, + underline: colors.underline, + + set info(custom) { + this._info = custom; + }, + get info() { + return this._info || this.primary; + }, + + set em(custom) { + this._em = custom; + }, + get em() { + return this._em || this.primary.underline; + }, + + set heading(custom) { + this._heading = custom; + }, + get heading() { + return this._heading || this.muted.underline; + }, + + /** + * Statuses + */ + + set pending(custom) { + this._pending = custom; + }, + get pending() { + return this._pending || this.primary; + }, + + set submitted(custom) { + this._submitted = custom; + }, + get submitted() { + return this._submitted || this.success; + }, + + set cancelled(custom) { + this._cancelled = custom; + }, + get cancelled() { + return this._cancelled || this.danger; + }, + + /** + * Special styling + */ + + set typing(custom) { + this._typing = custom; + }, + get typing() { + return this._typing || this.dim; + }, + + set placeholder(custom) { + this._placeholder = custom; + }, + get placeholder() { + return this._placeholder || this.primary.dim; + }, + + set highlight(custom) { + this._highlight = custom; + }, + get highlight() { + return this._highlight || this.inverse; + } +}; + +styles.merge = (options = {}) => { + if (options.styles && typeof options.styles.enabled === 'boolean') { + colors.enabled = options.styles.enabled; + } + if (options.styles && typeof options.styles.visible === 'boolean') { + colors.visible = options.styles.visible; + } + + let result = utils.merge({}, styles, options.styles); + delete result.merge; + + for (let key of Object.keys(colors)) { + if (!result.hasOwnProperty(key)) { + Reflect.defineProperty(result, key, { get: () => colors[key] }); + } + } + + for (let key of Object.keys(colors.styles)) { + if (!result.hasOwnProperty(key)) { + Reflect.defineProperty(result, key, { get: () => colors[key] }); + } + } + return result; +}; + +module.exports = styles; diff --git a/node_modules/enquirer/lib/symbols.js b/node_modules/enquirer/lib/symbols.js new file mode 100644 index 0000000..16adb86 --- /dev/null +++ b/node_modules/enquirer/lib/symbols.js @@ -0,0 +1,66 @@ +'use strict'; + +const isWindows = process.platform === 'win32'; +const colors = require('ansi-colors'); +const utils = require('./utils'); + +const symbols = { + ...colors.symbols, + upDownDoubleArrow: '⇕', + upDownDoubleArrow2: '⬍', + upDownArrow: '↕', + asterisk: '*', + asterism: '⁂', + bulletWhite: '◦', + electricArrow: '⌁', + ellipsisLarge: '⋯', + ellipsisSmall: '…', + fullBlock: '█', + identicalTo: '≡', + indicator: colors.symbols.check, + leftAngle: '‹', + mark: '※', + minus: '−', + multiplication: '×', + obelus: '÷', + percent: '%', + pilcrow: '¶', + pilcrow2: '❡', + pencilUpRight: '✐', + pencilDownRight: '✎', + pencilRight: '✏', + plus: '+', + plusMinus: '±', + pointRight: '☞', + rightAngle: '›', + section: '§', + hexagon: { off: '⬡', on: '⬢', disabled: '⬢' }, + ballot: { on: '☑', off: '☐', disabled: '☒' }, + stars: { on: '★', off: '☆', disabled: '☆' }, + folder: { on: '▼', off: '▶', disabled: '▶' }, + prefix: { + pending: colors.symbols.question, + submitted: colors.symbols.check, + cancelled: colors.symbols.cross + }, + separator: { + pending: colors.symbols.pointerSmall, + submitted: colors.symbols.middot, + cancelled: colors.symbols.middot + }, + radio: { + off: isWindows ? '( )' : '◯', + on: isWindows ? '(*)' : '◉', + disabled: isWindows ? '(|)' : 'Ⓘ' + }, + numbers: ['⓪', '①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳', '㉑', '㉒', '㉓', '㉔', '㉕', '㉖', '㉗', '㉘', '㉙', '㉚', '㉛', '㉜', '㉝', '㉞', '㉟', '㊱', '㊲', '㊳', '㊴', '㊵', '㊶', '㊷', '㊸', '㊹', '㊺', '㊻', '㊼', '㊽', '㊾', '㊿'] +}; + +symbols.merge = options => { + let result = utils.merge({}, colors.symbols, symbols, options.symbols); + delete result.merge; + return result; +}; + +module.exports = symbols; + diff --git a/node_modules/enquirer/lib/theme.js b/node_modules/enquirer/lib/theme.js new file mode 100644 index 0000000..f9c642a --- /dev/null +++ b/node_modules/enquirer/lib/theme.js @@ -0,0 +1,11 @@ +'use strict'; + +const styles = require('./styles'); +const symbols = require('./symbols'); +const utils = require('./utils'); + +module.exports = prompt => { + prompt.options = utils.merge({}, prompt.options.theme, prompt.options); + prompt.symbols = symbols.merge(prompt.options); + prompt.styles = styles.merge(prompt.options); +}; diff --git a/node_modules/enquirer/lib/timer.js b/node_modules/enquirer/lib/timer.js new file mode 100644 index 0000000..564998b --- /dev/null +++ b/node_modules/enquirer/lib/timer.js @@ -0,0 +1,38 @@ +'use strict'; + +module.exports = prompt => { + prompt.timers = prompt.timers || {}; + + let timers = prompt.options.timers; + if (!timers) return; + + for (let key of Object.keys(timers)) { + let opts = timers[key]; + if (typeof opts === 'number') { + opts = { interval: opts }; + } + create(prompt, key, opts); + } +}; + +function create(prompt, name, options = {}) { + let timer = prompt.timers[name] = { name, start: Date.now(), ms: 0, tick: 0 }; + let ms = options.interval || 120; + timer.frames = options.frames || []; + timer.loading = true; + + let interval = setInterval(() => { + timer.ms = Date.now() - timer.start; + timer.tick++; + prompt.render(); + }, ms); + + timer.stop = () => { + timer.loading = false; + clearInterval(interval); + }; + + Reflect.defineProperty(timer, 'interval', { value: interval }); + prompt.once('close', () => timer.stop()); + return timer.stop; +} diff --git a/node_modules/enquirer/lib/types/array.js b/node_modules/enquirer/lib/types/array.js new file mode 100644 index 0000000..0a522cb --- /dev/null +++ b/node_modules/enquirer/lib/types/array.js @@ -0,0 +1,658 @@ +'use strict'; + +const colors = require('ansi-colors'); +const Prompt = require('../prompt'); +const roles = require('../roles'); +const utils = require('../utils'); +const { reorder, scrollUp, scrollDown, isObject, swap } = utils; + +class ArrayPrompt extends Prompt { + constructor(options) { + super(options); + this.cursorHide(); + this.maxSelected = options.maxSelected || Infinity; + this.multiple = options.multiple || false; + this.initial = options.initial || 0; + this.delay = options.delay || 0; + this.longest = 0; + this.num = ''; + } + + async initialize() { + if (typeof this.options.initial === 'function') { + this.initial = await this.options.initial.call(this); + } + await this.reset(true); + await super.initialize(); + } + + async reset() { + let { choices, initial, autofocus, suggest } = this.options; + this.state._choices = []; + this.state.choices = []; + + this.choices = await Promise.all(await this.toChoices(choices)); + this.choices.forEach(ch => (ch.enabled = false)); + + if (typeof suggest !== 'function' && this.selectable.length === 0) { + throw new Error('At least one choice must be selectable'); + } + + if (isObject(initial)) initial = Object.keys(initial); + if (Array.isArray(initial)) { + if (autofocus != null) this.index = this.findIndex(autofocus); + initial.forEach(v => this.enable(this.find(v))); + await this.render(); + } else { + if (autofocus != null) initial = autofocus; + if (typeof initial === 'string') initial = this.findIndex(initial); + if (typeof initial === 'number' && initial > -1) { + this.index = Math.max(0, Math.min(initial, this.choices.length)); + this.enable(this.find(this.index)); + } + } + + if (this.isDisabled(this.focused)) { + await this.down(); + } + } + + async toChoices(value, parent) { + this.state.loadingChoices = true; + let choices = []; + let index = 0; + + let toChoices = async(items, parent) => { + if (typeof items === 'function') items = await items.call(this); + if (items instanceof Promise) items = await items; + + for (let i = 0; i < items.length; i++) { + let choice = items[i] = await this.toChoice(items[i], index++, parent); + choices.push(choice); + + if (choice.choices) { + await toChoices(choice.choices, choice); + } + } + return choices; + }; + + return toChoices(value, parent) + .then(choices => { + this.state.loadingChoices = false; + return choices; + }); + } + + async toChoice(ele, i, parent) { + if (typeof ele === 'function') ele = await ele.call(this, this); + if (ele instanceof Promise) ele = await ele; + if (typeof ele === 'string') ele = { name: ele }; + + if (ele.normalized) return ele; + ele.normalized = true; + + let origVal = ele.value; + let role = roles(ele.role, this.options); + ele = role(this, ele); + + if (typeof ele.disabled === 'string' && !ele.hint) { + ele.hint = ele.disabled; + ele.disabled = true; + } + + if (ele.disabled === true && ele.hint == null) { + ele.hint = '(disabled)'; + } + + // if the choice was already normalized, return it + if (ele.index != null) return ele; + ele.name = ele.name || ele.key || ele.title || ele.value || ele.message; + ele.message = ele.message || ele.name || ''; + ele.value = [ele.value, ele.name].find(this.isValue.bind(this)); + + ele.input = ''; + ele.index = i; + ele.cursor = 0; + + utils.define(ele, 'parent', parent); + ele.level = parent ? parent.level + 1 : 1; + if (ele.indent == null) { + ele.indent = parent ? parent.indent + ' ' : (ele.indent || ''); + } + + ele.path = parent ? parent.path + '.' + ele.name : ele.name; + ele.enabled = !!(this.multiple && !this.isDisabled(ele) && (ele.enabled || this.isSelected(ele))); + + if (!this.isDisabled(ele)) { + this.longest = Math.max(this.longest, colors.unstyle(ele.message).length); + } + + // shallow clone the choice first + let choice = { ...ele }; + + // then allow the choice to be reset using the "original" values + ele.reset = (input = choice.input, value = choice.value) => { + for (let key of Object.keys(choice)) ele[key] = choice[key]; + ele.input = input; + ele.value = value; + }; + + if (origVal == null && typeof ele.initial === 'function') { + ele.input = await ele.initial.call(this, this.state, ele, i); + } + + return ele; + } + + async onChoice(choice, i) { + this.emit('choice', choice, i, this); + + if (typeof choice.onChoice === 'function') { + await choice.onChoice.call(this, this.state, choice, i); + } + } + + async addChoice(ele, i, parent) { + let choice = await this.toChoice(ele, i, parent); + this.choices.push(choice); + this.index = this.choices.length - 1; + this.limit = this.choices.length; + return choice; + } + + async newItem(item, i, parent) { + let ele = { name: 'New choice name?', editable: true, newChoice: true, ...item }; + let choice = await this.addChoice(ele, i, parent); + + choice.updateChoice = () => { + delete choice.newChoice; + choice.name = choice.message = choice.input; + choice.input = ''; + choice.cursor = 0; + }; + + return this.render(); + } + + indent(choice) { + if (choice.indent == null) { + return choice.level > 1 ? ' '.repeat(choice.level - 1) : ''; + } + return choice.indent; + } + + dispatch(s, key) { + if (this.multiple && this[key.name]) return this[key.name](); + this.alert(); + } + + focus(choice, enabled) { + if (typeof enabled !== 'boolean') enabled = choice.enabled; + if (enabled && !choice.enabled && this.selected.length >= this.maxSelected) { + return this.alert(); + } + this.index = choice.index; + choice.enabled = enabled && !this.isDisabled(choice); + return choice; + } + + space() { + if (!this.multiple) return this.alert(); + this.toggle(this.focused); + return this.render(); + } + + a() { + if (this.maxSelected < this.choices.length) return this.alert(); + let enabled = this.selectable.every(ch => ch.enabled); + this.choices.forEach(ch => (ch.enabled = !enabled)); + return this.render(); + } + + i() { + // don't allow choices to be inverted if it will result in + // more than the maximum number of allowed selected items. + if (this.choices.length - this.selected.length > this.maxSelected) { + return this.alert(); + } + this.choices.forEach(ch => (ch.enabled = !ch.enabled)); + return this.render(); + } + + g(choice = this.focused) { + if (!this.choices.some(ch => !!ch.parent)) return this.a(); + this.toggle((choice.parent && !choice.choices) ? choice.parent : choice); + return this.render(); + } + + toggle(choice, enabled) { + if (!choice.enabled && this.selected.length >= this.maxSelected) { + return this.alert(); + } + + if (typeof enabled !== 'boolean') enabled = !choice.enabled; + choice.enabled = enabled; + + if (choice.choices) { + choice.choices.forEach(ch => this.toggle(ch, enabled)); + } + + let parent = choice.parent; + while (parent) { + let choices = parent.choices.filter(ch => this.isDisabled(ch)); + parent.enabled = choices.every(ch => ch.enabled === true); + parent = parent.parent; + } + + reset(this, this.choices); + this.emit('toggle', choice, this); + return choice; + } + + enable(choice) { + if (this.selected.length >= this.maxSelected) return this.alert(); + choice.enabled = !this.isDisabled(choice); + choice.choices && choice.choices.forEach(this.enable.bind(this)); + return choice; + } + + disable(choice) { + choice.enabled = false; + choice.choices && choice.choices.forEach(this.disable.bind(this)); + return choice; + } + + number(n) { + this.num += n; + + let number = num => { + let i = Number(num); + if (i > this.choices.length - 1) return this.alert(); + + let focused = this.focused; + let choice = this.choices.find(ch => i === ch.index); + + if (!choice.enabled && this.selected.length >= this.maxSelected) { + return this.alert(); + } + + if (this.visible.indexOf(choice) === -1) { + let choices = reorder(this.choices); + let actualIdx = choices.indexOf(choice); + + if (focused.index > actualIdx) { + let start = choices.slice(actualIdx, actualIdx + this.limit); + let end = choices.filter(ch => !start.includes(ch)); + this.choices = start.concat(end); + } else { + let pos = actualIdx - this.limit + 1; + this.choices = choices.slice(pos).concat(choices.slice(0, pos)); + } + } + + this.index = this.choices.indexOf(choice); + this.toggle(this.focused); + return this.render(); + }; + + clearTimeout(this.numberTimeout); + + return new Promise(resolve => { + let len = this.choices.length; + let num = this.num; + + let handle = (val = false, res) => { + clearTimeout(this.numberTimeout); + if (val) res = number(num); + this.num = ''; + resolve(res); + }; + + if (num === '0' || (num.length === 1 && Number(num + '0') > len)) { + return handle(true); + } + + if (Number(num) > len) { + return handle(false, this.alert()); + } + + this.numberTimeout = setTimeout(() => handle(true), this.delay); + }); + } + + home() { + this.choices = reorder(this.choices); + this.index = 0; + return this.render(); + } + + end() { + let pos = this.choices.length - this.limit; + let choices = reorder(this.choices); + this.choices = choices.slice(pos).concat(choices.slice(0, pos)); + this.index = this.limit - 1; + return this.render(); + } + + first() { + this.index = 0; + return this.render(); + } + + last() { + this.index = this.visible.length - 1; + return this.render(); + } + + prev() { + if (this.visible.length <= 1) return this.alert(); + return this.up(); + } + + next() { + if (this.visible.length <= 1) return this.alert(); + return this.down(); + } + + right() { + if (this.cursor >= this.input.length) return this.alert(); + this.cursor++; + return this.render(); + } + + left() { + if (this.cursor <= 0) return this.alert(); + this.cursor--; + return this.render(); + } + + up() { + let len = this.choices.length; + let vis = this.visible.length; + let idx = this.index; + if (this.options.scroll === false && idx === 0) { + return this.alert(); + } + if (len > vis && idx === 0) { + return this.scrollUp(); + } + this.index = ((idx - 1 % len) + len) % len; + if (this.isDisabled()) { + return this.up(); + } + return this.render(); + } + + down() { + let len = this.choices.length; + let vis = this.visible.length; + let idx = this.index; + if (this.options.scroll === false && idx === vis - 1) { + return this.alert(); + } + if (len > vis && idx === vis - 1) { + return this.scrollDown(); + } + this.index = (idx + 1) % len; + if (this.isDisabled()) { + return this.down(); + } + return this.render(); + } + + scrollUp(i = 0) { + this.choices = scrollUp(this.choices); + this.index = i; + if (this.isDisabled()) { + return this.up(); + } + return this.render(); + } + + scrollDown(i = this.visible.length - 1) { + this.choices = scrollDown(this.choices); + this.index = i; + if (this.isDisabled()) { + return this.down(); + } + return this.render(); + } + + async shiftUp() { + if (this.options.sort === true) { + this.sorting = true; + this.swap(this.index - 1); + await this.up(); + this.sorting = false; + return; + } + return this.scrollUp(this.index); + } + + async shiftDown() { + if (this.options.sort === true) { + this.sorting = true; + this.swap(this.index + 1); + await this.down(); + this.sorting = false; + return; + } + return this.scrollDown(this.index); + } + + pageUp() { + if (this.visible.length <= 1) return this.alert(); + this.limit = Math.max(this.limit - 1, 0); + this.index = Math.min(this.limit - 1, this.index); + this._limit = this.limit; + if (this.isDisabled()) { + return this.up(); + } + return this.render(); + } + + pageDown() { + if (this.visible.length >= this.choices.length) return this.alert(); + this.index = Math.max(0, this.index); + this.limit = Math.min(this.limit + 1, this.choices.length); + this._limit = this.limit; + if (this.isDisabled()) { + return this.down(); + } + return this.render(); + } + + swap(pos) { + swap(this.choices, this.index, pos); + } + + isDisabled(choice = this.focused) { + let keys = ['disabled', 'collapsed', 'hidden', 'completing', 'readonly']; + if (choice && keys.some(key => choice[key] === true)) { + return true; + } + return choice && choice.role === 'heading'; + } + + isEnabled(choice = this.focused) { + if (Array.isArray(choice)) return choice.every(ch => this.isEnabled(ch)); + if (choice.choices) { + let choices = choice.choices.filter(ch => !this.isDisabled(ch)); + return choice.enabled && choices.every(ch => this.isEnabled(ch)); + } + return choice.enabled && !this.isDisabled(choice); + } + + isChoice(choice, value) { + return choice.name === value || choice.index === Number(value); + } + + isSelected(choice) { + if (Array.isArray(this.initial)) { + return this.initial.some(value => this.isChoice(choice, value)); + } + return this.isChoice(choice, this.initial); + } + + map(names = [], prop = 'value') { + return [].concat(names || []).reduce((acc, name) => { + acc[name] = this.find(name, prop); + return acc; + }, {}); + } + + filter(value, prop) { + let isChoice = (ele, i) => [ele.name, i].includes(value); + let fn = typeof value === 'function' ? value : isChoice; + let choices = this.options.multiple ? this.state._choices : this.choices; + let result = choices.filter(fn); + if (prop) { + return result.map(ch => ch[prop]); + } + return result; + } + + find(value, prop) { + if (isObject(value)) return prop ? value[prop] : value; + let isChoice = (ele, i) => [ele.name, i].includes(value); + let fn = typeof value === 'function' ? value : isChoice; + let choice = this.choices.find(fn); + if (choice) { + return prop ? choice[prop] : choice; + } + } + + findIndex(value) { + return this.choices.indexOf(this.find(value)); + } + + async submit() { + let choice = this.focused; + if (!choice) return this.alert(); + + if (choice.newChoice) { + if (!choice.input) return this.alert(); + choice.updateChoice(); + return this.render(); + } + + if (this.choices.some(ch => ch.newChoice)) { + return this.alert(); + } + + let { reorder, sort } = this.options; + let multi = this.multiple === true; + let value = this.selected; + if (value === void 0) { + return this.alert(); + } + + // re-sort choices to original order + if (Array.isArray(value) && reorder !== false && sort !== true) { + value = utils.reorder(value); + } + + this.value = multi ? value.map(ch => ch.name) : value.name; + return super.submit(); + } + + set choices(choices = []) { + this.state._choices = this.state._choices || []; + this.state.choices = choices; + + for (let choice of choices) { + if (!this.state._choices.some(ch => ch.name === choice.name)) { + this.state._choices.push(choice); + } + } + + if (!this._initial && this.options.initial) { + this._initial = true; + let init = this.initial; + if (typeof init === 'string' || typeof init === 'number') { + let choice = this.find(init); + if (choice) { + this.initial = choice.index; + this.focus(choice, true); + } + } + } + } + get choices() { + return reset(this, this.state.choices || []); + } + + set visible(visible) { + this.state.visible = visible; + } + get visible() { + return (this.state.visible || this.choices).slice(0, this.limit); + } + + set limit(num) { + this.state.limit = num; + } + get limit() { + let { state, options, choices } = this; + let limit = state.limit || this._limit || options.limit || choices.length; + return Math.min(limit, this.height); + } + + set value(value) { + super.value = value; + } + get value() { + if (typeof super.value !== 'string' && super.value === this.initial) { + return this.input; + } + return super.value; + } + + set index(i) { + this.state.index = i; + } + get index() { + return Math.max(0, this.state ? this.state.index : 0); + } + + get enabled() { + return this.filter(this.isEnabled.bind(this)); + } + + get focused() { + let choice = this.choices[this.index]; + if (choice && this.state.submitted && this.multiple !== true) { + choice.enabled = true; + } + return choice; + } + + get selectable() { + return this.choices.filter(choice => !this.isDisabled(choice)); + } + + get selected() { + return this.multiple ? this.enabled : this.focused; + } +} + +function reset(prompt, choices) { + if (choices instanceof Promise) return choices; + if (typeof choices === 'function') { + if (utils.isAsyncFn(choices)) return choices; + choices = choices.call(prompt, prompt); + } + for (let choice of choices) { + if (Array.isArray(choice.choices)) { + let items = choice.choices.filter(ch => !prompt.isDisabled(ch)); + choice.enabled = items.every(ch => ch.enabled === true); + } + if (prompt.isDisabled(choice) === true) { + delete choice.enabled; + } + } + return choices; +} + +module.exports = ArrayPrompt; diff --git a/node_modules/enquirer/lib/types/auth.js b/node_modules/enquirer/lib/types/auth.js new file mode 100644 index 0000000..c2c66fa --- /dev/null +++ b/node_modules/enquirer/lib/types/auth.js @@ -0,0 +1,29 @@ +'use strict'; + +const FormPrompt = require('../prompts/form'); + +const defaultAuthenticate = () => { + throw new Error('expected prompt to have a custom authenticate method'); +}; + +const factory = (authenticate = defaultAuthenticate) => { + + class AuthPrompt extends FormPrompt { + constructor(options) { + super(options); + } + + async submit() { + this.value = await authenticate.call(this, this.values, this.state); + super.base.submit.call(this); + } + + static create(authenticate) { + return factory(authenticate); + } + } + + return AuthPrompt; +}; + +module.exports = factory(); diff --git a/node_modules/enquirer/lib/types/boolean.js b/node_modules/enquirer/lib/types/boolean.js new file mode 100644 index 0000000..d3e7f34 --- /dev/null +++ b/node_modules/enquirer/lib/types/boolean.js @@ -0,0 +1,88 @@ +'use strict'; + +const Prompt = require('../prompt'); +const { isPrimitive, hasColor } = require('../utils'); + +class BooleanPrompt extends Prompt { + constructor(options) { + super(options); + this.cursorHide(); + } + + async initialize() { + let initial = await this.resolve(this.initial, this.state); + this.input = await this.cast(initial); + await super.initialize(); + } + + dispatch(ch) { + if (!this.isValue(ch)) return this.alert(); + this.input = ch; + return this.submit(); + } + + format(value) { + let { styles, state } = this; + return !state.submitted ? styles.primary(value) : styles.success(value); + } + + cast(input) { + return this.isTrue(input); + } + + isTrue(input) { + return /^[ty1]/i.test(input); + } + + isFalse(input) { + return /^[fn0]/i.test(input); + } + + isValue(value) { + return isPrimitive(value) && (this.isTrue(value) || this.isFalse(value)); + } + + async hint() { + if (this.state.status === 'pending') { + let hint = await this.element('hint'); + if (!hasColor(hint)) { + return this.styles.muted(hint); + } + return hint; + } + } + + async render() { + let { input, size } = this.state; + + let prefix = await this.prefix(); + let sep = await this.separator(); + let msg = await this.message(); + let hint = this.styles.muted(this.default); + + let promptLine = [prefix, msg, hint, sep].filter(Boolean).join(' '); + this.state.prompt = promptLine; + + let header = await this.header(); + let value = this.value = this.cast(input); + let output = await this.format(value); + let help = (await this.error()) || (await this.hint()); + let footer = await this.footer(); + + if (help && !promptLine.includes(help)) output += ' ' + help; + promptLine += ' ' + output; + + this.clear(size); + this.write([header, promptLine, footer].filter(Boolean).join('\n')); + this.restore(); + } + + set value(value) { + super.value = value; + } + get value() { + return this.cast(super.value); + } +} + +module.exports = BooleanPrompt; diff --git a/node_modules/enquirer/lib/types/index.js b/node_modules/enquirer/lib/types/index.js new file mode 100644 index 0000000..b3a2300 --- /dev/null +++ b/node_modules/enquirer/lib/types/index.js @@ -0,0 +1,7 @@ +module.exports = { + ArrayPrompt: require('./array'), + AuthPrompt: require('./auth'), + BooleanPrompt: require('./boolean'), + NumberPrompt: require('./number'), + StringPrompt: require('./string') +}; diff --git a/node_modules/enquirer/lib/types/number.js b/node_modules/enquirer/lib/types/number.js new file mode 100644 index 0000000..199a7c9 --- /dev/null +++ b/node_modules/enquirer/lib/types/number.js @@ -0,0 +1,86 @@ +'use strict'; + +const StringPrompt = require('./string'); + +class NumberPrompt extends StringPrompt { + constructor(options = {}) { + super({ style: 'number', ...options }); + this.min = this.isValue(options.min) ? this.toNumber(options.min) : -Infinity; + this.max = this.isValue(options.max) ? this.toNumber(options.max) : Infinity; + this.delay = options.delay != null ? options.delay : 1000; + this.float = options.float !== false; + this.round = options.round === true || options.float === false; + this.major = options.major || 10; + this.minor = options.minor || 1; + this.initial = options.initial != null ? options.initial : ''; + this.input = String(this.initial); + this.cursor = this.input.length; + this.cursorShow(); + } + + append(ch) { + if (!/[-+.]/.test(ch) || (ch === '.' && this.input.includes('.'))) { + return this.alert('invalid number'); + } + return super.append(ch); + } + + number(ch) { + return super.append(ch); + } + + next() { + if (this.input && this.input !== this.initial) return this.alert(); + if (!this.isValue(this.initial)) return this.alert(); + this.input = this.initial; + this.cursor = String(this.initial).length; + return this.render(); + } + + up(number) { + let step = number || this.minor; + let num = this.toNumber(this.input); + if (num > this.max + step) return this.alert(); + this.input = `${num + step}`; + return this.render(); + } + + down(number) { + let step = number || this.minor; + let num = this.toNumber(this.input); + if (num < this.min - step) return this.alert(); + this.input = `${num - step}`; + return this.render(); + } + + shiftDown() { + return this.down(this.major); + } + + shiftUp() { + return this.up(this.major); + } + + format(input = this.input) { + if (typeof this.options.format === 'function') { + return this.options.format.call(this, input); + } + return this.styles.info(input); + } + + toNumber(value = '') { + return this.float ? +value : Math.round(+value); + } + + isValue(value) { + return /^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(value); + } + + submit() { + let value = [this.input, this.initial].find(v => this.isValue(v)); + this.value = this.toNumber(value || 0); + return super.submit(); + } +} + +module.exports = NumberPrompt; diff --git a/node_modules/enquirer/lib/types/string.js b/node_modules/enquirer/lib/types/string.js new file mode 100644 index 0000000..d4e0ce9 --- /dev/null +++ b/node_modules/enquirer/lib/types/string.js @@ -0,0 +1,185 @@ +'use strict'; + +const Prompt = require('../prompt'); +const placeholder = require('../placeholder'); +const { isPrimitive } = require('../utils'); + +class StringPrompt extends Prompt { + constructor(options) { + super(options); + this.initial = isPrimitive(this.initial) ? String(this.initial) : ''; + if (this.initial) this.cursorHide(); + this.state.prevCursor = 0; + this.state.clipboard = []; + } + + async keypress(input, key = {}) { + let prev = this.state.prevKeypress; + this.state.prevKeypress = key; + if (this.options.multiline === true && key.name === 'return') { + if (!prev || prev.name !== 'return') { + return this.append('\n', key); + } + } + return super.keypress(input, key); + } + + moveCursor(n) { + this.cursor += n; + } + + reset() { + this.input = this.value = ''; + this.cursor = 0; + return this.render(); + } + + dispatch(ch, key) { + if (!ch || key.ctrl || key.code) return this.alert(); + this.append(ch); + } + + append(ch) { + let { cursor, input } = this.state; + this.input = `${input}`.slice(0, cursor) + ch + `${input}`.slice(cursor); + this.moveCursor(String(ch).length); + this.render(); + } + + insert(str) { + this.append(str); + } + + delete() { + let { cursor, input } = this.state; + if (cursor <= 0) return this.alert(); + this.input = `${input}`.slice(0, cursor - 1) + `${input}`.slice(cursor); + this.moveCursor(-1); + this.render(); + } + + deleteForward() { + let { cursor, input } = this.state; + if (input[cursor] === void 0) return this.alert(); + this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); + this.render(); + } + + cutForward() { + let pos = this.cursor; + if (this.input.length <= pos) return this.alert(); + this.state.clipboard.push(this.input.slice(pos)); + this.input = this.input.slice(0, pos); + this.render(); + } + + cutLeft() { + let pos = this.cursor; + if (pos === 0) return this.alert(); + let before = this.input.slice(0, pos); + let after = this.input.slice(pos); + let words = before.split(' '); + this.state.clipboard.push(words.pop()); + this.input = words.join(' '); + this.cursor = this.input.length; + this.input += after; + this.render(); + } + + paste() { + if (!this.state.clipboard.length) return this.alert(); + this.insert(this.state.clipboard.pop()); + this.render(); + } + + toggleCursor() { + if (this.state.prevCursor) { + this.cursor = this.state.prevCursor; + this.state.prevCursor = 0; + } else { + this.state.prevCursor = this.cursor; + this.cursor = 0; + } + this.render(); + } + + first() { + this.cursor = 0; + this.render(); + } + + last() { + this.cursor = this.input.length - 1; + this.render(); + } + + next() { + let init = this.initial != null ? String(this.initial) : ''; + if (!init || !init.startsWith(this.input)) return this.alert(); + this.input = this.initial; + this.cursor = this.initial.length; + this.render(); + } + + prev() { + if (!this.input) return this.alert(); + this.reset(); + } + + backward() { + return this.left(); + } + + forward() { + return this.right(); + } + + right() { + if (this.cursor >= this.input.length) return this.alert(); + this.moveCursor(1); + return this.render(); + } + + left() { + if (this.cursor <= 0) return this.alert(); + this.moveCursor(-1); + return this.render(); + } + + isValue(value) { + return !!value; + } + + async format(input = this.value) { + let initial = await this.resolve(this.initial, this.state); + if (!this.state.submitted) { + return placeholder(this, { input, initial, pos: this.cursor }); + } + return this.styles.submitted(input || initial); + } + + async render() { + let size = this.state.size; + + let prefix = await this.prefix(); + let separator = await this.separator(); + let message = await this.message(); + + let prompt = [prefix, message, separator].filter(Boolean).join(' '); + this.state.prompt = prompt; + + let header = await this.header(); + let output = await this.format(); + let help = (await this.error()) || (await this.hint()); + let footer = await this.footer(); + + if (help && !output.includes(help)) output += ' ' + help; + prompt += ' ' + output; + + this.clear(size); + this.write([header, prompt, footer].filter(Boolean).join('\n')); + this.restore(); + } +} + +module.exports = StringPrompt; diff --git a/node_modules/enquirer/lib/utils.js b/node_modules/enquirer/lib/utils.js new file mode 100644 index 0000000..7493c0d --- /dev/null +++ b/node_modules/enquirer/lib/utils.js @@ -0,0 +1,268 @@ +'use strict'; + +const toString = Object.prototype.toString; +const colors = require('ansi-colors'); +let called = false; +let fns = []; + +const complements = { + 'yellow': 'blue', + 'cyan': 'red', + 'green': 'magenta', + 'black': 'white', + 'blue': 'yellow', + 'red': 'cyan', + 'magenta': 'green', + 'white': 'black' +}; + +exports.longest = (arr, prop) => { + return arr.reduce((a, v) => Math.max(a, prop ? v[prop].length : v.length), 0); +}; + +exports.hasColor = str => !!str && colors.hasColor(str); + +const isObject = exports.isObject = val => { + return val !== null && typeof val === 'object' && !Array.isArray(val); +}; + +exports.nativeType = val => { + return toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +exports.isAsyncFn = val => { + return exports.nativeType(val) === 'asyncfunction'; +}; + +exports.isPrimitive = val => { + return val != null && typeof val !== 'object' && typeof val !== 'function'; +}; + +exports.resolve = (context, value, ...rest) => { + if (typeof value === 'function') { + return value.call(context, ...rest); + } + return value; +}; + +exports.scrollDown = (choices = []) => [...choices.slice(1), choices[0]]; +exports.scrollUp = (choices = []) => [choices.pop(), ...choices]; + +exports.reorder = (arr = []) => { + let res = arr.slice(); + res.sort((a, b) => { + if (a.index > b.index) return 1; + if (a.index < b.index) return -1; + return 0; + }); + return res; +}; + +exports.swap = (arr, index, pos) => { + let len = arr.length; + let idx = pos === len ? 0 : pos < 0 ? len - 1 : pos; + let choice = arr[index]; + arr[index] = arr[idx]; + arr[idx] = choice; +}; + +exports.width = (stream, fallback = 80) => { + let columns = (stream && stream.columns) ? stream.columns : fallback; + if (stream && typeof stream.getWindowSize === 'function') { + columns = stream.getWindowSize()[0]; + } + if (process.platform === 'win32') { + return columns - 1; + } + return columns; +}; + +exports.height = (stream, fallback = 20) => { + let rows = (stream && stream.rows) ? stream.rows : fallback; + if (stream && typeof stream.getWindowSize === 'function') { + rows = stream.getWindowSize()[1]; + } + return rows; +}; + +exports.wordWrap = (str, options = {}) => { + if (!str) return str; + + if (typeof options === 'number') { + options = { width: options }; + } + + let { indent = '', newline = ('\n' + indent), width = 80 } = options; + let spaces = (newline + indent).match(/[^\S\n]/g) || []; + width -= spaces.length; + let source = `.{1,${width}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`; + let output = str.trim(); + let regex = new RegExp(source, 'g'); + let lines = output.match(regex) || []; + lines = lines.map(line => line.replace(/\n$/, '')); + if (options.padEnd) lines = lines.map(line => line.padEnd(width, ' ')); + if (options.padStart) lines = lines.map(line => line.padStart(width, ' ')); + return indent + lines.join(newline); +}; + +exports.unmute = color => { + let name = color.stack.find(n => colors.keys.color.includes(n)); + if (name) { + return colors[name]; + } + let bg = color.stack.find(n => n.slice(2) === 'bg'); + if (bg) { + return colors[name.slice(2)]; + } + return str => str; +}; + +exports.pascal = str => str ? str[0].toUpperCase() + str.slice(1) : ''; + +exports.inverse = color => { + if (!color || !color.stack) return color; + let name = color.stack.find(n => colors.keys.color.includes(n)); + if (name) { + let col = colors['bg' + exports.pascal(name)]; + return col ? col.black : color; + } + let bg = color.stack.find(n => n.slice(0, 2) === 'bg'); + if (bg) { + return colors[bg.slice(2).toLowerCase()] || color; + } + return colors.none; +}; + +exports.complement = color => { + if (!color || !color.stack) return color; + let name = color.stack.find(n => colors.keys.color.includes(n)); + let bg = color.stack.find(n => n.slice(0, 2) === 'bg'); + if (name && !bg) { + return colors[complements[name] || name]; + } + if (bg) { + let lower = bg.slice(2).toLowerCase(); + let comp = complements[lower]; + if (!comp) return color; + return colors['bg' + exports.pascal(comp)] || color; + } + return colors.none; +}; + +exports.meridiem = date => { + let hours = date.getHours(); + let minutes = date.getMinutes(); + let ampm = hours >= 12 ? 'pm' : 'am'; + hours = hours % 12; + let hrs = hours === 0 ? 12 : hours; + let min = minutes < 10 ? '0' + minutes : minutes; + return hrs + ':' + min + ' ' + ampm; +}; + +/** + * Set a value on the given object. + * @param {Object} obj + * @param {String} prop + * @param {any} value + */ + +exports.set = (obj = {}, prop = '', val) => { + return prop.split('.').reduce((acc, k, i, arr) => { + let value = arr.length - 1 > i ? (acc[k] || {}) : val; + if (!exports.isObject(value) && i < arr.length - 1) value = {}; + return (acc[k] = value); + }, obj); +}; + +/** + * Get a value from the given object. + * @param {Object} obj + * @param {String} prop + */ + +exports.get = (obj = {}, prop = '', fallback) => { + let value = obj[prop] == null + ? prop.split('.').reduce((acc, k) => acc && acc[k], obj) + : obj[prop]; + return value == null ? fallback : value; +}; + +exports.mixin = (target, b) => { + if (!isObject(target)) return b; + if (!isObject(b)) return target; + for (let key of Object.keys(b)) { + let desc = Object.getOwnPropertyDescriptor(b, key); + if (desc.hasOwnProperty('value')) { + if (target.hasOwnProperty(key) && isObject(desc.value)) { + let existing = Object.getOwnPropertyDescriptor(target, key); + if (isObject(existing.value)) { + target[key] = exports.merge({}, target[key], b[key]); + } else { + Reflect.defineProperty(target, key, desc); + } + } else { + Reflect.defineProperty(target, key, desc); + } + } else { + Reflect.defineProperty(target, key, desc); + } + } + return target; +}; + +exports.merge = (...args) => { + let target = {}; + for (let ele of args) exports.mixin(target, ele); + return target; +}; + +exports.mixinEmitter = (obj, emitter) => { + let proto = emitter.constructor.prototype; + for (let key of Object.keys(proto)) { + let val = proto[key]; + if (typeof val === 'function') { + exports.define(obj, key, val.bind(emitter)); + } else { + exports.define(obj, key, val); + } + } +}; + +exports.onExit = callback => { + const onExit = (quit, code) => { + if (called) return; + + called = true; + fns.forEach(fn => fn()); + + if (quit === true) { + process.exit(128 + code); + } + }; + + if (fns.length === 0) { + process.once('SIGTERM', onExit.bind(null, true, 15)); + process.once('SIGINT', onExit.bind(null, true, 2)); + process.once('exit', onExit); + } + + fns.push(callback); +}; + +exports.define = (obj, key, value) => { + Reflect.defineProperty(obj, key, { value }); +}; + +exports.defineExport = (obj, key, fn) => { + let custom; + Reflect.defineProperty(obj, key, { + enumerable: true, + configurable: true, + set(val) { + custom = val; + }, + get() { + return custom ? custom() : fn(); + } + }); +}; diff --git a/node_modules/enquirer/package.json b/node_modules/enquirer/package.json new file mode 100644 index 0000000..5356097 --- /dev/null +++ b/node_modules/enquirer/package.json @@ -0,0 +1,148 @@ +{ + "_from": "enquirer@2.3.4", + "_id": "enquirer@2.3.4", + "_inBundle": false, + "_integrity": "sha512-pkYrrDZumL2VS6VBGDhqbajCM2xpkUNLuKfGPjfKaSIBKYopQbqEFyrOkRMIb2HDR/rO1kGhEt/5twBwtzKBXw==", + "_location": "/enquirer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "enquirer@2.3.4", + "name": "enquirer", + "escapedName": "enquirer", + "rawSpec": "2.3.4", + "saveSpec": null, + "fetchSpec": "2.3.4" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.4.tgz", + "_shasum": "c608f2e1134c7f68c1c9ee056de13f9b31076de9", + "_spec": "enquirer@2.3.4", + "_where": "/Users/mgolebiowski/projects/public/jquery/jquery-release", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/enquirer/enquirer/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + } + ], + "dependencies": { + "ansi-colors": "^3.2.1" + }, + "deprecated": false, + "description": "Stylish, intuitive and user-friendly prompt system. Fast and lightweight enough for small projects, powerful and extensible enough for the most advanced use cases.", + "devDependencies": { + "@types/node": "^8", + "gulp-format-md": "^2.0.0", + "inquirer": "^6.2.0", + "mocha": "^5.2.0", + "nyc": "^13.1.0", + "prompts": "^1.2.1", + "time-require": "github:jonschlinkert/time-require", + "typescript": "^3.1.6" + }, + "engines": { + "node": ">=8.6" + }, + "files": [ + "index.js", + "index.d.ts", + "lib" + ], + "homepage": "https://github.com/enquirer/enquirer", + "keywords": [ + "answer", + "answers", + "ask", + "base", + "cli", + "command", + "command-line", + "confirm", + "enquirer", + "generator", + "generate", + "hyper", + "input", + "inquire", + "inquirer", + "interface", + "iterm", + "javascript", + "node", + "nodejs", + "prompt", + "prompts", + "promptly", + "question", + "readline", + "scaffold", + "scaffolding", + "scaffolder", + "stdin", + "stdout", + "terminal", + "tty", + "ui", + "yeoman", + "yo", + "zsh" + ], + "license": "MIT", + "lintDeps": { + "devDependencies": { + "files": { + "patterns": [ + "examples/**/*.js", + "perf/*.js", + "recipes/*.js" + ] + } + } + }, + "main": "index.js", + "name": "enquirer", + "repository": { + "type": "git", + "url": "git+https://github.com/enquirer/enquirer.git" + }, + "scripts": { + "cover": "nyc --reporter=text --reporter=html mocha", + "test": "mocha && tsc -p ./test/types" + }, + "verb": { + "toc": false, + "layout": false, + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "helpers": [ + "./docs/helpers.js" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "inquirer", + "prompt-skeleton" + ] + }, + "version": "2.3.4" +} diff --git a/package.json b/package.json index 569beaa..32cce55 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "dependencies": { "chalk": "2.4.2", "changelogplease": "1.2.0", + "enquirer": "2.3.4", "github-request": "1.2.4", "semver": "6.3.0", "shelljs": "0.2.6", From ec98e772f18673b63548570f791dc583ad5bf337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Mon, 16 Mar 2020 17:36:50 +0100 Subject: [PATCH 65/83] npm: Ask for a one-time password for `npm dist-tag add` as well Closes gh-105 --- lib/npm.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/npm.js b/lib/npm.js index 77d6bda..3cf8667 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -98,7 +98,13 @@ module.exports = function( Release ) { Release.exec( npmPublish ); while ( npmTags.length ) { - npmPublish = "npm dist-tag add " + newVersion + " " + npmTags.pop(); + + // Ask for OTP before adding each tag as the code may get invalid + // if the process takes too long. + otp = await Release._getNpmOtp(); + npmPublish = `npm dist-tag add ${ newVersion } ${ npmTags.pop() } ${ + otp ? `--otp ${ otp }` : "" + }`; console.log( " " + chalk.cyan( npmPublish ) ); if ( !Release.isTest ) { Release.exec( npmPublish ); From 932f45d182c14914c1a313ae3398c5f2194c5eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Sun, 10 May 2020 23:48:26 +0200 Subject: [PATCH 66/83] CDN: Use versioned files for jquery-color --- lib/cdn.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cdn.js b/lib/cdn.js index d5e5745..45dbad2 100644 --- a/lib/cdn.js +++ b/lib/cdn.js @@ -19,6 +19,9 @@ module.exports = function( Release ) { if ( project === "qunitjs" ) { return jqueryCdn + "/qunit"; } + if ( project === "jquery-color" ) { + return jqueryCdn + "/color"; + } // Projects with different directory names than their npm package if ( /^jquery-/.test( project ) ) { From 06069005253cd176cd3dfc2a1f40ff9062cebac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Mon, 7 Dec 2020 20:07:28 +0100 Subject: [PATCH 67/83] Repo: Update the version in package-lock.json as well Closes gh-106 --- lib/repo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/repo.js b/lib/repo.js index 8be1ec1..6766348 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -6,7 +6,7 @@ var fs = require( "fs" ), module.exports = function( Release ) { Release.define( { - _jsonFiles: [ "package.json", "bower.json" ], + _jsonFiles: [ "package.json", "package-lock.json", "bower.json" ], _cloneRepo: function() { var projectRelease, releaseDependencies; @@ -270,6 +270,7 @@ Release.define( { // Update only canonical version Release._versionJSON( "package.json", Release.nextVersion ); + Release._versionJSON( "package-lock.json", Release.nextVersion ); console.log( "Committing version update..." ); Release.exec( "git commit -am \"Build: Updating the " + Release.branch + From 15e4154956f2f65d00a29f9bcb0504fd073ec932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Sun, 7 Feb 2021 14:03:57 +0100 Subject: [PATCH 68/83] Build: Make main the default branch instead of master Closes gh-107 --- README.md | 2 +- docs/usage.txt | 2 +- lib/bootstrap.js | 2 +- lib/repo.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 75afa27..f45ccd4 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ project=/path/to/fake-project cdn=/path/to/fake-cdn cd $project -git checkout master +git checkout main set +e git tag -d 0.0.1 set -e diff --git a/docs/usage.txt b/docs/usage.txt index 358017e..5359419 100644 --- a/docs/usage.txt +++ b/docs/usage.txt @@ -11,7 +11,7 @@ OPTIONS --branch=branch Specifies which branch to create the release from. - Defaults to master. + Defaults to main. --remote=repo Specifies the remote repository to work with. There are three diff --git a/lib/bootstrap.js b/lib/bootstrap.js index d7792f2..ccee740 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -41,7 +41,7 @@ Release.define( { } ); Release._parseRemote(); - Release.branch = Release.args.branch || "master"; + Release.branch = Release.args.branch || "main"; Release.preRelease = Release.args.preRelease || false; if ( Release.args.dryRun || Release.args.isTest ) { Release.isTest = true; diff --git a/lib/repo.js b/lib/repo.js index 6766348..b310db9 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -212,10 +212,10 @@ Release.define( { // Update package.json URLs console.log( "Updating package.json URLs..." ); json = Release.readPackage(); - json.author.url = json.author.url.replace( "master", Release.newVersion ); + json.author.url = json.author.url.replace( "main", Release.newVersion ); if ( json.licenses ) { json.licenses.forEach( function( license ) { - license.url = license.url.replace( "master", Release.newVersion ); + license.url = license.url.replace( "main", Release.newVersion ); } ); } Release.writePackage( json ); From 2d645e976ffaab8ed12526beed9889231f1b31cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Tue, 16 Feb 2021 14:50:57 +0100 Subject: [PATCH 69/83] Docs: Document that the `branch` option defaults to "main" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f45ccd4..924da8c 100644 --- a/README.md +++ b/README.md @@ -233,4 +233,4 @@ Timestamp for the release tag. #### branch -Which branch the release is being generated from. +Which branch the release is being generated from (defaults to `main`). From c5014e83fb390979a78ec95e5baef43a659e8d1e Mon Sep 17 00:00:00 2001 From: Timmy Willison <4timmywil@gmail.com> Date: Mon, 4 May 2020 18:46:56 -0400 Subject: [PATCH 70/83] Docs: dry-run argument should be after release.js --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 924da8c..05ce969 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ git push -f cd - npm run clean -env TEST_REMOTE=$cdn node --dry-run release.js --remote=$project +env TEST_REMOTE=$cdn node release.js --dry-run --remote=$project ``` Save as `test-release.sh` in the checkout of this repo, make it executable with `chmod +x test-release.sh`, then run with `./test-release.sh`. From 82f3f22b4f58f3681cb2b22b6bd9d6cba6c5ed93 Mon Sep 17 00:00:00 2001 From: Timmy Willison <4timmywil@gmail.com> Date: Mon, 1 Mar 2021 16:34:49 -0500 Subject: [PATCH 71/83] Build: remove dependencies from git; track with package-lock.json - Also update all dependencies - Concerns about shrinkwrap/package-lock are outdated. If there are issues, we can address them. Close gh-76 --- .gitignore | 2 +- node_modules/.bin/semver | 1 - node_modules/.bin/shjs | 1 - node_modules/.bin/which | 1 - node_modules/ansi-colors/LICENSE | 21 - node_modules/ansi-colors/README.md | 279 --- node_modules/ansi-colors/index.js | 117 -- node_modules/ansi-colors/package.json | 152 -- node_modules/ansi-colors/symbols.js | 46 - node_modules/ansi-colors/types/index.d.ts | 161 -- node_modules/ansi-styles/index.js | 165 -- node_modules/ansi-styles/license | 9 - node_modules/ansi-styles/package.json | 88 - node_modules/ansi-styles/readme.md | 147 -- node_modules/chalk/index.js | 228 --- node_modules/chalk/index.js.flow | 93 - node_modules/chalk/license | 9 - node_modules/chalk/package.json | 105 - node_modules/chalk/readme.md | 314 --- node_modules/chalk/templates.js | 128 -- node_modules/chalk/types/index.d.ts | 97 - node_modules/changelogplease/.npmignore | 4 - node_modules/changelogplease/LICENSE.txt | 20 - node_modules/changelogplease/README.md | 89 - node_modules/changelogplease/index.js | 185 -- node_modules/changelogplease/package.json | 57 - node_modules/color-convert/CHANGELOG.md | 54 - node_modules/color-convert/LICENSE | 21 - node_modules/color-convert/README.md | 68 - node_modules/color-convert/conversions.js | 868 -------- node_modules/color-convert/index.js | 78 - node_modules/color-convert/package.json | 80 - node_modules/color-convert/route.js | 97 - node_modules/color-name/.eslintrc.json | 43 - node_modules/color-name/.npmignore | 107 - node_modules/color-name/LICENSE | 8 - node_modules/color-name/README.md | 11 - node_modules/color-name/index.js | 152 -- node_modules/color-name/package.json | 52 - node_modules/color-name/test.js | 7 - node_modules/enquirer/CHANGELOG.md | 121 -- node_modules/enquirer/LICENSE | 21 - node_modules/enquirer/README.md | 1747 ----------------- node_modules/enquirer/index.d.ts | 150 -- node_modules/enquirer/index.js | 250 --- node_modules/enquirer/lib/ansi.js | 116 -- node_modules/enquirer/lib/combos.js | 75 - node_modules/enquirer/lib/completer.js | 52 - node_modules/enquirer/lib/interpolate.js | 266 --- node_modules/enquirer/lib/keypress.js | 243 --- node_modules/enquirer/lib/placeholder.js | 63 - node_modules/enquirer/lib/prompt.js | 485 ----- .../enquirer/lib/prompts/autocomplete.js | 109 - .../enquirer/lib/prompts/basicauth.js | 41 - node_modules/enquirer/lib/prompts/confirm.js | 13 - node_modules/enquirer/lib/prompts/editable.js | 136 -- node_modules/enquirer/lib/prompts/form.js | 196 -- node_modules/enquirer/lib/prompts/index.js | 28 - node_modules/enquirer/lib/prompts/input.js | 55 - .../enquirer/lib/prompts/invisible.js | 11 - node_modules/enquirer/lib/prompts/list.js | 36 - .../enquirer/lib/prompts/multiselect.js | 11 - node_modules/enquirer/lib/prompts/numeral.js | 1 - node_modules/enquirer/lib/prompts/password.js | 18 - node_modules/enquirer/lib/prompts/quiz.js | 37 - node_modules/enquirer/lib/prompts/scale.js | 237 --- node_modules/enquirer/lib/prompts/select.js | 139 -- node_modules/enquirer/lib/prompts/snippet.js | 185 -- node_modules/enquirer/lib/prompts/sort.js | 37 - node_modules/enquirer/lib/prompts/survey.js | 163 -- node_modules/enquirer/lib/prompts/text.js | 1 - node_modules/enquirer/lib/prompts/toggle.js | 109 - node_modules/enquirer/lib/render.js | 33 - node_modules/enquirer/lib/roles.js | 46 - node_modules/enquirer/lib/state.js | 69 - node_modules/enquirer/lib/styles.js | 144 -- node_modules/enquirer/lib/symbols.js | 66 - node_modules/enquirer/lib/theme.js | 11 - node_modules/enquirer/lib/timer.js | 38 - node_modules/enquirer/lib/types/array.js | 658 ------- node_modules/enquirer/lib/types/auth.js | 29 - node_modules/enquirer/lib/types/boolean.js | 88 - node_modules/enquirer/lib/types/index.js | 7 - node_modules/enquirer/lib/types/number.js | 86 - node_modules/enquirer/lib/types/string.js | 185 -- node_modules/enquirer/lib/utils.js | 268 --- node_modules/enquirer/package.json | 148 -- node_modules/escape-string-regexp/index.js | 11 - node_modules/escape-string-regexp/license | 21 - .../escape-string-regexp/package.json | 81 - node_modules/escape-string-regexp/readme.md | 27 - node_modules/git-tools/.npmignore | 3 - node_modules/git-tools/LICENSE-MIT.txt | 20 - node_modules/git-tools/README.md | 265 --- node_modules/git-tools/git-tools.js | 396 ---- node_modules/git-tools/package.json | 52 - node_modules/github-request/LICENSE.txt | 20 - node_modules/github-request/README.md | 69 - node_modules/github-request/lib/request.js | 121 -- node_modules/github-request/package.json | 47 - node_modules/has-flag/index.js | 8 - node_modules/has-flag/license | 9 - node_modules/has-flag/package.json | 75 - node_modules/has-flag/readme.md | 70 - node_modules/isexe/.npmignore | 2 - node_modules/isexe/LICENSE | 15 - node_modules/isexe/README.md | 51 - node_modules/isexe/index.js | 57 - node_modules/isexe/mode.js | 41 - node_modules/isexe/package.json | 59 - node_modules/isexe/test/basic.js | 221 --- node_modules/isexe/windows.js | 42 - node_modules/semver/CHANGELOG.md | 70 - node_modules/semver/LICENSE | 15 - node_modules/semver/README.md | 443 ----- node_modules/semver/bin/semver.js | 174 -- node_modules/semver/package.json | 60 - node_modules/semver/range.bnf | 16 - node_modules/semver/semver.js | 1596 --------------- node_modules/shelljs/.documentup.json | 6 - node_modules/shelljs/.jshintrc | 7 - node_modules/shelljs/.npmignore | 2 - node_modules/shelljs/.travis.yml | 5 - node_modules/shelljs/LICENSE | 26 - node_modules/shelljs/README.md | 552 ------ node_modules/shelljs/bin/shjs | 51 - node_modules/shelljs/global.js | 3 - node_modules/shelljs/make.js | 47 - node_modules/shelljs/package.json | 64 - node_modules/shelljs/scripts/generate-docs.js | 21 - node_modules/shelljs/scripts/run-tests.js | 50 - node_modules/shelljs/shell.js | 153 -- node_modules/shelljs/src/cat.js | 43 - node_modules/shelljs/src/cd.js | 19 - node_modules/shelljs/src/chmod.js | 208 -- node_modules/shelljs/src/common.js | 189 -- node_modules/shelljs/src/cp.js | 200 -- node_modules/shelljs/src/dirs.js | 191 -- node_modules/shelljs/src/echo.js | 20 - node_modules/shelljs/src/error.js | 10 - node_modules/shelljs/src/exec.js | 181 -- node_modules/shelljs/src/find.js | 51 - node_modules/shelljs/src/grep.js | 52 - node_modules/shelljs/src/ls.js | 126 -- node_modules/shelljs/src/mkdir.js | 68 - node_modules/shelljs/src/mv.js | 80 - node_modules/shelljs/src/popd.js | 1 - node_modules/shelljs/src/pushd.js | 1 - node_modules/shelljs/src/pwd.js | 11 - node_modules/shelljs/src/rm.js | 145 -- node_modules/shelljs/src/sed.js | 43 - node_modules/shelljs/src/tempdir.js | 56 - node_modules/shelljs/src/test.js | 85 - node_modules/shelljs/src/to.js | 29 - node_modules/shelljs/src/toEnd.js | 29 - node_modules/shelljs/src/which.js | 79 - node_modules/supports-color/browser.js | 5 - node_modules/supports-color/index.js | 131 -- node_modules/supports-color/license | 9 - node_modules/supports-color/package.json | 84 - node_modules/supports-color/readme.md | 66 - node_modules/which/CHANGELOG.md | 152 -- node_modules/which/LICENSE | 15 - node_modules/which/README.md | 51 - node_modules/which/bin/which | 52 - node_modules/which/package.json | 65 - node_modules/which/which.js | 135 -- package-lock.json | 997 ++++++++++ package.json | 14 +- 169 files changed, 1005 insertions(+), 19025 deletions(-) delete mode 120000 node_modules/.bin/semver delete mode 120000 node_modules/.bin/shjs delete mode 120000 node_modules/.bin/which delete mode 100644 node_modules/ansi-colors/LICENSE delete mode 100644 node_modules/ansi-colors/README.md delete mode 100644 node_modules/ansi-colors/index.js delete mode 100644 node_modules/ansi-colors/package.json delete mode 100644 node_modules/ansi-colors/symbols.js delete mode 100644 node_modules/ansi-colors/types/index.d.ts delete mode 100644 node_modules/ansi-styles/index.js delete mode 100644 node_modules/ansi-styles/license delete mode 100644 node_modules/ansi-styles/package.json delete mode 100644 node_modules/ansi-styles/readme.md delete mode 100644 node_modules/chalk/index.js delete mode 100644 node_modules/chalk/index.js.flow delete mode 100644 node_modules/chalk/license delete mode 100644 node_modules/chalk/package.json delete mode 100644 node_modules/chalk/readme.md delete mode 100644 node_modules/chalk/templates.js delete mode 100644 node_modules/chalk/types/index.d.ts delete mode 100644 node_modules/changelogplease/.npmignore delete mode 100644 node_modules/changelogplease/LICENSE.txt delete mode 100644 node_modules/changelogplease/README.md delete mode 100644 node_modules/changelogplease/index.js delete mode 100644 node_modules/changelogplease/package.json delete mode 100644 node_modules/color-convert/CHANGELOG.md delete mode 100644 node_modules/color-convert/LICENSE delete mode 100644 node_modules/color-convert/README.md delete mode 100644 node_modules/color-convert/conversions.js delete mode 100644 node_modules/color-convert/index.js delete mode 100644 node_modules/color-convert/package.json delete mode 100644 node_modules/color-convert/route.js delete mode 100644 node_modules/color-name/.eslintrc.json delete mode 100644 node_modules/color-name/.npmignore delete mode 100644 node_modules/color-name/LICENSE delete mode 100644 node_modules/color-name/README.md delete mode 100644 node_modules/color-name/index.js delete mode 100644 node_modules/color-name/package.json delete mode 100644 node_modules/color-name/test.js delete mode 100644 node_modules/enquirer/CHANGELOG.md delete mode 100644 node_modules/enquirer/LICENSE delete mode 100644 node_modules/enquirer/README.md delete mode 100644 node_modules/enquirer/index.d.ts delete mode 100644 node_modules/enquirer/index.js delete mode 100644 node_modules/enquirer/lib/ansi.js delete mode 100644 node_modules/enquirer/lib/combos.js delete mode 100644 node_modules/enquirer/lib/completer.js delete mode 100644 node_modules/enquirer/lib/interpolate.js delete mode 100644 node_modules/enquirer/lib/keypress.js delete mode 100644 node_modules/enquirer/lib/placeholder.js delete mode 100644 node_modules/enquirer/lib/prompt.js delete mode 100644 node_modules/enquirer/lib/prompts/autocomplete.js delete mode 100644 node_modules/enquirer/lib/prompts/basicauth.js delete mode 100644 node_modules/enquirer/lib/prompts/confirm.js delete mode 100644 node_modules/enquirer/lib/prompts/editable.js delete mode 100644 node_modules/enquirer/lib/prompts/form.js delete mode 100644 node_modules/enquirer/lib/prompts/index.js delete mode 100644 node_modules/enquirer/lib/prompts/input.js delete mode 100644 node_modules/enquirer/lib/prompts/invisible.js delete mode 100644 node_modules/enquirer/lib/prompts/list.js delete mode 100644 node_modules/enquirer/lib/prompts/multiselect.js delete mode 100644 node_modules/enquirer/lib/prompts/numeral.js delete mode 100644 node_modules/enquirer/lib/prompts/password.js delete mode 100644 node_modules/enquirer/lib/prompts/quiz.js delete mode 100644 node_modules/enquirer/lib/prompts/scale.js delete mode 100644 node_modules/enquirer/lib/prompts/select.js delete mode 100644 node_modules/enquirer/lib/prompts/snippet.js delete mode 100644 node_modules/enquirer/lib/prompts/sort.js delete mode 100644 node_modules/enquirer/lib/prompts/survey.js delete mode 100644 node_modules/enquirer/lib/prompts/text.js delete mode 100644 node_modules/enquirer/lib/prompts/toggle.js delete mode 100644 node_modules/enquirer/lib/render.js delete mode 100644 node_modules/enquirer/lib/roles.js delete mode 100644 node_modules/enquirer/lib/state.js delete mode 100644 node_modules/enquirer/lib/styles.js delete mode 100644 node_modules/enquirer/lib/symbols.js delete mode 100644 node_modules/enquirer/lib/theme.js delete mode 100644 node_modules/enquirer/lib/timer.js delete mode 100644 node_modules/enquirer/lib/types/array.js delete mode 100644 node_modules/enquirer/lib/types/auth.js delete mode 100644 node_modules/enquirer/lib/types/boolean.js delete mode 100644 node_modules/enquirer/lib/types/index.js delete mode 100644 node_modules/enquirer/lib/types/number.js delete mode 100644 node_modules/enquirer/lib/types/string.js delete mode 100644 node_modules/enquirer/lib/utils.js delete mode 100644 node_modules/enquirer/package.json delete mode 100644 node_modules/escape-string-regexp/index.js delete mode 100644 node_modules/escape-string-regexp/license delete mode 100644 node_modules/escape-string-regexp/package.json delete mode 100644 node_modules/escape-string-regexp/readme.md delete mode 100644 node_modules/git-tools/.npmignore delete mode 100644 node_modules/git-tools/LICENSE-MIT.txt delete mode 100644 node_modules/git-tools/README.md delete mode 100644 node_modules/git-tools/git-tools.js delete mode 100644 node_modules/git-tools/package.json delete mode 100644 node_modules/github-request/LICENSE.txt delete mode 100644 node_modules/github-request/README.md delete mode 100644 node_modules/github-request/lib/request.js delete mode 100644 node_modules/github-request/package.json delete mode 100644 node_modules/has-flag/index.js delete mode 100644 node_modules/has-flag/license delete mode 100644 node_modules/has-flag/package.json delete mode 100644 node_modules/has-flag/readme.md delete mode 100644 node_modules/isexe/.npmignore delete mode 100644 node_modules/isexe/LICENSE delete mode 100644 node_modules/isexe/README.md delete mode 100644 node_modules/isexe/index.js delete mode 100644 node_modules/isexe/mode.js delete mode 100644 node_modules/isexe/package.json delete mode 100644 node_modules/isexe/test/basic.js delete mode 100644 node_modules/isexe/windows.js delete mode 100644 node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/semver/LICENSE delete mode 100644 node_modules/semver/README.md delete mode 100755 node_modules/semver/bin/semver.js delete mode 100644 node_modules/semver/package.json delete mode 100644 node_modules/semver/range.bnf delete mode 100644 node_modules/semver/semver.js delete mode 100644 node_modules/shelljs/.documentup.json delete mode 100644 node_modules/shelljs/.jshintrc delete mode 100644 node_modules/shelljs/.npmignore delete mode 100644 node_modules/shelljs/.travis.yml delete mode 100644 node_modules/shelljs/LICENSE delete mode 100644 node_modules/shelljs/README.md delete mode 100755 node_modules/shelljs/bin/shjs delete mode 100644 node_modules/shelljs/global.js delete mode 100644 node_modules/shelljs/make.js delete mode 100644 node_modules/shelljs/package.json delete mode 100755 node_modules/shelljs/scripts/generate-docs.js delete mode 100755 node_modules/shelljs/scripts/run-tests.js delete mode 100644 node_modules/shelljs/shell.js delete mode 100644 node_modules/shelljs/src/cat.js delete mode 100644 node_modules/shelljs/src/cd.js delete mode 100644 node_modules/shelljs/src/chmod.js delete mode 100644 node_modules/shelljs/src/common.js delete mode 100644 node_modules/shelljs/src/cp.js delete mode 100644 node_modules/shelljs/src/dirs.js delete mode 100644 node_modules/shelljs/src/echo.js delete mode 100644 node_modules/shelljs/src/error.js delete mode 100644 node_modules/shelljs/src/exec.js delete mode 100644 node_modules/shelljs/src/find.js delete mode 100644 node_modules/shelljs/src/grep.js delete mode 100644 node_modules/shelljs/src/ls.js delete mode 100644 node_modules/shelljs/src/mkdir.js delete mode 100644 node_modules/shelljs/src/mv.js delete mode 100644 node_modules/shelljs/src/popd.js delete mode 100644 node_modules/shelljs/src/pushd.js delete mode 100644 node_modules/shelljs/src/pwd.js delete mode 100644 node_modules/shelljs/src/rm.js delete mode 100644 node_modules/shelljs/src/sed.js delete mode 100644 node_modules/shelljs/src/tempdir.js delete mode 100644 node_modules/shelljs/src/test.js delete mode 100644 node_modules/shelljs/src/to.js delete mode 100644 node_modules/shelljs/src/toEnd.js delete mode 100644 node_modules/shelljs/src/which.js delete mode 100644 node_modules/supports-color/browser.js delete mode 100644 node_modules/supports-color/index.js delete mode 100644 node_modules/supports-color/license delete mode 100644 node_modules/supports-color/package.json delete mode 100644 node_modules/supports-color/readme.md delete mode 100644 node_modules/which/CHANGELOG.md delete mode 100644 node_modules/which/LICENSE delete mode 100644 node_modules/which/README.md delete mode 100755 node_modules/which/bin/which delete mode 100644 node_modules/which/package.json delete mode 100644 node_modules/which/which.js create mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index 245c836..02ebf08 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ +/node_modules test-*.sh -package-lock.json diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver deleted file mode 120000 index 5aaadf4..0000000 --- a/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/.bin/shjs b/node_modules/.bin/shjs deleted file mode 120000 index a044997..0000000 --- a/node_modules/.bin/shjs +++ /dev/null @@ -1 +0,0 @@ -../shelljs/bin/shjs \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which deleted file mode 120000 index f62471c..0000000 --- a/node_modules/.bin/which +++ /dev/null @@ -1 +0,0 @@ -../which/bin/which \ No newline at end of file diff --git a/node_modules/ansi-colors/LICENSE b/node_modules/ansi-colors/LICENSE deleted file mode 100644 index 8749cc7..0000000 --- a/node_modules/ansi-colors/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-present, Brian Woodward. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/ansi-colors/README.md b/node_modules/ansi-colors/README.md deleted file mode 100644 index 4d27647..0000000 --- a/node_modules/ansi-colors/README.md +++ /dev/null @@ -1,279 +0,0 @@ -# ansi-colors [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) - -> Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs). - -Please consider following this project's author, [Brian Woodward](https://github.com/doowb), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save ansi-colors -``` - -![image](https://user-images.githubusercontent.com/383994/39635445-8a98a3a6-4f8b-11e8-89c1-068c45d4fff8.png) - -## Why use this? - -ansi-colors is _the fastest Node.js library for terminal styling_. A more performant drop-in replacement for chalk, with no dependencies. - -* _Blazing fast_ - Fastest terminal styling library in node.js, 10-20x faster than chalk! - -* _Drop-in replacement_ for [chalk](https://github.com/chalk/chalk). -* _No dependencies_ (Chalk has 7 dependencies in its tree!) - -* _Safe_ - Does not modify the `String.prototype` like [colors](https://github.com/Marak/colors.js). -* Supports [nested colors](#nested-colors), **and does not have the [nested styling bug](#nested-styling-bug) that is present in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur)**. -* Supports [chained colors](#chained-colors). -* [Toggle color support](#toggle-color-support) on or off. - -## Usage - -```js -const c = require('ansi-colors'); - -console.log(c.red('This is a red string!')); -console.log(c.green('This is a red string!')); -console.log(c.cyan('This is a cyan string!')); -console.log(c.yellow('This is a yellow string!')); -``` - -![image](https://user-images.githubusercontent.com/383994/39653848-a38e67da-4fc0-11e8-89ae-98c65ebe9dcf.png) - -## Chained colors - -```js -console.log(c.bold.red('this is a bold red message')); -console.log(c.bold.yellow.italic('this is a bold yellow italicized message')); -console.log(c.green.bold.underline('this is a bold green underlined message')); -``` - -![image](https://user-images.githubusercontent.com/383994/39635780-7617246a-4f8c-11e8-89e9-05216cc54e38.png) - -## Nested colors - -```js -console.log(c.yellow(`foo ${c.red.bold('red')} bar ${c.cyan('cyan')} baz`)); -``` - -![image](https://user-images.githubusercontent.com/383994/39635817-8ed93d44-4f8c-11e8-8afd-8c3ea35f5fbe.png) - -### Nested styling bug - -`ansi-colors` does not have the nested styling bug found in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur). - -```js -const { bold, red } = require('ansi-styles'); -console.log(bold(`foo ${red.dim('bar')} baz`)); - -const colorette = require('colorette'); -console.log(colorette.bold(`foo ${colorette.red(colorette.dim('bar'))} baz`)); - -const kleur = require('kleur'); -console.log(kleur.bold(`foo ${kleur.red.dim('bar')} baz`)); - -const chalk = require('chalk'); -console.log(chalk.bold(`foo ${chalk.red.dim('bar')} baz`)); -``` - -**Results in the following** - -(sans icons and labels) - -![image](https://user-images.githubusercontent.com/383994/47280326-d2ee0580-d5a3-11e8-9611-ea6010f0a253.png) - -## Toggle color support - -Easily enable/disable colors. - -```js -const c = require('ansi-colors'); - -// disable colors manually -c.enabled = false; - -// or use a library to automatically detect support -c.enabled = require('color-support').hasBasic; - -console.log(c.red('I will only be colored red if the terminal supports colors')); -``` - -## Strip ANSI codes - -Use the `.unstyle` method to strip ANSI codes from a string. - -```js -console.log(c.unstyle(c.blue.bold('foo bar baz'))); -//=> 'foo bar baz' -``` - -## Available styles - -**Note** that bright and bright-background colors are not always supported. - -| Colors | Background Colors | Bright Colors | Bright Background Colors | -| ------- | ----------------- | ------------- | ------------------------ | -| black | bgBlack | blackBright | bgBlackBright | -| red | bgRed | redBright | bgRedBright | -| green | bgGreen | greenBright | bgGreenBright | -| yellow | bgYellow | yellowBright | bgYellowBright | -| blue | bgBlue | blueBright | bgBlueBright | -| magenta | bgMagenta | magentaBright | bgMagentaBright | -| cyan | bgCyan | cyanBright | bgCyanBright | -| white | bgWhite | whiteBright | bgWhiteBright | -| gray | | | | -| grey | | | | - -_(`gray` is the U.S. spelling, `grey` is more commonly used in the Canada and U.K.)_ - -### Style modifiers - -* dim -* **bold** - -* hidden -* _italic_ - -* underline -* inverse -* ~~strikethrough~~ - -* reset - -## Performance - -**Libraries tested** - -* ansi-colors v3.0.4 -* chalk v2.4.1 - -### Mac - -> MacBook Pro, Intel Core i7, 2.3 GHz, 16 GB. - -**Load time** - -Time it takes to load the first time `require()` is called: - -* ansi-colors - `1.915ms` -* chalk - `12.437ms` - -**Benchmarks** - -``` -# All Colors - ansi-colors x 173,851 ops/sec ±0.42% (91 runs sampled) - chalk x 9,944 ops/sec ±2.53% (81 runs sampled))) - -# Chained colors - ansi-colors x 20,791 ops/sec ±0.60% (88 runs sampled) - chalk x 2,111 ops/sec ±2.34% (83 runs sampled) - -# Nested colors - ansi-colors x 59,304 ops/sec ±0.98% (92 runs sampled) - chalk x 4,590 ops/sec ±2.08% (82 runs sampled) -``` - -### Windows - -> Windows 10, Intel Core i7-7700k CPU @ 4.2 GHz, 32 GB - -**Load time** - -Time it takes to load the first time `require()` is called: - -* ansi-colors - `1.494ms` -* chalk - `11.523ms` - -**Benchmarks** - -``` -# All Colors - ansi-colors x 193,088 ops/sec ±0.51% (95 runs sampled)) - chalk x 9,612 ops/sec ±3.31% (77 runs sampled))) - -# Chained colors - ansi-colors x 26,093 ops/sec ±1.13% (94 runs sampled) - chalk x 2,267 ops/sec ±2.88% (80 runs sampled)) - -# Nested colors - ansi-colors x 67,747 ops/sec ±0.49% (93 runs sampled) - chalk x 4,446 ops/sec ±3.01% (82 runs sampled)) -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [ansi-wrap](https://www.npmjs.com/package/ansi-wrap): Create ansi colors by passing the open and close codes. | [homepage](https://github.com/jonschlinkert/ansi-wrap "Create ansi colors by passing the open and close codes.") -* [strip-color](https://www.npmjs.com/package/strip-color): Strip ANSI color codes from a string. No dependencies. | [homepage](https://github.com/jonschlinkert/strip-color "Strip ANSI color codes from a string. No dependencies.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 42 | [doowb](https://github.com/doowb) | -| 38 | [jonschlinkert](https://github.com/jonschlinkert) | -| 6 | [lukeed](https://github.com/lukeed) | -| 2 | [Silic0nS0ldier](https://github.com/Silic0nS0ldier) | -| 1 | [dwieeb](https://github.com/dwieeb) | -| 1 | [jorgebucaran](https://github.com/jorgebucaran) | -| 1 | [madhavarshney](https://github.com/madhavarshney) | -| 1 | [chapterjason](https://github.com/chapterjason) | - -### Author - -**Brian Woodward** - -* [GitHub Profile](https://github.com/doowb) -* [Twitter Profile](https://twitter.com/doowb) -* [LinkedIn Profile](https://linkedin.com/in/woodwardbrian) - -Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! - - - - - -### License - -Copyright © 2019, [Brian Woodward](https://github.com/doowb). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 03, 2019._ \ No newline at end of file diff --git a/node_modules/ansi-colors/index.js b/node_modules/ansi-colors/index.js deleted file mode 100644 index ce09969..0000000 --- a/node_modules/ansi-colors/index.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict'; - -const colors = { enabled: true, visible: true, styles: {}, keys: {} }; - -if ('FORCE_COLOR' in process.env) { - colors.enabled = process.env.FORCE_COLOR !== '0'; -} - -const ansi = style => { - style.open = `\u001b[${style.codes[0]}m`; - style.close = `\u001b[${style.codes[1]}m`; - style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'); - return style; -}; - -const wrap = (style, str, nl) => { - let { open, close, regex } = style; - str = open + (str.includes(close) ? str.replace(regex, close + open) : str) + close; - // see https://github.com/chalk/chalk/pull/92, thanks to the - // chalk contributors for this fix. However, we've confirmed that - // this issue is also present in Windows terminals - return nl ? str.replace(/\r?\n/g, `${close}$&${open}`) : str; -}; - -const style = (input, stack) => { - if (input === '' || input == null) return ''; - if (colors.enabled === false) return input; - if (colors.visible === false) return ''; - let str = '' + input; - let nl = str.includes('\n'); - let n = stack.length; - while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl); - return str; -}; - -const define = (name, codes, type) => { - colors.styles[name] = ansi({ name, codes }); - let t = colors.keys[type] || (colors.keys[type] = []); - t.push(name); - - Reflect.defineProperty(colors, name, { - get() { - let color = input => style(input, color.stack); - Reflect.setPrototypeOf(color, colors); - color.stack = this.stack ? this.stack.concat(name) : [name]; - return color; - } - }); -}; - -define('reset', [0, 0], 'modifier'); -define('bold', [1, 22], 'modifier'); -define('dim', [2, 22], 'modifier'); -define('italic', [3, 23], 'modifier'); -define('underline', [4, 24], 'modifier'); -define('inverse', [7, 27], 'modifier'); -define('hidden', [8, 28], 'modifier'); -define('strikethrough', [9, 29], 'modifier'); - -define('black', [30, 39], 'color'); -define('red', [31, 39], 'color'); -define('green', [32, 39], 'color'); -define('yellow', [33, 39], 'color'); -define('blue', [34, 39], 'color'); -define('magenta', [35, 39], 'color'); -define('cyan', [36, 39], 'color'); -define('white', [37, 39], 'color'); -define('gray', [90, 39], 'color'); -define('grey', [90, 39], 'color'); - -define('bgBlack', [40, 49], 'bg'); -define('bgRed', [41, 49], 'bg'); -define('bgGreen', [42, 49], 'bg'); -define('bgYellow', [43, 49], 'bg'); -define('bgBlue', [44, 49], 'bg'); -define('bgMagenta', [45, 49], 'bg'); -define('bgCyan', [46, 49], 'bg'); -define('bgWhite', [47, 49], 'bg'); - -define('blackBright', [90, 39], 'bright'); -define('redBright', [91, 39], 'bright'); -define('greenBright', [92, 39], 'bright'); -define('yellowBright', [93, 39], 'bright'); -define('blueBright', [94, 39], 'bright'); -define('magentaBright', [95, 39], 'bright'); -define('cyanBright', [96, 39], 'bright'); -define('whiteBright', [97, 39], 'bright'); - -define('bgBlackBright', [100, 49], 'bgBright'); -define('bgRedBright', [101, 49], 'bgBright'); -define('bgGreenBright', [102, 49], 'bgBright'); -define('bgYellowBright', [103, 49], 'bgBright'); -define('bgBlueBright', [104, 49], 'bgBright'); -define('bgMagentaBright', [105, 49], 'bgBright'); -define('bgCyanBright', [106, 49], 'bgBright'); -define('bgWhiteBright', [107, 49], 'bgBright'); - -/* eslint-disable no-control-regex */ -// this is a modified, optimized version of -// https://github.com/chalk/ansi-regex (MIT License) -const re = colors.ansiRegex = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g; - -colors.hasColor = colors.hasAnsi = str => { - re.lastIndex = 0; - return !!str && typeof str === 'string' && re.test(str); -}; - -colors.unstyle = str => { - re.lastIndex = 0; - return typeof str === 'string' ? str.replace(re, '') : str; -}; - -colors.none = colors.clear = colors.noop = str => str; // no-op, for programmatic usage -colors.stripColor = colors.unstyle; -colors.symbols = require('./symbols'); -colors.define = define; -module.exports = colors; diff --git a/node_modules/ansi-colors/package.json b/node_modules/ansi-colors/package.json deleted file mode 100644 index ea2e441..0000000 --- a/node_modules/ansi-colors/package.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "_from": "ansi-colors@^3.2.1", - "_id": "ansi-colors@3.2.4", - "_inBundle": false, - "_integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "_location": "/ansi-colors", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ansi-colors@^3.2.1", - "name": "ansi-colors", - "escapedName": "ansi-colors", - "rawSpec": "^3.2.1", - "saveSpec": null, - "fetchSpec": "^3.2.1" - }, - "_requiredBy": [ - "/enquirer" - ], - "_resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "_shasum": "e3a3da4bfbae6c86a9c285625de124a234026fbf", - "_spec": "ansi-colors@^3.2.1", - "_where": "/Users/mgolebiowski/projects/public/jquery/jquery-release/node_modules/enquirer", - "author": { - "name": "Brian Woodward", - "url": "https://github.com/doowb" - }, - "bugs": { - "url": "https://github.com/doowb/ansi-colors/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jason Schilling", - "url": "https://sourecode.de" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Jordan", - "url": "https://github.com/Silic0nS0ldier" - } - ], - "deprecated": false, - "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", - "devDependencies": { - "decache": "^4.4.0", - "gulp-format-md": "^1.0.0", - "justified": "^1.0.1", - "mocha": "^5.2.0", - "text-table": "^0.2.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "symbols.js", - "types/index.d.ts" - ], - "homepage": "https://github.com/doowb/ansi-colors", - "keywords": [ - "ansi", - "bgblack", - "bgBlack", - "bgblue", - "bgBlue", - "bgcyan", - "bgCyan", - "bggreen", - "bgGreen", - "bgmagenta", - "bgMagenta", - "bgred", - "bgRed", - "bgwhite", - "bgWhite", - "bgyellow", - "bgYellow", - "black", - "blue", - "bold", - "clorox", - "colors", - "cyan", - "dim", - "gray", - "green", - "grey", - "hidden", - "inverse", - "italic", - "kleur", - "magenta", - "red", - "reset", - "strikethrough", - "underline", - "white", - "yellow" - ], - "license": "MIT", - "main": "index.js", - "name": "ansi-colors", - "repository": { - "type": "git", - "url": "git+https://github.com/doowb/ansi-colors.git" - }, - "scripts": { - "test": "mocha" - }, - "types": "./types/index.d.ts", - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "data": { - "author": { - "linkedin": "woodwardbrian", - "twitter": "doowb" - } - }, - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "ansi-wrap", - "strip-color" - ] - }, - "reflinks": [ - "chalk", - "colorette", - "colors", - "kleur" - ] - }, - "version": "3.2.4" -} diff --git a/node_modules/ansi-colors/symbols.js b/node_modules/ansi-colors/symbols.js deleted file mode 100644 index 9643d8d..0000000 --- a/node_modules/ansi-colors/symbols.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const isWindows = process.platform === 'win32'; -const isLinux = process.platform === 'linux'; - -const windows = { - bullet: '•', - check: '√', - cross: '×', - ellipsis: '...', - heart: '❤', - info: 'i', - line: '─', - middot: '·', - minus: '-', - plus: '+', - question: '?', - questionSmall: '﹖', - pointer: '>', - pointerSmall: '»', - warning: '‼' -}; - -const other = { - ballotCross: '✘', - bullet: '•', - check: '✔', - cross: '✖', - ellipsis: '…', - heart: '❤', - info: 'ℹ', - line: '─', - middot: '·', - minus: '-', - plus: '+', - question: '?', - questionFull: '?', - questionSmall: '﹖', - pointer: isLinux ? '▸' : '❯', - pointerSmall: isLinux ? '‣' : '›', - warning: '⚠' -}; - -module.exports = isWindows ? windows : other; -Reflect.defineProperty(module.exports, 'windows', { enumerable: false, value: windows }); -Reflect.defineProperty(module.exports, 'other', { enumerable: false, value: other }); diff --git a/node_modules/ansi-colors/types/index.d.ts b/node_modules/ansi-colors/types/index.d.ts deleted file mode 100644 index ca2d24a..0000000 --- a/node_modules/ansi-colors/types/index.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -// Imported from DefinitelyTyped project. -// TypeScript definitions for ansi-colors -// Definitions by: Rogier Schouten -// Integrated by: Jordan Mele - -interface SymbolsType { - check: string; - cross: string; - info: string; - line: string; - pointer: string; - pointerSmall: string; - question: string; - warning: string; -} - -type StyleArrayStructure = [number, number]; -interface StyleArrayProperties { - open: string; - close: string; - closeRe: string; -} - -type StyleType = StyleArrayStructure & StyleArrayProperties; - -export interface StyleFunction extends StylesType { - (s: string): string; -} - -interface StylesType { - // modifiers - reset: T; - bold: T; - dim: T; - italic: T; - underline: T; - inverse: T; - hidden: T; - strikethrough: T; - - // colors - black: T; - red: T; - green: T; - yellow: T; - blue: T; - magenta: T; - cyan: T; - white: T; - gray: T; - grey: T; - - // bright colors - blackBright: T; - redBright: T; - greenBright: T; - yellowBright: T; - blueBright: T; - magentaBright: T; - cyanBright: T; - whiteBright: T; - - // background colors - bgBlack: T; - bgRed: T; - bgGreen: T; - bgYellow: T; - bgBlue: T; - bgMagenta: T; - bgCyan: T; - bgWhite: T; - - // bright background colors - bgBlackBright: T; - bgRedBright: T; - bgGreenBright: T; - bgYellowBright: T; - bgBlueBright: T; - bgMagentaBright: T; - bgCyanBright: T; - bgWhiteBright: T; -} - -// modifiers -export const reset: StyleFunction; -export const bold: StyleFunction; -export const dim: StyleFunction; -export const italic: StyleFunction; -export const underline: StyleFunction; -export const inverse: StyleFunction; -export const hidden: StyleFunction; -export const strikethrough: StyleFunction; - -// colors -export const black: StyleFunction; -export const red: StyleFunction; -export const green: StyleFunction; -export const yellow: StyleFunction; -export const blue: StyleFunction; -export const magenta: StyleFunction; -export const cyan: StyleFunction; -export const white: StyleFunction; -export const gray: StyleFunction; -export const grey: StyleFunction; - -// bright colors -export const blackBright: StyleFunction; -export const redBright: StyleFunction; -export const greenBright: StyleFunction; -export const yellowBright: StyleFunction; -export const blueBright: StyleFunction; -export const magentaBright: StyleFunction; -export const cyanBright: StyleFunction; -export const whiteBright: StyleFunction; - -// background colors -export const bgBlack: StyleFunction; -export const bgRed: StyleFunction; -export const bgGreen: StyleFunction; -export const bgYellow: StyleFunction; -export const bgBlue: StyleFunction; -export const bgMagenta: StyleFunction; -export const bgCyan: StyleFunction; -export const bgWhite: StyleFunction; - -// bright background colors -export const bgBlackBright: StyleFunction; -export const bgRedBright: StyleFunction; -export const bgGreenBright: StyleFunction; -export const bgYellowBright: StyleFunction; -export const bgBlueBright: StyleFunction; -export const bgMagentaBright: StyleFunction; -export const bgCyanBright: StyleFunction; -export const bgWhiteBright: StyleFunction; - -export let enabled: boolean; -export let visible: boolean; -export const ansiRegex: RegExp; - -/** - * Remove styles from string - */ -export function stripColor(s: string): string; - -/** - * Remove styles from string - */ -export function strip(s: string): string; - -/** - * Remove styles from string - */ -export function unstyle(s: string): string; - -export const styles: StylesType; -export const symbols: SymbolsType; - -/** - * Outputs a string with check-symbol as prefix - */ -export function ok(...args: string[]): string; diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js deleted file mode 100644 index 90a871c..0000000 --- a/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; -const colorConvert = require('color-convert'); - -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Fix humans - styles.color.grey = styles.color.gray; - - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; - - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - } - - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/node_modules/ansi-styles/license b/node_modules/ansi-styles/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json deleted file mode 100644 index 676858d..0000000 --- a/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_from": "ansi-styles@^3.2.1", - "_id": "ansi-styles@3.2.1", - "_inBundle": false, - "_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "_location": "/ansi-styles", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ansi-styles@^3.2.1", - "name": "ansi-styles", - "escapedName": "ansi-styles", - "rawSpec": "^3.2.1", - "saveSpec": null, - "fetchSpec": "^3.2.1" - }, - "_requiredBy": [ - "/chalk", - "/slice-ansi" - ], - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "_shasum": "41fbb20243e50b12be0f04b8dedbf07520ce841d", - "_spec": "ansi-styles@^3.2.1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "ava": { - "require": "babel-polyfill" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-styles/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-convert": "^1.9.0" - }, - "deprecated": false, - "description": "ANSI escape codes for styling strings in the terminal", - "devDependencies": { - "ava": "*", - "babel-polyfill": "^6.23.0", - "svg-term-cli": "^2.1.1", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-styles#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "ansi-styles", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-styles.git" - }, - "scripts": { - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", - "test": "xo && ava" - }, - "version": "3.2.1" -} diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md deleted file mode 100644 index 3158e2d..0000000 --- a/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,147 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - - - - -## Install - -``` -$ npm install ansi-styles -``` - - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `gray` ("bright black") -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/chalk/index.js b/node_modules/chalk/index.js deleted file mode 100644 index 1cc5fa8..0000000 --- a/node_modules/chalk/index.js +++ /dev/null @@ -1,228 +0,0 @@ -'use strict'; -const escapeStringRegexp = require('escape-string-regexp'); -const ansiStyles = require('ansi-styles'); -const stdoutColor = require('supports-color').stdout; - -const template = require('./templates.js'); - -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; - -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); - -const styles = Object.create(null); - -function applyOptions(obj, options) { - options = options || {}; - - // Detect level if not set manually - const scLevel = stdoutColor ? stdoutColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; -} - -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = Chalk; - - return chalk.template; - } - - applyOptions(this, options); -} - -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} - -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; -} - -styles.visible = { - get() { - return build.call(this, this._styles || [], true, 'visible'); - } -}; - -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, styles); - -function build(_styles, _empty, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder._empty = _empty; - - const self = this; - - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); - - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - return builder; -} - -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? '' : str; - } - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - for (const code of this._styles.slice().reverse()) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } - - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; - - return str; -} - -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } - - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return template(chalk, parts.join('')); -} - -Object.defineProperties(Chalk.prototype, styles); - -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = stdoutColor; -module.exports.default = module.exports; // For TypeScript diff --git a/node_modules/chalk/index.js.flow b/node_modules/chalk/index.js.flow deleted file mode 100644 index 622caaa..0000000 --- a/node_modules/chalk/index.js.flow +++ /dev/null @@ -1,93 +0,0 @@ -// @flow strict - -type TemplateStringsArray = $ReadOnlyArray; - -export type Level = $Values<{ - None: 0, - Basic: 1, - Ansi256: 2, - TrueColor: 3 -}>; - -export type ChalkOptions = {| - enabled?: boolean, - level?: Level -|}; - -export type ColorSupport = {| - level: Level, - hasBasic: boolean, - has256: boolean, - has16m: boolean -|}; - -export interface Chalk { - (...text: string[]): string, - (text: TemplateStringsArray, ...placeholders: string[]): string, - constructor(options?: ChalkOptions): Chalk, - enabled: boolean, - level: Level, - rgb(r: number, g: number, b: number): Chalk, - hsl(h: number, s: number, l: number): Chalk, - hsv(h: number, s: number, v: number): Chalk, - hwb(h: number, w: number, b: number): Chalk, - bgHex(color: string): Chalk, - bgKeyword(color: string): Chalk, - bgRgb(r: number, g: number, b: number): Chalk, - bgHsl(h: number, s: number, l: number): Chalk, - bgHsv(h: number, s: number, v: number): Chalk, - bgHwb(h: number, w: number, b: number): Chalk, - hex(color: string): Chalk, - keyword(color: string): Chalk, - - +reset: Chalk, - +bold: Chalk, - +dim: Chalk, - +italic: Chalk, - +underline: Chalk, - +inverse: Chalk, - +hidden: Chalk, - +strikethrough: Chalk, - - +visible: Chalk, - - +black: Chalk, - +red: Chalk, - +green: Chalk, - +yellow: Chalk, - +blue: Chalk, - +magenta: Chalk, - +cyan: Chalk, - +white: Chalk, - +gray: Chalk, - +grey: Chalk, - +blackBright: Chalk, - +redBright: Chalk, - +greenBright: Chalk, - +yellowBright: Chalk, - +blueBright: Chalk, - +magentaBright: Chalk, - +cyanBright: Chalk, - +whiteBright: Chalk, - - +bgBlack: Chalk, - +bgRed: Chalk, - +bgGreen: Chalk, - +bgYellow: Chalk, - +bgBlue: Chalk, - +bgMagenta: Chalk, - +bgCyan: Chalk, - +bgWhite: Chalk, - +bgBlackBright: Chalk, - +bgRedBright: Chalk, - +bgGreenBright: Chalk, - +bgYellowBright: Chalk, - +bgBlueBright: Chalk, - +bgMagentaBright: Chalk, - +bgCyanBright: Chalk, - +bgWhiteBrigh: Chalk, - - supportsColor: ColorSupport -}; - -declare module.exports: Chalk; diff --git a/node_modules/chalk/license b/node_modules/chalk/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/chalk/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json deleted file mode 100644 index daf9db9..0000000 --- a/node_modules/chalk/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_from": "chalk@2.4.2", - "_id": "chalk@2.4.2", - "_inBundle": false, - "_integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "_location": "/chalk", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "chalk@2.4.2", - "name": "chalk", - "escapedName": "chalk", - "rawSpec": "2.4.2", - "saveSpec": null, - "fetchSpec": "2.4.2" - }, - "_requiredBy": [ - "/", - "/@babel/highlight", - "/eslint", - "/inquirer" - ], - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "_shasum": "cd42541677a54333cf541a49108c1432b44c9424", - "_spec": "chalk@2.4.2", - "bugs": { - "url": "https://github.com/chalk/chalk/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "deprecated": false, - "description": "Terminal string styling done right", - "devDependencies": { - "ava": "*", - "coveralls": "^3.0.0", - "execa": "^0.9.0", - "flow-bin": "^0.68.0", - "import-fresh": "^2.0.0", - "matcha": "^0.7.0", - "nyc": "^11.0.2", - "resolve-from": "^4.0.0", - "typescript": "^2.5.3", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "templates.js", - "types/index.d.ts", - "index.js.flow" - ], - "homepage": "https://github.com/chalk/chalk#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "chalk", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/chalk.git" - }, - "scripts": { - "bench": "matcha benchmark.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava" - }, - "types": "types/index.d.ts", - "version": "2.4.2", - "xo": { - "envs": [ - "node", - "mocha" - ], - "ignores": [ - "test/_flow.js" - ] - } -} diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md deleted file mode 100644 index d298e2c..0000000 --- a/node_modules/chalk/readme.md +++ /dev/null @@ -1,314 +0,0 @@ -

-
-
- Chalk -
-
-
-

- -> Terminal string styling done right - -[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) - -### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) - - - - -## Highlights - -- Expressive API -- Highly performant -- Ability to nest styles -- [256/Truecolor color support](#256-and-truecolor-color-support) -- Auto-detects color support -- Doesn't extend `String.prototype` -- Clean and focused -- Actively maintained -- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 - - -## Install - -```console -$ npm install chalk -``` - - - - - - -## Usage - -```js -const chalk = require('chalk'); - -console.log(chalk.blue('Hello world!')); -``` - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -const chalk = require('chalk'); -const log = console.log; - -// Combine styled and normal strings -log(chalk.blue('Hello') + ' World' + chalk.red('!')); - -// Compose multiple styles using the chainable API -log(chalk.blue.bgRed.bold('Hello world!')); - -// Pass in multiple arguments -log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); - -// Nest styles -log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); - -// Nest styles of the same type even (color, underline, background) -log(chalk.green( - 'I am a green line ' + - chalk.blue.underline.bold('with a blue substring') + - ' that becomes green again!' -)); - -// ES2015 template literal -log(` -CPU: ${chalk.red('90%')} -RAM: ${chalk.green('40%')} -DISK: ${chalk.yellow('70%')} -`); - -// ES2015 tagged template literal -log(chalk` -CPU: {red ${cpu.totalPercent}%} -RAM: {green ${ram.used / ram.total * 100}%} -DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} -`); - -// Use RGB colors in terminal emulators that support it. -log(chalk.keyword('orange')('Yay for orange colored text!')); -log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); -log(chalk.hex('#DEADED').bold('Bold gray!')); -``` - -Easily define your own themes: - -```js -const chalk = require('chalk'); - -const error = chalk.bold.red; -const warning = chalk.keyword('orange'); - -console.log(error('Error!')); -console.log(warning('Warning!')); -``` - -Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): - -```js -const name = 'Sindre'; -console.log(chalk.green('Hello %s'), name); -//=> 'Hello Sindre' -``` - - -## API - -### chalk.`[....](string, [string...])` - -Example: `chalk.red.bold.underline('Hello', 'world');` - -Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. - -Multiple arguments will be separated by space. - -### chalk.enabled - -Color support is automatically detected, as is the level (see `chalk.level`). However, if you'd like to simply enable/disable Chalk, you can do so via the `.enabled` property. - -Chalk is enabled by default unless explicitly disabled via the constructor or `chalk.level` is `0`. - -If you need to change this in a reusable module, create a new instance: - -```js -const ctx = new chalk.constructor({enabled: false}); -``` - -### chalk.level - -Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers. - -If you need to change this in a reusable module, create a new instance: - -```js -const ctx = new chalk.constructor({level: 0}); -``` - -Levels are as follows: - -0. All colors disabled -1. Basic color support (16 colors) -2. 256 color support -3. Truecolor support (16 million colors) - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience. - -Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* -- `visible` (Text is emitted only if enabled) - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` *(On Windows the bright version is used since normal blue is illegible)* -- `magenta` -- `cyan` -- `white` -- `gray` ("bright black") -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - - -## Tagged template literal - -Chalk can be used as a [tagged template literal](http://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals). - -```js -const chalk = require('chalk'); - -const miles = 18; -const calculateFeet = miles => miles * 5280; - -console.log(chalk` - There are {bold 5280 feet} in a mile. - In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}. -`); -``` - -Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`). - -Template styles are chained exactly like normal Chalk styles. The following two statements are equivalent: - -```js -console.log(chalk.bold.rgb(10, 100, 200)('Hello!')); -console.log(chalk`{bold.rgb(10,100,200) Hello!}`); -``` - -Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters. - -All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped. - - -## 256 and Truecolor color support - -Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps. - -Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red). - -Examples: - -- `chalk.hex('#DEADED').underline('Hello, world!')` -- `chalk.keyword('orange')('Some orange text')` -- `chalk.rgb(15, 100, 204).inverse('Hello!')` - -Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors). - -- `chalk.bgHex('#DEADED').underline('Hello, world!')` -- `chalk.bgKeyword('orange')('Some orange text')` -- `chalk.bgRgb(15, 100, 204).inverse('Hello!')` - -The following color models can be used: - -- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')` -- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')` -- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')` -- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')` -- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')` -- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')` -- `ansi16` -- `ansi256` - - -## Windows - -If you're on Windows, do yourself a favor and use [`cmder`](http://cmder.net/) instead of `cmd.exe`. - - -## Origin story - -[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative. - - -## Related - -- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module -- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal -- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color -- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes -- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes -- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models -- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal -- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings -- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings -- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/chalk/templates.js b/node_modules/chalk/templates.js deleted file mode 100644 index dbdf9b2..0000000 --- a/node_modules/chalk/templates.js +++ /dev/null @@ -1,128 +0,0 @@ -'use strict'; -const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, args) { - const results = []; - const chunks = args.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - if (!isNaN(chunk)) { - results.push(Number(chunk)); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const styleName of Object.keys(enabled)) { - if (Array.isArray(enabled[styleName])) { - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - if (enabled[styleName].length > 0) { - current = current[styleName].apply(current, enabled[styleName]); - } else { - current = current[styleName]; - } - } - } - - return current; -} - -module.exports = (chalk, tmp) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { - if (escapeChar) { - chunk.push(unescape(escapeChar)); - } else if (style) { - const str = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(chr); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMsg); - } - - return chunks.join(''); -}; diff --git a/node_modules/chalk/types/index.d.ts b/node_modules/chalk/types/index.d.ts deleted file mode 100644 index b4e4dc5..0000000 --- a/node_modules/chalk/types/index.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -// Type definitions for Chalk -// Definitions by: Thomas Sauer - -export const enum Level { - None = 0, - Basic = 1, - Ansi256 = 2, - TrueColor = 3 -} - -export interface ChalkOptions { - enabled?: boolean; - level?: Level; -} - -export interface ChalkConstructor { - new (options?: ChalkOptions): Chalk; - (options?: ChalkOptions): Chalk; -} - -export interface ColorSupport { - level: Level; - hasBasic: boolean; - has256: boolean; - has16m: boolean; -} - -export interface Chalk { - (...text: string[]): string; - (text: TemplateStringsArray, ...placeholders: string[]): string; - constructor: ChalkConstructor; - enabled: boolean; - level: Level; - rgb(r: number, g: number, b: number): this; - hsl(h: number, s: number, l: number): this; - hsv(h: number, s: number, v: number): this; - hwb(h: number, w: number, b: number): this; - bgHex(color: string): this; - bgKeyword(color: string): this; - bgRgb(r: number, g: number, b: number): this; - bgHsl(h: number, s: number, l: number): this; - bgHsv(h: number, s: number, v: number): this; - bgHwb(h: number, w: number, b: number): this; - hex(color: string): this; - keyword(color: string): this; - - readonly reset: this; - readonly bold: this; - readonly dim: this; - readonly italic: this; - readonly underline: this; - readonly inverse: this; - readonly hidden: this; - readonly strikethrough: this; - - readonly visible: this; - - readonly black: this; - readonly red: this; - readonly green: this; - readonly yellow: this; - readonly blue: this; - readonly magenta: this; - readonly cyan: this; - readonly white: this; - readonly gray: this; - readonly grey: this; - readonly blackBright: this; - readonly redBright: this; - readonly greenBright: this; - readonly yellowBright: this; - readonly blueBright: this; - readonly magentaBright: this; - readonly cyanBright: this; - readonly whiteBright: this; - - readonly bgBlack: this; - readonly bgRed: this; - readonly bgGreen: this; - readonly bgYellow: this; - readonly bgBlue: this; - readonly bgMagenta: this; - readonly bgCyan: this; - readonly bgWhite: this; - readonly bgBlackBright: this; - readonly bgRedBright: this; - readonly bgGreenBright: this; - readonly bgYellowBright: this; - readonly bgBlueBright: this; - readonly bgMagentaBright: this; - readonly bgCyanBright: this; - readonly bgWhiteBright: this; -} - -declare const chalk: Chalk & { supportsColor: ColorSupport }; - -export default chalk diff --git a/node_modules/changelogplease/.npmignore b/node_modules/changelogplease/.npmignore deleted file mode 100644 index 36f30bb..0000000 --- a/node_modules/changelogplease/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/node_modules/ -/tests/ -.travis.yml -Gruntfile.js diff --git a/node_modules/changelogplease/LICENSE.txt b/node_modules/changelogplease/LICENSE.txt deleted file mode 100644 index 6ca2fdd..0000000 --- a/node_modules/changelogplease/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Scott González http://scottgonzalez.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. diff --git a/node_modules/changelogplease/README.md b/node_modules/changelogplease/README.md deleted file mode 100644 index fa5b4c1..0000000 --- a/node_modules/changelogplease/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# Changelog, please - -Generate changelogs from git commit messages using node.js. The generated changelogs are written in markdown. - -Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/). - -## Installation - -``` -npm install changelogplease -``` - -## Usage - -```javascript -var changelog = require( "changelogplease" ); -changelog({ - ticketUrl: "https://github.com/scottgonzalez/changelogplease/issues/{id}", - commitUrl: "https://github.com/scottgonzalez/changelogplease/commit/{id}", - repo: "/path/to/repo", - committish: "1.2.3..1.2.4" -}, function( error, log ) { - if ( error ) { - console.log( error ); - return; - } - - console.log( log ); -}); -``` - -## API - -### changelog( options, callback ) - -* `options` (Object): Options for creating the changelog. - * `ticketTypes` (Array): Which ticket types to look for when parsing logs. See [`Changelog.ticketParsers`](#changelogticketparsers) for a list of available types. Ticket references are parsed in the order specified. Defaults to `["github"]`. - * `ticketUrl` (String or Object): Template(s) for ticket/issue URLs; `{id}` will be replaced with the ticket ID. When specifying multiple values for `ticketTypes`, `ticketUrl` must be an object with the ticket type as the keys and the URL templates as the values. - * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash. - * `repo` (String): Path to the repository. - * `committish` (String): The range of commits for the changelog. - * `sort` (Boolean, Function): Function for sorting commits. By default commits are sorted alphabetically so they are grouped by component. A value of `false` disables sorting. -* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog. - * `log` (String): Generated changelog, written in markdown. - -### Changelog - -`changelog( options, callback )` is a shorthand for the following: - -```js -var Changelog = require( "changelogplease" ).Changelog; -var instance = new Changelog( options ); -instance.parse( callback ); -``` - -Changelog generation is tailored to a specific format based on the needs of the various jQuery -projects. However, the `Changelog` constructor and prototype are exposed to allow flexibility. -Be aware that these methods are not currently documented because they may change. Feel free to -submit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't -feel comfortable hacking in your own changes (or even if you do). - -### Changelog.ticketParsers - -Changelogplease supports multiple issue trackers. `Changelog.ticketParsers` defines the list of supported ticket types and allows user-defined parsers to be added. - -#### Built-in parsers - -* github: The github parser supports all forms of GitHub issue references: `#123`, `gh-123`, and `account/repo#123`. Because GitHub supports the short form `#123`, this parser can be used for other issue trackers as well. -* jira: JIRA issues must be in the form `PROJECT-123`, with the project reference in all caps. - -#### Custom parsers - -Custom parsers can be implemented by adding a new property to `Changelog.ticketParsers`. The key is the name of the parser and the value is a function which receives two parameters: - -* `commit` (String): The full commit message. -* `ticketUrl` (Function; `function( ticketId )`): A function which accepts a ticket ID and returns the URL for the specified ticket. - -The function must return an array of objects each containing two values: - -* `url`: The URL for the ticket (generated by invoking the `ticketUrl` method). -* `label`: The label for the ticket. - -## License - -Copyright Scott González. Released under the terms of the MIT license. - ---- - -Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/). diff --git a/node_modules/changelogplease/index.js b/node_modules/changelogplease/index.js deleted file mode 100644 index 992cd50..0000000 --- a/node_modules/changelogplease/index.js +++ /dev/null @@ -1,185 +0,0 @@ -var Repo = require( "git-tools" ); - -exports = module.exports = changelog; -exports.Changelog = Changelog; - -function changelog( options, callback ) { - var instance = new Changelog( options ); - - if ( callback ) { - instance.parse( callback ); - } - - return instance; -} - -function Changelog( options ) { - this.options = options; - this.repo = new Repo( this.options.repo ); - - if ( !this.options.ticketTypes ) { - - // GitHub is the default because it's common - // and also handles the generic form of #XXX - this.options.ticketTypes = [ "github" ]; - } - - // Normalize ticketUrl to a hash - if ( typeof this.options.ticketUrl === "string" ) { - this.options.ticketUrl = { - _default: this.options.ticketUrl - }; - } - - this.createTicketUrlParsers(); - - // Bind all methods to the instance - for ( var method in this ) { - if ( typeof this[ method ] === "function" ) { - this[ method ] = this[ method ].bind( this ); - } - } -} - -Changelog.ticketParsers = { - github: function ( commit, ticketUrl ) { - var tickets = []; - - // Sane global exec with iteration over matches - commit.replace( - /Fix(?:e[sd])? ((?:[a-zA-Z0-9_-]{1,39}\/[a-zA-Z0-9_-]{1,100}#)|#|gh-)(\d+)/g, - function ( match, refType, ticketId ) { - var ticketRef = { - url: ticketUrl( ticketId ), - label: "#" + ticketId - }; - - // If the refType has anything before the #, assume it's a GitHub ref - if ( /.#$/.test( refType ) ) { - refType = refType.replace( /#$/, "" ); - ticketRef.url = "https://github.com/" + refType + "/issues/" + ticketId; - ticketRef.label = refType + ticketRef.label; - } - - tickets.push( ticketRef ); - } - ); - - return tickets; - }, - - jira: function ( commit, ticketUrl ) { - var tickets = []; - - // Sane global exec with iteration over matches - commit.replace( - /Fix(?:e[sd])? ([A-Z][A-Z0-9_]+-\d+)/g, - function ( match, ticketId ) { - var ticketRef = { - url: ticketUrl( ticketId ), - label: ticketId - }; - - tickets.push( ticketRef ); - } - ); - - return tickets; - } -}; - -Changelog.prototype.createTicketUrlParsers = function() { - this.ticketUrls = {}; - Object.keys( this.options.ticketUrl ).forEach(function( type ) { - this.ticketUrls[ type ] = function( id ) { - return this.options.ticketUrl[ type ].replace( "{id}", id ); - }.bind( this ); - }, this ); -}; - -Changelog.prototype.parse = function( callback ) { - this.getLog(function( error, log ) { - if ( error ) { - return callback( error ); - } - - callback( null, this.parseCommits( log ) ); - }.bind( this )); -}; - -Changelog.prototype.getLog = function( callback ) { - var commitUrl = this.options.commitUrl.replace( "{id}", "%H" ); - - this.repo.exec( "log", - "--format=" + - "__COMMIT__%n" + - "%s (__TICKETREF__, [%h](" + commitUrl + "))%n" + - "%b", - this.options.committish, - callback ); -}; - -Changelog.prototype.sort = function( commits ) { - if ( this.options.sort === false ) { - return commits; - } - - if ( typeof this.options.sort === "function" ) { - return this.options.sort( commits ); - } - - // Sort commits so that they're grouped by component - var component = /^([^:]+):/; - return commits.sort(function( a, b ) { - var aMatch = a.match( component ), - bMatch = b.match( component ); - - if ( aMatch && bMatch) { - return aMatch[ 1 ].localeCompare( bMatch[ 1 ] ); - } - - return a.localeCompare( b ); - }); -}; - -Changelog.prototype.parseCommits = function( commits ) { - commits = commits.split( "__COMMIT__\n" ); - commits.shift(); - - // Parse each individual commit - commits = commits.map( this.parseCommit ); - - // Sort commits - commits = this.sort( commits ); - - return commits.join( "\n" ) + "\n"; -}; - -Changelog.prototype.parseCommit = function( commit ) { - var tickets = []; - - this.options.ticketTypes.forEach( function( ticketType ) { - tickets = tickets.concat( - Changelog.ticketParsers[ ticketType ]( - commit, - this.ticketUrls[ ticketType ] || this.ticketUrls._default - ) - ); - }, this ); - - // Only keep the summary for the changelog; drop the body - var parsed = "* " + commit.split( /\r?\n/ )[ 0 ]; - - // Add in ticket references - // Leave __TICKETREF__ token in place so it's easy to find commits without tickets - if ( tickets.length ) { - parsed = parsed.replace( "__TICKETREF__", tickets.map(function( ticket ) { - return "[" + ticket.label + "](" + ticket.url + ")"; - }).join( ", " ) ); - } - - // Remove cherry pick references - parsed = parsed.replace( / \(cherry picked from commit [^)]+\)/, "" ); - - return parsed; -}; diff --git a/node_modules/changelogplease/package.json b/node_modules/changelogplease/package.json deleted file mode 100644 index 56060e4..0000000 --- a/node_modules/changelogplease/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_from": "changelogplease@1.2.0", - "_id": "changelogplease@1.2.0", - "_inBundle": false, - "_integrity": "sha1-1o0CqlS6oZAzJRLUfx1bR+cSNQ4=", - "_location": "/changelogplease", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "changelogplease@1.2.0", - "name": "changelogplease", - "escapedName": "changelogplease", - "rawSpec": "1.2.0", - "saveSpec": null, - "fetchSpec": "1.2.0" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.2.0.tgz", - "_shasum": "d68d02aa54baa190332512d47f1d5b47e712350e", - "_spec": "changelogplease@1.2.0", - "author": { - "name": "Scott González", - "email": "scott.gonzalez@gmail.com", - "url": "http://scottgonzalez.com" - }, - "bugs": { - "url": "https://github.com/scottgonzalez/changelogplease/issues" - }, - "bundleDependencies": false, - "dependencies": { - "git-tools": "0.1.0" - }, - "deprecated": false, - "description": "Generate changelogs from git commit messages", - "devDependencies": { - "nodeunit": "0.8.6" - }, - "homepage": "https://github.com/scottgonzalez/changelogplease", - "keywords": [ - "changelog", - "release" - ], - "license": "MIT", - "main": "index.js", - "name": "changelogplease", - "repository": { - "type": "git", - "url": "git://github.com/scottgonzalez/changelogplease.git" - }, - "scripts": { - "test": "nodeunit tests" - }, - "version": "1.2.0" -} diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md deleted file mode 100644 index 0a7bce4..0000000 --- a/node_modules/color-convert/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -# 1.0.0 - 2016-01-07 - -- Removed: unused speed test -- Added: Automatic routing between previously unsupported conversions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `convert()` class -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: all functions to lookup dictionary -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: `ansi` to `ansi256` -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Fixed: argument grouping for functions requiring only one argument -([#27](https://github.com/Qix-/color-convert/pull/27)) - -# 0.6.0 - 2015-07-23 - -- Added: methods to handle -[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: - - rgb2ansi16 - - rgb2ansi - - hsl2ansi16 - - hsl2ansi - - hsv2ansi16 - - hsv2ansi - - hwb2ansi16 - - hwb2ansi - - cmyk2ansi16 - - cmyk2ansi - - keyword2ansi16 - - keyword2ansi - - ansi162rgb - - ansi162hsl - - ansi162hsv - - ansi162hwb - - ansi162cmyk - - ansi162keyword - - ansi2rgb - - ansi2hsl - - ansi2hsv - - ansi2hwb - - ansi2cmyk - - ansi2keyword -([#18](https://github.com/harthur/color-convert/pull/18)) - -# 0.5.3 - 2015-06-02 - -- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` -([#15](https://github.com/harthur/color-convert/issues/15)) - ---- - -Check out commit logs for older releases diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE deleted file mode 100644 index 5b4c386..0000000 --- a/node_modules/color-convert/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011-2016 Heather Arthur - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/color-convert/README.md b/node_modules/color-convert/README.md deleted file mode 100644 index d4b08fc..0000000 --- a/node_modules/color-convert/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# color-convert - -[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) - -Color-convert is a color conversion library for JavaScript and node. -It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): - -```js -var convert = require('color-convert'); - -convert.rgb.hsl(140, 200, 100); // [96, 48, 59] -convert.keyword.rgb('blue'); // [0, 0, 255] - -var rgbChannels = convert.rgb.channels; // 3 -var cmykChannels = convert.cmyk.channels; // 4 -var ansiChannels = convert.ansi16.channels; // 1 -``` - -# Install - -```console -$ npm install color-convert -``` - -# API - -Simply get the property of the _from_ and _to_ conversion that you're looking for. - -All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. - -All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). - -```js -var convert = require('color-convert'); - -// Hex to LAB -convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] -convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] - -// RGB to CMYK -convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] -convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] -``` - -### Arrays -All functions that accept multiple arguments also support passing an array. - -Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) - -```js -var convert = require('color-convert'); - -convert.rgb.hex(123, 45, 67); // '7B2D43' -convert.rgb.hex([123, 45, 67]); // '7B2D43' -``` - -## Routing - -Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). - -Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). - -# Contribute - -If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. - -# License -Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js deleted file mode 100644 index 3217200..0000000 --- a/node_modules/color-convert/conversions.js +++ /dev/null @@ -1,868 +0,0 @@ -/* MIT license */ -var cssKeywords = require('color-name'); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -var reverseKeywords = {}; -for (var key in cssKeywords) { - if (cssKeywords.hasOwnProperty(key)) { - reverseKeywords[cssKeywords[key]] = key; - } -} - -var convert = module.exports = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -// hide .channels and .labels properties -for (var model in convert) { - if (convert.hasOwnProperty(model)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - var channels = convert[model].channels; - var labels = convert[model].labels; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); - } -} - -convert.rgb.hsl = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var min = Math.min(r, g, b); - var max = Math.max(r, g, b); - var delta = max - min; - var h; - var s; - var l; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - var rdif; - var gdif; - var bdif; - var h; - var s; - - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var v = Math.max(r, g, b); - var diff = v - Math.min(r, g, b); - var diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - var r = rgb[0]; - var g = rgb[1]; - var b = rgb[2]; - var h = convert.rgb.hsl(rgb)[0]; - var w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var c; - var m; - var y; - var k; - - k = Math.min(1 - r, 1 - g, 1 - b); - c = (1 - r - k) / (1 - k) || 0; - m = (1 - g - k) / (1 - k) || 0; - y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -/** - * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - * */ -function comparativeDistance(x, y) { - return ( - Math.pow(x[0] - y[0], 2) + - Math.pow(x[1] - y[1], 2) + - Math.pow(x[2] - y[2], 2) - ); -} - -convert.rgb.keyword = function (rgb) { - var reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - var currentClosestDistance = Infinity; - var currentClosestKeyword; - - for (var keyword in cssKeywords) { - if (cssKeywords.hasOwnProperty(keyword)) { - var value = cssKeywords[keyword]; - - // Compute comparative distance - var distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - - // assume sRGB - r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); - g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); - b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); - - var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - var xyz = convert.rgb.xyz(rgb); - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - var h = hsl[0] / 360; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var t1; - var t2; - var t3; - var rgb; - var val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - t1 = 2 * l - t2; - - rgb = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - var h = hsl[0]; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var smin = s; - var lmin = Math.max(l, 0.01); - var sv; - var v; - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - v = (l + s) / 2; - sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - var h = hsv[0] / 60; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var hi = Math.floor(h) % 6; - - var f = h - Math.floor(h); - var p = 255 * v * (1 - s); - var q = 255 * v * (1 - (s * f)); - var t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - var h = hsv[0]; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var vmin = Math.max(v, 0.01); - var lmin; - var sl; - var l; - - l = (2 - s) * v; - lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - var h = hwb[0] / 360; - var wh = hwb[1] / 100; - var bl = hwb[2] / 100; - var ratio = wh + bl; - var i; - var v; - var f; - var n; - - // wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - i = Math.floor(6 * h); - v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - n = wh + f * (v - wh); // linear interpolation - - var r; - var g; - var b; - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - var c = cmyk[0] / 100; - var m = cmyk[1] / 100; - var y = cmyk[2] / 100; - var k = cmyk[3] / 100; - var r; - var g; - var b; - - r = 1 - Math.min(1, c * (1 - k) + k); - g = 1 - Math.min(1, m * (1 - k) + k); - b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - var x = xyz[0] / 100; - var y = xyz[1] / 100; - var z = xyz[2] / 100; - var r; - var g; - var b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // assume sRGB - r = r > 0.0031308 - ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var x; - var y; - var z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - var y2 = Math.pow(y, 3); - var x2 = Math.pow(x, 3); - var z2 = Math.pow(z, 3); - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var hr; - var h; - var c; - - hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - var l = lch[0]; - var c = lch[1]; - var h = lch[2]; - var a; - var b; - var hr; - - hr = h / 360 * 2 * Math.PI; - a = c * Math.cos(hr); - b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - var ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - - // we use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - var ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - var color = args % 10; - - // handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - var mult = (~~(args > 50) + 1) * 0.5; - var r = ((color & 1) * mult) * 255; - var g = (((color >> 1) & 1) * mult) * 255; - var b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // handle greyscale - if (args >= 232) { - var c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - var rem; - var r = Math.floor(args / 36) / 5 * 255; - var g = Math.floor((rem = args % 36) / 6) / 5 * 255; - var b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - var integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - var colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(function (char) { - return char + char; - }).join(''); - } - - var integer = parseInt(colorString, 16); - var r = (integer >> 16) & 0xFF; - var g = (integer >> 8) & 0xFF; - var b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var max = Math.max(Math.max(r, g), b); - var min = Math.min(Math.min(r, g), b); - var chroma = (max - min); - var grayscale; - var hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma + 4; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var c = 1; - var f = 0; - - if (l < 0.5) { - c = 2.0 * s * l; - } else { - c = 2.0 * s * (1.0 - l); - } - - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - var s = hsv[1] / 100; - var v = hsv[2] / 100; - - var c = s * v; - var f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - var h = hcg[0] / 360; - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - var pure = [0, 0, 0]; - var hi = (h % 1) * 6; - var v = hi % 1; - var w = 1 - v; - var mg = 0; - - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var v = c + g * (1.0 - c); - var f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var l = g * (1.0 - c) + 0.5 * c; - var s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - var w = hwb[1] / 100; - var b = hwb[2] / 100; - var v = 1 - b; - var c = v - w; - var g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = convert.gray.hsv = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - var val = Math.round(gray[0] / 100 * 255) & 0xFF; - var integer = (val << 16) + (val << 8) + val; - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - var val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js deleted file mode 100644 index e65b5d7..0000000 --- a/node_modules/color-convert/index.js +++ /dev/null @@ -1,78 +0,0 @@ -var conversions = require('./conversions'); -var route = require('./route'); - -var convert = {}; - -var models = Object.keys(conversions); - -function wrapRaw(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - return fn(args); - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - var result = fn(args); - - // we're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (var len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(function (fromModel) { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - var routes = route(fromModel); - var routeModels = Object.keys(routes); - - routeModels.forEach(function (toModel) { - var fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json deleted file mode 100644 index 343dd8b..0000000 --- a/node_modules/color-convert/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_from": "color-convert@^1.9.0", - "_id": "color-convert@1.9.3", - "_inBundle": false, - "_integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "_location": "/color-convert", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "color-convert@^1.9.0", - "name": "color-convert", - "escapedName": "color-convert", - "rawSpec": "^1.9.0", - "saveSpec": null, - "fetchSpec": "^1.9.0" - }, - "_requiredBy": [ - "/ansi-styles" - ], - "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "_shasum": "bb71850690e1f136567de629d2d5471deda4c1e8", - "_spec": "color-convert@^1.9.0", - "author": { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - "bugs": { - "url": "https://github.com/Qix-/color-convert/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-name": "1.1.3" - }, - "deprecated": false, - "description": "Plain color conversion functions", - "devDependencies": { - "chalk": "1.1.1", - "xo": "0.11.2" - }, - "files": [ - "index.js", - "conversions.js", - "css-keywords.js", - "route.js" - ], - "homepage": "https://github.com/Qix-/color-convert#readme", - "keywords": [ - "color", - "colour", - "convert", - "converter", - "conversion", - "rgb", - "hsl", - "hsv", - "hwb", - "cmyk", - "ansi", - "ansi16" - ], - "license": "MIT", - "name": "color-convert", - "repository": { - "type": "git", - "url": "git+https://github.com/Qix-/color-convert.git" - }, - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "version": "1.9.3", - "xo": { - "rules": { - "default-case": 0, - "no-inline-comments": 0, - "operator-linebreak": 0 - } - } -} diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js deleted file mode 100644 index 0a1fdea..0000000 --- a/node_modules/color-convert/route.js +++ /dev/null @@ -1,97 +0,0 @@ -var conversions = require('./conversions'); - -/* - this function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - var graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - var models = Object.keys(conversions); - - for (var len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - var graph = buildGraph(); - var queue = [fromModel]; // unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - var current = queue.pop(); - var adjacents = Object.keys(conversions[current]); - - for (var len = adjacents.length, i = 0; i < len; i++) { - var adjacent = adjacents[i]; - var node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - var path = [graph[toModel].parent, toModel]; - var fn = conversions[graph[toModel].parent][toModel]; - - var cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - var graph = deriveBFS(fromModel); - var conversion = {}; - - var models = Object.keys(graph); - for (var len = models.length, i = 0; i < len; i++) { - var toModel = models[i]; - var node = graph[toModel]; - - if (node.parent === null) { - // no possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - diff --git a/node_modules/color-name/.eslintrc.json b/node_modules/color-name/.eslintrc.json deleted file mode 100644 index c50c250..0000000 --- a/node_modules/color-name/.eslintrc.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/node_modules/color-name/.npmignore b/node_modules/color-name/.npmignore deleted file mode 100644 index 3854c07..0000000 --- a/node_modules/color-name/.npmignore +++ /dev/null @@ -1,107 +0,0 @@ -//this will affect all the git repos -git config --global core.excludesfile ~/.gitignore - - -//update files since .ignore won't if already tracked -git rm --cached - -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -# Icon? -ehthumbs.db -Thumbs.db -.cache -.project -.settings -.tmproj -*.esproj -nbproject - -# Numerous always-ignore extensions # -##################################### -*.diff -*.err -*.orig -*.rej -*.swn -*.swo -*.swp -*.vi -*~ -*.sass-cache -*.grunt -*.tmp - -# Dreamweaver added files # -########################### -_notes -dwsync.xml - -# Komodo # -########################### -*.komodoproject -.komodotools - -# Node # -##################### -node_modules - -# Bower # -##################### -bower_components - -# Folders to ignore # -##################### -.hg -.svn -.CVS -intermediate -publish -.idea -.graphics -_test -_archive -uploads -tmp - -# Vim files to ignore # -####################### -.VimballRecord -.netrwhist - -bundle.* - -_demo \ No newline at end of file diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE deleted file mode 100644 index 4d9802a..0000000 --- a/node_modules/color-name/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/color-name/README.md b/node_modules/color-name/README.md deleted file mode 100644 index 3611a6b..0000000 --- a/node_modules/color-name/README.md +++ /dev/null @@ -1,11 +0,0 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js deleted file mode 100644 index e42aa68..0000000 --- a/node_modules/color-name/index.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json deleted file mode 100644 index ff36ab8..0000000 --- a/node_modules/color-name/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "_from": "color-name@1.1.3", - "_id": "color-name@1.1.3", - "_inBundle": false, - "_integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "_location": "/color-name", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "color-name@1.1.3", - "name": "color-name", - "escapedName": "color-name", - "rawSpec": "1.1.3", - "saveSpec": null, - "fetchSpec": "1.1.3" - }, - "_requiredBy": [ - "/color-convert" - ], - "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "_shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25", - "_spec": "color-name@1.1.3", - "author": { - "name": "DY", - "email": "dfcreative@gmail.com" - }, - "bugs": { - "url": "https://github.com/dfcreative/color-name/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A list of color names and its values", - "homepage": "https://github.com/dfcreative/color-name", - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "license": "MIT", - "main": "index.js", - "name": "color-name", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/dfcreative/color-name.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.1.3" -} diff --git a/node_modules/color-name/test.js b/node_modules/color-name/test.js deleted file mode 100644 index 7a08746..0000000 --- a/node_modules/color-name/test.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -var names = require('./'); -var assert = require('assert'); - -assert.deepEqual(names.red, [255,0,0]); -assert.deepEqual(names.aliceblue, [240,248,255]); diff --git a/node_modules/enquirer/CHANGELOG.md b/node_modules/enquirer/CHANGELOG.md deleted file mode 100644 index b885bd6..0000000 --- a/node_modules/enquirer/CHANGELOG.md +++ /dev/null @@ -1,121 +0,0 @@ -# Release history - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -
- Guiding Principles - -- Changelogs are for humans, not machines. -- There should be an entry for every single version. -- The same types of changes should be grouped. -- Versions and sections should be linkable. -- The latest version comes first. -- The release date of each versions is displayed. -- Mention whether you follow Semantic Versioning. - -
- -
- Types of changes - -Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): - -- `Added` for new features. -- `Changed` for changes in existing functionality. -- `Deprecated` for soon-to-be removed features. -- `Removed` for now removed features. -- `Fixed` for any bug fixes. -- `Security` in case of vulnerabilities. - -
- -## 2.3.3 - 2020-01-13 - -### Added - -- `BooleanPrompt` new example for `header` option. - -### Fixed - -- using `await` in `keypress` and returning the `number` result in the `array` type fixes an issue with tests failing only on Travis -- `autocomplete` highlighting issue -- Typos in some documentation and example comments. -- Syntax errors in example code on the README.md. - -## 2.3.4 - 2020-01-13 - -### Added - -- `MultiSelectPrompt` new example for `result` option. - -### Fixed - -- Updated typings to use `EventEmitter` class from `events` directly due to changes in `@types/node`. - -## 2.3.2 - 2019-09-17 - -### Added - -- `AuthPrompt` type for creating authentication based prompts. -- `BasicAuth` prompt as an example of creating an authentication prompt using basic username/password authentication -- Examples for different authentication prompts. -- `QuizPrompt` - -### Fixed - -- More examples were updated to fix any known bugs. -- Couple of fixes to the editable and autocomplete prompts. -- Documentation updates to highlight options available to some prompts. - -## 2.3.1 - 2019-07-12 - -### Fixed - -- Several examples were updated to align with latest code changes and to fix small bugs found in the implementation of the example. -- Some bugs found from updating examples were fixed. -- Updates to documentation to provide more information on how to use prompts and the options available. - -## 2.1.0 - 2018-11-29 - -### Fixed - -- Several improvements were made for handling custom `format`, `result` and `initial` functions defined on the options. - -## 2.0.7 - 2018-11-14 - -### Fixed - -- `validate` function now properly accepts `false` as a return value, thanks to [@g-plane](https://github.com/g-plane). - -### Added - -- Adds support for ctrl+n to add choices -- Adds support for `options.required` on all prompts. Uses the built-in `validate()` function, allowing this functionality to be overridden or customized. -- Adds support for `options.scroll` to disable scrolling in array prompts. -- Adds support for `options.onRun`, which is called when `prompt.run()` is called, after the readline instance is created. -- Adds support for `options.history` on the `Input` and `Text` prompts. -- Adds support for `options.term` to set the terminal, thanks to [@tunnckoCore](https://github.com/tunnckoCore). At the moment this is only used in a couple of edge cases with the `Survey` and `Scale` prompts to check if the terminal is Hyper. -- `options.skip` may now be a Boolean, thanks to [@tunnckoCore](https://github.com/tunnckoCore) - -## 2.0.0 - 2018-11-07 - -### Changed - -Enquire 2.0 is a bottom-up complete re-write: - -- Several prompts that were previously published as individual packages will be included in Enquirer itself. -- Why? - As users, we didn't like having to add commonly-used prompts as plugins. Enquirer 2.0 will still support custom prompts as plugins, but many prompts will also be built-in. -- Enquirer will only have a single dependency, https://github.com/doowb/ansi-colors, which itself has no other dependencies). This will make Enquirer easier to maintain and faster for users. -- Methods for registering "questions" have been removed. While it was nice to be able to preregister questions that could be called upon later, this is something that is better left to implementors, as it's relatively trivial to do with custom code. -- `options.default` is now `options.initial` - -### Added - -- Many prompts that were previously separate packages are now bundled into Enquirer itself. - - -[Unreleased]: https://github.com/enquirer/enquirer/compare/2.0.2...HEAD -[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/enquirer/LICENSE b/node_modules/enquirer/LICENSE deleted file mode 100644 index 681d1bf..0000000 --- a/node_modules/enquirer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/enquirer/README.md b/node_modules/enquirer/README.md deleted file mode 100644 index 7909711..0000000 --- a/node_modules/enquirer/README.md +++ /dev/null @@ -1,1747 +0,0 @@ -

Enquirer

- -

- -version - - -travis - - -downloads - -

- -
-
- -

-Stylish CLI prompts that are user-friendly, intuitive and easy to create.
->_ Prompts should be more like conversations than inquisitions▌ -

- -
- -

-(Example shows Enquirer's Survey Prompt) -Enquirer Survey Prompt
-The terminal in all examples is Hyper, theme is hyper-monokai-extended.

-See more prompt examples -

- -
-
- -Created by [jonschlinkert](https://github.com/jonschlinkert) and [doowb](https://github.com/doowb), Enquirer is fast, easy to use, and lightweight enough for small projects, while also being powerful and customizable enough for the most advanced use cases. - -* **Fast** - [Loads in ~4ms](#-performance) (that's about _3-4 times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps_) -* **Lightweight** - Only one dependency, the excellent [ansi-colors](https://github.com/doowb/ansi-colors) by [Brian Woodward](https://github.com/doowb). -* **Easy to implement** - Uses promises and async/await and sensible defaults to make prompts easy to create and implement. -* **Easy to use** - Thrill your users with a better experience! Navigating around input and choices is a breeze. You can even create [quizzes](examples/fun/countdown.js), or [record](examples/fun/record.js) and [playback](examples/fun/play.js) key bindings to aid with tutorials and videos. -* **Intuitive** - Keypress combos are available to simplify usage. -* **Flexible** - All prompts can be used standalone or chained together. -* **Stylish** - Easily override semantic styles and symbols for any part of the prompt. -* **Extensible** - Easily create and use custom prompts by extending Enquirer's built-in [prompts](#-prompts). -* **Pluggable** - Add advanced features to Enquirer using plugins. -* **Validation** - Optionally validate user input with any prompt. -* **Well tested** - All prompts are well-tested, and tests are easy to create without having to use brittle, hacky solutions to spy on prompts or "inject" values. -* **Examples** - There are numerous [examples](examples) available to help you get started. - -If you like Enquirer, please consider starring or tweeting about this project to show your support. Thanks! - -
- -

->_ Ready to start making prompts your users will love? ▌
-Enquirer Select Prompt with heartbeat example -

- -
-
- -## ❯ Getting started - -Get started with Enquirer, the most powerful and easy-to-use Node.js library for creating interactive CLI prompts. - -* [Install](#-install) -* [Usage](#-usage) -* [Enquirer](#-enquirer) -* [Prompts](#-prompts) - - [Built-in Prompts](#-prompts) - - [Custom Prompts](#-custom-prompts) -* [Key Bindings](#-key-bindings) -* [Options](#-options) -* [Release History](#-release-history) -* [Performance](#-performance) -* [About](#-about) - -
- -## ❯ Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install enquirer --save -``` -Install with [yarn](https://yarnpkg.com/en/): - -```sh -$ yarn add enquirer -``` - -

-Install Enquirer with NPM -

- -_(Requires Node.js 8.6 or higher. Please let us know if you need support for an earlier version by creating an [issue](../../issues/new).)_ - -
- -## ❯ Usage - -### Single prompt - -The easiest way to get started with enquirer is to pass a [question object](#prompt-options) to the `prompt` method. - -```js -const { prompt } = require('enquirer'); - -const response = await prompt({ - type: 'input', - name: 'username', - message: 'What is your username?' -}); - -console.log(response); // { username: 'jonschlinkert' } -``` - -_(Examples with `await` need to be run inside an `async` function)_ - -### Multiple prompts - -Pass an array of ["question" objects](#prompt-options) to run a series of prompts. - -```js -const response = await prompt([ - { - type: 'input', - name: 'name', - message: 'What is your name?' - }, - { - type: 'input', - name: 'username', - message: 'What is your username?' - } -]); - -console.log(response); // { name: 'Edward Chan', username: 'edwardmchan' } -``` - -### Different ways to run enquirer - -#### 1. By importing the specific `built-in prompt` - -```js -const { Confirm } = require('enquirer'); - -const prompt = new Confirm({ - name: 'question', - message: 'Did you like enquirer?' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)); -``` - -#### 2. By passing the options to `prompt` - -```js -const { prompt } = require('enquirer'); - -prompt({ - type: 'confirm', - name: 'question', - message: 'Did you like enquirer?' -}) - .then(answer => console.log('Answer:', answer)); -``` - -**Jump to**: [Getting Started](#-getting-started) · [Prompts](#-prompts) · [Options](#-options) · [Key Bindings](#-key-bindings) - -
- -## ❯ Enquirer - -**Enquirer is a prompt runner** - -Add Enquirer to your JavaScript project with following line of code. - -```js -const Enquirer = require('enquirer'); -``` - -The main export of this library is the `Enquirer` class, which has methods and features designed to simplify running prompts. - -```js -const { prompt } = require('enquirer'); -const question = [ - { - type: 'input', - name: 'username', - message: 'What is your username?' - }, - { - type: 'password', - name: 'password', - message: 'What is your password?' - } -]; - -let answers = await prompt(question); -console.log(answers); -``` - -**Prompts control how values are rendered and returned** - -Each individual prompt is a class with special features and functionality for rendering the types of values you want to show users in the terminal, and subsequently returning the types of values you need to use in your application. - -**How can I customize prompts?** - -Below in this guide you will find information about creating [custom prompts](#-custom-prompts). For now, we'll focus on how to customize an existing prompt. - -All of the individual [prompt classes](#built-in-prompts) in this library are exposed as static properties on Enquirer. This allows them to be used directly without using `enquirer.prompt()`. - -Use this approach if you need to modify a prompt instance, or listen for events on the prompt. - -**Example** - -```js -const { Input } = require('enquirer'); -const prompt = new Input({ - name: 'username', - message: 'What is your username?' -}); - -prompt.run() - .then(answer => console.log('Username:', answer)) - .catch(console.error); -``` - -### [Enquirer](index.js#L20) - -Create an instance of `Enquirer`. - -**Params** - -* `options` **{Object}**: (optional) Options to use with all prompts. -* `answers` **{Object}**: (optional) Answers object to initialize with. - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -``` - -### [register()](index.js#L42) - -Register a custom prompt type. - -**Params** - -* `type` **{String}** -* `fn` **{Function|Prompt}**: `Prompt` class, or a function that returns a `Prompt` class. -* `returns` **{Object}**: Returns the Enquirer instance - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -enquirer.register('customType', require('./custom-prompt')); -``` - -### [prompt()](index.js#L78) - -Prompt function that takes a "question" object or array of question objects, and returns an object with responses from the user. - -**Params** - -* `questions` **{Array|Object}**: Options objects for one or more prompts to run. -* `returns` **{Promise}**: Promise that returns an "answers" object with the user's responses. - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); - -const response = await enquirer.prompt({ - type: 'input', - name: 'username', - message: 'What is your username?' -}); -console.log(response); -``` - -### [use()](index.js#L160) - -Use an enquirer plugin. - -**Params** - -* `plugin` **{Function}**: Plugin function that takes an instance of Enquirer. -* `returns` **{Object}**: Returns the Enquirer instance. - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -const plugin = enquirer => { - // do stuff to enquire instance -}; -enquirer.use(plugin); -``` - -### [Enquirer#prompt](index.js#L210) - -Prompt function that takes a "question" object or array of question objects, and returns an object with responses from the user. - -**Params** - -* `questions` **{Array|Object}**: Options objects for one or more prompts to run. -* `returns` **{Promise}**: Promise that returns an "answers" object with the user's responses. - -**Example** - -```js -const { prompt } = require('enquirer'); -const response = await prompt({ - type: 'input', - name: 'username', - message: 'What is your username?' -}); -console.log(response); -``` - -
- -## ❯ Prompts - -This section is about Enquirer's prompts: what they look like, how they work, how to run them, available options, and how to customize the prompts or create your own prompt concept. - -**Getting started with Enquirer's prompts** - -* [Prompt](#prompt) - The base `Prompt` class used by other prompts - - [Prompt Options](#prompt-options) -* [Built-in prompts](#built-in-prompts) -* [Prompt Types](#prompt-types) - The base `Prompt` class used by other prompts -* [Custom prompts](#%E2%9D%AF-custom-prompts) - Enquirer 2.0 introduced the concept of prompt "types", with the goal of making custom prompts easier than ever to create and use. - -### Prompt - -The base `Prompt` class is used to create all other prompts. - -```js -const { Prompt } = require('enquirer'); -class MyCustomPrompt extends Prompt {} -``` - -See the documentation for [creating custom prompts](#-custom-prompts) to learn more about how this works. - -#### Prompt Options - -Each prompt takes an options object (aka "question" object), that implements the following interface: - -```js -{ - // required - type: string | function, - name: string | function, - message: string | function | async function, - - // optional - skip: boolean | function | async function, - initial: string | function | async function, - format: function | async function, - result: function | async function, - validate: function | async function, -} -``` -Each property of the options object is described below: - -| **Property** | **Required?** | **Type** | **Description** | -| ------------ | ------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | yes | `string\|function` | Enquirer uses this value to determine the type of prompt to run, but it's optional when prompts are run directly. | -| `name` | yes | `string\|function` | Used as the key for the answer on the returned values (answers) object. | -| `message` | yes | `string\|function` | The message to display when the prompt is rendered in the terminal. | -| `skip` | no | `boolean\|function` | If `true` it will not ask that prompt. | -| `initial` | no | `string\|function` | The default value to return if the user does not supply a value. | -| `format` | no | `function` | Function to format user input in the terminal. | -| `result` | no | `function` | Function to format the final submitted value before it's returned. | -| `validate` | no | `function` | Function to validate the submitted value before it's returned. This function may return a boolean or a string. If a string is returned it will be used as the validation error message. | - -**Example usage** - -```js -const { prompt } = require('enquirer'); - -const question = { - type: 'input', - name: 'username', - message: 'What is your username?' -}; - -prompt(question) - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -
- -### Built-in prompts - -* [AutoComplete Prompt](#autocomplete-prompt) -* [BasicAuth Prompt](#basicauth-prompt) -* [Confirm Prompt](#confirm-prompt) -* [Form Prompt](#form-prompt) -* [Input Prompt](#input-prompt) -* [Invisible Prompt](#invisible-prompt) -* [List Prompt](#list-prompt) -* [MultiSelect Prompt](#multiselect-prompt) -* [Numeral Prompt](#numeral-prompt) -* [Password Prompt](#password-prompt) -* [Quiz Prompt](#quiz-prompt) -* [Survey Prompt](#survey-prompt) -* [Scale Prompt](#scale-prompt) -* [Select Prompt](#select-prompt) -* [Sort Prompt](#sort-prompt) -* [Snippet Prompt](#snippet-prompt) -* [Toggle Prompt](#toggle-prompt) - -### AutoComplete Prompt - -Prompt that auto-completes as the user types, and returns the selected value as a string. - -

-Enquirer AutoComplete Prompt -

- -**Example Usage** - -```js -const { AutoComplete } = require('enquirer'); - -const prompt = new AutoComplete({ - name: 'flavor', - message: 'Pick your favorite flavor', - limit: 10, - choices: [ - 'Almond', - 'Apple', - 'Banana', - 'Blackberry', - 'Blueberry', - 'Cherry', - 'Chocolate', - 'Cinnamon', - 'Coconut', - 'Cranberry', - 'Grape', - 'Nougat', - 'Orange', - 'Pear', - 'Pineapple', - 'Raspberry', - 'Strawberry', - 'Vanilla', - 'Watermelon', - 'Wintergreen' - ] -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**AutoComplete Options** - -| Option | Type | Default | Description | -| ----------- | ---------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| `highlight` | `function` | `dim` version of primary style | The color to use when "highlighting" characters in the list that match user input. | -| `multiple` | `boolean` | `false` | Allow multiple choices to be selected. | -| `suggest` | `function` | Greedy match, returns true if choice message contains input string. | Function that filters choices. Takes user input and a choices array, and returns a list of matching choices. | -| `footer` | `function` | None | Function that displays [footer text](https://github.com/enquirer/enquirer/blob/6c2819518a1e2ed284242a99a685655fbaabfa28/examples/autocomplete/option-footer.js#L10) | - -**Related prompts** - -* [Select](#select-prompt) -* [MultiSelect](#multiselect-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### BasicAuth Prompt - -Prompt that asks for username and password to authenticate the user. The default implementation of `authenticate` function in `BasicAuth` prompt is to compare the username and password with the values supplied while running the prompt. The implementer is expected to override the `authenticate` function with a custom logic such as making an API request to a server to authenticate the username and password entered and expect a token back. - -

-Enquirer BasicAuth Prompt -

- -**Example Usage** - -```js -const { BasicAuth } = require('enquirer'); - - const prompt = new BasicAuth({ - name: 'password', - message: 'Please enter your password', - username: 'rajat-sr', - password: '123', - showPassword: true -}); - - prompt - .run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Confirm Prompt - -Prompt that returns `true` or `false`. - -

-Enquirer Confirm Prompt -

- -**Example Usage** - -```js -const { Confirm } = require('enquirer'); - -const prompt = new Confirm({ - name: 'question', - message: 'Want to answer?' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Numeral](#numeral-prompt) -* [Password](#password-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Form Prompt - -Prompt that allows the user to enter and submit multiple values on a single terminal screen. - -

-Enquirer Form Prompt -

- -**Example Usage** - -```js -const { Form } = require('enquirer'); - -const prompt = new Form({ - name: 'user', - message: 'Please provide the following information:', - choices: [ - { name: 'firstname', message: 'First Name', initial: 'Jon' }, - { name: 'lastname', message: 'Last Name', initial: 'Schlinkert' }, - { name: 'username', message: 'GitHub username', initial: 'jonschlinkert' } - ] -}); - -prompt.run() - .then(value => console.log('Answer:', value)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Input Prompt - -Prompt that takes user input and returns a string. - -

-Enquirer Input Prompt -

- -**Example Usage** - -```js -const { Input } = require('enquirer'); -const prompt = new Input({ - message: 'What is your username?', - initial: 'jonschlinkert' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.log); -``` - -You can use [data-store](https://github.com/jonschlinkert/data-store) to store [input history](https://github.com/enquirer/enquirer/blob/master/examples/input/option-history.js) that the user can cycle through (see [source](https://github.com/enquirer/enquirer/blob/8407dc3579123df5e6e20215078e33bb605b0c37/lib/prompts/input.js)). - -**Related prompts** - -* [Confirm](#confirm-prompt) -* [Numeral](#numeral-prompt) -* [Password](#password-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Invisible Prompt - -Prompt that takes user input, hides it from the terminal, and returns a string. - -

-Enquirer Invisible Prompt -

- -**Example Usage** - -```js -const { Invisible } = require('enquirer'); -const prompt = new Invisible({ - name: 'secret', - message: 'What is your secret?' -}); - -prompt.run() - .then(answer => console.log('Answer:', { secret: answer })) - .catch(console.error); -``` - -**Related prompts** - -* [Password](#password-prompt) -* [Input](#input-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### List Prompt - -Prompt that returns a list of values, created by splitting the user input. The default split character is `,` with optional trailing whitespace. - -

-Enquirer List Prompt -

- -**Example Usage** - -```js -const { List } = require('enquirer'); -const prompt = new List({ - name: 'keywords', - message: 'Type comma-separated keywords' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Sort](#sort-prompt) -* [Select](#select-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### MultiSelect Prompt - -Prompt that allows the user to select multiple items from a list of options. - -

-Enquirer MultiSelect Prompt -

- -**Example Usage** - -```js -const { MultiSelect } = require('enquirer'); - -const prompt = new MultiSelect({ - name: 'value', - message: 'Pick your favorite colors', - limit: 7, - choices: [ - { name: 'aqua', value: '#00ffff' }, - { name: 'black', value: '#000000' }, - { name: 'blue', value: '#0000ff' }, - { name: 'fuchsia', value: '#ff00ff' }, - { name: 'gray', value: '#808080' }, - { name: 'green', value: '#008000' }, - { name: 'lime', value: '#00ff00' }, - { name: 'maroon', value: '#800000' }, - { name: 'navy', value: '#000080' }, - { name: 'olive', value: '#808000' }, - { name: 'purple', value: '#800080' }, - { name: 'red', value: '#ff0000' }, - { name: 'silver', value: '#c0c0c0' }, - { name: 'teal', value: '#008080' }, - { name: 'white', value: '#ffffff' }, - { name: 'yellow', value: '#ffff00' } - ] -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); - -// Answer: ['aqua', 'blue', 'fuchsia'] -``` - -**Example key-value pairs** - -Optionally, pass a `result` function and use the `.map` method to return an object of key-value pairs of the selected names and values: [example](./examples/multiselect/option-result.js) - -```js -const { MultiSelect } = require('enquirer'); - -const prompt = new MultiSelect({ - name: 'value', - message: 'Pick your favorite colors', - limit: 7, - choices: [ - { name: 'aqua', value: '#00ffff' }, - { name: 'black', value: '#000000' }, - { name: 'blue', value: '#0000ff' }, - { name: 'fuchsia', value: '#ff00ff' }, - { name: 'gray', value: '#808080' }, - { name: 'green', value: '#008000' }, - { name: 'lime', value: '#00ff00' }, - { name: 'maroon', value: '#800000' }, - { name: 'navy', value: '#000080' }, - { name: 'olive', value: '#808000' }, - { name: 'purple', value: '#800080' }, - { name: 'red', value: '#ff0000' }, - { name: 'silver', value: '#c0c0c0' }, - { name: 'teal', value: '#008080' }, - { name: 'white', value: '#ffffff' }, - { name: 'yellow', value: '#ffff00' } - ], - result(names) { - return this.map(names); - } -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); - -// Answer: { aqua: '#00ffff', blue: '#0000ff', fuchsia: '#ff00ff' } -``` - -**Related prompts** - -* [AutoComplete](#autocomplete-prompt) -* [Select](#select-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Numeral Prompt - -Prompt that takes a number as input. - -

-Enquirer Numeral Prompt -

- -**Example Usage** - -```js -const { NumberPrompt } = require('enquirer'); - -const prompt = new NumberPrompt({ - name: 'number', - message: 'Please enter a number' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Confirm](#confirm-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Password Prompt - -Prompt that takes user input and masks it in the terminal. Also see the [invisible prompt](#invisible-prompt) - -

-Enquirer Password Prompt -

- -**Example Usage** - -```js -const { Password } = require('enquirer'); - -const prompt = new Password({ - name: 'password', - message: 'What is your password?' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Invisible](#invisible-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Quiz Prompt - -Prompt that allows the user to play multiple-choice quiz questions. - -

-Enquirer Quiz Prompt -

- -**Example Usage** - -```js -const { Quiz } = require('enquirer'); - - const prompt = new Quiz({ - name: 'countries', - message: 'How many countries are there in the world?', - choices: ['165', '175', '185', '195', '205'], - correctChoice: 3 -}); - - prompt - .run() - .then(answer => { - if (answer.correct) { - console.log('Correct!'); - } else { - console.log(`Wrong! Correct answer is ${answer.correctAnswer}`); - } - }) - .catch(console.error); -``` - -**Quiz Options** - -| Option | Type | Required | Description | -| ----------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------ | -| `choices` | `array` | Yes | The list of possible answers to the quiz question. | -| `correctChoice`| `number` | Yes | Index of the correct choice from the `choices` array. | - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Survey Prompt - -Prompt that allows the user to provide feedback for a list of questions. - -

-Enquirer Survey Prompt -

- -**Example Usage** - -```js -const { Survey } = require('enquirer'); - -const prompt = new Survey({ - name: 'experience', - message: 'Please rate your experience', - scale: [ - { name: '1', message: 'Strongly Disagree' }, - { name: '2', message: 'Disagree' }, - { name: '3', message: 'Neutral' }, - { name: '4', message: 'Agree' }, - { name: '5', message: 'Strongly Agree' } - ], - margin: [0, 0, 2, 1], - choices: [ - { - name: 'interface', - message: 'The website has a friendly interface.' - }, - { - name: 'navigation', - message: 'The website is easy to navigate.' - }, - { - name: 'images', - message: 'The website usually has good images.' - }, - { - name: 'upload', - message: 'The website makes it easy to upload images.' - }, - { - name: 'colors', - message: 'The website has a pleasing color palette.' - } - ] -}); - -prompt.run() - .then(value => console.log('ANSWERS:', value)) - .catch(console.error); -``` - -**Related prompts** - -* [Scale](#scale-prompt) -* [Snippet](#snippet-prompt) -* [Select](#select-prompt) - -*** - -### Scale Prompt - -A more compact version of the [Survey prompt](#survey-prompt), the Scale prompt allows the user to quickly provide feedback using a [Likert Scale](https://en.wikipedia.org/wiki/Likert_scale). - -

-Enquirer Scale Prompt -

- -**Example Usage** - -```js -const { Scale } = require('enquirer'); -const prompt = new Scale({ - name: 'experience', - message: 'Please rate your experience', - scale: [ - { name: '1', message: 'Strongly Disagree' }, - { name: '2', message: 'Disagree' }, - { name: '3', message: 'Neutral' }, - { name: '4', message: 'Agree' }, - { name: '5', message: 'Strongly Agree' } - ], - margin: [0, 0, 2, 1], - choices: [ - { - name: 'interface', - message: 'The website has a friendly interface.', - initial: 2 - }, - { - name: 'navigation', - message: 'The website is easy to navigate.', - initial: 2 - }, - { - name: 'images', - message: 'The website usually has good images.', - initial: 2 - }, - { - name: 'upload', - message: 'The website makes it easy to upload images.', - initial: 2 - }, - { - name: 'colors', - message: 'The website has a pleasing color palette.', - initial: 2 - } - ] -}); - -prompt.run() - .then(value => console.log('ANSWERS:', value)) - .catch(console.error); -``` - -**Related prompts** - -* [AutoComplete](#autocomplete-prompt) -* [Select](#select-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Select Prompt - -Prompt that allows the user to select from a list of options. - -

-Enquirer Select Prompt -

- -**Example Usage** - -```js -const { Select } = require('enquirer'); - -const prompt = new Select({ - name: 'color', - message: 'Pick a flavor', - choices: ['apple', 'grape', 'watermelon', 'cherry', 'orange'] -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [AutoComplete](#autocomplete-prompt) -* [MultiSelect](#multiselect-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Sort Prompt - -Prompt that allows the user to sort items in a list. - -**Example** - -In this [example](https://github.com/enquirer/enquirer/raw/master/examples/sort/prompt.js), custom styling is applied to the returned values to make it easier to see what's happening. - -

-Enquirer Sort Prompt -

- -**Example Usage** - -```js -const colors = require('ansi-colors'); -const { Sort } = require('enquirer'); -const prompt = new Sort({ - name: 'colors', - message: 'Sort the colors in order of preference', - hint: 'Top is best, bottom is worst', - numbered: true, - choices: ['red', 'white', 'green', 'cyan', 'yellow'].map(n => ({ - name: n, - message: colors[n](n) - })) -}); - -prompt.run() - .then(function(answer = []) { - console.log(answer); - console.log('Your preferred order of colors is:'); - console.log(answer.map(key => colors[key](key)).join('\n')); - }) - .catch(console.error); -``` - -**Related prompts** - -* [List](#list-prompt) -* [Select](#select-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Snippet Prompt - -Prompt that allows the user to replace placeholders in a snippet of code or text. - -

-Prompts -

- -**Example Usage** - -```js -const semver = require('semver'); -const { Snippet } = require('enquirer'); -const prompt = new Snippet({ - name: 'username', - message: 'Fill out the fields in package.json', - required: true, - fields: [ - { - name: 'author_name', - message: 'Author Name' - }, - { - name: 'version', - validate(value, state, item, index) { - if (item && item.name === 'version' && !semver.valid(value)) { - return prompt.styles.danger('version should be a valid semver value'); - } - return true; - } - } - ], - template: `{ - "name": "\${name}", - "description": "\${description}", - "version": "\${version}", - "homepage": "https://github.com/\${username}/\${name}", - "author": "\${author_name} (https://github.com/\${username})", - "repository": "\${username}/\${name}", - "license": "\${license:ISC}" -} -` -}); - -prompt.run() - .then(answer => console.log('Answer:', answer.result)) - .catch(console.error); -``` - -**Related prompts** - -* [Survey](#survey-prompt) -* [AutoComplete](#autocomplete-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Toggle Prompt - -Prompt that allows the user to toggle between two values then returns `true` or `false`. - -

-Enquirer Toggle Prompt -

- -**Example Usage** - -```js -const { Toggle } = require('enquirer'); - -const prompt = new Toggle({ - message: 'Want to answer?', - enabled: 'Yep', - disabled: 'Nope' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Confirm](#confirm-prompt) -* [Input](#input-prompt) -* [Sort](#sort-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Prompt Types - -There are 5 (soon to be 6!) type classes: - -* [ArrayPrompt](#arrayprompt) - - [Options](#options) - - [Properties](#properties) - - [Methods](#methods) - - [Choices](#choices) - - [Defining choices](#defining-choices) - - [Choice properties](#choice-properties) - - [Related prompts](#related-prompts) -* [AuthPrompt](#authprompt) -* [BooleanPrompt](#booleanprompt) -* DatePrompt (Coming Soon!) -* [NumberPrompt](#numberprompt) -* [StringPrompt](#stringprompt) - -Each type is a low-level class that may be used as a starting point for creating higher level prompts. Continue reading to learn how. - -### ArrayPrompt - -The `ArrayPrompt` class is used for creating prompts that display a list of choices in the terminal. For example, Enquirer uses this class as the basis for the [Select](#select) and [Survey](#survey) prompts. - -#### Options - -In addition to the [options](#options) available to all prompts, Array prompts also support the following options. - -| **Option** | **Required?** | **Type** | **Description** | -| ----------- | ------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `autofocus` | `no` | `string\|number` | The index or name of the choice that should have focus when the prompt loads. Only one choice may have focus at a time. | | -| `stdin` | `no` | `stream` | The input stream to use for emitting keypress events. Defaults to `process.stdin`. | -| `stdout` | `no` | `stream` | The output stream to use for writing the prompt to the terminal. Defaults to `process.stdout`. | -| | - -#### Properties - -Array prompts have the following instance properties and getters. - -| **Property name** | **Type** | **Description** | -| ----------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `choices` | `array` | Array of choices that have been normalized from choices passed on the prompt options. | -| `cursor` | `number` | Position of the cursor relative to the _user input (string)_. | -| `enabled` | `array` | Returns an array of enabled choices. | -| `focused` | `array` | Returns the currently selected choice in the visible list of choices. This is similar to the concept of focus in HTML and CSS. Focused choices are always visible (on-screen). When a list of choices is longer than the list of visible choices, and an off-screen choice is _focused_, the list will scroll to the focused choice and re-render. | -| `focused` | Gets the currently selected choice. Equivalent to `prompt.choices[prompt.index]`. | -| `index` | `number` | Position of the pointer in the _visible list (array) of choices_. | -| `limit` | `number` | The number of choices to display on-screen. | -| `selected` | `array` | Either a list of enabled choices (when `options.multiple` is true) or the currently focused choice. | -| `visible` | `string` | | - -#### Methods - -| **Method** | **Description** | -| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pointer()` | Returns the visual symbol to use to identify the choice that currently has focus. The `❯` symbol is often used for this. The pointer is not always visible, as with the `autocomplete` prompt. | -| `indicator()` | Returns the visual symbol that indicates whether or not a choice is checked/enabled. | -| `focus()` | Sets focus on a choice, if it can be focused. | - -#### Choices - -Array prompts support the `choices` option, which is the array of choices users will be able to select from when rendered in the terminal. - -**Type**: `string|object` - -**Example** - -```js -const { prompt } = require('enquirer'); - -const questions = [{ - type: 'select', - name: 'color', - message: 'Favorite color?', - initial: 1, - choices: [ - { name: 'red', message: 'Red', value: '#ff0000' }, //<= choice object - { name: 'green', message: 'Green', value: '#00ff00' }, //<= choice object - { name: 'blue', message: 'Blue', value: '#0000ff' } //<= choice object - ] -}]; - -let answers = await prompt(questions); -console.log('Answer:', answers.color); -``` - -#### Defining choices - -Whether defined as a string or object, choices are normalized to the following interface: - -```js -{ - name: string; - message: string | undefined; - value: string | undefined; - hint: string | undefined; - disabled: boolean | string | undefined; -} -``` - -**Example** - -```js -const question = { - name: 'fruit', - message: 'Favorite fruit?', - choices: ['Apple', 'Orange', 'Raspberry'] -}; -``` - -Normalizes to the following when the prompt is run: - -```js -const question = { - name: 'fruit', - message: 'Favorite fruit?', - choices: [ - { name: 'Apple', message: 'Apple', value: 'Apple' }, - { name: 'Orange', message: 'Orange', value: 'Orange' }, - { name: 'Raspberry', message: 'Raspberry', value: 'Raspberry' } - ] -}; -``` - -#### Choice properties - -The following properties are supported on `choice` objects. - -| **Option** | **Type** | **Description** | -| ----------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | The unique key to identify a choice | -| `message` | `string` | The message to display in the terminal. `name` is used when this is undefined. | -| `value` | `string` | Value to associate with the choice. Useful for creating key-value pairs from user choices. `name` is used when this is undefined. | -| `choices` | `array` | Array of "child" choices. | -| `hint` | `string` | Help message to display next to a choice. | -| `role` | `string` | Determines how the choice will be displayed. Currently the only role supported is `separator`. Additional roles may be added in the future (like `heading`, etc). Please create a [feature request] | -| `enabled` | `boolean` | Enabled a choice by default. This is only supported when `options.multiple` is true or on prompts that support multiple choices, like [MultiSelect](#-multiselect). | -| `disabled` | `boolean\|string` | Disable a choice so that it cannot be selected. This value may either be `true`, `false`, or a message to display. | -| `indicator` | `string\|function` | Custom indicator to render for a choice (like a check or radio button). | - -#### Related prompts - -* [AutoComplete](#autocomplete-prompt) -* [Form](#form-prompt) -* [MultiSelect](#multiselect-prompt) -* [Select](#select-prompt) -* [Survey](#survey-prompt) - -*** - -### AuthPrompt - -The `AuthPrompt` is used to create prompts to log in user using any authentication method. For example, Enquirer uses this class as the basis for the [BasicAuth Prompt](#basicauth-prompt). You can also find prompt examples in `examples/auth/` folder that utilizes `AuthPrompt` to create OAuth based authentication prompt or a prompt that authenticates using time-based OTP, among others. - -`AuthPrompt` has a factory function that creates an instance of `AuthPrompt` class and it expects an `authenticate` function, as an argument, which overrides the `authenticate` function of the `AuthPrompt` class. - -#### Methods - -| **Method** | **Description** | -| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `authenticate()` | Contain all the authentication logic. This function should be overridden to implement custom authentication logic. The default `authenticate` function throws an error if no other function is provided. | - -#### Choices - -Auth prompt supports the `choices` option, which is the similar to the choices used in [Form Prompt](#form-prompt). - -**Example** - -```js -const { AuthPrompt } = require('enquirer'); - -function authenticate(value, state) { - if (value.username === this.options.username && value.password === this.options.password) { - return true; - } - return false; -} - -const CustomAuthPrompt = AuthPrompt.create(authenticate); - -const prompt = new CustomAuthPrompt({ - name: 'password', - message: 'Please enter your password', - username: 'rajat-sr', - password: '1234567', - choices: [ - { name: 'username', message: 'username' }, - { name: 'password', message: 'password' } - ] -}); - -prompt - .run() - .then(answer => console.log('Authenticated?', answer)) - .catch(console.error); -``` - -#### Related prompts - -* [BasicAuth Prompt](#basicauth-prompt) - -*** - -### BooleanPrompt - -The `BooleanPrompt` class is used for creating prompts that display and return a boolean value. - -```js -const { BooleanPrompt } = require('enquirer'); - -const prompt = new BooleanPrompt({ - header: '========================', - message: 'Do you love enquirer?', - footer: '========================', -}); - -prompt.run() - .then(answer => console.log('Selected:', answer)) - .catch(console.error); -``` - -**Returns**: `boolean` - -*** - -### NumberPrompt - -The `NumberPrompt` class is used for creating prompts that display and return a numerical value. - -```js -const { NumberPrompt } = require('enquirer'); - -const prompt = new NumberPrompt({ - header: '************************', - message: 'Input the Numbers:', - footer: '************************', -}); - -prompt.run() - .then(answer => console.log('Numbers are:', answer)) - .catch(console.error); -``` - -**Returns**: `string|number` (number, or number formatted as a string) - -*** - -### StringPrompt - -The `StringPrompt` class is used for creating prompts that display and return a string value. - -```js -const { StringPrompt } = require('enquirer'); - -const prompt = new StringPrompt({ - header: '************************', - message: 'Input the String:', - footer: '************************' -}); - -prompt.run() - .then(answer => console.log('String is:', answer)) - .catch(console.error); -``` - -**Returns**: `string` - -
- -## ❯ Custom prompts - -With Enquirer 2.0, custom prompts are easier than ever to create and use. - -**How do I create a custom prompt?** - -Custom prompts are created by extending either: - -* Enquirer's `Prompt` class -* one of the built-in [prompts](#-prompts), or -* low-level [types](#-types). - - - -```js -const { Prompt } = require('enquirer'); - -class HaiKarate extends Prompt { - constructor(options = {}) { - super(options); - this.value = options.initial || 0; - this.cursorHide(); - } - up() { - this.value++; - this.render(); - } - down() { - this.value--; - this.render(); - } - render() { - this.clear(); // clear previously rendered prompt from the terminal - this.write(`${this.state.message}: ${this.value}`); - } -} - -// Use the prompt by creating an instance of your custom prompt class. -const prompt = new HaiKarate({ - message: 'How many sprays do you want?', - initial: 10 -}); - -prompt.run() - .then(answer => console.log('Sprays:', answer)) - .catch(console.error); -``` - -If you want to be able to specify your prompt by `type` so that it may be used alongside other prompts, you will need to first create an instance of `Enquirer`. - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -``` - -Then use the `.register()` method to add your custom prompt. - -```js -enquirer.register('haikarate', HaiKarate); -``` - -Now you can do the following when defining "questions". - -```js -let spritzer = require('cologne-drone'); -let answers = await enquirer.prompt([ - { - type: 'haikarate', - name: 'cologne', - message: 'How many sprays do you need?', - initial: 10, - async onSubmit(name, value) { - await spritzer.activate(value); //<= activate drone - return value; - } - } -]); -``` - -
- -## ❯ Key Bindings - -### All prompts - -These key combinations may be used with all prompts. - -| **command** | **description** | -| -------------------------------- | -------------------------------------- | -| ctrl + c | Cancel the prompt. | -| ctrl + g | Reset the prompt to its initial state. | - -
- -### Move cursor - -These combinations may be used on prompts that support user input (eg. [input prompt](#input-prompt), [password prompt](#password-prompt), and [invisible prompt](#invisible-prompt)). - -| **command** | **description** | -| ------------------------------ | ---------------------------------------- | -| left | Move the cursor back one character. | -| right | Move the cursor forward one character. | -| ctrl + a | Move cursor to the start of the line | -| ctrl + e | Move cursor to the end of the line | -| ctrl + b | Move cursor back one character | -| ctrl + f | Move cursor forward one character | -| ctrl + x | Toggle between first and cursor position | - -
- -### Edit Input - -These key combinations may be used on prompts that support user input (eg. [input prompt](#input-prompt), [password prompt](#password-prompt), and [invisible prompt](#invisible-prompt)). - -| **command** | **description** | -| ------------------------------ | ---------------------------------------- | -| ctrl + a | Move cursor to the start of the line | -| ctrl + e | Move cursor to the end of the line | -| ctrl + b | Move cursor back one character | -| ctrl + f | Move cursor forward one character | -| ctrl + x | Toggle between first and cursor position | - -
- -| **command (Mac)** | **command (Windows)** | **description** | -| ----------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| delete | backspace | Delete one character to the left. | -| fn + delete | delete | Delete one character to the right. | -| option + up | alt + up | Scroll to the previous item in history ([Input prompt](#input-prompt) only, when [history is enabled](examples/input/option-history.js)). | -| option + down | alt + down | Scroll to the next item in history ([Input prompt](#input-prompt) only, when [history is enabled](examples/input/option-history.js)). | - -### Select choices - -These key combinations may be used on prompts that support _multiple_ choices, such as the [multiselect prompt](#multiselect-prompt), or the [select prompt](#select-prompt) when the `multiple` options is true. - -| **command** | **description** | -| ----------------- | -------------------------------------------------------------------------------------------------------------------- | -| space | Toggle the currently selected choice when `options.multiple` is true. | -| number | Move the pointer to the choice at the given index. Also toggles the selected choice when `options.multiple` is true. | -| a | Toggle all choices to be enabled or disabled. | -| i | Invert the current selection of choices. | -| g | Toggle the current choice group. | - -
- -### Hide/show choices - -| **command** | **description** | -| ------------------------------- | ---------------------------------------------- | -| fn + up | Decrease the number of visible choices by one. | -| fn + down | Increase the number of visible choices by one. | - -
- -### Move/lock Pointer - -| **command** | **description** | -| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| number | Move the pointer to the choice at the given index. Also toggles the selected choice when `options.multiple` is true. | -| up | Move the pointer up. | -| down | Move the pointer down. | -| ctrl + a | Move the pointer to the first _visible_ choice. | -| ctrl + e | Move the pointer to the last _visible_ choice. | -| shift + up | Scroll up one choice without changing pointer position (locks the pointer while scrolling). | -| shift + down | Scroll down one choice without changing pointer position (locks the pointer while scrolling). | - -
- -| **command (Mac)** | **command (Windows)** | **description** | -| -------------------------------- | --------------------- | ---------------------------------------------------------- | -| fn + left | home | Move the pointer to the first choice in the choices array. | -| fn + right | end | Move the pointer to the last choice in the choices array. | - -
- -## ❯ Release History - -Please see [CHANGELOG.md](CHANGELOG.md). - -## ❯ Performance - -### System specs - -MacBook Pro, Intel Core i7, 2.5 GHz, 16 GB. - -### Load time - -Time it takes for the module to load the first time (average of 3 runs): - -``` -enquirer: 4.013ms -inquirer: 286.717ms -``` - -
- -## ❯ About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Todo - -We're currently working on documentation for the following items. Please star and watch the repository for updates! - -* [ ] Customizing symbols -* [ ] Customizing styles (palette) -* [ ] Customizing rendered input -* [ ] Customizing returned values -* [ ] Customizing key bindings -* [ ] Question validation -* [ ] Choice validation -* [ ] Skipping questions -* [ ] Async choices -* [ ] Async timers: loaders, spinners and other animations -* [ ] Links to examples -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` -```sh -$ yarn && yarn test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -#### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 283 | [jonschlinkert](https://github.com/jonschlinkert) | -| 72 | [doowb](https://github.com/doowb) | -| 32 | [rajat-sr](https://github.com/rajat-sr) | -| 20 | [318097](https://github.com/318097) | -| 15 | [g-plane](https://github.com/g-plane) | -| 12 | [pixelass](https://github.com/pixelass) | -| 5 | [satotake](https://github.com/satotake) | -| 3 | [tunnckoCore](https://github.com/tunnckoCore) | -| 3 | [sw-yx](https://github.com/sw-yx) | -| 2 | [adityavyas611](https://github.com/adityavyas611) | -| 2 | [DanielRuf](https://github.com/DanielRuf) | -| 2 | [gabel0287](https://github.com/gabel0287) | -| 1 | [AlCalzone](https://github.com/AlCalzone) | -| 1 | [ImgBotApp](https://github.com/ImgBotApp) | -| 1 | [jsonkao](https://github.com/jsonkao) | -| 1 | [knpwrs](https://github.com/knpwrs) | -| 1 | [yeskunall](https://github.com/yeskunall) | -| 1 | [mischah](https://github.com/mischah) | -| 1 | [renarsvilnis](https://github.com/renarsvilnis) | -| 1 | [sbugert](https://github.com/sbugert) | -| 1 | [stephencweiss](https://github.com/stephencweiss) | -| 1 | [skellock](https://github.com/skellock) | -| 1 | [whxaxes](https://github.com/whxaxes) | - -#### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -#### Credit - -Thanks to [derhuerst](https://github.com/derhuerst), creator of prompt libraries such as [prompt-skeleton](https://github.com/derhuerst/prompt-skeleton), which influenced some of the concepts we used in our prompts. - -#### License - -Copyright © 2018-present, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). \ No newline at end of file diff --git a/node_modules/enquirer/index.d.ts b/node_modules/enquirer/index.d.ts deleted file mode 100644 index 053a9e7..0000000 --- a/node_modules/enquirer/index.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { EventEmitter } from "events"; - -interface BasePromptOptions { - name: string | (() => string) - type: string | (() => string) - message: string | (() => string) | (() => Promise) - initial?: any - required?: boolean - format?(value: string): string | Promise - result?(value: string): string | Promise - skip?: ((state: object) => boolean | Promise) | boolean - validate?(value: string): boolean | Promise | string | Promise - onSubmit?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise - onCancel?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise - stdin?: NodeJS.ReadStream - stdout?: NodeJS.WriteStream -} - -interface Choice { - name: string - message?: string - value?: string - hint?: string - disabled?: boolean | string -} - -interface ArrayPromptOptions extends BasePromptOptions { - type: - | 'autocomplete' - | 'editable' - | 'form' - | 'multiselect' - | 'select' - | 'survey' - | 'list' - | 'scale' - choices: string[] | Choice[] - maxChoices?: number - muliple?: boolean - initial?: number - delay?: number - separator?: boolean - sort?: boolean - linebreak?: boolean - edgeLength?: number - align?: 'left' | 'right' - scroll?: boolean -} - -interface BooleanPromptOptions extends BasePromptOptions { - type: 'confirm' - initial?: boolean -} - -interface StringPromptOptions extends BasePromptOptions { - type: 'input' | 'invisible' | 'list' | 'password' | 'text' - initial?: string - multiline?: boolean -} - -interface NumberPromptOptions extends BasePromptOptions { - type: 'numeral' - min?: number - max?: number - delay?: number - float?: boolean - round?: boolean - major?: number - minor?: number - initial?: number -} - -interface SnippetPromptOptions extends BasePromptOptions { - type: 'snippet' - newline?: string -} - -interface SortPromptOptions extends BasePromptOptions { - type: 'sort' - hint?: string - drag?: boolean - numbered?: boolean -} - -type PromptOptions = - | ArrayPromptOptions - | BooleanPromptOptions - | StringPromptOptions - | NumberPromptOptions - | SnippetPromptOptions - | SortPromptOptions - | BasePromptOptions - -declare class BasePrompt extends EventEmitter { - constructor(options?: PromptOptions); - - render(): void; - - run(): Promise; - } - -declare class Enquirer extends EventEmitter { - constructor(options?: object, answers?: T); - - /** - * Register a custom prompt type. - * - * @param type - * @param fn `Prompt` class, or a function that returns a `Prompt` class. - */ - register(type: string, fn: typeof BasePrompt | (() => typeof BasePrompt)): this; - - /** - * Register a custom prompt type. - */ - register(type: { [key: string]: typeof BasePrompt | (() => typeof BasePrompt) }): this; - - /** - * Prompt function that takes a "question" object or array of question objects, - * and returns an object with responses from the user. - * - * @param questions Options objects for one or more prompts to run. - */ - prompt( - questions: - | PromptOptions - | ((this: Enquirer) => PromptOptions) - | (PromptOptions | ((this: Enquirer) => PromptOptions))[] - ): Promise; - - /** - * Use an enquirer plugin. - * - * @param plugin Plugin function that takes an instance of Enquirer. - */ - use(plugin: (this: this, enquirer: this) => void): this; -} - -declare namespace Enquirer { - function prompt( - questions: - | PromptOptions - | ((this: Enquirer) => PromptOptions) - | (PromptOptions | ((this: Enquirer) => PromptOptions))[] - ): Promise; - - class Prompt extends BasePrompt {} -} - -export = Enquirer; diff --git a/node_modules/enquirer/index.js b/node_modules/enquirer/index.js deleted file mode 100644 index d0ef3f6..0000000 --- a/node_modules/enquirer/index.js +++ /dev/null @@ -1,250 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const Events = require('events'); -const utils = require('./lib/utils'); - -/** - * Create an instance of `Enquirer`. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * ``` - * @name Enquirer - * @param {Object} `options` (optional) Options to use with all prompts. - * @param {Object} `answers` (optional) Answers object to initialize with. - * @api public - */ - -class Enquirer extends Events { - constructor(options, answers) { - super(); - this.options = utils.merge({}, options); - this.answers = { ...answers }; - } - - /** - * Register a custom prompt type. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * enquirer.register('customType', require('./custom-prompt')); - * ``` - * @name register() - * @param {String} `type` - * @param {Function|Prompt} `fn` `Prompt` class, or a function that returns a `Prompt` class. - * @return {Object} Returns the Enquirer instance - * @api public - */ - - register(type, fn) { - if (utils.isObject(type)) { - for (let key of Object.keys(type)) this.register(key, type[key]); - return this; - } - assert.equal(typeof fn, 'function', 'expected a function'); - let name = type.toLowerCase(); - if (fn.prototype instanceof this.Prompt) { - this.prompts[name] = fn; - } else { - this.prompts[name] = fn(this.Prompt, this); - } - return this; - } - - /** - * Prompt function that takes a "question" object or array of question objects, - * and returns an object with responses from the user. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * - * const response = await enquirer.prompt({ - * type: 'input', - * name: 'username', - * message: 'What is your username?' - * }); - * console.log(response); - * ``` - * @name prompt() - * @param {Array|Object} `questions` Options objects for one or more prompts to run. - * @return {Promise} Promise that returns an "answers" object with the user's responses. - * @api public - */ - - async prompt(questions = []) { - for (let question of [].concat(questions)) { - try { - if (typeof question === 'function') question = await question.call(this); - await this.ask(utils.merge({}, this.options, question)); - } catch (err) { - return Promise.reject(err); - } - } - return this.answers; - } - - async ask(question) { - if (typeof question === 'function') { - question = await question.call(this); - } - - let opts = utils.merge({}, this.options, question); - let { type, name } = question; - let { set, get } = utils; - - if (typeof type === 'function') { - type = await type.call(this, question, this.answers); - } - - if (!type) return this.answers[name]; - - assert(this.prompts[type], `Prompt "${type}" is not registered`); - - let prompt = new this.prompts[type](opts); - let value = get(this.answers, name); - - prompt.state.answers = this.answers; - prompt.enquirer = this; - - if (name) { - prompt.on('submit', value => { - this.emit('answer', name, value, prompt); - set(this.answers, name, value); - }); - } - - // bubble events - let emit = prompt.emit.bind(prompt); - prompt.emit = (...args) => { - this.emit.call(this, ...args); - return emit(...args); - }; - - this.emit('prompt', prompt, this); - - if (opts.autofill && value != null) { - prompt.value = prompt.input = value; - - // if "autofill=show" render the prompt, otherwise stay "silent" - if (opts.autofill === 'show') { - await prompt.submit(); - } - } else { - value = prompt.value = await prompt.run(); - } - - return value; - } - - /** - * Use an enquirer plugin. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * const plugin = enquirer => { - * // do stuff to enquire instance - * }; - * enquirer.use(plugin); - * ``` - * @name use() - * @param {Function} `plugin` Plugin function that takes an instance of Enquirer. - * @return {Object} Returns the Enquirer instance. - * @api public - */ - - use(plugin) { - plugin.call(this, this); - return this; - } - - set Prompt(value) { - this._Prompt = value; - } - get Prompt() { - return this._Prompt || this.constructor.Prompt; - } - - get prompts() { - return this.constructor.prompts; - } - - static set Prompt(value) { - this._Prompt = value; - } - static get Prompt() { - return this._Prompt || require('./lib/prompt'); - } - - static get prompts() { - return require('./lib/prompts'); - } - - static get types() { - return require('./lib/types'); - } - - /** - * Prompt function that takes a "question" object or array of question objects, - * and returns an object with responses from the user. - * - * ```js - * const { prompt } = require('enquirer'); - * const response = await prompt({ - * type: 'input', - * name: 'username', - * message: 'What is your username?' - * }); - * console.log(response); - * ``` - * @name Enquirer#prompt - * @param {Array|Object} `questions` Options objects for one or more prompts to run. - * @return {Promise} Promise that returns an "answers" object with the user's responses. - * @api public - */ - - static get prompt() { - const fn = (questions, ...rest) => { - let enquirer = new this(...rest); - let emit = enquirer.emit.bind(enquirer); - enquirer.emit = (...args) => { - fn.emit(...args); - return emit(...args); - }; - return enquirer.prompt(questions); - }; - utils.mixinEmitter(fn, new Events()); - return fn; - } -} - -utils.mixinEmitter(Enquirer, new Events()); -const prompts = Enquirer.prompts; - -for (let name of Object.keys(prompts)) { - let key = name.toLowerCase(); - - let run = options => new prompts[name](options).run(); - Enquirer.prompt[key] = run; - Enquirer[key] = run; - - if (!Enquirer[name]) { - Reflect.defineProperty(Enquirer, name, { get: () => prompts[name] }); - } -} - -const exp = name => { - utils.defineExport(Enquirer, name, () => Enquirer.types[name]); -}; - -exp('ArrayPrompt'); -exp('AuthPrompt'); -exp('BooleanPrompt'); -exp('NumberPrompt'); -exp('StringPrompt'); - -module.exports = Enquirer; diff --git a/node_modules/enquirer/lib/ansi.js b/node_modules/enquirer/lib/ansi.js deleted file mode 100644 index 1ba1981..0000000 --- a/node_modules/enquirer/lib/ansi.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -const isTerm = process.env.TERM_PROGRAM === 'Apple_Terminal'; -const colors = require('ansi-colors'); -const utils = require('./utils'); -const ansi = module.exports = exports; -const ESC = '\u001b['; -const BEL = '\u0007'; -let hidden = false; - -const code = ansi.code = { - bell: BEL, - beep: BEL, - beginning: `${ESC}G`, - down: `${ESC}J`, - esc: ESC, - getPosition: `${ESC}6n`, - hide: `${ESC}?25l`, - line: `${ESC}2K`, - lineEnd: `${ESC}K`, - lineStart: `${ESC}1K`, - restorePosition: ESC + (isTerm ? '8' : 'u'), - savePosition: ESC + (isTerm ? '7' : 's'), - screen: `${ESC}2J`, - show: `${ESC}?25h`, - up: `${ESC}1J` -}; - -const cursor = ansi.cursor = { - get hidden() { - return hidden; - }, - - hide() { - hidden = true; - return code.hide; - }, - show() { - hidden = false; - return code.show; - }, - - forward: (count = 1) => `${ESC}${count}C`, - backward: (count = 1) => `${ESC}${count}D`, - nextLine: (count = 1) => `${ESC}E`.repeat(count), - prevLine: (count = 1) => `${ESC}F`.repeat(count), - - up: (count = 1) => count ? `${ESC}${count}A` : '', - down: (count = 1) => count ? `${ESC}${count}B` : '', - right: (count = 1) => count ? `${ESC}${count}C` : '', - left: (count = 1) => count ? `${ESC}${count}D` : '', - - to(x, y) { - return y ? `${ESC}${y + 1};${x + 1}H` : `${ESC}${x + 1}G`; - }, - - move(x = 0, y = 0) { - let res = ''; - res += (x < 0) ? cursor.left(-x) : (x > 0) ? cursor.right(x) : ''; - res += (y < 0) ? cursor.up(-y) : (y > 0) ? cursor.down(y) : ''; - return res; - }, - - restore(state = {}) { - let { after, cursor, initial, input, prompt, size, value } = state; - initial = utils.isPrimitive(initial) ? String(initial) : ''; - input = utils.isPrimitive(input) ? String(input) : ''; - value = utils.isPrimitive(value) ? String(value) : ''; - - if (size) { - let codes = ansi.cursor.up(size) + ansi.cursor.to(prompt.length); - let diff = input.length - cursor; - if (diff > 0) { - codes += ansi.cursor.left(diff); - } - return codes; - } - - if (value || after) { - let pos = (!input && !!initial) ? -initial.length : -input.length + cursor; - if (after) pos -= after.length; - if (input === '' && initial && !prompt.includes(initial)) { - pos += initial.length; - } - return ansi.cursor.move(pos); - } - } -}; - -const erase = ansi.erase = { - screen: code.screen, - up: code.up, - down: code.down, - line: code.line, - lineEnd: code.lineEnd, - lineStart: code.lineStart, - lines(n) { - let str = ''; - for (let i = 0; i < n; i++) { - str += ansi.erase.line + (i < n - 1 ? ansi.cursor.up(1) : ''); - } - if (n) str += ansi.code.beginning; - return str; - } -}; - -ansi.clear = (input = '', columns = process.stdout.columns) => { - if (!columns) return erase.line + cursor.to(0); - let width = str => [...colors.unstyle(str)].length; - let lines = input.split(/\r?\n/); - let rows = 0; - for (let line of lines) { - rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / columns); - } - return (erase.line + cursor.prevLine()).repeat(rows - 1) + erase.line + cursor.to(0); -}; diff --git a/node_modules/enquirer/lib/combos.js b/node_modules/enquirer/lib/combos.js deleted file mode 100644 index 5b9d86c..0000000 --- a/node_modules/enquirer/lib/combos.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -/** - * Actions are mappings from keypress event names to method names - * in the prompts. - */ - -exports.ctrl = { - a: 'first', - b: 'backward', - c: 'cancel', - d: 'deleteForward', - e: 'last', - f: 'forward', - g: 'reset', - i: 'tab', - k: 'cutForward', - l: 'reset', - n: 'newItem', - m: 'cancel', - j: 'submit', - p: 'search', - r: 'remove', - s: 'save', - u: 'undo', - w: 'cutLeft', - x: 'toggleCursor', - v: 'paste' -}; - -exports.shift = { - up: 'shiftUp', - down: 'shiftDown', - left: 'shiftLeft', - right: 'shiftRight', - tab: 'prev' -}; - -exports.fn = { - up: 'pageUp', - down: 'pageDown', - left: 'pageLeft', - right: 'pageRight', - delete: 'deleteForward' -}; - -// on Windows -exports.option = { - b: 'backward', - f: 'forward', - d: 'cutRight', - left: 'cutLeft', - up: 'altUp', - down: 'altDown' -}; - -exports.keys = { - pageup: 'pageUp', // + (mac), (windows) - pagedown: 'pageDown', // + (mac), (windows) - home: 'home', // + (mac), (windows) - end: 'end', // + (mac), (windows) - cancel: 'cancel', - delete: 'deleteForward', - backspace: 'delete', - down: 'down', - enter: 'submit', - escape: 'cancel', - left: 'left', - space: 'space', - number: 'number', - return: 'submit', - right: 'right', - tab: 'next', - up: 'up' -}; diff --git a/node_modules/enquirer/lib/completer.js b/node_modules/enquirer/lib/completer.js deleted file mode 100644 index 4a50af0..0000000 --- a/node_modules/enquirer/lib/completer.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -const unique = arr => arr.filter((v, i) => arr.lastIndexOf(v) === i); -const compact = arr => unique(arr).filter(Boolean); - -module.exports = (action, data = {}, value = '') => { - let { past = [], present = '' } = data; - let rest, prev; - - switch (action) { - case 'prev': - case 'undo': - rest = past.slice(0, past.length - 1); - prev = past[past.length - 1] || ''; - return { - past: compact([value, ...rest]), - present: prev - }; - - case 'next': - case 'redo': - rest = past.slice(1); - prev = past[0] || ''; - return { - past: compact([...rest, value]), - present: prev - }; - - case 'save': - return { - past: compact([...past, value]), - present: '' - }; - - case 'remove': - prev = compact(past.filter(v => v !== value)); - present = ''; - - if (prev.length) { - present = prev.pop(); - } - - return { - past: prev, - present - }; - - default: { - throw new Error(`Invalid action: "${action}"`); - } - } -}; diff --git a/node_modules/enquirer/lib/interpolate.js b/node_modules/enquirer/lib/interpolate.js deleted file mode 100644 index c3d9b3f..0000000 --- a/node_modules/enquirer/lib/interpolate.js +++ /dev/null @@ -1,266 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const clean = (str = '') => { - return typeof str === 'string' ? str.replace(/^['"]|['"]$/g, '') : ''; -}; - -/** - * This file contains the interpolation and rendering logic for - * the Snippet prompt. - */ - -class Item { - constructor(token) { - this.name = token.key; - this.field = token.field || {}; - this.value = clean(token.initial || this.field.initial || ''); - this.message = token.message || this.name; - this.cursor = 0; - this.input = ''; - this.lines = []; - } -} - -const tokenize = async(options = {}, defaults = {}, fn = token => token) => { - let unique = new Set(); - let fields = options.fields || []; - let input = options.template; - let tabstops = []; - let items = []; - let keys = []; - let line = 1; - - if (typeof input === 'function') { - input = await input(); - } - - let i = -1; - let next = () => input[++i]; - let peek = () => input[i + 1]; - let push = token => { - token.line = line; - tabstops.push(token); - }; - - push({ type: 'bos', value: '' }); - - while (i < input.length - 1) { - let value = next(); - - if (/^[^\S\n ]$/.test(value)) { - push({ type: 'text', value }); - continue; - } - - if (value === '\n') { - push({ type: 'newline', value }); - line++; - continue; - } - - if (value === '\\') { - value += next(); - push({ type: 'text', value }); - continue; - } - - if ((value === '$' || value === '#' || value === '{') && peek() === '{') { - let n = next(); - value += n; - - let token = { type: 'template', open: value, inner: '', close: '', value }; - let ch; - - while ((ch = next())) { - if (ch === '}') { - if (peek() === '}') ch += next(); - token.value += ch; - token.close = ch; - break; - } - - if (ch === ':') { - token.initial = ''; - token.key = token.inner; - } else if (token.initial !== void 0) { - token.initial += ch; - } - - token.value += ch; - token.inner += ch; - } - - token.template = token.open + (token.initial || token.inner) + token.close; - token.key = token.key || token.inner; - - if (defaults.hasOwnProperty(token.key)) { - token.initial = defaults[token.key]; - } - - token = fn(token); - push(token); - - keys.push(token.key); - unique.add(token.key); - - let item = items.find(item => item.name === token.key); - token.field = fields.find(ch => ch.name === token.key); - - if (!item) { - item = new Item(token); - items.push(item); - } - - item.lines.push(token.line - 1); - continue; - } - - let last = tabstops[tabstops.length - 1]; - if (last.type === 'text' && last.line === line) { - last.value += value; - } else { - push({ type: 'text', value }); - } - } - - push({ type: 'eos', value: '' }); - return { input, tabstops, unique, keys, items }; -}; - -module.exports = async prompt => { - let options = prompt.options; - let required = new Set(options.required === true ? [] : (options.required || [])); - let defaults = { ...options.values, ...options.initial }; - let { tabstops, items, keys } = await tokenize(options, defaults); - - let result = createFn('result', prompt, options); - let format = createFn('format', prompt, options); - let isValid = createFn('validate', prompt, options, true); - let isVal = prompt.isValue.bind(prompt); - - return async(state = {}, submitted = false) => { - let index = 0; - - state.required = required; - state.items = items; - state.keys = keys; - state.output = ''; - - let validate = async(value, state, item, index) => { - let error = await isValid(value, state, item, index); - if (error === false) { - return 'Invalid field ' + item.name; - } - return error; - }; - - for (let token of tabstops) { - let value = token.value; - let key = token.key; - - if (token.type !== 'template') { - if (value) state.output += value; - continue; - } - - if (token.type === 'template') { - let item = items.find(ch => ch.name === key); - - if (options.required === true) { - state.required.add(item.name); - } - - let val = [item.input, state.values[item.value], item.value, value].find(isVal); - let field = item.field || {}; - let message = field.message || token.inner; - - if (submitted) { - let error = await validate(state.values[key], state, item, index); - if ((error && typeof error === 'string') || error === false) { - state.invalid.set(key, error); - continue; - } - - state.invalid.delete(key); - let res = await result(state.values[key], state, item, index); - state.output += colors.unstyle(res); - continue; - } - - item.placeholder = false; - - let before = value; - value = await format(value, state, item, index); - - if (val !== value) { - state.values[key] = val; - value = prompt.styles.typing(val); - state.missing.delete(message); - - } else { - state.values[key] = void 0; - val = `<${message}>`; - value = prompt.styles.primary(val); - item.placeholder = true; - - if (state.required.has(key)) { - state.missing.add(message); - } - } - - if (state.missing.has(message) && state.validating) { - value = prompt.styles.warning(val); - } - - if (state.invalid.has(key) && state.validating) { - value = prompt.styles.danger(val); - } - - if (index === state.index) { - if (before !== value) { - value = prompt.styles.underline(value); - } else { - value = prompt.styles.heading(colors.unstyle(value)); - } - } - - index++; - } - - if (value) { - state.output += value; - } - } - - let lines = state.output.split('\n').map(l => ' ' + l); - let len = items.length; - let done = 0; - - for (let item of items) { - if (state.invalid.has(item.name)) { - item.lines.forEach(i => { - if (lines[i][0] !== ' ') return; - lines[i] = state.styles.danger(state.symbols.bullet) + lines[i].slice(1); - }); - } - - if (prompt.isValue(state.values[item.name])) { - done++; - } - } - - state.completed = ((done / len) * 100).toFixed(0); - state.output = lines.join('\n'); - return state.output; - }; -}; - -function createFn(prop, prompt, options, fallback) { - return (value, state, item, index) => { - if (typeof item.field[prop] === 'function') { - return item.field[prop].call(prompt, value, state, item, index); - } - return [fallback, value].find(v => prompt.isValue(v)); - }; -} diff --git a/node_modules/enquirer/lib/keypress.js b/node_modules/enquirer/lib/keypress.js deleted file mode 100644 index 15d7314..0000000 --- a/node_modules/enquirer/lib/keypress.js +++ /dev/null @@ -1,243 +0,0 @@ -'use strict'; - -const readline = require('readline'); -const combos = require('./combos'); - -/* eslint-disable no-control-regex */ -const metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/; -const fnKeyRe = /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/; -const keyName = { - /* xterm/gnome ESC O letter */ - 'OP': 'f1', - 'OQ': 'f2', - 'OR': 'f3', - 'OS': 'f4', - /* xterm/rxvt ESC [ number ~ */ - '[11~': 'f1', - '[12~': 'f2', - '[13~': 'f3', - '[14~': 'f4', - /* from Cygwin and used in libuv */ - '[[A': 'f1', - '[[B': 'f2', - '[[C': 'f3', - '[[D': 'f4', - '[[E': 'f5', - /* common */ - '[15~': 'f5', - '[17~': 'f6', - '[18~': 'f7', - '[19~': 'f8', - '[20~': 'f9', - '[21~': 'f10', - '[23~': 'f11', - '[24~': 'f12', - /* xterm ESC [ letter */ - '[A': 'up', - '[B': 'down', - '[C': 'right', - '[D': 'left', - '[E': 'clear', - '[F': 'end', - '[H': 'home', - /* xterm/gnome ESC O letter */ - 'OA': 'up', - 'OB': 'down', - 'OC': 'right', - 'OD': 'left', - 'OE': 'clear', - 'OF': 'end', - 'OH': 'home', - /* xterm/rxvt ESC [ number ~ */ - '[1~': 'home', - '[2~': 'insert', - '[3~': 'delete', - '[4~': 'end', - '[5~': 'pageup', - '[6~': 'pagedown', - /* putty */ - '[[5~': 'pageup', - '[[6~': 'pagedown', - /* rxvt */ - '[7~': 'home', - '[8~': 'end', - /* rxvt keys with modifiers */ - '[a': 'up', - '[b': 'down', - '[c': 'right', - '[d': 'left', - '[e': 'clear', - - '[2$': 'insert', - '[3$': 'delete', - '[5$': 'pageup', - '[6$': 'pagedown', - '[7$': 'home', - '[8$': 'end', - - 'Oa': 'up', - 'Ob': 'down', - 'Oc': 'right', - 'Od': 'left', - 'Oe': 'clear', - - '[2^': 'insert', - '[3^': 'delete', - '[5^': 'pageup', - '[6^': 'pagedown', - '[7^': 'home', - '[8^': 'end', - /* misc. */ - '[Z': 'tab', -} - -function isShiftKey(code) { - return ['[a', '[b', '[c', '[d', '[e', '[2$', '[3$', '[5$', '[6$', '[7$', '[8$', '[Z'].includes(code) -} - -function isCtrlKey(code) { - return [ 'Oa', 'Ob', 'Oc', 'Od', 'Oe', '[2^', '[3^', '[5^', '[6^', '[7^', '[8^'].includes(code) -} - -const keypress = (s = '', event = {}) => { - let parts; - let key = { - name: event.name, - ctrl: false, - meta: false, - shift: false, - option: false, - sequence: s, - raw: s, - ...event - }; - - if (Buffer.isBuffer(s)) { - if (s[0] > 127 && s[1] === void 0) { - s[0] -= 128; - s = '\x1b' + String(s); - } else { - s = String(s); - } - } else if (s !== void 0 && typeof s !== 'string') { - s = String(s); - } else if (!s) { - s = key.sequence || ''; - } - - key.sequence = key.sequence || s || key.name; - - if (s === '\r') { - // carriage return - key.raw = void 0; - key.name = 'return'; - } else if (s === '\n') { - // enter, should have been called linefeed - key.name = 'enter'; - } else if (s === '\t') { - // tab - key.name = 'tab'; - } else if (s === '\b' || s === '\x7f' || s === '\x1b\x7f' || s === '\x1b\b') { - // backspace or ctrl+h - key.name = 'backspace'; - key.meta = s.charAt(0) === '\x1b'; - } else if (s === '\x1b' || s === '\x1b\x1b') { - // escape key - key.name = 'escape'; - key.meta = s.length === 2; - } else if (s === ' ' || s === '\x1b ') { - key.name = 'space'; - key.meta = s.length === 2; - } else if (s <= '\x1a') { - // ctrl+letter - key.name = String.fromCharCode(s.charCodeAt(0) + 'a'.charCodeAt(0) - 1); - key.ctrl = true; - } else if (s.length === 1 && s >= '0' && s <= '9') { - // number - key.name = 'number'; - } else if (s.length === 1 && s >= 'a' && s <= 'z') { - // lowercase letter - key.name = s; - } else if (s.length === 1 && s >= 'A' && s <= 'Z') { - // shift+letter - key.name = s.toLowerCase(); - key.shift = true; - } else if ((parts = metaKeyCodeRe.exec(s))) { - // meta+character key - key.meta = true; - key.shift = /^[A-Z]$/.test(parts[1]); - } else if ((parts = fnKeyRe.exec(s))) { - let segs = [...s]; - - if (segs[0] === '\u001b' && segs[1] === '\u001b') { - key.option = true; - } - - // ansi escape sequence - // reassemble the key code leaving out leading \x1b's, - // the modifier key bitflag and any meaningless "1;" sequence - let code = [parts[1], parts[2], parts[4], parts[6]].filter(Boolean).join(''); - let modifier = (parts[3] || parts[5] || 1) - 1; - - // Parse the key modifier - key.ctrl = !!(modifier & 4); - key.meta = !!(modifier & 10); - key.shift = !!(modifier & 1); - key.code = code; - - key.name = keyName[code]; - key.shift = isShiftKey(code) || key.shift; - key.ctrl = isCtrlKey(code) || key.ctrl; - } - return key; -}; - -keypress.listen = (options = {}, onKeypress) => { - let { stdin } = options; - - if (!stdin || (stdin !== process.stdin && !stdin.isTTY)) { - throw new Error('Invalid stream passed'); - } - - let rl = readline.createInterface({ terminal: true, input: stdin }); - readline.emitKeypressEvents(stdin, rl); - - let on = (buf, key) => onKeypress(buf, keypress(buf, key), rl); - let isRaw = stdin.isRaw; - - if (stdin.isTTY) stdin.setRawMode(true); - stdin.on('keypress', on); - rl.resume(); - - let off = () => { - if (stdin.isTTY) stdin.setRawMode(isRaw); - stdin.removeListener('keypress', on); - rl.pause(); - rl.close(); - }; - - return off; -}; - -keypress.action = (buf, key, customActions) => { - let obj = { ...combos, ...customActions }; - if (key.ctrl) { - key.action = obj.ctrl[key.name]; - return key; - } - - if (key.option && obj.option) { - key.action = obj.option[key.name]; - return key; - } - - if (key.shift) { - key.action = obj.shift[key.name]; - return key; - } - - key.action = obj.keys[key.name]; - return key; -}; - -module.exports = keypress; diff --git a/node_modules/enquirer/lib/placeholder.js b/node_modules/enquirer/lib/placeholder.js deleted file mode 100644 index ae2af1c..0000000 --- a/node_modules/enquirer/lib/placeholder.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -const utils = require('./utils'); - -/** - * Render a placeholder value with cursor and styling based on the - * position of the cursor. - * - * @param {Object} `prompt` Prompt instance. - * @param {String} `input` Input string. - * @param {String} `initial` The initial user-provided value. - * @param {Number} `pos` Current cursor position. - * @param {Boolean} `showCursor` Render a simulated cursor using the inverse primary style. - * @return {String} Returns the styled placeholder string. - * @api public - */ - -module.exports = (prompt, options = {}) => { - prompt.cursorHide(); - - let { input = '', initial = '', pos, showCursor = true, color } = options; - let style = color || prompt.styles.placeholder; - let inverse = utils.inverse(prompt.styles.primary); - let blinker = str => inverse(prompt.styles.black(str)); - let output = input; - let char = ' '; - let reverse = blinker(char); - - if (prompt.blink && prompt.blink.off === true) { - blinker = str => str; - reverse = ''; - } - - if (showCursor && pos === 0 && initial === '' && input === '') { - return blinker(char); - } - - if (showCursor && pos === 0 && (input === initial || input === '')) { - return blinker(initial[0]) + style(initial.slice(1)); - } - - initial = utils.isPrimitive(initial) ? `${initial}` : ''; - input = utils.isPrimitive(input) ? `${input}` : ''; - - let placeholder = initial && initial.startsWith(input) && initial !== input; - let cursor = placeholder ? blinker(initial[input.length]) : reverse; - - if (pos !== input.length && showCursor === true) { - output = input.slice(0, pos) + blinker(input[pos]) + input.slice(pos + 1); - cursor = ''; - } - - if (showCursor === false) { - cursor = ''; - } - - if (placeholder) { - let raw = prompt.styles.unstyle(output + cursor); - return output + cursor + style(initial.slice(raw.length)); - } - - return output + cursor; -}; diff --git a/node_modules/enquirer/lib/prompt.js b/node_modules/enquirer/lib/prompt.js deleted file mode 100644 index 65f7bdd..0000000 --- a/node_modules/enquirer/lib/prompt.js +++ /dev/null @@ -1,485 +0,0 @@ -'use strict'; - -const Events = require('events'); -const colors = require('ansi-colors'); -const keypress = require('./keypress'); -const timer = require('./timer'); -const State = require('./state'); -const theme = require('./theme'); -const utils = require('./utils'); -const ansi = require('./ansi'); - -/** - * Base class for creating a new Prompt. - * @param {Object} `options` Question object. - */ - -class Prompt extends Events { - constructor(options = {}) { - super(); - this.name = options.name; - this.type = options.type; - this.options = options; - theme(this); - timer(this); - this.state = new State(this); - this.initial = [options.initial, options.default].find(v => v != null); - this.stdout = options.stdout || process.stdout; - this.stdin = options.stdin || process.stdin; - this.scale = options.scale || 1; - this.term = this.options.term || process.env.TERM_PROGRAM; - this.margin = margin(this.options.margin); - this.setMaxListeners(0); - setOptions(this); - } - - async keypress(input, event = {}) { - this.keypressed = true; - let key = keypress.action(input, keypress(input, event), this.options.actions); - this.state.keypress = key; - this.emit('keypress', input, key); - this.emit('state', this.state.clone()); - let fn = this.options[key.action] || this[key.action] || this.dispatch; - if (typeof fn === 'function') { - return await fn.call(this, input, key); - } - this.alert(); - } - - alert() { - delete this.state.alert; - if (this.options.show === false) { - this.emit('alert'); - } else { - this.stdout.write(ansi.code.beep); - } - } - - cursorHide() { - this.stdout.write(ansi.cursor.hide()); - utils.onExit(() => this.cursorShow()); - } - - cursorShow() { - this.stdout.write(ansi.cursor.show()); - } - - write(str) { - if (!str) return; - if (this.stdout && this.state.show !== false) { - this.stdout.write(str); - } - this.state.buffer += str; - } - - clear(lines = 0) { - let buffer = this.state.buffer; - this.state.buffer = ''; - if ((!buffer && !lines) || this.options.show === false) return; - this.stdout.write(ansi.cursor.down(lines) + ansi.clear(buffer, this.width)); - } - - restore() { - if (this.state.closed || this.options.show === false) return; - - let { prompt, after, rest } = this.sections(); - let { cursor, initial = '', input = '', value = '' } = this; - - let size = this.state.size = rest.length; - let state = { after, cursor, initial, input, prompt, size, value }; - let codes = ansi.cursor.restore(state); - if (codes) { - this.stdout.write(codes); - } - } - - sections() { - let { buffer, input, prompt } = this.state; - prompt = colors.unstyle(prompt); - let buf = colors.unstyle(buffer); - let idx = buf.indexOf(prompt); - let header = buf.slice(0, idx); - let rest = buf.slice(idx); - let lines = rest.split('\n'); - let first = lines[0]; - let last = lines[lines.length - 1]; - let promptLine = prompt + (input ? ' ' + input : ''); - let len = promptLine.length; - let after = len < first.length ? first.slice(len + 1) : ''; - return { header, prompt: first, after, rest: lines.slice(1), last }; - } - - async submit() { - this.state.submitted = true; - this.state.validating = true; - - // this will only be called when the prompt is directly submitted - // without initializing, i.e. when the prompt is skipped, etc. Otherwize, - // "options.onSubmit" is will be handled by the "initialize()" method. - if (this.options.onSubmit) { - await this.options.onSubmit.call(this, this.name, this.value, this); - } - - let result = this.state.error || await this.validate(this.value, this.state); - if (result !== true) { - let error = '\n' + this.symbols.pointer + ' '; - - if (typeof result === 'string') { - error += result.trim(); - } else { - error += 'Invalid input'; - } - - this.state.error = '\n' + this.styles.danger(error); - this.state.submitted = false; - await this.render(); - await this.alert(); - this.state.validating = false; - this.state.error = void 0; - return; - } - - this.state.validating = false; - await this.render(); - await this.close(); - - this.value = await this.result(this.value); - this.emit('submit', this.value); - } - - async cancel(err) { - this.state.cancelled = this.state.submitted = true; - - await this.render(); - await this.close(); - - if (typeof this.options.onCancel === 'function') { - await this.options.onCancel.call(this, this.name, this.value, this); - } - - this.emit('cancel', await this.error(err)); - } - - async close() { - this.state.closed = true; - - try { - let sections = this.sections(); - let lines = Math.ceil(sections.prompt.length / this.width); - if (sections.rest) { - this.write(ansi.cursor.down(sections.rest.length)); - } - this.write('\n'.repeat(lines)); - } catch (err) { /* do nothing */ } - - this.emit('close'); - } - - start() { - if (!this.stop && this.options.show !== false) { - this.stop = keypress.listen(this, this.keypress.bind(this)); - this.once('close', this.stop); - } - } - - async skip() { - this.skipped = this.options.skip === true; - if (typeof this.options.skip === 'function') { - this.skipped = await this.options.skip.call(this, this.name, this.value); - } - return this.skipped; - } - - async initialize() { - let { format, options, result } = this; - - this.format = () => format.call(this, this.value); - this.result = () => result.call(this, this.value); - - if (typeof options.initial === 'function') { - this.initial = await options.initial.call(this, this); - } - - if (typeof options.onRun === 'function') { - await options.onRun.call(this, this); - } - - // if "options.onSubmit" is defined, we wrap the "submit" method to guarantee - // that "onSubmit" will always called first thing inside the submit - // method, regardless of how it's handled in inheriting prompts. - if (typeof options.onSubmit === 'function') { - let onSubmit = options.onSubmit.bind(this); - let submit = this.submit.bind(this); - delete this.options.onSubmit; - this.submit = async() => { - await onSubmit(this.name, this.value, this); - return submit(); - }; - } - - await this.start(); - await this.render(); - } - - render() { - throw new Error('expected prompt to have a custom render method'); - } - - run() { - return new Promise(async(resolve, reject) => { - this.once('submit', resolve); - this.once('cancel', reject); - if (await this.skip()) { - this.render = () => {}; - return this.submit(); - } - await this.initialize(); - this.emit('run'); - }); - } - - async element(name, choice, i) { - let { options, state, symbols, timers } = this; - let timer = timers && timers[name]; - state.timer = timer; - let value = options[name] || state[name] || symbols[name]; - let val = choice && choice[name] != null ? choice[name] : await value; - if (val === '') return val; - - let res = await this.resolve(val, state, choice, i); - if (!res && choice && choice[name]) { - return this.resolve(value, state, choice, i); - } - return res; - } - - async prefix() { - let element = await this.element('prefix') || this.symbols; - let timer = this.timers && this.timers.prefix; - let state = this.state; - state.timer = timer; - if (utils.isObject(element)) element = element[state.status] || element.pending; - if (!utils.hasColor(element)) { - let style = this.styles[state.status] || this.styles.pending; - return style(element); - } - return element; - } - - async message() { - let message = await this.element('message'); - if (!utils.hasColor(message)) { - return this.styles.strong(message); - } - return message; - } - - async separator() { - let element = await this.element('separator') || this.symbols; - let timer = this.timers && this.timers.separator; - let state = this.state; - state.timer = timer; - let value = element[state.status] || element.pending || state.separator; - let ele = await this.resolve(value, state); - if (utils.isObject(ele)) ele = ele[state.status] || ele.pending; - if (!utils.hasColor(ele)) { - return this.styles.muted(ele); - } - return ele; - } - - async pointer(choice, i) { - let val = await this.element('pointer', choice, i); - - if (typeof val === 'string' && utils.hasColor(val)) { - return val; - } - - if (val) { - let styles = this.styles; - let focused = this.index === i; - let style = focused ? styles.primary : val => val; - let ele = await this.resolve(val[focused ? 'on' : 'off'] || val, this.state); - let styled = !utils.hasColor(ele) ? style(ele) : ele; - return focused ? styled : ' '.repeat(ele.length); - } - } - - async indicator(choice, i) { - let val = await this.element('indicator', choice, i); - if (typeof val === 'string' && utils.hasColor(val)) { - return val; - } - if (val) { - let styles = this.styles; - let enabled = choice.enabled === true; - let style = enabled ? styles.success : styles.dark; - let ele = val[enabled ? 'on' : 'off'] || val; - return !utils.hasColor(ele) ? style(ele) : ele; - } - return ''; - } - - body() { - return null; - } - - footer() { - if (this.state.status === 'pending') { - return this.element('footer'); - } - } - - header() { - if (this.state.status === 'pending') { - return this.element('header'); - } - } - - async hint() { - if (this.state.status === 'pending' && !this.isValue(this.state.input)) { - let hint = await this.element('hint'); - if (!utils.hasColor(hint)) { - return this.styles.muted(hint); - } - return hint; - } - } - - error(err) { - return !this.state.submitted ? (err || this.state.error) : ''; - } - - format(value) { - return value; - } - - result(value) { - return value; - } - - validate(value) { - if (this.options.required === true) { - return this.isValue(value); - } - return true; - } - - isValue(value) { - return value != null && value !== ''; - } - - resolve(value, ...args) { - return utils.resolve(this, value, ...args); - } - - get base() { - return Prompt.prototype; - } - - get style() { - return this.styles[this.state.status]; - } - - get height() { - return this.options.rows || utils.height(this.stdout, 25); - } - get width() { - return this.options.columns || utils.width(this.stdout, 80); - } - get size() { - return { width: this.width, height: this.height }; - } - - set cursor(value) { - this.state.cursor = value; - } - get cursor() { - return this.state.cursor; - } - - set input(value) { - this.state.input = value; - } - get input() { - return this.state.input; - } - - set value(value) { - this.state.value = value; - } - get value() { - let { input, value } = this.state; - let result = [value, input].find(this.isValue.bind(this)); - return this.isValue(result) ? result : this.initial; - } - - static get prompt() { - return options => new this(options).run(); - } -} - -function setOptions(prompt) { - let isValidKey = key => { - return prompt[key] === void 0 || typeof prompt[key] === 'function'; - }; - - let ignore = [ - 'actions', - 'choices', - 'initial', - 'margin', - 'roles', - 'styles', - 'symbols', - 'theme', - 'timers', - 'value' - ]; - - let ignoreFn = [ - 'body', - 'footer', - 'error', - 'header', - 'hint', - 'indicator', - 'message', - 'prefix', - 'separator', - 'skip' - ]; - - for (let key of Object.keys(prompt.options)) { - if (ignore.includes(key)) continue; - if (/^on[A-Z]/.test(key)) continue; - let option = prompt.options[key]; - if (typeof option === 'function' && isValidKey(key)) { - if (!ignoreFn.includes(key)) { - prompt[key] = option.bind(prompt); - } - } else if (typeof prompt[key] !== 'function') { - prompt[key] = option; - } - } -} - -function margin(value) { - if (typeof value === 'number') { - value = [value, value, value, value]; - } - let arr = [].concat(value || []); - let pad = i => i % 2 === 0 ? '\n' : ' '; - let res = []; - for (let i = 0; i < 4; i++) { - let char = pad(i); - if (arr[i]) { - res.push(char.repeat(arr[i])); - } else { - res.push(''); - } - } - return res; -} - -module.exports = Prompt; diff --git a/node_modules/enquirer/lib/prompts/autocomplete.js b/node_modules/enquirer/lib/prompts/autocomplete.js deleted file mode 100644 index d34243b..0000000 --- a/node_modules/enquirer/lib/prompts/autocomplete.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -const Select = require('./select'); - -const highlight = (input, color) => { - let val = input.toLowerCase(); - return str => { - let s = str.toLowerCase(); - let i = s.indexOf(val); - let colored = color(str.slice(i, i + val.length)); - return i >= 0 ? str.slice(0, i) + colored + str.slice(i + val.length) : str; - }; -}; - -class AutoComplete extends Select { - constructor(options) { - super(options); - this.cursorShow(); - } - - moveCursor(n) { - this.state.cursor += n; - } - - dispatch(ch) { - return this.append(ch); - } - - space(ch) { - return this.options.multiple ? super.space(ch) : this.append(ch); - } - - append(ch) { - let { cursor, input } = this.state; - this.input = input.slice(0, cursor) + ch + input.slice(cursor); - this.moveCursor(1); - return this.complete(); - } - - delete() { - let { cursor, input } = this.state; - if (!input) return this.alert(); - this.input = input.slice(0, cursor - 1) + input.slice(cursor); - this.moveCursor(-1); - return this.complete(); - } - - deleteForward() { - let { cursor, input } = this.state; - if (input[cursor] === void 0) return this.alert(); - this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); - return this.complete(); - } - - async complete() { - this.completing = true; - this.choices = await this.suggest(this.input, this.state._choices); - this.state.limit = void 0; // allow getter/setter to reset limit - this.index = Math.min(Math.max(this.visible.length - 1, 0), this.index); - await this.render(); - this.completing = false; - } - - suggest(input = this.input, choices = this.state._choices) { - if (typeof this.options.suggest === 'function') { - return this.options.suggest.call(this, input, choices); - } - let str = input.toLowerCase(); - return choices.filter(ch => ch.message.toLowerCase().includes(str)); - } - - pointer() { - return ''; - } - - format() { - if (!this.focused) return this.input; - if (this.options.multiple && this.state.submitted) { - return this.selected.map(ch => this.styles.primary(ch.message)).join(', '); - } - if (this.state.submitted) { - let value = this.value = this.input = this.focused.value; - return this.styles.primary(value); - } - return this.input; - } - - async render() { - if (this.state.status !== 'pending') return super.render(); - let style = this.options.highlight - ? this.options.highlight.bind(this) - : this.styles.placeholder; - - let color = highlight(this.input, style); - let choices = this.choices; - this.choices = choices.map(ch => ({ ...ch, message: color(ch.message) })); - await super.render(); - this.choices = choices; - } - - submit() { - if (this.options.multiple) { - this.value = this.selected.map(ch => ch.name); - } - return super.submit(); - } -} - -module.exports = AutoComplete; diff --git a/node_modules/enquirer/lib/prompts/basicauth.js b/node_modules/enquirer/lib/prompts/basicauth.js deleted file mode 100644 index 54c5ea7..0000000 --- a/node_modules/enquirer/lib/prompts/basicauth.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const AuthPrompt = require('../types/auth'); - -function defaultAuthenticate(value, state) { - if (value.username === this.options.username && value.password === this.options.password) { - return true; - } - return false; -} - -const factory = (authenticate = defaultAuthenticate) => { - const choices = [ - { name: 'username', message: 'username' }, - { - name: 'password', - message: 'password', - format(input) { - if (this.options.showPassword) { - return input; - } - let color = this.state.submitted ? this.styles.primary : this.styles.muted; - return color(this.symbols.asterisk.repeat(input.length)); - } - } - ]; - - class BasicAuthPrompt extends AuthPrompt.create(authenticate) { - constructor(options) { - super({ ...options, choices }); - } - - static create(authenticate) { - return factory(authenticate); - } - } - - return BasicAuthPrompt; -}; - -module.exports = factory(); diff --git a/node_modules/enquirer/lib/prompts/confirm.js b/node_modules/enquirer/lib/prompts/confirm.js deleted file mode 100644 index 61eae7a..0000000 --- a/node_modules/enquirer/lib/prompts/confirm.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const BooleanPrompt = require('../types/boolean'); - -class ConfirmPrompt extends BooleanPrompt { - constructor(options) { - super(options); - this.default = this.options.default || (this.initial ? '(Y/n)' : '(y/N)'); - } -} - -module.exports = ConfirmPrompt; - diff --git a/node_modules/enquirer/lib/prompts/editable.js b/node_modules/enquirer/lib/prompts/editable.js deleted file mode 100644 index 042e4c9..0000000 --- a/node_modules/enquirer/lib/prompts/editable.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict'; - -const Select = require('./select'); -const Form = require('./form'); -const form = Form.prototype; - -class Editable extends Select { - constructor(options) { - super({ ...options, multiple: true }); - this.align = [this.options.align, 'left'].find(v => v != null); - this.emptyError = ''; - this.values = {}; - } - - dispatch(char, key) { - let choice = this.focused; - let parent = choice.parent || {}; - if (!choice.editable && !parent.editable) { - if (char === 'a' || char === 'i') return super[char](); - } - return form.dispatch.call(this, char, key); - } - - append(char, key) { - return form.append.call(this, char, key); - } - - delete(char, key) { - return form.delete.call(this, char, key); - } - - space(char) { - return this.focused.editable ? this.append(char) : super.space(); - } - - number(char) { - return this.focused.editable ? this.append(char) : super.number(char); - } - - next() { - return this.focused.editable ? form.next.call(this) : super.next(); - } - - prev() { - return this.focused.editable ? form.prev.call(this) : super.prev(); - } - - async indicator(choice, i) { - let symbol = choice.indicator || ''; - let value = choice.editable ? symbol : super.indicator(choice, i); - return await this.resolve(value, this.state, choice, i) || ''; - } - - indent(choice) { - return choice.role === 'heading' ? '' : (choice.editable ? ' ' : ' '); - } - - async renderChoice(choice, i) { - choice.indent = ''; - if (choice.editable) return form.renderChoice.call(this, choice, i); - return super.renderChoice(choice, i); - } - - error() { - return ''; - } - - footer() { - return this.state.error; - } - - async validate() { - let result = true; - - for (let choice of this.choices) { - if (typeof choice.validate !== 'function') { - continue; - } - - if (choice.role === 'heading') { - continue; - } - - let val = choice.parent ? this.value[choice.parent.name] : this.value; - - if (choice.editable) { - val = choice.value === choice.name ? choice.initial || '' : choice.value; - } else if (!this.isDisabled(choice)) { - val = choice.enabled === true; - } - - result = await choice.validate(val, this.state); - - if (result !== true) { - break; - } - } - - if (result !== true) { - this.state.error = typeof result === 'string' ? result : 'Invalid Input'; - } - - return result; - } - - submit() { - if (this.focused.newChoice === true) return super.submit(); - if (this.choices.some(ch => ch.newChoice)) { - return this.alert(); - } - - this.value = {}; - - for (let choice of this.choices) { - let val = choice.parent ? this.value[choice.parent.name] : this.value; - - if (choice.role === 'heading') { - this.value[choice.name] = {}; - continue; - } - - if (choice.editable) { - val[choice.name] = choice.value === choice.name - ? (choice.initial || '') - : choice.value; - - } else if (!this.isDisabled(choice)) { - val[choice.name] = choice.enabled === true; - } - } - - return this.base.submit.call(this); - } -} - -module.exports = Editable; diff --git a/node_modules/enquirer/lib/prompts/form.js b/node_modules/enquirer/lib/prompts/form.js deleted file mode 100644 index aad4c6c..0000000 --- a/node_modules/enquirer/lib/prompts/form.js +++ /dev/null @@ -1,196 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const SelectPrompt = require('./select'); -const placeholder = require('../placeholder'); - -class FormPrompt extends SelectPrompt { - constructor(options) { - super({ ...options, multiple: true }); - this.type = 'form'; - this.initial = this.options.initial; - this.align = [this.options.align, 'right'].find(v => v != null); - this.emptyError = ''; - this.values = {}; - } - - async reset(first) { - await super.reset(); - if (first === true) this._index = this.index; - this.index = this._index; - this.values = {}; - this.choices.forEach(choice => choice.reset && choice.reset()); - return this.render(); - } - - dispatch(char) { - return !!char && this.append(char); - } - - append(char) { - let choice = this.focused; - if (!choice) return this.alert(); - let { cursor, input } = choice; - choice.value = choice.input = input.slice(0, cursor) + char + input.slice(cursor); - choice.cursor++; - return this.render(); - } - - delete() { - let choice = this.focused; - if (!choice || choice.cursor <= 0) return this.alert(); - let { cursor, input } = choice; - choice.value = choice.input = input.slice(0, cursor - 1) + input.slice(cursor); - choice.cursor--; - return this.render(); - } - - deleteForward() { - let choice = this.focused; - if (!choice) return this.alert(); - let { cursor, input } = choice; - if (input[cursor] === void 0) return this.alert(); - let str = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); - choice.value = choice.input = str; - return this.render(); - } - - right() { - let choice = this.focused; - if (!choice) return this.alert(); - if (choice.cursor >= choice.input.length) return this.alert(); - choice.cursor++; - return this.render(); - } - - left() { - let choice = this.focused; - if (!choice) return this.alert(); - if (choice.cursor <= 0) return this.alert(); - choice.cursor--; - return this.render(); - } - - space(ch, key) { - return this.dispatch(ch, key); - } - - number(ch, key) { - return this.dispatch(ch, key); - } - - next() { - let ch = this.focused; - if (!ch) return this.alert(); - let { initial, input } = ch; - if (initial && initial.startsWith(input) && input !== initial) { - ch.value = ch.input = initial; - ch.cursor = ch.value.length; - return this.render(); - } - return super.next(); - } - - prev() { - let ch = this.focused; - if (!ch) return this.alert(); - if (ch.cursor === 0) return super.prev(); - ch.value = ch.input = ''; - ch.cursor = 0; - return this.render(); - } - - separator() { - return ''; - } - - format(value) { - return !this.state.submitted ? super.format(value) : ''; - } - - pointer() { - return ''; - } - - indicator(choice) { - return choice.input ? '⦿' : '⊙'; - } - - async choiceSeparator(choice, i) { - let sep = await this.resolve(choice.separator, this.state, choice, i) || ':'; - return sep ? ' ' + this.styles.disabled(sep) : ''; - } - - async renderChoice(choice, i) { - await this.onChoice(choice, i); - - let { state, styles } = this; - let { cursor, initial = '', name, hint, input = '' } = choice; - let { muted, submitted, primary, danger } = styles; - - let help = hint; - let focused = this.index === i; - let validate = choice.validate || (() => true); - let sep = await this.choiceSeparator(choice, i); - let msg = choice.message; - - if (this.align === 'right') msg = msg.padStart(this.longest + 1, ' '); - if (this.align === 'left') msg = msg.padEnd(this.longest + 1, ' '); - - // re-populate the form values (answers) object - let value = this.values[name] = (input || initial); - let color = input ? 'success' : 'dark'; - - if ((await validate.call(choice, value, this.state)) !== true) { - color = 'danger'; - } - - let style = styles[color]; - let indicator = style(await this.indicator(choice, i)) + (choice.pad || ''); - - let indent = this.indent(choice); - let line = () => [indent, indicator, msg + sep, input, help].filter(Boolean).join(' '); - - if (state.submitted) { - msg = colors.unstyle(msg); - input = submitted(input); - help = ''; - return line(); - } - - if (choice.format) { - input = await choice.format.call(this, input, choice, i); - } else { - let color = this.styles.muted; - let options = { input, initial, pos: cursor, showCursor: focused, color }; - input = placeholder(this, options); - } - - if (!this.isValue(input)) { - input = this.styles.muted(this.symbols.ellipsis); - } - - if (choice.result) { - this.values[name] = await choice.result.call(this, value, choice, i); - } - - if (focused) { - msg = primary(msg); - } - - if (choice.error) { - input += (input ? ' ' : '') + danger(choice.error.trim()); - } else if (choice.hint) { - input += (input ? ' ' : '') + muted(choice.hint.trim()); - } - - return line(); - } - - async submit() { - this.value = this.values; - return super.base.submit.call(this); - } -} - -module.exports = FormPrompt; diff --git a/node_modules/enquirer/lib/prompts/index.js b/node_modules/enquirer/lib/prompts/index.js deleted file mode 100644 index a82fbfb..0000000 --- a/node_modules/enquirer/lib/prompts/index.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const utils = require('../utils'); - -const define = (key, fn) => { - utils.defineExport(exports, key, fn); - utils.defineExport(exports, key.toLowerCase(), fn); -}; - -define('AutoComplete', () => require('./autocomplete')); -define('BasicAuth', () => require('./basicauth')); -define('Confirm', () => require('./confirm')); -define('Editable', () => require('./editable')); -define('Form', () => require('./form')); -define('Input', () => require('./input')); -define('Invisible', () => require('./invisible')); -define('List', () => require('./list')); -define('MultiSelect', () => require('./multiselect')); -define('Numeral', () => require('./numeral')); -define('Password', () => require('./password')); -define('Scale', () => require('./scale')); -define('Select', () => require('./select')); -define('Snippet', () => require('./snippet')); -define('Sort', () => require('./sort')); -define('Survey', () => require('./survey')); -define('Text', () => require('./text')); -define('Toggle', () => require('./toggle')); -define('Quiz', () => require('./quiz')); diff --git a/node_modules/enquirer/lib/prompts/input.js b/node_modules/enquirer/lib/prompts/input.js deleted file mode 100644 index 80ba193..0000000 --- a/node_modules/enquirer/lib/prompts/input.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -const Prompt = require('../types/string'); -const completer = require('../completer'); - -class Input extends Prompt { - constructor(options) { - super(options); - let history = this.options.history; - if (history && history.store) { - let initial = history.values || this.initial; - this.autosave = !!history.autosave; - this.store = history.store; - this.data = this.store.get('values') || { past: [], present: initial }; - this.initial = this.data.present || this.data.past[this.data.past.length - 1]; - } - } - - completion(action) { - if (!this.store) return this.alert(); - this.data = completer(action, this.data, this.input); - if (!this.data.present) return this.alert(); - this.input = this.data.present; - this.cursor = this.input.length; - return this.render(); - } - - altUp() { - return this.completion('prev'); - } - - altDown() { - return this.completion('next'); - } - - prev() { - this.save(); - return super.prev(); - } - - save() { - if (!this.store) return; - this.data = completer('save', this.data, this.input); - this.store.set('values', this.data); - } - - submit() { - if (this.store && this.autosave === true) { - this.save(); - } - return super.submit(); - } -} - -module.exports = Input; diff --git a/node_modules/enquirer/lib/prompts/invisible.js b/node_modules/enquirer/lib/prompts/invisible.js deleted file mode 100644 index 5481062..0000000 --- a/node_modules/enquirer/lib/prompts/invisible.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const StringPrompt = require('../types/string'); - -class InvisiblePrompt extends StringPrompt { - format() { - return ''; - } -} - -module.exports = InvisiblePrompt; diff --git a/node_modules/enquirer/lib/prompts/list.js b/node_modules/enquirer/lib/prompts/list.js deleted file mode 100644 index 7657c7f..0000000 --- a/node_modules/enquirer/lib/prompts/list.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const StringPrompt = require('../types/string'); - -class ListPrompt extends StringPrompt { - constructor(options = {}) { - super(options); - this.sep = this.options.separator || /, */; - this.initial = options.initial || ''; - } - - split(input = this.value) { - return input ? String(input).split(this.sep) : []; - } - - format() { - let style = this.state.submitted ? this.styles.primary : val => val; - return this.list.map(style).join(', '); - } - - async submit(value) { - let result = this.state.error || await this.validate(this.list, this.state); - if (result !== true) { - this.state.error = result; - return super.submit(); - } - this.value = this.list; - return super.submit(); - } - - get list() { - return this.split(); - } -} - -module.exports = ListPrompt; diff --git a/node_modules/enquirer/lib/prompts/multiselect.js b/node_modules/enquirer/lib/prompts/multiselect.js deleted file mode 100644 index f64fcd5..0000000 --- a/node_modules/enquirer/lib/prompts/multiselect.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const Select = require('./select'); - -class MultiSelect extends Select { - constructor(options) { - super({ ...options, multiple: true }); - } -} - -module.exports = MultiSelect; diff --git a/node_modules/enquirer/lib/prompts/numeral.js b/node_modules/enquirer/lib/prompts/numeral.js deleted file mode 100644 index 2a81fdd..0000000 --- a/node_modules/enquirer/lib/prompts/numeral.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../types/number'); diff --git a/node_modules/enquirer/lib/prompts/password.js b/node_modules/enquirer/lib/prompts/password.js deleted file mode 100644 index 46df22d..0000000 --- a/node_modules/enquirer/lib/prompts/password.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const StringPrompt = require('../types/string'); - -class PasswordPrompt extends StringPrompt { - constructor(options) { - super(options); - this.cursorShow(); - } - - format(input = this.input) { - if (!this.keypressed) return ''; - let color = this.state.submitted ? this.styles.primary : this.styles.muted; - return color(this.symbols.asterisk.repeat(input.length)); - } -} - -module.exports = PasswordPrompt; diff --git a/node_modules/enquirer/lib/prompts/quiz.js b/node_modules/enquirer/lib/prompts/quiz.js deleted file mode 100644 index 2be4551..0000000 --- a/node_modules/enquirer/lib/prompts/quiz.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -const SelectPrompt = require('./select'); - -class Quiz extends SelectPrompt { - constructor(options) { - super(options); - if (typeof this.options.correctChoice !== 'number' || this.options.correctChoice < 0) { - throw new Error('Please specify the index of the correct answer from the list of choices'); - } - } - - async toChoices(value, parent) { - let choices = await super.toChoices(value, parent); - if (choices.length < 2) { - throw new Error('Please give at least two choices to the user'); - } - if (this.options.correctChoice > choices.length) { - throw new Error('Please specify the index of the correct answer from the list of choices'); - } - return choices; - } - - check(state) { - return state.index === this.options.correctChoice; - } - - async result(selected) { - return { - selectedAnswer: selected, - correctAnswer: this.options.choices[this.options.correctChoice].value, - correct: await this.check(this.state) - }; - } -} - -module.exports = Quiz; diff --git a/node_modules/enquirer/lib/prompts/scale.js b/node_modules/enquirer/lib/prompts/scale.js deleted file mode 100644 index 29d6829..0000000 --- a/node_modules/enquirer/lib/prompts/scale.js +++ /dev/null @@ -1,237 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const ArrayPrompt = require('../types/array'); -const utils = require('../utils'); - -class LikertScale extends ArrayPrompt { - constructor(options = {}) { - super(options); - this.widths = [].concat(options.messageWidth || 50); - this.align = [].concat(options.align || 'left'); - this.linebreak = options.linebreak || false; - this.edgeLength = options.edgeLength || 3; - this.newline = options.newline || '\n '; - let start = options.startNumber || 1; - if (typeof this.scale === 'number') { - this.scaleKey = false; - this.scale = Array(this.scale).fill(0).map((v, i) => ({ name: i + start })); - } - } - - async reset() { - this.tableized = false; - await super.reset(); - return this.render(); - } - - tableize() { - if (this.tableized === true) return; - this.tableized = true; - let longest = 0; - - for (let ch of this.choices) { - longest = Math.max(longest, ch.message.length); - ch.scaleIndex = ch.initial || 2; - ch.scale = []; - - for (let i = 0; i < this.scale.length; i++) { - ch.scale.push({ index: i }); - } - } - this.widths[0] = Math.min(this.widths[0], longest + 3); - } - - async dispatch(s, key) { - if (this.multiple) { - return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); - } - this.alert(); - } - - heading(msg, item, i) { - return this.styles.strong(msg); - } - - separator() { - return this.styles.muted(this.symbols.ellipsis); - } - - right() { - let choice = this.focused; - if (choice.scaleIndex >= this.scale.length - 1) return this.alert(); - choice.scaleIndex++; - return this.render(); - } - - left() { - let choice = this.focused; - if (choice.scaleIndex <= 0) return this.alert(); - choice.scaleIndex--; - return this.render(); - } - - indent() { - return ''; - } - - format() { - if (this.state.submitted) { - let values = this.choices.map(ch => this.styles.info(ch.index)); - return values.join(', '); - } - return ''; - } - - pointer() { - return ''; - } - - /** - * Render the scale "Key". Something like: - * @return {String} - */ - - renderScaleKey() { - if (this.scaleKey === false) return ''; - if (this.state.submitted) return ''; - let scale = this.scale.map(item => ` ${item.name} - ${item.message}`); - let key = ['', ...scale].map(item => this.styles.muted(item)); - return key.join('\n'); - } - - /** - * Render the heading row for the scale. - * @return {String} - */ - - renderScaleHeading(max) { - let keys = this.scale.map(ele => ele.name); - if (typeof this.options.renderScaleHeading === 'function') { - keys = this.options.renderScaleHeading.call(this, max); - } - let diff = this.scaleLength - keys.join('').length; - let spacing = Math.round(diff / (keys.length - 1)); - let names = keys.map(key => this.styles.strong(key)); - let headings = names.join(' '.repeat(spacing)); - let padding = ' '.repeat(this.widths[0]); - return this.margin[3] + padding + this.margin[1] + headings; - } - - /** - * Render a scale indicator => ◯ or ◉ by default - */ - - scaleIndicator(choice, item, i) { - if (typeof this.options.scaleIndicator === 'function') { - return this.options.scaleIndicator.call(this, choice, item, i); - } - let enabled = choice.scaleIndex === item.index; - if (item.disabled) return this.styles.hint(this.symbols.radio.disabled); - if (enabled) return this.styles.success(this.symbols.radio.on); - return this.symbols.radio.off; - } - - /** - * Render the actual scale => ◯────◯────◉────◯────◯ - */ - - renderScale(choice, i) { - let scale = choice.scale.map(item => this.scaleIndicator(choice, item, i)); - let padding = this.term === 'Hyper' ? '' : ' '; - return scale.join(padding + this.symbols.line.repeat(this.edgeLength)); - } - - /** - * Render a choice, including scale => - * "The website is easy to navigate. ◯───◯───◉───◯───◯" - */ - - async renderChoice(choice, i) { - await this.onChoice(choice, i); - - let focused = this.index === i; - let pointer = await this.pointer(choice, i); - let hint = await choice.hint; - - if (hint && !utils.hasColor(hint)) { - hint = this.styles.muted(hint); - } - - let pad = str => this.margin[3] + str.replace(/\s+$/, '').padEnd(this.widths[0], ' '); - let newline = this.newline; - let ind = this.indent(choice); - let message = await this.resolve(choice.message, this.state, choice, i); - let scale = await this.renderScale(choice, i); - let margin = this.margin[1] + this.margin[3]; - this.scaleLength = colors.unstyle(scale).length; - this.widths[0] = Math.min(this.widths[0], this.width - this.scaleLength - margin.length); - let msg = utils.wordWrap(message, { width: this.widths[0], newline }); - let lines = msg.split('\n').map(line => pad(line) + this.margin[1]); - - if (focused) { - scale = this.styles.info(scale); - lines = lines.map(line => this.styles.info(line)); - } - - lines[0] += scale; - - if (this.linebreak) lines.push(''); - return [ind + pointer, lines.join('\n')].filter(Boolean); - } - - async renderChoices() { - if (this.state.submitted) return ''; - this.tableize(); - let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); - let visible = await Promise.all(choices); - let heading = await this.renderScaleHeading(); - return this.margin[0] + [heading, ...visible.map(v => v.join(' '))].join('\n'); - } - - async render() { - let { submitted, size } = this.state; - - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = ''; - if (this.options.promptLine !== false) { - prompt = [prefix, message, separator, ''].join(' '); - this.state.prompt = prompt; - } - - let header = await this.header(); - let output = await this.format(); - let key = await this.renderScaleKey(); - let help = await this.error() || await this.hint(); - let body = await this.renderChoices(); - let footer = await this.footer(); - let err = this.emptyError; - - if (output) prompt += output; - if (help && !prompt.includes(help)) prompt += ' ' + help; - - if (submitted && !output && !body.trim() && this.multiple && err != null) { - prompt += this.styles.danger(err); - } - - this.clear(size); - this.write([header, prompt, key, body, footer].filter(Boolean).join('\n')); - if (!this.state.submitted) { - this.write(this.margin[2]); - } - this.restore(); - } - - submit() { - this.value = {}; - for (let choice of this.choices) { - this.value[choice.name] = choice.scaleIndex; - } - return this.base.submit.call(this); - } -} - -module.exports = LikertScale; diff --git a/node_modules/enquirer/lib/prompts/select.js b/node_modules/enquirer/lib/prompts/select.js deleted file mode 100644 index a17cc0b..0000000 --- a/node_modules/enquirer/lib/prompts/select.js +++ /dev/null @@ -1,139 +0,0 @@ -'use strict'; - -const ArrayPrompt = require('../types/array'); -const utils = require('../utils'); - -class SelectPrompt extends ArrayPrompt { - constructor(options) { - super(options); - this.emptyError = this.options.emptyError || 'No items were selected'; - } - - async dispatch(s, key) { - if (this.multiple) { - return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); - } - this.alert(); - } - - separator() { - if (this.options.separator) return super.separator(); - let sep = this.styles.muted(this.symbols.ellipsis); - return this.state.submitted ? super.separator() : sep; - } - - pointer(choice, i) { - return (!this.multiple || this.options.pointer) ? super.pointer(choice, i) : ''; - } - - indicator(choice, i) { - return this.multiple ? super.indicator(choice, i) : ''; - } - - choiceMessage(choice, i) { - let message = this.resolve(choice.message, this.state, choice, i); - if (choice.role === 'heading' && !utils.hasColor(message)) { - message = this.styles.strong(message); - } - return this.resolve(message, this.state, choice, i); - } - - choiceSeparator() { - return ':'; - } - - async renderChoice(choice, i) { - await this.onChoice(choice, i); - - let focused = this.index === i; - let pointer = await this.pointer(choice, i); - let check = await this.indicator(choice, i) + (choice.pad || ''); - let hint = await this.resolve(choice.hint, this.state, choice, i); - - if (hint && !utils.hasColor(hint)) { - hint = this.styles.muted(hint); - } - - let ind = this.indent(choice); - let msg = await this.choiceMessage(choice, i); - let line = () => [this.margin[3], ind + pointer + check, msg, this.margin[1], hint].filter(Boolean).join(' '); - - if (choice.role === 'heading') { - return line(); - } - - if (choice.disabled) { - if (!utils.hasColor(msg)) { - msg = this.styles.disabled(msg); - } - return line(); - } - - if (focused) { - msg = this.styles.em(msg); - } - - return line(); - } - - async renderChoices() { - if (this.state.loading === 'choices') { - return this.styles.warning('Loading choices'); - } - - if (this.state.submitted) return ''; - let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); - let visible = await Promise.all(choices); - if (!visible.length) visible.push(this.styles.danger('No matching choices')); - let result = this.margin[0] + visible.join('\n'); - let header; - - if (this.options.choicesHeader) { - header = await this.resolve(this.options.choicesHeader, this.state); - } - - return [header, result].filter(Boolean).join('\n'); - } - - format() { - if (!this.state.submitted) return ''; - if (Array.isArray(this.selected)) { - return this.selected.map(choice => this.styles.primary(choice.name)).join(', '); - } - return this.styles.primary(this.selected.name); - } - - async render() { - let { submitted, size } = this.state; - - let prompt = ''; - let header = await this.header(); - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - if (this.options.promptLine !== false) { - prompt = [prefix, message, separator, ''].join(' '); - this.state.prompt = prompt; - } - - let output = await this.format(); - let help = (await this.error()) || (await this.hint()); - let body = await this.renderChoices(); - let footer = await this.footer(); - - if (output) prompt += output; - if (help && !prompt.includes(help)) prompt += ' ' + help; - - if (submitted && !output && !body.trim() && this.multiple && this.emptyError != null) { - prompt += this.styles.danger(this.emptyError); - } - - this.clear(size); - this.write([header, prompt, body, footer].filter(Boolean).join('\n')); - this.write(this.margin[2]); - this.restore(); - } -} - -module.exports = SelectPrompt; diff --git a/node_modules/enquirer/lib/prompts/snippet.js b/node_modules/enquirer/lib/prompts/snippet.js deleted file mode 100644 index eec6cc3..0000000 --- a/node_modules/enquirer/lib/prompts/snippet.js +++ /dev/null @@ -1,185 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const interpolate = require('../interpolate'); -const Prompt = require('../prompt'); - -class SnippetPrompt extends Prompt { - constructor(options) { - super(options); - this.cursorHide(); - this.reset(true); - } - - async initialize() { - this.interpolate = await interpolate(this); - await super.initialize(); - } - - async reset(first) { - this.state.keys = []; - this.state.invalid = new Map(); - this.state.missing = new Set(); - this.state.completed = 0; - this.state.values = {}; - - if (first !== true) { - await this.initialize(); - await this.render(); - } - } - - moveCursor(n) { - let item = this.getItem(); - this.cursor += n; - item.cursor += n; - } - - dispatch(ch, key) { - if (!key.code && !key.ctrl && ch != null && this.getItem()) { - this.append(ch, key); - return; - } - this.alert(); - } - - append(ch, key) { - let item = this.getItem(); - let prefix = item.input.slice(0, this.cursor); - let suffix = item.input.slice(this.cursor); - this.input = item.input = `${prefix}${ch}${suffix}`; - this.moveCursor(1); - this.render(); - } - - delete() { - let item = this.getItem(); - if (this.cursor <= 0 || !item.input) return this.alert(); - let suffix = item.input.slice(this.cursor); - let prefix = item.input.slice(0, this.cursor - 1); - this.input = item.input = `${prefix}${suffix}`; - this.moveCursor(-1); - this.render(); - } - - increment(i) { - return i >= this.state.keys.length - 1 ? 0 : i + 1; - } - - decrement(i) { - return i <= 0 ? this.state.keys.length - 1 : i - 1; - } - - first() { - this.state.index = 0; - this.render(); - } - - last() { - this.state.index = this.state.keys.length - 1; - this.render(); - } - - right() { - if (this.cursor >= this.input.length) return this.alert(); - this.moveCursor(1); - this.render(); - } - - left() { - if (this.cursor <= 0) return this.alert(); - this.moveCursor(-1); - this.render(); - } - - prev() { - this.state.index = this.decrement(this.state.index); - this.getItem(); - this.render(); - } - - next() { - this.state.index = this.increment(this.state.index); - this.getItem(); - this.render(); - } - - up() { - this.prev(); - } - - down() { - this.next(); - } - - format(value) { - let color = this.state.completed < 100 ? this.styles.warning : this.styles.success; - if (this.state.submitted === true && this.state.completed !== 100) { - color = this.styles.danger; - } - return color(`${this.state.completed}% completed`); - } - - async render() { - let { index, keys = [], submitted, size } = this.state; - - let newline = [this.options.newline, '\n'].find(v => v != null); - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = [prefix, message, separator].filter(Boolean).join(' '); - this.state.prompt = prompt; - - let header = await this.header(); - let error = (await this.error()) || ''; - let hint = (await this.hint()) || ''; - let body = submitted ? '' : await this.interpolate(this.state); - - let key = this.state.key = keys[index] || ''; - let input = await this.format(key); - let footer = await this.footer(); - if (input) prompt += ' ' + input; - if (hint && !input && this.state.completed === 0) prompt += ' ' + hint; - - this.clear(size); - let lines = [header, prompt, body, footer, error.trim()]; - this.write(lines.filter(Boolean).join(newline)); - this.restore(); - } - - getItem(name) { - let { items, keys, index } = this.state; - let item = items.find(ch => ch.name === keys[index]); - if (item && item.input != null) { - this.input = item.input; - this.cursor = item.cursor; - } - return item; - } - - async submit() { - if (typeof this.interpolate !== 'function') await this.initialize(); - await this.interpolate(this.state, true); - - let { invalid, missing, output, values } = this.state; - if (invalid.size) { - let err = ''; - for (let [key, value] of invalid) err += `Invalid ${key}: ${value}\n`; - this.state.error = err; - return super.submit(); - } - - if (missing.size) { - this.state.error = 'Required: ' + [...missing.keys()].join(', '); - return super.submit(); - } - - let lines = colors.unstyle(output).split('\n'); - let result = lines.map(v => v.slice(1)).join('\n'); - this.value = { values, result }; - return super.submit(); - } -} - -module.exports = SnippetPrompt; diff --git a/node_modules/enquirer/lib/prompts/sort.js b/node_modules/enquirer/lib/prompts/sort.js deleted file mode 100644 index b779b9b..0000000 --- a/node_modules/enquirer/lib/prompts/sort.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -const hint = '(Use + to sort)'; -const Prompt = require('./select'); - -class Sort extends Prompt { - constructor(options) { - super({ ...options, reorder: false, sort: true, multiple: true }); - this.state.hint = [this.options.hint, hint].find(this.isValue.bind(this)); - } - - indicator() { - return ''; - } - - async renderChoice(choice, i) { - let str = await super.renderChoice(choice, i); - let sym = this.symbols.identicalTo + ' '; - let pre = (this.index === i && this.sorting) ? this.styles.muted(sym) : ' '; - if (this.options.drag === false) pre = ''; - if (this.options.numbered === true) { - return pre + `${i + 1} - ` + str; - } - return pre + str; - } - - get selected() { - return this.choices; - } - - submit() { - this.value = this.choices.map(choice => choice.value); - return super.submit(); - } -} - -module.exports = Sort; diff --git a/node_modules/enquirer/lib/prompts/survey.js b/node_modules/enquirer/lib/prompts/survey.js deleted file mode 100644 index 5d39f6b..0000000 --- a/node_modules/enquirer/lib/prompts/survey.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -const ArrayPrompt = require('../types/array'); - -class Survey extends ArrayPrompt { - constructor(options = {}) { - super(options); - this.emptyError = options.emptyError || 'No items were selected'; - this.term = process.env.TERM_PROGRAM; - - if (!this.options.header) { - let header = ['', '4 - Strongly Agree', '3 - Agree', '2 - Neutral', '1 - Disagree', '0 - Strongly Disagree', '']; - header = header.map(ele => this.styles.muted(ele)); - this.state.header = header.join('\n '); - } - } - - async toChoices(...args) { - if (this.createdScales) return false; - this.createdScales = true; - let choices = await super.toChoices(...args); - for (let choice of choices) { - choice.scale = createScale(5, this.options); - choice.scaleIdx = 2; - } - return choices; - } - - dispatch() { - this.alert(); - } - - space() { - let choice = this.focused; - let ele = choice.scale[choice.scaleIdx]; - let selected = ele.selected; - choice.scale.forEach(e => (e.selected = false)); - ele.selected = !selected; - return this.render(); - } - - indicator() { - return ''; - } - - pointer() { - return ''; - } - - separator() { - return this.styles.muted(this.symbols.ellipsis); - } - - right() { - let choice = this.focused; - if (choice.scaleIdx >= choice.scale.length - 1) return this.alert(); - choice.scaleIdx++; - return this.render(); - } - - left() { - let choice = this.focused; - if (choice.scaleIdx <= 0) return this.alert(); - choice.scaleIdx--; - return this.render(); - } - - indent() { - return ' '; - } - - async renderChoice(item, i) { - await this.onChoice(item, i); - let focused = this.index === i; - let isHyper = this.term === 'Hyper'; - let n = !isHyper ? 8 : 9; - let s = !isHyper ? ' ' : ''; - let ln = this.symbols.line.repeat(n); - let sp = ' '.repeat(n + (isHyper ? 0 : 1)); - let dot = enabled => (enabled ? this.styles.success('◉') : '◯') + s; - - let num = i + 1 + '.'; - let color = focused ? this.styles.heading : this.styles.noop; - let msg = await this.resolve(item.message, this.state, item, i); - let indent = this.indent(item); - let scale = indent + item.scale.map((e, i) => dot(i === item.scaleIdx)).join(ln); - let val = i => i === item.scaleIdx ? color(i) : i; - let next = indent + item.scale.map((e, i) => val(i)).join(sp); - - let line = () => [num, msg].filter(Boolean).join(' '); - let lines = () => [line(), scale, next, ' '].filter(Boolean).join('\n'); - - if (focused) { - scale = this.styles.cyan(scale); - next = this.styles.cyan(next); - } - - return lines(); - } - - async renderChoices() { - if (this.state.submitted) return ''; - let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); - let visible = await Promise.all(choices); - if (!visible.length) visible.push(this.styles.danger('No matching choices')); - return visible.join('\n'); - } - - format() { - if (this.state.submitted) { - let values = this.choices.map(ch => this.styles.info(ch.scaleIdx)); - return values.join(', '); - } - return ''; - } - - async render() { - let { submitted, size } = this.state; - - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = [prefix, message, separator].filter(Boolean).join(' '); - this.state.prompt = prompt; - - let header = await this.header(); - let output = await this.format(); - let help = await this.error() || await this.hint(); - let body = await this.renderChoices(); - let footer = await this.footer(); - - if (output || !help) prompt += ' ' + output; - if (help && !prompt.includes(help)) prompt += ' ' + help; - - if (submitted && !output && !body && this.multiple && this.type !== 'form') { - prompt += this.styles.danger(this.emptyError); - } - - this.clear(size); - this.write([prompt, header, body, footer].filter(Boolean).join('\n')); - this.restore(); - } - - submit() { - this.value = {}; - for (let choice of this.choices) { - this.value[choice.name] = choice.scaleIdx; - } - return this.base.submit.call(this); - } -} - -function createScale(n, options = {}) { - if (Array.isArray(options.scale)) { - return options.scale.map(ele => ({ ...ele })); - } - let scale = []; - for (let i = 1; i < n + 1; i++) scale.push({ i, selected: false }); - return scale; -} - -module.exports = Survey; diff --git a/node_modules/enquirer/lib/prompts/text.js b/node_modules/enquirer/lib/prompts/text.js deleted file mode 100644 index 556e1db..0000000 --- a/node_modules/enquirer/lib/prompts/text.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./input'); diff --git a/node_modules/enquirer/lib/prompts/toggle.js b/node_modules/enquirer/lib/prompts/toggle.js deleted file mode 100644 index 26d3394..0000000 --- a/node_modules/enquirer/lib/prompts/toggle.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -const BooleanPrompt = require('../types/boolean'); - -class TogglePrompt extends BooleanPrompt { - async initialize() { - await super.initialize(); - this.value = this.initial = !!this.options.initial; - this.disabled = this.options.disabled || 'no'; - this.enabled = this.options.enabled || 'yes'; - await this.render(); - } - - reset() { - this.value = this.initial; - this.render(); - } - - delete() { - this.alert(); - } - - toggle() { - this.value = !this.value; - this.render(); - } - - enable() { - if (this.value === true) return this.alert(); - this.value = true; - this.render(); - } - disable() { - if (this.value === false) return this.alert(); - this.value = false; - this.render(); - } - - up() { - this.toggle(); - } - down() { - this.toggle(); - } - right() { - this.toggle(); - } - left() { - this.toggle(); - } - next() { - this.toggle(); - } - prev() { - this.toggle(); - } - - dispatch(ch = '', key) { - switch (ch.toLowerCase()) { - case ' ': - return this.toggle(); - case '1': - case 'y': - case 't': - return this.enable(); - case '0': - case 'n': - case 'f': - return this.disable(); - default: { - return this.alert(); - } - } - } - - format() { - let active = str => this.styles.primary.underline(str); - let value = [ - this.value ? this.disabled : active(this.disabled), - this.value ? active(this.enabled) : this.enabled - ]; - return value.join(this.styles.muted(' / ')); - } - - async render() { - let { size } = this.state; - - let header = await this.header(); - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let output = await this.format(); - let help = (await this.error()) || (await this.hint()); - let footer = await this.footer(); - - let prompt = [prefix, message, separator, output].join(' '); - this.state.prompt = prompt; - - if (help && !prompt.includes(help)) prompt += ' ' + help; - - this.clear(size); - this.write([header, prompt, footer].filter(Boolean).join('\n')); - this.write(this.margin[2]); - this.restore(); - } -} - -module.exports = TogglePrompt; diff --git a/node_modules/enquirer/lib/render.js b/node_modules/enquirer/lib/render.js deleted file mode 100644 index 6a6df4a..0000000 --- a/node_modules/enquirer/lib/render.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -module.exports = async(value, prompt, context = {}) => { - let { choices, multiple } = prompt.options; - let { size, submitted } = prompt.state; - - let prefix = context.prefix || await prompt.prefix(); - let separator = context.separator || await prompt.separator(); - let message = context.message || await prompt.message(); - - // ? Select your favorite colors > - // ^ ^ ^ - // prefix message separator - let promptLine = [prefix, message, separator].filter(Boolean).join(' '); - prompt.state.prompt = promptLine; - - let header = context.header || await prompt.header(); - let output = context.format || await prompt.format(value); - let help = context.help || await prompt.error() || await prompt.hint(); - let body = context.body || await prompt.body(); - let footer = context.footer || await prompt.footer(); - - if (output || !help) promptLine += ' ' + output; - if (help && !promptLine.includes(help)) promptLine += ' ' + help; - - if (submitted && choices && multiple && !output && !body) { - promptLine += prompt.styles.danger('No items were selected'); - } - - prompt.clear(size); - prompt.write([header, promptLine, body, footer].filter(Boolean).join('\n')); - prompt.restore(); -}; diff --git a/node_modules/enquirer/lib/roles.js b/node_modules/enquirer/lib/roles.js deleted file mode 100644 index 1d663d2..0000000 --- a/node_modules/enquirer/lib/roles.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const roles = { - default(prompt, choice) { - return choice; - }, - checkbox(prompt, choice) { - throw new Error('checkbox role is not implemented yet'); - }, - editable(prompt, choice) { - throw new Error('editable role is not implemented yet'); - }, - expandable(prompt, choice) { - throw new Error('expandable role is not implemented yet'); - }, - heading(prompt, choice) { - choice.disabled = ''; - choice.indicator = [choice.indicator, ' '].find(v => v != null); - choice.message = choice.message || ''; - return choice; - }, - input(prompt, choice) { - throw new Error('input role is not implemented yet'); - }, - option(prompt, choice) { - return roles.default(prompt, choice); - }, - radio(prompt, choice) { - throw new Error('radio role is not implemented yet'); - }, - separator(prompt, choice) { - choice.disabled = ''; - choice.indicator = [choice.indicator, ' '].find(v => v != null); - choice.message = choice.message || prompt.symbols.line.repeat(5); - return choice; - }, - spacer(prompt, choice) { - return choice; - } -}; - -module.exports = (name, options = {}) => { - let role = utils.merge({}, roles, options.roles); - return role[name] || role.default; -}; diff --git a/node_modules/enquirer/lib/state.js b/node_modules/enquirer/lib/state.js deleted file mode 100644 index 501890b..0000000 --- a/node_modules/enquirer/lib/state.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -const { define, width } = require('./utils'); - -class State { - constructor(prompt) { - let options = prompt.options; - define(this, '_prompt', prompt); - this.type = prompt.type; - this.name = prompt.name; - this.message = ''; - this.header = ''; - this.footer = ''; - this.error = ''; - this.hint = ''; - this.input = ''; - this.cursor = 0; - this.index = 0; - this.lines = 0; - this.tick = 0; - this.prompt = ''; - this.buffer = ''; - this.width = width(options.stdout || process.stdout); - Object.assign(this, options); - this.name = this.name || this.message; - this.message = this.message || this.name; - this.symbols = prompt.symbols; - this.styles = prompt.styles; - this.required = new Set(); - this.cancelled = false; - this.submitted = false; - } - - clone() { - let state = { ...this }; - state.status = this.status; - state.buffer = Buffer.from(state.buffer); - delete state.clone; - return state; - } - - set color(val) { - this._color = val; - } - get color() { - let styles = this.prompt.styles; - if (this.cancelled) return styles.cancelled; - if (this.submitted) return styles.submitted; - let color = this._color || styles[this.status]; - return typeof color === 'function' ? color : styles.pending; - } - - set loading(value) { - this._loading = value; - } - get loading() { - if (typeof this._loading === 'boolean') return this._loading; - if (this.loadingChoices) return 'choices'; - return false; - } - - get status() { - if (this.cancelled) return 'cancelled'; - if (this.submitted) return 'submitted'; - return 'pending'; - } -} - -module.exports = State; diff --git a/node_modules/enquirer/lib/styles.js b/node_modules/enquirer/lib/styles.js deleted file mode 100644 index 0a177f4..0000000 --- a/node_modules/enquirer/lib/styles.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const colors = require('ansi-colors'); - -const styles = { - default: colors.noop, - noop: colors.noop, - - /** - * Modifiers - */ - - set inverse(custom) { - this._inverse = custom; - }, - get inverse() { - return this._inverse || utils.inverse(this.primary); - }, - - set complement(custom) { - this._complement = custom; - }, - get complement() { - return this._complement || utils.complement(this.primary); - }, - - /** - * Main color - */ - - primary: colors.cyan, - - /** - * Main palette - */ - - success: colors.green, - danger: colors.magenta, - strong: colors.bold, - warning: colors.yellow, - muted: colors.dim, - disabled: colors.gray, - dark: colors.dim.gray, - underline: colors.underline, - - set info(custom) { - this._info = custom; - }, - get info() { - return this._info || this.primary; - }, - - set em(custom) { - this._em = custom; - }, - get em() { - return this._em || this.primary.underline; - }, - - set heading(custom) { - this._heading = custom; - }, - get heading() { - return this._heading || this.muted.underline; - }, - - /** - * Statuses - */ - - set pending(custom) { - this._pending = custom; - }, - get pending() { - return this._pending || this.primary; - }, - - set submitted(custom) { - this._submitted = custom; - }, - get submitted() { - return this._submitted || this.success; - }, - - set cancelled(custom) { - this._cancelled = custom; - }, - get cancelled() { - return this._cancelled || this.danger; - }, - - /** - * Special styling - */ - - set typing(custom) { - this._typing = custom; - }, - get typing() { - return this._typing || this.dim; - }, - - set placeholder(custom) { - this._placeholder = custom; - }, - get placeholder() { - return this._placeholder || this.primary.dim; - }, - - set highlight(custom) { - this._highlight = custom; - }, - get highlight() { - return this._highlight || this.inverse; - } -}; - -styles.merge = (options = {}) => { - if (options.styles && typeof options.styles.enabled === 'boolean') { - colors.enabled = options.styles.enabled; - } - if (options.styles && typeof options.styles.visible === 'boolean') { - colors.visible = options.styles.visible; - } - - let result = utils.merge({}, styles, options.styles); - delete result.merge; - - for (let key of Object.keys(colors)) { - if (!result.hasOwnProperty(key)) { - Reflect.defineProperty(result, key, { get: () => colors[key] }); - } - } - - for (let key of Object.keys(colors.styles)) { - if (!result.hasOwnProperty(key)) { - Reflect.defineProperty(result, key, { get: () => colors[key] }); - } - } - return result; -}; - -module.exports = styles; diff --git a/node_modules/enquirer/lib/symbols.js b/node_modules/enquirer/lib/symbols.js deleted file mode 100644 index 16adb86..0000000 --- a/node_modules/enquirer/lib/symbols.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -const isWindows = process.platform === 'win32'; -const colors = require('ansi-colors'); -const utils = require('./utils'); - -const symbols = { - ...colors.symbols, - upDownDoubleArrow: '⇕', - upDownDoubleArrow2: '⬍', - upDownArrow: '↕', - asterisk: '*', - asterism: '⁂', - bulletWhite: '◦', - electricArrow: '⌁', - ellipsisLarge: '⋯', - ellipsisSmall: '…', - fullBlock: '█', - identicalTo: '≡', - indicator: colors.symbols.check, - leftAngle: '‹', - mark: '※', - minus: '−', - multiplication: '×', - obelus: '÷', - percent: '%', - pilcrow: '¶', - pilcrow2: '❡', - pencilUpRight: '✐', - pencilDownRight: '✎', - pencilRight: '✏', - plus: '+', - plusMinus: '±', - pointRight: '☞', - rightAngle: '›', - section: '§', - hexagon: { off: '⬡', on: '⬢', disabled: '⬢' }, - ballot: { on: '☑', off: '☐', disabled: '☒' }, - stars: { on: '★', off: '☆', disabled: '☆' }, - folder: { on: '▼', off: '▶', disabled: '▶' }, - prefix: { - pending: colors.symbols.question, - submitted: colors.symbols.check, - cancelled: colors.symbols.cross - }, - separator: { - pending: colors.symbols.pointerSmall, - submitted: colors.symbols.middot, - cancelled: colors.symbols.middot - }, - radio: { - off: isWindows ? '( )' : '◯', - on: isWindows ? '(*)' : '◉', - disabled: isWindows ? '(|)' : 'Ⓘ' - }, - numbers: ['⓪', '①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳', '㉑', '㉒', '㉓', '㉔', '㉕', '㉖', '㉗', '㉘', '㉙', '㉚', '㉛', '㉜', '㉝', '㉞', '㉟', '㊱', '㊲', '㊳', '㊴', '㊵', '㊶', '㊷', '㊸', '㊹', '㊺', '㊻', '㊼', '㊽', '㊾', '㊿'] -}; - -symbols.merge = options => { - let result = utils.merge({}, colors.symbols, symbols, options.symbols); - delete result.merge; - return result; -}; - -module.exports = symbols; - diff --git a/node_modules/enquirer/lib/theme.js b/node_modules/enquirer/lib/theme.js deleted file mode 100644 index f9c642a..0000000 --- a/node_modules/enquirer/lib/theme.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const styles = require('./styles'); -const symbols = require('./symbols'); -const utils = require('./utils'); - -module.exports = prompt => { - prompt.options = utils.merge({}, prompt.options.theme, prompt.options); - prompt.symbols = symbols.merge(prompt.options); - prompt.styles = styles.merge(prompt.options); -}; diff --git a/node_modules/enquirer/lib/timer.js b/node_modules/enquirer/lib/timer.js deleted file mode 100644 index 564998b..0000000 --- a/node_modules/enquirer/lib/timer.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -module.exports = prompt => { - prompt.timers = prompt.timers || {}; - - let timers = prompt.options.timers; - if (!timers) return; - - for (let key of Object.keys(timers)) { - let opts = timers[key]; - if (typeof opts === 'number') { - opts = { interval: opts }; - } - create(prompt, key, opts); - } -}; - -function create(prompt, name, options = {}) { - let timer = prompt.timers[name] = { name, start: Date.now(), ms: 0, tick: 0 }; - let ms = options.interval || 120; - timer.frames = options.frames || []; - timer.loading = true; - - let interval = setInterval(() => { - timer.ms = Date.now() - timer.start; - timer.tick++; - prompt.render(); - }, ms); - - timer.stop = () => { - timer.loading = false; - clearInterval(interval); - }; - - Reflect.defineProperty(timer, 'interval', { value: interval }); - prompt.once('close', () => timer.stop()); - return timer.stop; -} diff --git a/node_modules/enquirer/lib/types/array.js b/node_modules/enquirer/lib/types/array.js deleted file mode 100644 index 0a522cb..0000000 --- a/node_modules/enquirer/lib/types/array.js +++ /dev/null @@ -1,658 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const Prompt = require('../prompt'); -const roles = require('../roles'); -const utils = require('../utils'); -const { reorder, scrollUp, scrollDown, isObject, swap } = utils; - -class ArrayPrompt extends Prompt { - constructor(options) { - super(options); - this.cursorHide(); - this.maxSelected = options.maxSelected || Infinity; - this.multiple = options.multiple || false; - this.initial = options.initial || 0; - this.delay = options.delay || 0; - this.longest = 0; - this.num = ''; - } - - async initialize() { - if (typeof this.options.initial === 'function') { - this.initial = await this.options.initial.call(this); - } - await this.reset(true); - await super.initialize(); - } - - async reset() { - let { choices, initial, autofocus, suggest } = this.options; - this.state._choices = []; - this.state.choices = []; - - this.choices = await Promise.all(await this.toChoices(choices)); - this.choices.forEach(ch => (ch.enabled = false)); - - if (typeof suggest !== 'function' && this.selectable.length === 0) { - throw new Error('At least one choice must be selectable'); - } - - if (isObject(initial)) initial = Object.keys(initial); - if (Array.isArray(initial)) { - if (autofocus != null) this.index = this.findIndex(autofocus); - initial.forEach(v => this.enable(this.find(v))); - await this.render(); - } else { - if (autofocus != null) initial = autofocus; - if (typeof initial === 'string') initial = this.findIndex(initial); - if (typeof initial === 'number' && initial > -1) { - this.index = Math.max(0, Math.min(initial, this.choices.length)); - this.enable(this.find(this.index)); - } - } - - if (this.isDisabled(this.focused)) { - await this.down(); - } - } - - async toChoices(value, parent) { - this.state.loadingChoices = true; - let choices = []; - let index = 0; - - let toChoices = async(items, parent) => { - if (typeof items === 'function') items = await items.call(this); - if (items instanceof Promise) items = await items; - - for (let i = 0; i < items.length; i++) { - let choice = items[i] = await this.toChoice(items[i], index++, parent); - choices.push(choice); - - if (choice.choices) { - await toChoices(choice.choices, choice); - } - } - return choices; - }; - - return toChoices(value, parent) - .then(choices => { - this.state.loadingChoices = false; - return choices; - }); - } - - async toChoice(ele, i, parent) { - if (typeof ele === 'function') ele = await ele.call(this, this); - if (ele instanceof Promise) ele = await ele; - if (typeof ele === 'string') ele = { name: ele }; - - if (ele.normalized) return ele; - ele.normalized = true; - - let origVal = ele.value; - let role = roles(ele.role, this.options); - ele = role(this, ele); - - if (typeof ele.disabled === 'string' && !ele.hint) { - ele.hint = ele.disabled; - ele.disabled = true; - } - - if (ele.disabled === true && ele.hint == null) { - ele.hint = '(disabled)'; - } - - // if the choice was already normalized, return it - if (ele.index != null) return ele; - ele.name = ele.name || ele.key || ele.title || ele.value || ele.message; - ele.message = ele.message || ele.name || ''; - ele.value = [ele.value, ele.name].find(this.isValue.bind(this)); - - ele.input = ''; - ele.index = i; - ele.cursor = 0; - - utils.define(ele, 'parent', parent); - ele.level = parent ? parent.level + 1 : 1; - if (ele.indent == null) { - ele.indent = parent ? parent.indent + ' ' : (ele.indent || ''); - } - - ele.path = parent ? parent.path + '.' + ele.name : ele.name; - ele.enabled = !!(this.multiple && !this.isDisabled(ele) && (ele.enabled || this.isSelected(ele))); - - if (!this.isDisabled(ele)) { - this.longest = Math.max(this.longest, colors.unstyle(ele.message).length); - } - - // shallow clone the choice first - let choice = { ...ele }; - - // then allow the choice to be reset using the "original" values - ele.reset = (input = choice.input, value = choice.value) => { - for (let key of Object.keys(choice)) ele[key] = choice[key]; - ele.input = input; - ele.value = value; - }; - - if (origVal == null && typeof ele.initial === 'function') { - ele.input = await ele.initial.call(this, this.state, ele, i); - } - - return ele; - } - - async onChoice(choice, i) { - this.emit('choice', choice, i, this); - - if (typeof choice.onChoice === 'function') { - await choice.onChoice.call(this, this.state, choice, i); - } - } - - async addChoice(ele, i, parent) { - let choice = await this.toChoice(ele, i, parent); - this.choices.push(choice); - this.index = this.choices.length - 1; - this.limit = this.choices.length; - return choice; - } - - async newItem(item, i, parent) { - let ele = { name: 'New choice name?', editable: true, newChoice: true, ...item }; - let choice = await this.addChoice(ele, i, parent); - - choice.updateChoice = () => { - delete choice.newChoice; - choice.name = choice.message = choice.input; - choice.input = ''; - choice.cursor = 0; - }; - - return this.render(); - } - - indent(choice) { - if (choice.indent == null) { - return choice.level > 1 ? ' '.repeat(choice.level - 1) : ''; - } - return choice.indent; - } - - dispatch(s, key) { - if (this.multiple && this[key.name]) return this[key.name](); - this.alert(); - } - - focus(choice, enabled) { - if (typeof enabled !== 'boolean') enabled = choice.enabled; - if (enabled && !choice.enabled && this.selected.length >= this.maxSelected) { - return this.alert(); - } - this.index = choice.index; - choice.enabled = enabled && !this.isDisabled(choice); - return choice; - } - - space() { - if (!this.multiple) return this.alert(); - this.toggle(this.focused); - return this.render(); - } - - a() { - if (this.maxSelected < this.choices.length) return this.alert(); - let enabled = this.selectable.every(ch => ch.enabled); - this.choices.forEach(ch => (ch.enabled = !enabled)); - return this.render(); - } - - i() { - // don't allow choices to be inverted if it will result in - // more than the maximum number of allowed selected items. - if (this.choices.length - this.selected.length > this.maxSelected) { - return this.alert(); - } - this.choices.forEach(ch => (ch.enabled = !ch.enabled)); - return this.render(); - } - - g(choice = this.focused) { - if (!this.choices.some(ch => !!ch.parent)) return this.a(); - this.toggle((choice.parent && !choice.choices) ? choice.parent : choice); - return this.render(); - } - - toggle(choice, enabled) { - if (!choice.enabled && this.selected.length >= this.maxSelected) { - return this.alert(); - } - - if (typeof enabled !== 'boolean') enabled = !choice.enabled; - choice.enabled = enabled; - - if (choice.choices) { - choice.choices.forEach(ch => this.toggle(ch, enabled)); - } - - let parent = choice.parent; - while (parent) { - let choices = parent.choices.filter(ch => this.isDisabled(ch)); - parent.enabled = choices.every(ch => ch.enabled === true); - parent = parent.parent; - } - - reset(this, this.choices); - this.emit('toggle', choice, this); - return choice; - } - - enable(choice) { - if (this.selected.length >= this.maxSelected) return this.alert(); - choice.enabled = !this.isDisabled(choice); - choice.choices && choice.choices.forEach(this.enable.bind(this)); - return choice; - } - - disable(choice) { - choice.enabled = false; - choice.choices && choice.choices.forEach(this.disable.bind(this)); - return choice; - } - - number(n) { - this.num += n; - - let number = num => { - let i = Number(num); - if (i > this.choices.length - 1) return this.alert(); - - let focused = this.focused; - let choice = this.choices.find(ch => i === ch.index); - - if (!choice.enabled && this.selected.length >= this.maxSelected) { - return this.alert(); - } - - if (this.visible.indexOf(choice) === -1) { - let choices = reorder(this.choices); - let actualIdx = choices.indexOf(choice); - - if (focused.index > actualIdx) { - let start = choices.slice(actualIdx, actualIdx + this.limit); - let end = choices.filter(ch => !start.includes(ch)); - this.choices = start.concat(end); - } else { - let pos = actualIdx - this.limit + 1; - this.choices = choices.slice(pos).concat(choices.slice(0, pos)); - } - } - - this.index = this.choices.indexOf(choice); - this.toggle(this.focused); - return this.render(); - }; - - clearTimeout(this.numberTimeout); - - return new Promise(resolve => { - let len = this.choices.length; - let num = this.num; - - let handle = (val = false, res) => { - clearTimeout(this.numberTimeout); - if (val) res = number(num); - this.num = ''; - resolve(res); - }; - - if (num === '0' || (num.length === 1 && Number(num + '0') > len)) { - return handle(true); - } - - if (Number(num) > len) { - return handle(false, this.alert()); - } - - this.numberTimeout = setTimeout(() => handle(true), this.delay); - }); - } - - home() { - this.choices = reorder(this.choices); - this.index = 0; - return this.render(); - } - - end() { - let pos = this.choices.length - this.limit; - let choices = reorder(this.choices); - this.choices = choices.slice(pos).concat(choices.slice(0, pos)); - this.index = this.limit - 1; - return this.render(); - } - - first() { - this.index = 0; - return this.render(); - } - - last() { - this.index = this.visible.length - 1; - return this.render(); - } - - prev() { - if (this.visible.length <= 1) return this.alert(); - return this.up(); - } - - next() { - if (this.visible.length <= 1) return this.alert(); - return this.down(); - } - - right() { - if (this.cursor >= this.input.length) return this.alert(); - this.cursor++; - return this.render(); - } - - left() { - if (this.cursor <= 0) return this.alert(); - this.cursor--; - return this.render(); - } - - up() { - let len = this.choices.length; - let vis = this.visible.length; - let idx = this.index; - if (this.options.scroll === false && idx === 0) { - return this.alert(); - } - if (len > vis && idx === 0) { - return this.scrollUp(); - } - this.index = ((idx - 1 % len) + len) % len; - if (this.isDisabled()) { - return this.up(); - } - return this.render(); - } - - down() { - let len = this.choices.length; - let vis = this.visible.length; - let idx = this.index; - if (this.options.scroll === false && idx === vis - 1) { - return this.alert(); - } - if (len > vis && idx === vis - 1) { - return this.scrollDown(); - } - this.index = (idx + 1) % len; - if (this.isDisabled()) { - return this.down(); - } - return this.render(); - } - - scrollUp(i = 0) { - this.choices = scrollUp(this.choices); - this.index = i; - if (this.isDisabled()) { - return this.up(); - } - return this.render(); - } - - scrollDown(i = this.visible.length - 1) { - this.choices = scrollDown(this.choices); - this.index = i; - if (this.isDisabled()) { - return this.down(); - } - return this.render(); - } - - async shiftUp() { - if (this.options.sort === true) { - this.sorting = true; - this.swap(this.index - 1); - await this.up(); - this.sorting = false; - return; - } - return this.scrollUp(this.index); - } - - async shiftDown() { - if (this.options.sort === true) { - this.sorting = true; - this.swap(this.index + 1); - await this.down(); - this.sorting = false; - return; - } - return this.scrollDown(this.index); - } - - pageUp() { - if (this.visible.length <= 1) return this.alert(); - this.limit = Math.max(this.limit - 1, 0); - this.index = Math.min(this.limit - 1, this.index); - this._limit = this.limit; - if (this.isDisabled()) { - return this.up(); - } - return this.render(); - } - - pageDown() { - if (this.visible.length >= this.choices.length) return this.alert(); - this.index = Math.max(0, this.index); - this.limit = Math.min(this.limit + 1, this.choices.length); - this._limit = this.limit; - if (this.isDisabled()) { - return this.down(); - } - return this.render(); - } - - swap(pos) { - swap(this.choices, this.index, pos); - } - - isDisabled(choice = this.focused) { - let keys = ['disabled', 'collapsed', 'hidden', 'completing', 'readonly']; - if (choice && keys.some(key => choice[key] === true)) { - return true; - } - return choice && choice.role === 'heading'; - } - - isEnabled(choice = this.focused) { - if (Array.isArray(choice)) return choice.every(ch => this.isEnabled(ch)); - if (choice.choices) { - let choices = choice.choices.filter(ch => !this.isDisabled(ch)); - return choice.enabled && choices.every(ch => this.isEnabled(ch)); - } - return choice.enabled && !this.isDisabled(choice); - } - - isChoice(choice, value) { - return choice.name === value || choice.index === Number(value); - } - - isSelected(choice) { - if (Array.isArray(this.initial)) { - return this.initial.some(value => this.isChoice(choice, value)); - } - return this.isChoice(choice, this.initial); - } - - map(names = [], prop = 'value') { - return [].concat(names || []).reduce((acc, name) => { - acc[name] = this.find(name, prop); - return acc; - }, {}); - } - - filter(value, prop) { - let isChoice = (ele, i) => [ele.name, i].includes(value); - let fn = typeof value === 'function' ? value : isChoice; - let choices = this.options.multiple ? this.state._choices : this.choices; - let result = choices.filter(fn); - if (prop) { - return result.map(ch => ch[prop]); - } - return result; - } - - find(value, prop) { - if (isObject(value)) return prop ? value[prop] : value; - let isChoice = (ele, i) => [ele.name, i].includes(value); - let fn = typeof value === 'function' ? value : isChoice; - let choice = this.choices.find(fn); - if (choice) { - return prop ? choice[prop] : choice; - } - } - - findIndex(value) { - return this.choices.indexOf(this.find(value)); - } - - async submit() { - let choice = this.focused; - if (!choice) return this.alert(); - - if (choice.newChoice) { - if (!choice.input) return this.alert(); - choice.updateChoice(); - return this.render(); - } - - if (this.choices.some(ch => ch.newChoice)) { - return this.alert(); - } - - let { reorder, sort } = this.options; - let multi = this.multiple === true; - let value = this.selected; - if (value === void 0) { - return this.alert(); - } - - // re-sort choices to original order - if (Array.isArray(value) && reorder !== false && sort !== true) { - value = utils.reorder(value); - } - - this.value = multi ? value.map(ch => ch.name) : value.name; - return super.submit(); - } - - set choices(choices = []) { - this.state._choices = this.state._choices || []; - this.state.choices = choices; - - for (let choice of choices) { - if (!this.state._choices.some(ch => ch.name === choice.name)) { - this.state._choices.push(choice); - } - } - - if (!this._initial && this.options.initial) { - this._initial = true; - let init = this.initial; - if (typeof init === 'string' || typeof init === 'number') { - let choice = this.find(init); - if (choice) { - this.initial = choice.index; - this.focus(choice, true); - } - } - } - } - get choices() { - return reset(this, this.state.choices || []); - } - - set visible(visible) { - this.state.visible = visible; - } - get visible() { - return (this.state.visible || this.choices).slice(0, this.limit); - } - - set limit(num) { - this.state.limit = num; - } - get limit() { - let { state, options, choices } = this; - let limit = state.limit || this._limit || options.limit || choices.length; - return Math.min(limit, this.height); - } - - set value(value) { - super.value = value; - } - get value() { - if (typeof super.value !== 'string' && super.value === this.initial) { - return this.input; - } - return super.value; - } - - set index(i) { - this.state.index = i; - } - get index() { - return Math.max(0, this.state ? this.state.index : 0); - } - - get enabled() { - return this.filter(this.isEnabled.bind(this)); - } - - get focused() { - let choice = this.choices[this.index]; - if (choice && this.state.submitted && this.multiple !== true) { - choice.enabled = true; - } - return choice; - } - - get selectable() { - return this.choices.filter(choice => !this.isDisabled(choice)); - } - - get selected() { - return this.multiple ? this.enabled : this.focused; - } -} - -function reset(prompt, choices) { - if (choices instanceof Promise) return choices; - if (typeof choices === 'function') { - if (utils.isAsyncFn(choices)) return choices; - choices = choices.call(prompt, prompt); - } - for (let choice of choices) { - if (Array.isArray(choice.choices)) { - let items = choice.choices.filter(ch => !prompt.isDisabled(ch)); - choice.enabled = items.every(ch => ch.enabled === true); - } - if (prompt.isDisabled(choice) === true) { - delete choice.enabled; - } - } - return choices; -} - -module.exports = ArrayPrompt; diff --git a/node_modules/enquirer/lib/types/auth.js b/node_modules/enquirer/lib/types/auth.js deleted file mode 100644 index c2c66fa..0000000 --- a/node_modules/enquirer/lib/types/auth.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const FormPrompt = require('../prompts/form'); - -const defaultAuthenticate = () => { - throw new Error('expected prompt to have a custom authenticate method'); -}; - -const factory = (authenticate = defaultAuthenticate) => { - - class AuthPrompt extends FormPrompt { - constructor(options) { - super(options); - } - - async submit() { - this.value = await authenticate.call(this, this.values, this.state); - super.base.submit.call(this); - } - - static create(authenticate) { - return factory(authenticate); - } - } - - return AuthPrompt; -}; - -module.exports = factory(); diff --git a/node_modules/enquirer/lib/types/boolean.js b/node_modules/enquirer/lib/types/boolean.js deleted file mode 100644 index d3e7f34..0000000 --- a/node_modules/enquirer/lib/types/boolean.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -const Prompt = require('../prompt'); -const { isPrimitive, hasColor } = require('../utils'); - -class BooleanPrompt extends Prompt { - constructor(options) { - super(options); - this.cursorHide(); - } - - async initialize() { - let initial = await this.resolve(this.initial, this.state); - this.input = await this.cast(initial); - await super.initialize(); - } - - dispatch(ch) { - if (!this.isValue(ch)) return this.alert(); - this.input = ch; - return this.submit(); - } - - format(value) { - let { styles, state } = this; - return !state.submitted ? styles.primary(value) : styles.success(value); - } - - cast(input) { - return this.isTrue(input); - } - - isTrue(input) { - return /^[ty1]/i.test(input); - } - - isFalse(input) { - return /^[fn0]/i.test(input); - } - - isValue(value) { - return isPrimitive(value) && (this.isTrue(value) || this.isFalse(value)); - } - - async hint() { - if (this.state.status === 'pending') { - let hint = await this.element('hint'); - if (!hasColor(hint)) { - return this.styles.muted(hint); - } - return hint; - } - } - - async render() { - let { input, size } = this.state; - - let prefix = await this.prefix(); - let sep = await this.separator(); - let msg = await this.message(); - let hint = this.styles.muted(this.default); - - let promptLine = [prefix, msg, hint, sep].filter(Boolean).join(' '); - this.state.prompt = promptLine; - - let header = await this.header(); - let value = this.value = this.cast(input); - let output = await this.format(value); - let help = (await this.error()) || (await this.hint()); - let footer = await this.footer(); - - if (help && !promptLine.includes(help)) output += ' ' + help; - promptLine += ' ' + output; - - this.clear(size); - this.write([header, promptLine, footer].filter(Boolean).join('\n')); - this.restore(); - } - - set value(value) { - super.value = value; - } - get value() { - return this.cast(super.value); - } -} - -module.exports = BooleanPrompt; diff --git a/node_modules/enquirer/lib/types/index.js b/node_modules/enquirer/lib/types/index.js deleted file mode 100644 index b3a2300..0000000 --- a/node_modules/enquirer/lib/types/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - ArrayPrompt: require('./array'), - AuthPrompt: require('./auth'), - BooleanPrompt: require('./boolean'), - NumberPrompt: require('./number'), - StringPrompt: require('./string') -}; diff --git a/node_modules/enquirer/lib/types/number.js b/node_modules/enquirer/lib/types/number.js deleted file mode 100644 index 199a7c9..0000000 --- a/node_modules/enquirer/lib/types/number.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -const StringPrompt = require('./string'); - -class NumberPrompt extends StringPrompt { - constructor(options = {}) { - super({ style: 'number', ...options }); - this.min = this.isValue(options.min) ? this.toNumber(options.min) : -Infinity; - this.max = this.isValue(options.max) ? this.toNumber(options.max) : Infinity; - this.delay = options.delay != null ? options.delay : 1000; - this.float = options.float !== false; - this.round = options.round === true || options.float === false; - this.major = options.major || 10; - this.minor = options.minor || 1; - this.initial = options.initial != null ? options.initial : ''; - this.input = String(this.initial); - this.cursor = this.input.length; - this.cursorShow(); - } - - append(ch) { - if (!/[-+.]/.test(ch) || (ch === '.' && this.input.includes('.'))) { - return this.alert('invalid number'); - } - return super.append(ch); - } - - number(ch) { - return super.append(ch); - } - - next() { - if (this.input && this.input !== this.initial) return this.alert(); - if (!this.isValue(this.initial)) return this.alert(); - this.input = this.initial; - this.cursor = String(this.initial).length; - return this.render(); - } - - up(number) { - let step = number || this.minor; - let num = this.toNumber(this.input); - if (num > this.max + step) return this.alert(); - this.input = `${num + step}`; - return this.render(); - } - - down(number) { - let step = number || this.minor; - let num = this.toNumber(this.input); - if (num < this.min - step) return this.alert(); - this.input = `${num - step}`; - return this.render(); - } - - shiftDown() { - return this.down(this.major); - } - - shiftUp() { - return this.up(this.major); - } - - format(input = this.input) { - if (typeof this.options.format === 'function') { - return this.options.format.call(this, input); - } - return this.styles.info(input); - } - - toNumber(value = '') { - return this.float ? +value : Math.round(+value); - } - - isValue(value) { - return /^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(value); - } - - submit() { - let value = [this.input, this.initial].find(v => this.isValue(v)); - this.value = this.toNumber(value || 0); - return super.submit(); - } -} - -module.exports = NumberPrompt; diff --git a/node_modules/enquirer/lib/types/string.js b/node_modules/enquirer/lib/types/string.js deleted file mode 100644 index d4e0ce9..0000000 --- a/node_modules/enquirer/lib/types/string.js +++ /dev/null @@ -1,185 +0,0 @@ -'use strict'; - -const Prompt = require('../prompt'); -const placeholder = require('../placeholder'); -const { isPrimitive } = require('../utils'); - -class StringPrompt extends Prompt { - constructor(options) { - super(options); - this.initial = isPrimitive(this.initial) ? String(this.initial) : ''; - if (this.initial) this.cursorHide(); - this.state.prevCursor = 0; - this.state.clipboard = []; - } - - async keypress(input, key = {}) { - let prev = this.state.prevKeypress; - this.state.prevKeypress = key; - if (this.options.multiline === true && key.name === 'return') { - if (!prev || prev.name !== 'return') { - return this.append('\n', key); - } - } - return super.keypress(input, key); - } - - moveCursor(n) { - this.cursor += n; - } - - reset() { - this.input = this.value = ''; - this.cursor = 0; - return this.render(); - } - - dispatch(ch, key) { - if (!ch || key.ctrl || key.code) return this.alert(); - this.append(ch); - } - - append(ch) { - let { cursor, input } = this.state; - this.input = `${input}`.slice(0, cursor) + ch + `${input}`.slice(cursor); - this.moveCursor(String(ch).length); - this.render(); - } - - insert(str) { - this.append(str); - } - - delete() { - let { cursor, input } = this.state; - if (cursor <= 0) return this.alert(); - this.input = `${input}`.slice(0, cursor - 1) + `${input}`.slice(cursor); - this.moveCursor(-1); - this.render(); - } - - deleteForward() { - let { cursor, input } = this.state; - if (input[cursor] === void 0) return this.alert(); - this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); - this.render(); - } - - cutForward() { - let pos = this.cursor; - if (this.input.length <= pos) return this.alert(); - this.state.clipboard.push(this.input.slice(pos)); - this.input = this.input.slice(0, pos); - this.render(); - } - - cutLeft() { - let pos = this.cursor; - if (pos === 0) return this.alert(); - let before = this.input.slice(0, pos); - let after = this.input.slice(pos); - let words = before.split(' '); - this.state.clipboard.push(words.pop()); - this.input = words.join(' '); - this.cursor = this.input.length; - this.input += after; - this.render(); - } - - paste() { - if (!this.state.clipboard.length) return this.alert(); - this.insert(this.state.clipboard.pop()); - this.render(); - } - - toggleCursor() { - if (this.state.prevCursor) { - this.cursor = this.state.prevCursor; - this.state.prevCursor = 0; - } else { - this.state.prevCursor = this.cursor; - this.cursor = 0; - } - this.render(); - } - - first() { - this.cursor = 0; - this.render(); - } - - last() { - this.cursor = this.input.length - 1; - this.render(); - } - - next() { - let init = this.initial != null ? String(this.initial) : ''; - if (!init || !init.startsWith(this.input)) return this.alert(); - this.input = this.initial; - this.cursor = this.initial.length; - this.render(); - } - - prev() { - if (!this.input) return this.alert(); - this.reset(); - } - - backward() { - return this.left(); - } - - forward() { - return this.right(); - } - - right() { - if (this.cursor >= this.input.length) return this.alert(); - this.moveCursor(1); - return this.render(); - } - - left() { - if (this.cursor <= 0) return this.alert(); - this.moveCursor(-1); - return this.render(); - } - - isValue(value) { - return !!value; - } - - async format(input = this.value) { - let initial = await this.resolve(this.initial, this.state); - if (!this.state.submitted) { - return placeholder(this, { input, initial, pos: this.cursor }); - } - return this.styles.submitted(input || initial); - } - - async render() { - let size = this.state.size; - - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = [prefix, message, separator].filter(Boolean).join(' '); - this.state.prompt = prompt; - - let header = await this.header(); - let output = await this.format(); - let help = (await this.error()) || (await this.hint()); - let footer = await this.footer(); - - if (help && !output.includes(help)) output += ' ' + help; - prompt += ' ' + output; - - this.clear(size); - this.write([header, prompt, footer].filter(Boolean).join('\n')); - this.restore(); - } -} - -module.exports = StringPrompt; diff --git a/node_modules/enquirer/lib/utils.js b/node_modules/enquirer/lib/utils.js deleted file mode 100644 index 7493c0d..0000000 --- a/node_modules/enquirer/lib/utils.js +++ /dev/null @@ -1,268 +0,0 @@ -'use strict'; - -const toString = Object.prototype.toString; -const colors = require('ansi-colors'); -let called = false; -let fns = []; - -const complements = { - 'yellow': 'blue', - 'cyan': 'red', - 'green': 'magenta', - 'black': 'white', - 'blue': 'yellow', - 'red': 'cyan', - 'magenta': 'green', - 'white': 'black' -}; - -exports.longest = (arr, prop) => { - return arr.reduce((a, v) => Math.max(a, prop ? v[prop].length : v.length), 0); -}; - -exports.hasColor = str => !!str && colors.hasColor(str); - -const isObject = exports.isObject = val => { - return val !== null && typeof val === 'object' && !Array.isArray(val); -}; - -exports.nativeType = val => { - return toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, ''); -}; - -exports.isAsyncFn = val => { - return exports.nativeType(val) === 'asyncfunction'; -}; - -exports.isPrimitive = val => { - return val != null && typeof val !== 'object' && typeof val !== 'function'; -}; - -exports.resolve = (context, value, ...rest) => { - if (typeof value === 'function') { - return value.call(context, ...rest); - } - return value; -}; - -exports.scrollDown = (choices = []) => [...choices.slice(1), choices[0]]; -exports.scrollUp = (choices = []) => [choices.pop(), ...choices]; - -exports.reorder = (arr = []) => { - let res = arr.slice(); - res.sort((a, b) => { - if (a.index > b.index) return 1; - if (a.index < b.index) return -1; - return 0; - }); - return res; -}; - -exports.swap = (arr, index, pos) => { - let len = arr.length; - let idx = pos === len ? 0 : pos < 0 ? len - 1 : pos; - let choice = arr[index]; - arr[index] = arr[idx]; - arr[idx] = choice; -}; - -exports.width = (stream, fallback = 80) => { - let columns = (stream && stream.columns) ? stream.columns : fallback; - if (stream && typeof stream.getWindowSize === 'function') { - columns = stream.getWindowSize()[0]; - } - if (process.platform === 'win32') { - return columns - 1; - } - return columns; -}; - -exports.height = (stream, fallback = 20) => { - let rows = (stream && stream.rows) ? stream.rows : fallback; - if (stream && typeof stream.getWindowSize === 'function') { - rows = stream.getWindowSize()[1]; - } - return rows; -}; - -exports.wordWrap = (str, options = {}) => { - if (!str) return str; - - if (typeof options === 'number') { - options = { width: options }; - } - - let { indent = '', newline = ('\n' + indent), width = 80 } = options; - let spaces = (newline + indent).match(/[^\S\n]/g) || []; - width -= spaces.length; - let source = `.{1,${width}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`; - let output = str.trim(); - let regex = new RegExp(source, 'g'); - let lines = output.match(regex) || []; - lines = lines.map(line => line.replace(/\n$/, '')); - if (options.padEnd) lines = lines.map(line => line.padEnd(width, ' ')); - if (options.padStart) lines = lines.map(line => line.padStart(width, ' ')); - return indent + lines.join(newline); -}; - -exports.unmute = color => { - let name = color.stack.find(n => colors.keys.color.includes(n)); - if (name) { - return colors[name]; - } - let bg = color.stack.find(n => n.slice(2) === 'bg'); - if (bg) { - return colors[name.slice(2)]; - } - return str => str; -}; - -exports.pascal = str => str ? str[0].toUpperCase() + str.slice(1) : ''; - -exports.inverse = color => { - if (!color || !color.stack) return color; - let name = color.stack.find(n => colors.keys.color.includes(n)); - if (name) { - let col = colors['bg' + exports.pascal(name)]; - return col ? col.black : color; - } - let bg = color.stack.find(n => n.slice(0, 2) === 'bg'); - if (bg) { - return colors[bg.slice(2).toLowerCase()] || color; - } - return colors.none; -}; - -exports.complement = color => { - if (!color || !color.stack) return color; - let name = color.stack.find(n => colors.keys.color.includes(n)); - let bg = color.stack.find(n => n.slice(0, 2) === 'bg'); - if (name && !bg) { - return colors[complements[name] || name]; - } - if (bg) { - let lower = bg.slice(2).toLowerCase(); - let comp = complements[lower]; - if (!comp) return color; - return colors['bg' + exports.pascal(comp)] || color; - } - return colors.none; -}; - -exports.meridiem = date => { - let hours = date.getHours(); - let minutes = date.getMinutes(); - let ampm = hours >= 12 ? 'pm' : 'am'; - hours = hours % 12; - let hrs = hours === 0 ? 12 : hours; - let min = minutes < 10 ? '0' + minutes : minutes; - return hrs + ':' + min + ' ' + ampm; -}; - -/** - * Set a value on the given object. - * @param {Object} obj - * @param {String} prop - * @param {any} value - */ - -exports.set = (obj = {}, prop = '', val) => { - return prop.split('.').reduce((acc, k, i, arr) => { - let value = arr.length - 1 > i ? (acc[k] || {}) : val; - if (!exports.isObject(value) && i < arr.length - 1) value = {}; - return (acc[k] = value); - }, obj); -}; - -/** - * Get a value from the given object. - * @param {Object} obj - * @param {String} prop - */ - -exports.get = (obj = {}, prop = '', fallback) => { - let value = obj[prop] == null - ? prop.split('.').reduce((acc, k) => acc && acc[k], obj) - : obj[prop]; - return value == null ? fallback : value; -}; - -exports.mixin = (target, b) => { - if (!isObject(target)) return b; - if (!isObject(b)) return target; - for (let key of Object.keys(b)) { - let desc = Object.getOwnPropertyDescriptor(b, key); - if (desc.hasOwnProperty('value')) { - if (target.hasOwnProperty(key) && isObject(desc.value)) { - let existing = Object.getOwnPropertyDescriptor(target, key); - if (isObject(existing.value)) { - target[key] = exports.merge({}, target[key], b[key]); - } else { - Reflect.defineProperty(target, key, desc); - } - } else { - Reflect.defineProperty(target, key, desc); - } - } else { - Reflect.defineProperty(target, key, desc); - } - } - return target; -}; - -exports.merge = (...args) => { - let target = {}; - for (let ele of args) exports.mixin(target, ele); - return target; -}; - -exports.mixinEmitter = (obj, emitter) => { - let proto = emitter.constructor.prototype; - for (let key of Object.keys(proto)) { - let val = proto[key]; - if (typeof val === 'function') { - exports.define(obj, key, val.bind(emitter)); - } else { - exports.define(obj, key, val); - } - } -}; - -exports.onExit = callback => { - const onExit = (quit, code) => { - if (called) return; - - called = true; - fns.forEach(fn => fn()); - - if (quit === true) { - process.exit(128 + code); - } - }; - - if (fns.length === 0) { - process.once('SIGTERM', onExit.bind(null, true, 15)); - process.once('SIGINT', onExit.bind(null, true, 2)); - process.once('exit', onExit); - } - - fns.push(callback); -}; - -exports.define = (obj, key, value) => { - Reflect.defineProperty(obj, key, { value }); -}; - -exports.defineExport = (obj, key, fn) => { - let custom; - Reflect.defineProperty(obj, key, { - enumerable: true, - configurable: true, - set(val) { - custom = val; - }, - get() { - return custom ? custom() : fn(); - } - }); -}; diff --git a/node_modules/enquirer/package.json b/node_modules/enquirer/package.json deleted file mode 100644 index 5356097..0000000 --- a/node_modules/enquirer/package.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "_from": "enquirer@2.3.4", - "_id": "enquirer@2.3.4", - "_inBundle": false, - "_integrity": "sha512-pkYrrDZumL2VS6VBGDhqbajCM2xpkUNLuKfGPjfKaSIBKYopQbqEFyrOkRMIb2HDR/rO1kGhEt/5twBwtzKBXw==", - "_location": "/enquirer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "enquirer@2.3.4", - "name": "enquirer", - "escapedName": "enquirer", - "rawSpec": "2.3.4", - "saveSpec": null, - "fetchSpec": "2.3.4" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.4.tgz", - "_shasum": "c608f2e1134c7f68c1c9ee056de13f9b31076de9", - "_spec": "enquirer@2.3.4", - "_where": "/Users/mgolebiowski/projects/public/jquery/jquery-release", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/enquirer/enquirer/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "ansi-colors": "^3.2.1" - }, - "deprecated": false, - "description": "Stylish, intuitive and user-friendly prompt system. Fast and lightweight enough for small projects, powerful and extensible enough for the most advanced use cases.", - "devDependencies": { - "@types/node": "^8", - "gulp-format-md": "^2.0.0", - "inquirer": "^6.2.0", - "mocha": "^5.2.0", - "nyc": "^13.1.0", - "prompts": "^1.2.1", - "time-require": "github:jonschlinkert/time-require", - "typescript": "^3.1.6" - }, - "engines": { - "node": ">=8.6" - }, - "files": [ - "index.js", - "index.d.ts", - "lib" - ], - "homepage": "https://github.com/enquirer/enquirer", - "keywords": [ - "answer", - "answers", - "ask", - "base", - "cli", - "command", - "command-line", - "confirm", - "enquirer", - "generator", - "generate", - "hyper", - "input", - "inquire", - "inquirer", - "interface", - "iterm", - "javascript", - "node", - "nodejs", - "prompt", - "prompts", - "promptly", - "question", - "readline", - "scaffold", - "scaffolding", - "scaffolder", - "stdin", - "stdout", - "terminal", - "tty", - "ui", - "yeoman", - "yo", - "zsh" - ], - "license": "MIT", - "lintDeps": { - "devDependencies": { - "files": { - "patterns": [ - "examples/**/*.js", - "perf/*.js", - "recipes/*.js" - ] - } - } - }, - "main": "index.js", - "name": "enquirer", - "repository": { - "type": "git", - "url": "git+https://github.com/enquirer/enquirer.git" - }, - "scripts": { - "cover": "nyc --reporter=text --reporter=html mocha", - "test": "mocha && tsc -p ./test/types" - }, - "verb": { - "toc": false, - "layout": false, - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "helpers": [ - "./docs/helpers.js" - ], - "lint": { - "reflinks": true - }, - "reflinks": [ - "inquirer", - "prompt-skeleton" - ] - }, - "version": "2.3.4" -} diff --git a/node_modules/escape-string-regexp/index.js b/node_modules/escape-string-regexp/index.js deleted file mode 100644 index 7834bf9..0000000 --- a/node_modules/escape-string-regexp/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); -}; diff --git a/node_modules/escape-string-regexp/license b/node_modules/escape-string-regexp/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/escape-string-regexp/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/escape-string-regexp/package.json b/node_modules/escape-string-regexp/package.json deleted file mode 100644 index a8fa921..0000000 --- a/node_modules/escape-string-regexp/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "escape-string-regexp@^1.0.5", - "_id": "escape-string-regexp@1.0.5", - "_inBundle": false, - "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "_location": "/escape-string-regexp", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "escape-string-regexp@^1.0.5", - "name": "escape-string-regexp", - "escapedName": "escape-string-regexp", - "rawSpec": "^1.0.5", - "saveSpec": null, - "fetchSpec": "^1.0.5" - }, - "_requiredBy": [ - "/chalk", - "/figures" - ], - "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "_shasum": "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4", - "_spec": "escape-string-regexp@^1.0.5", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/escape-string-regexp/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Escape RegExp special characters", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", - "keywords": [ - "escape", - "regex", - "regexp", - "re", - "regular", - "expression", - "string", - "str", - "special", - "characters" - ], - "license": "MIT", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Joshua Boy Nicolai Appelman", - "email": "joshua@jbna.nl", - "url": "jbna.nl" - } - ], - "name": "escape-string-regexp", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.5" -} diff --git a/node_modules/escape-string-regexp/readme.md b/node_modules/escape-string-regexp/readme.md deleted file mode 100644 index 87ac82d..0000000 --- a/node_modules/escape-string-regexp/readme.md +++ /dev/null @@ -1,27 +0,0 @@ -# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) - -> Escape RegExp special characters - - -## Install - -``` -$ npm install --save escape-string-regexp -``` - - -## Usage - -```js -const escapeStringRegexp = require('escape-string-regexp'); - -const escapedString = escapeStringRegexp('how much $ for a unicorn?'); -//=> 'how much \$ for a unicorn\?' - -new RegExp(escapedString); -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/git-tools/.npmignore b/node_modules/git-tools/.npmignore deleted file mode 100644 index 3a4259c..0000000 --- a/node_modules/git-tools/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -/test/ -.jshintrc -Gruntfile.js diff --git a/node_modules/git-tools/LICENSE-MIT.txt b/node_modules/git-tools/LICENSE-MIT.txt deleted file mode 100644 index b99c1ea..0000000 --- a/node_modules/git-tools/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2013 Scott González http://scottgonzalez.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. diff --git a/node_modules/git-tools/README.md b/node_modules/git-tools/README.md deleted file mode 100644 index ad92887..0000000 --- a/node_modules/git-tools/README.md +++ /dev/null @@ -1,265 +0,0 @@ -# node-git-tools - -Tools for parsing data out of git repositories. - -Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/). - -## About - -The goal of node-git-tools is to provide a set of tools that can be used to -easily write custom git commands or other scripts that are tightly integrated -with git. - -I expect the API to grow over time and will happily entertain any feature -requests. If there is anything you'd like added, just file an issue. - -## Installation - -```sh -npm install git-tools -``` - -## Usage - -```js -var Repo = require( "git-tools" ); -var repo = new Repo( "path/to/repo" ); -repo.authors(function( error, authors ) { - console.log( authors ); -}); -``` - - - -## API - -### Repo.clone( options, callback ) - -Clones a repository and returns the new `Repo` instance. - -* `options` (Object): Options for cloning the repository. - * `repo` (String): The repository to clone from. - * `path` (String): The path to clone into. - * extra: Additional options can be provided, as documented below. -* `callback` (Function; `function( error, repo )`): Function to invoke after cloning the repository. - * `repo` (Object): A new `Repo` instance for the cloned repository. - -This function accepts arbitrary options to pass to `git clone`. -For example, to create a bare repository: - -```js -Repo.clone({ - repo: "git://github.com/scottgonzalez/node-git-tools.git", - dir: "/tmp/git-tools", - bare: true -}); -``` - -Or to create a repo with limited history: - -```js -Repo.clone({ - repo: "git://github.com/scottgonzalez/node-git-tools.git", - dir: "/tmp/git-tools", - depth: 5 -}); -``` - - - -### Repo.isRepo( path, callback ) - -Determines if the specified path is a git repository. - -* `path` (String): The path to check. -* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository. - * `isRepo` (Boolean): Whether the path is a git repository. - -*Note: This is equivalent to creating a `Repo` instance with `path` and calling `isRepo()` on the instance.* - - - -### activeDays( [committish], callback ) - -Gets the number of active days (unique days of authorship). Includes activity -by day, month, year, and the entire history. - -* `committish` (String; default: `"master"`): Committish range to analyze. -* `callback` (Function; `function( error, activeDays )`): Function to invoke after getting active days. - * `activeDays` (Object): Summary of active days. - -The `activeDays` object has the following form: - -```js -{ - activeDays: Number, - commits: Number, - dates: { - "YYYY-MM-DD": Number( commits ), - ... - }, - years: { - "YYYY": { - activeDays: Number, - commits: Number, - months: { - "M": { - activeDays: Number, - commits: Number, - days: { - "D": { - commits: Number - }, - ... - } - }, - ... - } - }, - ... - } -} -``` - - - -### age( callback ) - -Gets the age of the repository. - -* `callback` (Function; `function( error, age )`): Function to invoke after getting the age. - * `age` (String): The age of the repository. - - - -### authors( [committish], callback ) - -Gets all authors, sorted by number of commits. - -* `committish` (String; default: `"master"`): Committish range to analyze. -* `callback` (Function; `function( error, authors )`): Function to invoke after getting authors. - * `authors` (Array): All authors, sorted by number of commits. - -Each author object contains the following properties: - -* `email` (String): Author's email address. -* `name` (String): Author's name. -* `commits` (Number): Number of commits. -* `commitsPercent` (Number): Percentage of commits. - - - -### blame( options, callback ) - -Determine what revision and author last modified each line of a file. - -* `options` (Object): Options for the blame. - * `path` (String): The path to the file to run the blame for. - * `committish` (String; default: `"HEAD"`): Revision or range to blame against. -* `callback` (Function; `function( error, blame )`): Function to invoke after blaming the file. - * `blame` (Array): Commit information for each line. - -Each blame item contains the following properties: - -* `commit`: SHA of commit that most recently modified the line. -* `path`: Path to the file at the time of the most recent modification to the line. -* `lineNumber`: Line number within the file. -* `content`: Contents of the line. - - - -### branches( callback ) - -Gets all branches in order of most recent commit. - -* `callback` (Function; `function( error, branches )`): Function to invoke after getting branches. - * `branches` (Array): All branches, sorted by most recent commit date. - -Each branch object contains the following properties: - -* `name` (String): Branch name. -* `sha` (String): SHA-1 of most recent commit. -* `date` (Date): Author date of most recent commit. -* `subject` (String): Subject (first line) of most recent commit. -* `author` (Object): Author of most recent commit. - * `email` (String): Author's email address. - * `name` (String): Author's name. - - - -### config( name, callback ) - -Gets the value of a configuration option. - -* `name` (String): The name of the configuration option. -* `callback` (Function; `function( error, value )`): Function to invoke after getting the configuration option. - * `value` (String|null): The value for the configuration option, or `null` if no value is set. - - - -### currentBranch( callback ) - -Gets the name of the currently checked out branch, if any. - -* `callback` (Function; `function( error, branch )`): Function to invoke after getting the branch. - * `branch` (String|null): Branch name, or `null` if in detached HEAD state. - - - -### isRepo( callback ) - -Determines if the specified path is a git repository. - -* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository. - * `isRepo` (Boolean): Whether the path is a git repository. - - - -### remotes( callback ) - -Gets all remote repositories. - -* `callback` (Function; `function( error, remotes )`): Function to invoke after getting the remotes. - * `remotes` (Array): All remote repositories. - -Each remote object contains the following properties: - -* `name` (String): Remote name. -* `url` (String): URL for the remote repository. - - - -### resolveCommittish( committish, callback ) - -Resolves a committish to a SHA1. - -* `committish` (String): Any committish to resolve. -* `callback` (Function; `function( error, sha )`): Function to invoke after resolving the comittish. - * `sha`: SHA1 of the resolved committish. - - - -### tags( callback ) - -Gets all tags in reverse chronological order. - -Lightweight tags are sorted by author date and annotated tags are sorted by tagger date. - -* `callback` (Function; `function( error, tags )`): Function to invoke after getting tags. - * `tags` (Array): All tags, sorted by date. - -Each tag object contains the following properties: - -* `name` (String): Tag name. -* `sha` (String): SHA-1 for the tag. For lightweight tags, this is the SHA-1 of the commit. -* `date` (Date): Author date for ligthweight tags, tagger date for annotated tags. - - - -## License - -Copyright 2013 Scott González. Released under the terms of the MIT license. - ---- - -Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/). diff --git a/node_modules/git-tools/git-tools.js b/node_modules/git-tools/git-tools.js deleted file mode 100644 index 541ce59..0000000 --- a/node_modules/git-tools/git-tools.js +++ /dev/null @@ -1,396 +0,0 @@ -var spawn = require( "child_process" ).spawn; - -function extend( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - - return a; -} - -function copy( obj ) { - return extend( {}, obj ); -} - -function Repo( path ) { - this.path = path; -} - -Repo.parsePerson = (function() { - var rPerson = /^(\S+)\s(.+)$/; - return function( person ) { - var matches = rPerson.exec( person ); - return { - email: matches[ 1 ], - name: matches[ 2 ] - }; - }; -})(); - -Repo.clone = function( options, callback ) { - var dir = options.dir; - var args = [ "clone", options.repo, dir ]; - options = copy( options ); - delete options.repo; - delete options.dir; - - Object.keys( options ).forEach(function( option ) { - args.push( "--" + option ); - - var value = options[ option ]; - if ( value !== true ) { - args.push( value ); - } - }); - - args.push(function( error ) { - if ( error ) { - return callback( error ); - } - - callback( null, new Repo( dir ) ); - }); - - var repo = new Repo( process.cwd() ); - repo.exec.apply( repo, args ); -}; - -Repo.isRepo = function( path, callback ) { - var repo = new Repo( path ); - repo.isRepo( callback ); -}; - -Repo.prototype.exec = function() { - var args = [].slice.call( arguments ); - var callback = args.pop(); - var stdout = ""; - var stderr = ""; - var child = spawn( "git", args, { cwd: this.path } ); - var hadError = false; - child.on( "error", function( error ) { - hadError = true; - callback( error ); - }); - child.stdout.on( "data", function( data ) { - stdout += data; - }); - child.stderr.on( "data", function( data ) { - stderr += data; - }); - child.on( "close", function( code ) { - if ( hadError ) { - return; - } - - var error; - if ( code ) { - error = new Error( stderr ); - error.code = code; - return callback( error ); - } - - callback( null, stdout.trimRight() ); - }); -}; - -Repo.prototype.activeDays = function( committish, callback ) { - if ( !callback ) { - callback = committish; - committish = "master"; - } - - this.exec( "log", "--format=%at", committish, function( error, dates ) { - if ( error ) { - return callback( error ); - } - - var dateMap = { - activeDays: 0, - commits: 0, - dates: {}, - years: {} - }; - - dates.split( "\n" ).sort().forEach(function( timestamp ) { - var date = new Date( timestamp * 1000 ); - var year = date.getFullYear(); - var month = date.getMonth() + 1; - var day = date.getDate(); - - date = year + "-" + - (month < 10 ? "0" : "") + month + "-" + - (day < 10 ? "0" : "") + day; - - if ( !dateMap.dates[ date ] ) { - dateMap.dates[ date ] = 0; - } - dateMap.commits++; - dateMap.dates[ date ]++; - - if ( !dateMap.years[ year ] ) { - dateMap.years[ year ] = { - activeDays: 0, - commits: 0, - months: {} - }; - } - dateMap.years[ year ].commits++; - - if ( !dateMap.years[ year ].months[ month ] ) { - dateMap.years[ year ].months[ month ] = { - activeDays: 0, - commits: 0, - days: {} - }; - } - dateMap.years[ year ].months[ month ].commits++; - - if ( !dateMap.years[ year ].months[ month ].days[ day ] ) { - dateMap.years[ year ].months[ month ].days[ day ] = { - commits: 0 - }; - dateMap.activeDays++; - dateMap.years[ year ].activeDays++; - dateMap.years[ year ].months[ month ].activeDays++; - } - dateMap.years[ year ].months[ month ].days[ day ].commits++; - }); - - callback( null, dateMap ); - }); -}; - -Repo.prototype.age = function( callback ) { - this.exec( "log", "--reverse", "--format=%cr", function( error, stdout ) { - if ( error ) { - return callback( error ); - } - - callback( null, stdout.split( "\n" )[ 0 ].replace( /\sago/, "" ) ); - }); -}; - -Repo.prototype.authors = function( committish, callback ) { - if ( !callback ) { - callback = committish; - committish = "master"; - } - - this.exec( "log", "--format=%aE %aN", committish, function( error, data ) { - if ( error ) { - return callback( error ); - } - - var authors = data.split( "\n" ); - var authorMap = {}; - var totalCommits = 0; - - authors.forEach(function( author ) { - if ( !authorMap[ author ] ) { - authorMap[ author ] = 0; - } - - authorMap[ author ]++; - totalCommits++; - }); - - authors = Object.keys( authorMap ).map(function( author ) { - var commits = authorMap[ author ]; - return extend( Repo.parsePerson( author ), { - commits: commits, - commitsPercent: (commits * 100 / totalCommits).toFixed( 1 ) - }); - }).sort(function( a, b ) { - return b.commits - a.commits; - }); - - callback( null, authors ); - }); -}; - -Repo.prototype.blame = function( options, callback ) { - var args = [ "blame", "-s" ]; - - if ( options.committish ) { - args.push( options.committish ); - } - - args.push( "--", options.path ); - - var rBlame = /^(\w+)(\s(\S+))?\s+(\d+)\)\s(.*)$/; - - args.push(function( error, blame ) { - if ( error ) { - return callback( error ); - } - - var lines = blame.split( /\r?\n/ ); - lines = lines.map(function( line ) { - var matches = rBlame.exec( line ); - - return { - commit: matches[ 1 ], - path: matches[ 3 ] || options.path, - lineNumber: parseInt( matches[ 4 ], 10 ), - content: matches[ 5 ] - }; - }); - - callback( null, lines ); - }); - - this.exec.apply( this, args ); -}; - -Repo.prototype.branches = function( callback ) { - this.exec( "for-each-ref", - "--format=" + - "%(refname:short)%0a" + - "%(authordate:rfc2822)%0a" + - "%(authoremail) %(authorname)%0a" + - "%(subject)%0a" + - "%(objectname)%0a", - "refs/heads", - function( error, data ) { - if ( error ) { - return callback( error ); - } - - var branches = data.split( "\n\n" ).map(function( branch ) { - var lines = branch.split( "\n" ); - var name = lines[ 0 ]; - var date = new Date( lines[ 1 ] ); - var author = Repo.parsePerson( lines[ 2 ] ); - var subject = lines[ 3 ]; - var sha = lines[ 4 ]; - - return { - name: name, - sha: sha, - date: date, - subject: subject, - author: author - }; - }).sort(function( a, b ) { - return b.date - a.date; - }); - - callback( null, branches ); - }); -}; - -Repo.prototype.config = function( name, callback ) { - this.exec( "config --get " + name, function( error, stdout ) { - if ( error ) { - if ( /^Command failed:\s+$/.test( error.message ) ) { - return callback( null, null ); - } - - return callback( error ); - } - - callback( null, stdout.trim() ); - }); -}; - -Repo.prototype.currentBranch = function( callback ) { - this.exec( "rev-parse", "--abbrev-ref", "HEAD", function( error, data ) { - if ( error ) { - return callback( error ); - } - - var branch = data === "HEAD" ? null : data; - callback( null, branch ); - }); -}; - -Repo.prototype.isRepo = function( callback ) { - this.exec( "rev-parse", "--git-dir", function( error ) { - if ( error ) { - if ( error.message.indexOf( "Not a git repository" ) ) { - return callback( null, false ); - } - - // If the path doesn't exist, don't return an error - if ( error.code === "ENOENT" ) { - return callback( null, false ); - } - - return callback( error ); - } - - callback( null, true ); - }); -}; - -Repo.prototype.remotes = function( callback ) { - this.exec( "remote", "-v", function( error, data ) { - if ( error ) { - return callback( error ); - } - - var remotes = data.split( "\n" ); - var rRemote = /^(\S+)\s(\S+)/; - var remoteMap = {}; - - remotes.forEach(function( remote ) { - var matches = rRemote.exec( remote ); - - // New repositories with no remotes will have `origin` but no URL - if ( !matches ) { - return; - } - - var name = matches[ 1 ]; - var url = matches[ 2 ]; - - remoteMap[ name ] = url; - }); - - remotes = Object.keys( remoteMap ).map(function( remote ) { - return { - name: remote, - url: remoteMap[ remote ] - }; - }); - - callback( null, remotes ); - }); -}; - -Repo.prototype.resolveCommittish = function( committish, callback ) { - this.exec( "rev-parse", committish, callback ); -}; - -Repo.prototype.tags = function( callback ) { - this.exec( "for-each-ref", - "--format=" + - "%(refname:short)%0a" + - "%(authordate)%(taggerdate)%0a" + - "%(objectname)%0a", - "refs/tags", - function( error, data ) { - if ( error ) { - return callback( error ); - } - - var tags = data.split( "\n\n" ).map(function( tag ) { - var lines = tag.split( "\n" ); - var name = lines[ 0 ]; - var date = new Date( lines[ 1 ] ); - var sha = lines[ 2 ]; - - return { - name: name, - sha: sha, - date: date - }; - }).sort(function( a, b ) { - return b.date - a.date; - }); - - callback( null, tags ); - }); -}; - -module.exports = Repo; diff --git a/node_modules/git-tools/package.json b/node_modules/git-tools/package.json deleted file mode 100644 index d1240f0..0000000 --- a/node_modules/git-tools/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "_from": "git-tools@0.1.0", - "_id": "git-tools@0.1.0", - "_inBundle": false, - "_integrity": "sha1-QnCaq85mfofueJ+BZ9vgGR25oQs=", - "_location": "/git-tools", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "git-tools@0.1.0", - "name": "git-tools", - "escapedName": "git-tools", - "rawSpec": "0.1.0", - "saveSpec": null, - "fetchSpec": "0.1.0" - }, - "_requiredBy": [ - "/changelogplease" - ], - "_resolved": "https://registry.npmjs.org/git-tools/-/git-tools-0.1.0.tgz", - "_shasum": "42709aabce667e87ee789f8167dbe0191db9a10b", - "_spec": "git-tools@0.1.0", - "author": { - "name": "Scott González", - "email": "scott.gonzalez@gmail.com", - "url": "http://scottgonzalez.com" - }, - "bugs": { - "url": "https://github.com/scottgonzalez/node-git-tools/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Tools for parsing data out of git repositories.", - "devDependencies": { - "grunt": "~0.4.0", - "grunt-contrib-jshint": "~0.1.1", - "grunt-contrib-nodeunit": "~0.1.2", - "rimraf": "~2.1.4" - }, - "homepage": "https://github.com/scottgonzalez/node-git-tools", - "keywords": [ - "git" - ], - "main": "git-tools.js", - "name": "git-tools", - "repository": { - "type": "git", - "url": "git://github.com/scottgonzalez/node-git-tools.git" - }, - "version": "0.1.0" -} diff --git a/node_modules/github-request/LICENSE.txt b/node_modules/github-request/LICENSE.txt deleted file mode 100644 index 6ca2fdd..0000000 --- a/node_modules/github-request/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Scott González http://scottgonzalez.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. diff --git a/node_modules/github-request/README.md b/node_modules/github-request/README.md deleted file mode 100644 index 647aff1..0000000 --- a/node_modules/github-request/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# GitHub Request - -Simplified GitHub API requests. - -Support this project by [donating on Gratipay](https://gratipay.com/scottgonzalez/). - -## About - -Low level helper for working with the GitHub API. - -## Installation - -```sh -npm install github-request -``` - -## Usage - -```js -var github = require("github-request"); -github.request({ - path: "/orgs/jquery/repos" -}, function(error, repos) { - console.log(repos); -}); -``` - -## API - -### request(settings, data, callback) - -Performs a single request based on the provided settings. - -* `settings` (Object): Settings for the HTTPS request. -* `data` (Mixed): Data to pass for POST requests. Data is encoded as JSON prior to making the request. -* `callback` (`function( error, response, meta )`): A callback to invoke when the API call is complete. - * `response` (Object): The parsed JSON response. - * `meta` (Object): Metadata from the response headers. - -### requestAll(settings, callback) - -Performs a request based on the provided settings and then requests any additional paged content based on the response. Data from all pages are concatenated together and buffered until the last page of data has been retrieved. - -* `settings` (Object): Settings for the HTTPS request. -* `callback` (`function( error, response, meta )`): A callback to invoke when all API calls are complete. - * `response` (Object): The parsed JSON response. - * `meta` (Object): Metadata from the headers of the *last* response. - -### Response Metadata - -The metadata provided contains information from the following headers: - -* `x-ratelimit-*` -* `x-github-*` -* `link` - -These headers are parsed into a more friendly format before being passed as the `meta` parameter in the `callback`. - -All `x-*` headers have the `x-` prefix removed and the names are changed from dashed form to camel case. For example, `x-ratelimit-remaining` becomes `ratelimitRemaining`. - -The `link` header is parsed into the named `rel` values. For example, `; rel="next"` becomes `{next: "https://api.github.com/resource?page=2"}` and is provided in the `links` property. - -## License - -Copyright Scott González. Released under the terms of the MIT license. - ---- - -Support this project by [donating on Gratipay](https://gratipay.com/scottgonzalez/). diff --git a/node_modules/github-request/lib/request.js b/node_modules/github-request/lib/request.js deleted file mode 100644 index 8a5a736..0000000 --- a/node_modules/github-request/lib/request.js +++ /dev/null @@ -1,121 +0,0 @@ -var https = require("https"); -var url = require("url"); -var userAgent = "Node GitHub Request " + require( "../package" ).version; - -function extend(a, b) { - for (var prop in b) { - a[prop] = b[prop]; - } - - return a; -} - -function xHeader(str) { - if (str.substring(0, 2) === "x-" ) { - str = str.substring(2); - } - - return str.replace(/-([a-z])/g, function(all, letter) { - return letter.toUpperCase(); - }); -} - -function request(settings, data, callback) { - if (typeof data === "function") { - callback = data; - data = null; - } else { - data = JSON.stringify(data); - } - callback = callback || function() {}; - - settings = extend({ - method: "GET" - }, settings); - settings.headers = extend({ - "user-agent": userAgent, - "content-length": typeof data === "string" ? Buffer.byteLength(data, "utf8") : 0 - }, settings.headers || {}); - - var req = https.request(extend({ - host: "api.github.com" - }, settings), function(res) { - var meta = {}; - Object.keys(res.headers).forEach(function(header) { - if (/^(x-(ratelimit|github))/.test(header)) { - meta[xHeader(header)] = res.headers[header]; - } else if (header === "link") { - var links = res.headers.link.split(/,\s*/); - meta.links = {}; - links.forEach(function(link) { - var parts = /<([^>]+)>;\s*rel="([^"]+)"/.exec(link); - meta.links[parts[2]] = parts[1]; - }); - } - }); - - var response = ""; - res.setEncoding("utf8"); - res.on("data", function(chunk) { - response += chunk; - }); - - res.on("end", function() { - if (res.statusCode >= 400) { - var message; - if (res.headers["content-type"].indexOf("json") !== -1) { - message = JSON.parse(response).message; - } else { - message = response; - } - if (!message && res.statusCode === 403) { - message = "Forbidden"; - } - callback(new Error(message)); - } else { - callback(null, JSON.parse(response), meta); - } - }); - }); - - req.on("error", callback); - - if (data) { - req.write(data); - } - - req.end(); -} - -function requestAll(settings, callback) { - - // Force the request to use a page size of 100 for optimal performance - var parsed = url.parse(settings.path, true); - delete parsed.search; - parsed.query.per_page = 100; - settings.path = url.format(parsed); - - request(settings, function(error, data, meta) { - if (error) { - return callback(error); - } - - if (!meta.links || !meta.links.next) { - return callback(null, data, meta); - } - - settings.path = url.parse(meta.links.next).path; - requestAll(settings, function(error, nextData, nextMeta) { - if (error) { - return callback(error); - } - - callback(null, data.concat(nextData), nextMeta); - }); - }); -} - -module.exports = { - request: request, - requestAll: requestAll -}; diff --git a/node_modules/github-request/package.json b/node_modules/github-request/package.json deleted file mode 100644 index 614b232..0000000 --- a/node_modules/github-request/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "_from": "github-request@1.2.4", - "_id": "github-request@1.2.4", - "_inBundle": false, - "_integrity": "sha1-SPZN26rSH9gF+12X9aVUh0R7+0k=", - "_location": "/github-request", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "github-request@1.2.4", - "name": "github-request", - "escapedName": "github-request", - "rawSpec": "1.2.4", - "saveSpec": null, - "fetchSpec": "1.2.4" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/github-request/-/github-request-1.2.4.tgz", - "_shasum": "48f64ddbaad21fd805fb5d97f5a55487447bfb49", - "_spec": "github-request@1.2.4", - "author": { - "name": "Scott González", - "email": "scott.gonzalez@gmail.com", - "url": "http://scottgonzalez.com" - }, - "bugs": { - "url": "https://github.com/scottgonzalez/github-request/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Simplified GitHub API requests.", - "homepage": "https://github.com/scottgonzalez/github-request", - "keywords": [ - "github", - "request" - ], - "main": "./lib/request.js", - "name": "github-request", - "repository": { - "type": "git", - "url": "git://github.com/scottgonzalez/github-request.git" - }, - "version": "1.2.4" -} diff --git a/node_modules/has-flag/index.js b/node_modules/has-flag/index.js deleted file mode 100644 index 5139728..0000000 --- a/node_modules/has-flag/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; diff --git a/node_modules/has-flag/license b/node_modules/has-flag/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/has-flag/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/has-flag/package.json b/node_modules/has-flag/package.json deleted file mode 100644 index 2ef0c43..0000000 --- a/node_modules/has-flag/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "has-flag@^3.0.0", - "_id": "has-flag@3.0.0", - "_inBundle": false, - "_integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "_location": "/has-flag", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "has-flag@^3.0.0", - "name": "has-flag", - "escapedName": "has-flag", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/supports-color" - ], - "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "_shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd", - "_spec": "has-flag@^3.0.0", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/has-flag/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Check if argv has a specific flag", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/has-flag#readme", - "keywords": [ - "has", - "check", - "detect", - "contains", - "find", - "flag", - "cli", - "command-line", - "argv", - "process", - "arg", - "args", - "argument", - "arguments", - "getopt", - "minimist", - "optimist" - ], - "license": "MIT", - "name": "has-flag", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/has-flag.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.0.0" -} diff --git a/node_modules/has-flag/readme.md b/node_modules/has-flag/readme.md deleted file mode 100644 index 677893c..0000000 --- a/node_modules/has-flag/readme.md +++ /dev/null @@ -1,70 +0,0 @@ -# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) - -> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag - -Correctly stops looking after an `--` argument terminator. - - -## Install - -``` -$ npm install has-flag -``` - - -## Usage - -```js -// foo.js -const hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` - -``` -$ node foo.js -f --unicorn --foo=bar -- --rainbow -``` - - -## API - -### hasFlag(flag, [argv]) - -Returns a boolean for whether the flag exists. - -#### flag - -Type: `string` - -CLI flag to look for. The `--` prefix is optional. - -#### argv - -Type: `string[]`
-Default: `process.argv` - -CLI arguments. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore deleted file mode 100644 index c1cb757..0000000 --- a/node_modules/isexe/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.nyc_output/ -coverage/ diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/isexe/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md deleted file mode 100644 index 35769e8..0000000 --- a/node_modules/isexe/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# isexe - -Minimal module to check if a file is executable, and a normal file. - -Uses `fs.stat` and tests against the `PATHEXT` environment variable on -Windows. - -## USAGE - -```javascript -var isexe = require('isexe') -isexe('some-file-name', function (err, isExe) { - if (err) { - console.error('probably file does not exist or something', err) - } else if (isExe) { - console.error('this thing can be run') - } else { - console.error('cannot be run') - } -}) - -// same thing but synchronous, throws errors -var isExe = isexe.sync('some-file-name') - -// treat errors as just "not executable" -isexe('maybe-missing-file', { ignoreErrors: true }, callback) -var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) -``` - -## API - -### `isexe(path, [options], [callback])` - -Check if the path is executable. If no callback provided, and a -global `Promise` object is available, then a Promise will be returned. - -Will raise whatever errors may be raised by `fs.stat`, unless -`options.ignoreErrors` is set to true. - -### `isexe.sync(path, [options])` - -Same as `isexe` but returns the value and throws any errors raised. - -### Options - -* `ignoreErrors` Treat all errors as "no, this is not executable", but - don't raise them. -* `uid` Number to use as the user id -* `gid` Number to use as the group id -* `pathExt` List of path extensions to use instead of `PATHEXT` - environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js deleted file mode 100644 index 553fb32..0000000 --- a/node_modules/isexe/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var fs = require('fs') -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = require('./windows.js') -} else { - core = require('./mode.js') -} - -module.exports = isexe -isexe.sync = sync - -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } - - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } - - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null - is = false - } - } - cb(er, is) - }) -} - -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } -} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js deleted file mode 100644 index 1995ea4..0000000 --- a/node_modules/isexe/mode.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), options) -} - -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) -} - -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid - - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() - - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 - - return ret -} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json deleted file mode 100644 index 31783ce..0000000 --- a/node_modules/isexe/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "isexe@^2.0.0", - "_id": "isexe@2.0.0", - "_inBundle": false, - "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "_location": "/isexe", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "isexe@^2.0.0", - "name": "isexe", - "escapedName": "isexe", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/which" - ], - "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "_shasum": "e8fbf374dc556ff8947a10dcb0572d633f2cfa10", - "_spec": "isexe@^2.0.0", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/isexe/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Minimal module to check if a file is executable.", - "devDependencies": { - "mkdirp": "^0.5.1", - "rimraf": "^2.5.0", - "tap": "^10.3.0" - }, - "directories": { - "test": "test" - }, - "homepage": "https://github.com/isaacs/isexe#readme", - "keywords": [], - "license": "ISC", - "main": "index.js", - "name": "isexe", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/isexe.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --100" - }, - "version": "2.0.0" -} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js deleted file mode 100644 index d926df6..0000000 --- a/node_modules/isexe/test/basic.js +++ /dev/null @@ -1,221 +0,0 @@ -var t = require('tap') -var fs = require('fs') -var path = require('path') -var fixture = path.resolve(__dirname, 'fixtures') -var meow = fixture + '/meow.cat' -var mine = fixture + '/mine.cat' -var ours = fixture + '/ours.cat' -var fail = fixture + '/fail.false' -var noent = fixture + '/enoent.exe' -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') - -var isWindows = process.platform === 'win32' -var hasAccess = typeof fs.access === 'function' -var winSkip = isWindows && 'windows' -var accessSkip = !hasAccess && 'no fs.access function' -var hasPromise = typeof Promise === 'function' -var promiseSkip = !hasPromise && 'no global Promise' - -function reset () { - delete require.cache[require.resolve('../')] - return require('../') -} - -t.test('setup fixtures', function (t) { - rimraf.sync(fixture) - mkdirp.sync(fixture) - fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') - fs.chmodSync(meow, parseInt('0755', 8)) - fs.writeFileSync(fail, '#!/usr/bin/env false\n') - fs.chmodSync(fail, parseInt('0644', 8)) - fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') - fs.chmodSync(mine, parseInt('0744', 8)) - fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') - fs.chmodSync(ours, parseInt('0754', 8)) - t.end() -}) - -t.test('promise', { skip: promiseSkip }, function (t) { - var isexe = reset() - t.test('meow async', function (t) { - isexe(meow).then(function (is) { - t.ok(is) - t.end() - }) - }) - t.test('fail async', function (t) { - isexe(fail).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.test('noent async', function (t) { - isexe(noent).catch(function (er) { - t.ok(er) - t.end() - }) - }) - t.test('noent ignore async', function (t) { - isexe(noent, { ignoreErrors: true }).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.end() -}) - -t.test('no promise', function (t) { - global.Promise = null - var isexe = reset() - t.throws('try to meow a promise', function () { - isexe(meow) - }) - t.end() -}) - -t.test('access', { skip: accessSkip || winSkip }, function (t) { - runTest(t) -}) - -t.test('mode', { skip: winSkip }, function (t) { - delete fs.access - delete fs.accessSync - var isexe = reset() - t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) - t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) - runTest(t) -}) - -t.test('windows', function (t) { - global.TESTING_WINDOWS = true - var pathExt = '.EXE;.CAT;.CMD;.COM' - t.test('pathExt option', function (t) { - runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) - }) - t.test('pathExt env', function (t) { - process.env.PATHEXT = pathExt - runTest(t) - }) - t.test('no pathExt', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: '', skipFail: true }) - }) - t.test('pathext with empty entry', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: ';' + pathExt, skipFail: true }) - }) - t.end() -}) - -t.test('cleanup', function (t) { - rimraf.sync(fixture) - t.end() -}) - -function runTest (t, options) { - var isexe = reset() - - var optionsIgnore = Object.create(options || {}) - optionsIgnore.ignoreErrors = true - - if (!options || !options.skipFail) { - t.notOk(isexe.sync(fail, options)) - } - t.notOk(isexe.sync(noent, optionsIgnore)) - if (!options) { - t.ok(isexe.sync(meow)) - } else { - t.ok(isexe.sync(meow, options)) - } - - t.ok(isexe.sync(mine, options)) - t.ok(isexe.sync(ours, options)) - t.throws(function () { - isexe.sync(noent, options) - }) - - t.test('meow async', function (t) { - if (!options) { - isexe(meow, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } else { - isexe(meow, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } - }) - - t.test('mine async', function (t) { - isexe(mine, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - t.test('ours async', function (t) { - isexe(ours, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - if (!options || !options.skipFail) { - t.test('fail async', function (t) { - isexe(fail, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - } - - t.test('noent async', function (t) { - isexe(noent, options, function (er, is) { - t.ok(er) - t.notOk(is) - t.end() - }) - }) - - t.test('noent ignore async', function (t) { - isexe(noent, optionsIgnore, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.test('directory is not executable', function (t) { - isexe(__dirname, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.end() -} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js deleted file mode 100644 index 3499673..0000000 --- a/node_modules/isexe/windows.js +++ /dev/null @@ -1,42 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT - - if (!pathext) { - return true - } - - pathext = pathext.split(';') - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase() - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false -} - -function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) -} - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), path, options) -} diff --git a/node_modules/semver/CHANGELOG.md b/node_modules/semver/CHANGELOG.md deleted file mode 100644 index f567dd3..0000000 --- a/node_modules/semver/CHANGELOG.md +++ /dev/null @@ -1,70 +0,0 @@ -# changes log - -## 6.2.0 - -* Coerce numbers to strings when passed to semver.coerce() -* Add `rtl` option to coerce from right to left - -## 6.1.3 - -* Handle X-ranges properly in includePrerelease mode - -## 6.1.2 - -* Do not throw when testing invalid version strings - -## 6.1.1 - -* Add options support for semver.coerce() -* Handle undefined version passed to Range.test - -## 6.1.0 - -* Add semver.compareBuild function -* Support `*` in semver.intersects - -## 6.0 - -* Fix `intersects` logic. - - This is technically a bug fix, but since it is also a change to behavior - that may require users updating their code, it is marked as a major - version increment. - -## 5.7 - -* Add `minVersion` method - -## 5.6 - -* Move boolean `loose` param to an options object, with - backwards-compatibility protection. -* Add ability to opt out of special prerelease version handling with - the `includePrerelease` option flag. - -## 5.5 - -* Add version coercion capabilities - -## 5.4 - -* Add intersection checking - -## 5.3 - -* Add `minSatisfying` method - -## 5.2 - -* Add `prerelease(v)` that returns prerelease components - -## 5.1 - -* Add Backus-Naur for ranges -* Remove excessively cute inspection methods - -## 5.0 - -* Remove AMD/Browserified build artifacts -* Fix ltr and gtr when using the `*` range -* Fix for range `*` with a prerelease identifier diff --git a/node_modules/semver/LICENSE b/node_modules/semver/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md deleted file mode 100644 index 2293a14..0000000 --- a/node_modules/semver/README.md +++ /dev/null @@ -1,443 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero element in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions - are equal. Sorts in ascending order if passed to `Array.sort()`. - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version, options)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string, and consumes all -remaining characters which satisfy at least a partial semver (e.g., `1`, -`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer -versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All -surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes -`3.4.0`). Only text which lacks digits will fail coercion (`version one` -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value -components are invalid (`9999999999999999.4.7.4` is likely invalid). - -If the `options.rtl` flag is set, then `coerce` will return the right-most -coercible tuple that does not share an ending index with a longer coercible -tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not -`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of -any other overlapping SemVer tuple. - -### Clean - -* `clean(version)`: Clean a string to be a valid semver if possible - -This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. - -ex. -* `s.clean(' = v 2.1.5foo')`: `null` -* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean(' = v 2.1.5-foo')`: `null` -* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean('=v2.1.5')`: `'2.1.5'` -* `s.clean(' =v2.1.5')`: `2.1.5` -* `s.clean(' 2.1.5 ')`: `'2.1.5'` -* `s.clean('~1.0.0')`: `null` diff --git a/node_modules/semver/bin/semver.js b/node_modules/semver/bin/semver.js deleted file mode 100755 index 666034a..0000000 --- a/node_modules/semver/bin/semver.js +++ /dev/null @@ -1,174 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var rtl = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '--rtl': - rtl = true - break - case '--ltr': - rtl = false - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v, options) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - '--rtl', - ' Coerce version strings right to left', - '', - '--ltr', - ' Coerce version strings left to right (default)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json deleted file mode 100644 index 7973e43..0000000 --- a/node_modules/semver/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "semver@6.3.0", - "_id": "semver@6.3.0", - "_inBundle": false, - "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "_location": "/semver", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "semver@6.3.0", - "name": "semver", - "escapedName": "semver", - "rawSpec": "6.3.0", - "saveSpec": null, - "fetchSpec": "6.3.0" - }, - "_requiredBy": [ - "/", - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "_shasum": "ee0a64c8af5e8ceea67687b133761e1becbd1d3d", - "_spec": "semver@6.3.0", - "bin": { - "semver": "./bin/semver.js" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^14.3.1" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "name": "semver", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "postpublish": "git push origin --follow-tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap" - }, - "tap": { - "check-coverage": true - }, - "version": "6.3.0" -} diff --git a/node_modules/semver/range.bnf b/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0..0000000 --- a/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js deleted file mode 100644 index 636fa43..0000000 --- a/node_modules/semver/semver.js +++ /dev/null @@ -1,1596 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var t = exports.tokens = {} -var R = 0 - -function tok (n) { - t[n] = R++ -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -tok('NUMERICIDENTIFIER') -src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' -tok('NUMERICIDENTIFIERLOOSE') -src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -tok('NONNUMERICIDENTIFIER') -src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -tok('MAINVERSION') -src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')' - -tok('MAINVERSIONLOOSE') -src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -tok('PRERELEASEIDENTIFIER') -src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' - -tok('PRERELEASEIDENTIFIERLOOSE') -src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -tok('PRERELEASE') -src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' - -tok('PRERELEASELOOSE') -src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -tok('BUILDIDENTIFIER') -src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -tok('BUILD') -src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + - '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -tok('FULL') -tok('FULLPLAIN') -src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + - src[t.PRERELEASE] + '?' + - src[t.BUILD] + '?' - -src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -tok('LOOSEPLAIN') -src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + - src[t.PRERELEASELOOSE] + '?' + - src[t.BUILD] + '?' - -tok('LOOSE') -src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' - -tok('GTLT') -src[t.GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -tok('XRANGEIDENTIFIERLOOSE') -src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -tok('XRANGEIDENTIFIER') -src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' - -tok('XRANGEPLAIN') -src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:' + src[t.PRERELEASE] + ')?' + - src[t.BUILD] + '?' + - ')?)?' - -tok('XRANGEPLAINLOOSE') -src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[t.PRERELEASELOOSE] + ')?' + - src[t.BUILD] + '?' + - ')?)?' - -tok('XRANGE') -src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' -tok('XRANGELOOSE') -src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -tok('COERCE') -src[t.COERCE] = '(^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' -tok('COERCERTL') -re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -tok('LONETILDE') -src[t.LONETILDE] = '(?:~>?)' - -tok('TILDETRIM') -src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' -re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -tok('TILDE') -src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' -tok('TILDELOOSE') -src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -tok('LONECARET') -src[t.LONECARET] = '(?:\\^)' - -tok('CARETTRIM') -src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' -re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -tok('CARET') -src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' -tok('CARETLOOSE') -src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -tok('COMPARATORLOOSE') -src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' -tok('COMPARATOR') -src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -tok('COMPARATORTRIM') -src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + - '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -tok('HYPHENRANGE') -src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[t.XRANGEPLAIN] + ')' + - '\\s*$' - -tok('HYPHENRANGELOOSE') -src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[t.XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -tok('STAR') -src[t.STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[t.LOOSE] : re[t.FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -SemVer.prototype.compareBuild = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - var i = 0 - do { - var a = this.build[i] - var b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.compareBuild = compareBuild -function compareBuild (a, b, loose) { - var versionA = new SemVer(a, loose) - var versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compareBuild(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.compareBuild(b, a, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - if (this.value === '') { - return true - } - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[t.COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return ( - isSatisfiable(thisComparators, options) && - range.set.some(function (rangeComparators) { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every(function (thisComparator) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) -} - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -function isSatisfiable (comparators, options) { - var result = true - var remainingComparators = comparators.slice() - var testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every(function (otherComparator) { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p + pr - } else if (xm) { - ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr - } else if (xp) { - ret = '>=' + M + '.' + m + '.0' + pr + - ' <' + M + '.' + (+m + 1) + '.0' + pr - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[t.STAR], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version, options) { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - var match = null - if (!options.rtl) { - match = version.match(re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - var next - while ((next = re[t.COERCERTL].exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 - } - - if (match === null) { - return null - } - - return parse(match[2] + - '.' + (match[3] || '0') + - '.' + (match[4] || '0'), options) -} diff --git a/node_modules/shelljs/.documentup.json b/node_modules/shelljs/.documentup.json deleted file mode 100644 index 57fe301..0000000 --- a/node_modules/shelljs/.documentup.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "ShellJS", - "twitter": [ - "r2r" - ] -} diff --git a/node_modules/shelljs/.jshintrc b/node_modules/shelljs/.jshintrc deleted file mode 100644 index a80c559..0000000 --- a/node_modules/shelljs/.jshintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "loopfunc": true, - "sub": true, - "undef": true, - "unused": true, - "node": true -} \ No newline at end of file diff --git a/node_modules/shelljs/.npmignore b/node_modules/shelljs/.npmignore deleted file mode 100644 index 6b20c38..0000000 --- a/node_modules/shelljs/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test/ -tmp/ \ No newline at end of file diff --git a/node_modules/shelljs/.travis.yml b/node_modules/shelljs/.travis.yml deleted file mode 100644 index 99cdc74..0000000 --- a/node_modules/shelljs/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" diff --git a/node_modules/shelljs/LICENSE b/node_modules/shelljs/LICENSE deleted file mode 100644 index 1b35ee9..0000000 --- a/node_modules/shelljs/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2012, Artur Adib -All rights reserved. - -You may use this project under the terms of the New BSD license as follows: - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Artur Adib nor the - names of the contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/shelljs/README.md b/node_modules/shelljs/README.md deleted file mode 100644 index 9120623..0000000 --- a/node_modules/shelljs/README.md +++ /dev/null @@ -1,552 +0,0 @@ -# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs) - -ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts! - -The project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like: - -+ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader -+ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger -+ [JSHint](http://jshint.com) - Most popular JavaScript linter -+ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers -+ [Yeoman](http://yeoman.io/) - Web application stack and development tool -+ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation - -and [many more](https://npmjs.org/browse/depended/shelljs). - -## Installing - -Via npm: - -```bash -$ npm install [-g] shelljs -``` - -If the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to -run ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder: - -```bash -$ shjs my_script -``` - -You can also just copy `shell.js` into your project's directory, and `require()` accordingly. - - -## Examples - -### JavaScript - -```javascript -require('shelljs/global'); - -if (!which('git')) { - echo('Sorry, this script requires git'); - exit(1); -} - -// Copy files to release dir -mkdir('-p', 'out/Release'); -cp('-R', 'stuff/*', 'out/Release'); - -// Replace macros in each .js file -cd('lib'); -ls('*.js').forEach(function(file) { - sed('-i', 'BUILD_VERSION', 'v0.1.2', file); - sed('-i', /.*REMOVE_THIS_LINE.*\n/, '', file); - sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat('macro.js'), file); -}); -cd('..'); - -// Run external tool synchronously -if (exec('git commit -am "Auto-commit"').code !== 0) { - echo('Error: Git commit failed'); - exit(1); -} -``` - -### CoffeeScript - -```coffeescript -require 'shelljs/global' - -if not which 'git' - echo 'Sorry, this script requires git' - exit 1 - -# Copy files to release dir -mkdir '-p', 'out/Release' -cp '-R', 'stuff/*', 'out/Release' - -# Replace macros in each .js file -cd 'lib' -for file in ls '*.js' - sed '-i', 'BUILD_VERSION', 'v0.1.2', file - sed '-i', /.*REMOVE_THIS_LINE.*\n/, '', file - sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat 'macro.js', file -cd '..' - -# Run external tool synchronously -if (exec 'git commit -am "Auto-commit"').code != 0 - echo 'Error: Git commit failed' - exit 1 -``` - -## Global vs. Local - -The example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`. - -Example: - -```javascript -var shell = require('shelljs'); -shell.echo('hello world'); -``` - -## Make tool - -A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script. - -Example (CoffeeScript): - -```coffeescript -require 'shelljs/make' - -target.all = -> - target.bundle() - target.docs() - -target.bundle = -> - cd __dirname - mkdir 'build' - cd 'lib' - (cat '*.js').to '../build/output.js' - -target.docs = -> - cd __dirname - mkdir 'docs' - cd 'lib' - for file in ls '*.js' - text = grep '//@', file # extract special comments - text.replace '//@', '' # remove comment tags - text.to 'docs/my_docs.md' -``` - -To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`, and so on. - - - - - - -## Command reference - - -All commands run synchronously, unless otherwise stated. - - -### cd('dir') -Changes to directory `dir` for the duration of the script - - -### pwd() -Returns the current directory. - - -### ls([options ,] path [,path ...]) -### ls([options ,] path_array) -Available options: - -+ `-R`: recursive -+ `-A`: all files (include files beginning with `.`, except for `.` and `..`) - -Examples: - -```javascript -ls('projs/*.js'); -ls('-R', '/users/me', '/tmp'); -ls('-R', ['/users/me', '/tmp']); // same as above -``` - -Returns array of files in the given path, or in current directory if no path provided. - - -### find(path [,path ...]) -### find(path_array) -Examples: - -```javascript -find('src', 'lib'); -find(['src', 'lib']); // same as above -find('.').filter(function(file) { return file.match(/\.js$/); }); -``` - -Returns array of all files (however deep) in the given paths. - -The main difference from `ls('-R', path)` is that the resulting file names -include the base directories, e.g. `lib/resources/file1` instead of just `file1`. - - -### cp([options ,] source [,source ...], dest) -### cp([options ,] source_array, dest) -Available options: - -+ `-f`: force -+ `-r, -R`: recursive - -Examples: - -```javascript -cp('file1', 'dir1'); -cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); -cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above -``` - -Copies files. The wildcard `*` is accepted. - - -### rm([options ,] file [, file ...]) -### rm([options ,] file_array) -Available options: - -+ `-f`: force -+ `-r, -R`: recursive - -Examples: - -```javascript -rm('-rf', '/tmp/*'); -rm('some_file.txt', 'another_file.txt'); -rm(['some_file.txt', 'another_file.txt']); // same as above -``` - -Removes files. The wildcard `*` is accepted. - - -### mv(source [, source ...], dest') -### mv(source_array, dest') -Available options: - -+ `f`: force - -Examples: - -```javascript -mv('-f', 'file', 'dir/'); -mv('file1', 'file2', 'dir/'); -mv(['file1', 'file2'], 'dir/'); // same as above -``` - -Moves files. The wildcard `*` is accepted. - - -### mkdir([options ,] dir [, dir ...]) -### mkdir([options ,] dir_array) -Available options: - -+ `p`: full path (will create intermediate dirs if necessary) - -Examples: - -```javascript -mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); -mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above -``` - -Creates directories. - - -### test(expression) -Available expression primaries: - -+ `'-b', 'path'`: true if path is a block device -+ `'-c', 'path'`: true if path is a character device -+ `'-d', 'path'`: true if path is a directory -+ `'-e', 'path'`: true if path exists -+ `'-f', 'path'`: true if path is a regular file -+ `'-L', 'path'`: true if path is a symboilc link -+ `'-p', 'path'`: true if path is a pipe (FIFO) -+ `'-S', 'path'`: true if path is a socket - -Examples: - -```javascript -if (test('-d', path)) { /* do something with dir */ }; -if (!test('-f', path)) continue; // skip if it's a regular file -``` - -Evaluates expression using the available primaries and returns corresponding value. - - -### cat(file [, file ...]) -### cat(file_array) - -Examples: - -```javascript -var str = cat('file*.txt'); -var str = cat('file1', 'file2'); -var str = cat(['file1', 'file2']); // same as above -``` - -Returns a string containing the given file, or a concatenated string -containing the files if more than one file is given (a new line character is -introduced between each file). Wildcard `*` accepted. - - -### 'string'.to(file) - -Examples: - -```javascript -cat('input.txt').to('output.txt'); -``` - -Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as -those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ - - -### 'string'.toEnd(file) - -Examples: - -```javascript -cat('input.txt').toEnd('output.txt'); -``` - -Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as -those returned by `cat`, `grep`, etc). - - -### sed([options ,] search_regex, replace_str, file) -Available options: - -+ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ - -Examples: - -```javascript -sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); -sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); -``` - -Reads an input string from `file` and performs a JavaScript `replace()` on the input -using the given search regex and replacement string. Returns the new string after replacement. - - -### grep([options ,] regex_filter, file [, file ...]) -### grep([options ,] regex_filter, file_array) -Available options: - -+ `-v`: Inverse the sense of the regex and print the lines not matching the criteria. - -Examples: - -```javascript -grep('-v', 'GLOBAL_VARIABLE', '*.js'); -grep('GLOBAL_VARIABLE', '*.js'); -``` - -Reads input string from given files and returns a string containing all lines of the -file that match the given `regex_filter`. Wildcard `*` accepted. - - -### which(command) - -Examples: - -```javascript -var nodeExec = which('node'); -``` - -Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. -Returns string containing the absolute path to the command. - - -### echo(string [,string ...]) - -Examples: - -```javascript -echo('hello world'); -var str = echo('hello world'); -``` - -Prints string to stdout, and returns string with additional utility methods -like `.to()`. - - -### pushd([options,] [dir | '-N' | '+N']) - -Available options: - -+ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. - -Arguments: - -+ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. -+ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. -+ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. - -Examples: - -```javascript -// process.cwd() === '/usr' -pushd('/etc'); // Returns /etc /usr -pushd('+1'); // Returns /usr /etc -``` - -Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. - -### popd([options,] ['-N' | '+N']) - -Available options: - -+ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. - -Arguments: - -+ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. -+ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. - -Examples: - -```javascript -echo(process.cwd()); // '/usr' -pushd('/etc'); // '/etc /usr' -echo(process.cwd()); // '/etc' -popd(); // '/usr' -echo(process.cwd()); // '/usr' -``` - -When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. - -### dirs([options | '+N' | '-N']) - -Available options: - -+ `-c`: Clears the directory stack by deleting all of the elements. - -Arguments: - -+ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. -+ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. - -Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. - -See also: pushd, popd - - -### exit(code) -Exits the current process with the given exit code. - -### env['VAR_NAME'] -Object containing environment variables (both getter and setter). Shortcut to process.env. - -### exec(command [, options] [, callback]) -Available options (all `false` by default): - -+ `async`: Asynchronous execution. Defaults to true if a callback is provided. -+ `silent`: Do not echo program output to console. - -Examples: - -```javascript -var version = exec('node --version', {silent:true}).output; - -var child = exec('some_long_running_process', {async:true}); -child.stdout.on('data', function(data) { - /* ... do something with data ... */ -}); - -exec('some_long_running_process', function(code, output) { - console.log('Exit code:', code); - console.log('Program output:', output); -}); -``` - -Executes the given `command` _synchronously_, unless otherwise specified. -When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's -`output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and -the `callback` gets the arguments `(code, output)`. - -**Note:** For long-lived processes, it's best to run `exec()` asynchronously as -the current synchronous implementation uses a lot of CPU. This should be getting -fixed soon. - - -### chmod(octal_mode || octal_string, file) -### chmod(symbolic_mode, file) - -Available options: - -+ `-v`: output a diagnostic for every file processed -+ `-c`: like verbose but report only when a change is made -+ `-R`: change files and directories recursively - -Examples: - -```javascript -chmod(755, '/Users/brandon'); -chmod('755', '/Users/brandon'); // same as above -chmod('u+x', '/Users/brandon'); -``` - -Alters the permissions of a file or directory by either specifying the -absolute permissions in octal form or expressing the changes in symbols. -This command tries to mimic the POSIX behavior as much as possible. -Notable exceptions: - -+ In symbolic modes, 'a-r' and '-r' are identical. No consideration is - given to the umask. -+ There is no "quiet" option since default behavior is to run silent. - - -## Non-Unix commands - - -### tempdir() - -Examples: - -```javascript -var tmp = tempdir(); // "/tmp" for most *nix platforms -``` - -Searches and returns string containing a writeable, platform-dependent temporary directory. -Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). - - -### error() -Tests if error occurred in the last command. Returns `null` if no error occurred, -otherwise returns string explaining the error - - -## Configuration - - -### config.silent -Example: - -```javascript -var silentState = config.silent; // save old silent state -config.silent = true; -/* ... */ -config.silent = silentState; // restore old silent state -``` - -Suppresses all command output if `true`, except for `echo()` calls. -Default is `false`. - -### config.fatal -Example: - -```javascript -config.fatal = true; -cp('this_file_does_not_exist', '/dev/null'); // dies here -/* more commands... */ -``` - -If `true` the script will die on errors. Default is `false`. diff --git a/node_modules/shelljs/bin/shjs b/node_modules/shelljs/bin/shjs deleted file mode 100755 index d239a7a..0000000 --- a/node_modules/shelljs/bin/shjs +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env node -require('../global'); - -if (process.argv.length < 3) { - console.log('ShellJS: missing argument (script name)'); - console.log(); - process.exit(1); -} - -var args, - scriptName = process.argv[2]; -env['NODE_PATH'] = __dirname + '/../..'; - -if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) { - if (test('-f', scriptName + '.js')) - scriptName += '.js'; - if (test('-f', scriptName + '.coffee')) - scriptName += '.coffee'; -} - -if (!test('-f', scriptName)) { - console.log('ShellJS: script not found ('+scriptName+')'); - console.log(); - process.exit(1); -} - -args = process.argv.slice(3); - -for (var i = 0, l = args.length; i < l; i++) { - if (args[i][0] !== "-"){ - args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words - } -} - -if (scriptName.match(/\.coffee$/)) { - // - // CoffeeScript - // - if (which('coffee')) { - exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true }); - } else { - console.log('ShellJS: CoffeeScript interpreter not found'); - console.log(); - process.exit(1); - } -} else { - // - // JavaScript - // - exec('node ' + scriptName + ' ' + args.join(' '), { async: true }); -} diff --git a/node_modules/shelljs/global.js b/node_modules/shelljs/global.js deleted file mode 100644 index 97f0033..0000000 --- a/node_modules/shelljs/global.js +++ /dev/null @@ -1,3 +0,0 @@ -var shell = require('./shell.js'); -for (var cmd in shell) - global[cmd] = shell[cmd]; diff --git a/node_modules/shelljs/make.js b/node_modules/shelljs/make.js deleted file mode 100644 index 53e5e81..0000000 --- a/node_modules/shelljs/make.js +++ /dev/null @@ -1,47 +0,0 @@ -require('./global'); - -global.config.fatal = true; -global.target = {}; - -// This ensures we only execute the script targets after the entire script has -// been evaluated -var args = process.argv.slice(2); -setTimeout(function() { - var t; - - if (args.length === 1 && args[0] === '--help') { - console.log('Available targets:'); - for (t in global.target) - console.log(' ' + t); - return; - } - - // Wrap targets to prevent duplicate execution - for (t in global.target) { - (function(t, oldTarget){ - - // Wrap it - global.target[t] = function(force) { - if (oldTarget.done && !force) - return; - oldTarget.done = true; - return oldTarget.apply(oldTarget, arguments); - }; - - })(t, global.target[t]); - } - - // Execute desired targets - if (args.length > 0) { - args.forEach(function(arg) { - if (arg in global.target) - global.target[arg](); - else { - console.log('no such target: ' + arg); - } - }); - } else if ('all' in global.target) { - global.target.all(); - } - -}, 0); diff --git a/node_modules/shelljs/package.json b/node_modules/shelljs/package.json deleted file mode 100644 index e64905d..0000000 --- a/node_modules/shelljs/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "shelljs@0.2.6", - "_id": "shelljs@0.2.6", - "_inBundle": false, - "_integrity": "sha1-kEktcv/MgVmXa6umL7D2iE8MM3g=", - "_location": "/shelljs", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "shelljs@0.2.6", - "name": "shelljs", - "escapedName": "shelljs", - "rawSpec": "0.2.6", - "saveSpec": null, - "fetchSpec": "0.2.6" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz", - "_shasum": "90492d72ffcc8159976baba62fb0f6884f0c3378", - "_spec": "shelljs@0.2.6", - "author": { - "name": "Artur Adib", - "email": "aadib@mozilla.com" - }, - "bin": { - "shjs": "./bin/shjs" - }, - "bugs": { - "url": "https://github.com/arturadib/shelljs/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Portable Unix shell commands for Node.js", - "devDependencies": { - "jshint": "~2.1.11" - }, - "engines": { - "node": ">=0.8.0" - }, - "homepage": "http://github.com/arturadib/shelljs", - "keywords": [ - "unix", - "shell", - "makefile", - "make", - "jake", - "synchronous" - ], - "main": "./shell.js", - "name": "shelljs", - "optionalDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/arturadib/shelljs.git" - }, - "scripts": { - "test": "node scripts/run-tests" - }, - "version": "0.2.6" -} diff --git a/node_modules/shelljs/scripts/generate-docs.js b/node_modules/shelljs/scripts/generate-docs.js deleted file mode 100755 index 532fed9..0000000 --- a/node_modules/shelljs/scripts/generate-docs.js +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env node -require('../global'); - -echo('Appending docs to README.md'); - -cd(__dirname + '/..'); - -// Extract docs from shell.js -var docs = grep('//@', 'shell.js'); - -docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) { - var file = path.match('.js$') ? path : path+'.js'; - return grep('//@', file); -}); - -// Remove '//@' -docs = docs.replace(/\/\/\@ ?/g, ''); -// Append docs to README -sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md'); - -echo('All done.'); diff --git a/node_modules/shelljs/scripts/run-tests.js b/node_modules/shelljs/scripts/run-tests.js deleted file mode 100755 index f9d31e0..0000000 --- a/node_modules/shelljs/scripts/run-tests.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node -require('../global'); - -var path = require('path'); - -var failed = false; - -// -// Lint -// -JSHINT_BIN = './node_modules/jshint/bin/jshint'; -cd(__dirname + '/..'); - -if (!test('-f', JSHINT_BIN)) { - echo('JSHint not found. Run `npm install` in the root dir first.'); - exit(1); -} - -if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) { - failed = true; - echo('*** JSHINT FAILED! (return code != 0)'); - echo(); -} else { - echo('All JSHint tests passed'); - echo(); -} - -// -// Unit tests -// -cd(__dirname + '/../test'); -ls('*.js').forEach(function(file) { - echo('Running test:', file); - if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit) - failed = true; - echo('*** TEST FAILED! (missing exit code "123")'); - echo(); - } -}); - -if (failed) { - echo(); - echo('*******************************************************'); - echo('WARNING: Some tests did not pass!'); - echo('*******************************************************'); - exit(1); -} else { - echo(); - echo('All tests passed.'); -} diff --git a/node_modules/shelljs/shell.js b/node_modules/shelljs/shell.js deleted file mode 100644 index e56c5de..0000000 --- a/node_modules/shelljs/shell.js +++ /dev/null @@ -1,153 +0,0 @@ -// -// ShellJS -// Unix shell commands on top of Node's API -// -// Copyright (c) 2012 Artur Adib -// http://github.com/arturadib/shelljs -// - -var common = require('./src/common'); - - -//@ -//@ All commands run synchronously, unless otherwise stated. -//@ - -//@include ./src/cd -var _cd = require('./src/cd'); -exports.cd = common.wrap('cd', _cd); - -//@include ./src/pwd -var _pwd = require('./src/pwd'); -exports.pwd = common.wrap('pwd', _pwd); - -//@include ./src/ls -var _ls = require('./src/ls'); -exports.ls = common.wrap('ls', _ls); - -//@include ./src/find -var _find = require('./src/find'); -exports.find = common.wrap('find', _find); - -//@include ./src/cp -var _cp = require('./src/cp'); -exports.cp = common.wrap('cp', _cp); - -//@include ./src/rm -var _rm = require('./src/rm'); -exports.rm = common.wrap('rm', _rm); - -//@include ./src/mv -var _mv = require('./src/mv'); -exports.mv = common.wrap('mv', _mv); - -//@include ./src/mkdir -var _mkdir = require('./src/mkdir'); -exports.mkdir = common.wrap('mkdir', _mkdir); - -//@include ./src/test -var _test = require('./src/test'); -exports.test = common.wrap('test', _test); - -//@include ./src/cat -var _cat = require('./src/cat'); -exports.cat = common.wrap('cat', _cat); - -//@include ./src/to -var _to = require('./src/to'); -String.prototype.to = common.wrap('to', _to); - -//@include ./src/toEnd -var _toEnd = require('./src/toEnd'); -String.prototype.toEnd = common.wrap('toEnd', _toEnd); - -//@include ./src/sed -var _sed = require('./src/sed'); -exports.sed = common.wrap('sed', _sed); - -//@include ./src/grep -var _grep = require('./src/grep'); -exports.grep = common.wrap('grep', _grep); - -//@include ./src/which -var _which = require('./src/which'); -exports.which = common.wrap('which', _which); - -//@include ./src/echo -var _echo = require('./src/echo'); -exports.echo = _echo; // don't common.wrap() as it could parse '-options' - -//@include ./src/dirs -var _dirs = require('./src/dirs').dirs; -exports.dirs = common.wrap("dirs", _dirs); -var _pushd = require('./src/dirs').pushd; -exports.pushd = common.wrap('pushd', _pushd); -var _popd = require('./src/dirs').popd; -exports.popd = common.wrap("popd", _popd); - -//@ -//@ ### exit(code) -//@ Exits the current process with the given exit code. -exports.exit = process.exit; - -//@ -//@ ### env['VAR_NAME'] -//@ Object containing environment variables (both getter and setter). Shortcut to process.env. -exports.env = process.env; - -//@include ./src/exec -var _exec = require('./src/exec'); -exports.exec = common.wrap('exec', _exec, {notUnix:true}); - -//@include ./src/chmod -var _chmod = require('./src/chmod'); -exports.chmod = common.wrap('chmod', _chmod); - - - -//@ -//@ ## Non-Unix commands -//@ - -//@include ./src/tempdir -var _tempDir = require('./src/tempdir'); -exports.tempdir = common.wrap('tempdir', _tempDir); - - -//@include ./src/error -var _error = require('./src/error'); -exports.error = _error; - - - -//@ -//@ ## Configuration -//@ - -exports.config = common.config; - -//@ -//@ ### config.silent -//@ Example: -//@ -//@ ```javascript -//@ var silentState = config.silent; // save old silent state -//@ config.silent = true; -//@ /* ... */ -//@ config.silent = silentState; // restore old silent state -//@ ``` -//@ -//@ Suppresses all command output if `true`, except for `echo()` calls. -//@ Default is `false`. - -//@ -//@ ### config.fatal -//@ Example: -//@ -//@ ```javascript -//@ config.fatal = true; -//@ cp('this_file_does_not_exist', '/dev/null'); // dies here -//@ /* more commands... */ -//@ ``` -//@ -//@ If `true` the script will die on errors. Default is `false`. diff --git a/node_modules/shelljs/src/cat.js b/node_modules/shelljs/src/cat.js deleted file mode 100644 index f6f4d25..0000000 --- a/node_modules/shelljs/src/cat.js +++ /dev/null @@ -1,43 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### cat(file [, file ...]) -//@ ### cat(file_array) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var str = cat('file*.txt'); -//@ var str = cat('file1', 'file2'); -//@ var str = cat(['file1', 'file2']); // same as above -//@ ``` -//@ -//@ Returns a string containing the given file, or a concatenated string -//@ containing the files if more than one file is given (a new line character is -//@ introduced between each file). Wildcard `*` accepted. -function _cat(options, files) { - var cat = ''; - - if (!files) - common.error('no paths given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 1); - // if it's array leave it as it is - - files = common.expand(files); - - files.forEach(function(file) { - if (!fs.existsSync(file)) - common.error('no such file or directory: ' + file); - - cat += fs.readFileSync(file, 'utf8') + '\n'; - }); - - if (cat[cat.length-1] === '\n') - cat = cat.substring(0, cat.length-1); - - return common.ShellString(cat); -} -module.exports = _cat; diff --git a/node_modules/shelljs/src/cd.js b/node_modules/shelljs/src/cd.js deleted file mode 100644 index 230f432..0000000 --- a/node_modules/shelljs/src/cd.js +++ /dev/null @@ -1,19 +0,0 @@ -var fs = require('fs'); -var common = require('./common'); - -//@ -//@ ### cd('dir') -//@ Changes to directory `dir` for the duration of the script -function _cd(options, dir) { - if (!dir) - common.error('directory not specified'); - - if (!fs.existsSync(dir)) - common.error('no such file or directory: ' + dir); - - if (!fs.statSync(dir).isDirectory()) - common.error('not a directory: ' + dir); - - process.chdir(dir); -} -module.exports = _cd; diff --git a/node_modules/shelljs/src/chmod.js b/node_modules/shelljs/src/chmod.js deleted file mode 100644 index f288893..0000000 --- a/node_modules/shelljs/src/chmod.js +++ /dev/null @@ -1,208 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -var PERMS = (function (base) { - return { - OTHER_EXEC : base.EXEC, - OTHER_WRITE : base.WRITE, - OTHER_READ : base.READ, - - GROUP_EXEC : base.EXEC << 3, - GROUP_WRITE : base.WRITE << 3, - GROUP_READ : base.READ << 3, - - OWNER_EXEC : base.EXEC << 6, - OWNER_WRITE : base.WRITE << 6, - OWNER_READ : base.READ << 6, - - // Literal octal numbers are apparently not allowed in "strict" javascript. Using parseInt is - // the preferred way, else a jshint warning is thrown. - STICKY : parseInt('01000', 8), - SETGID : parseInt('02000', 8), - SETUID : parseInt('04000', 8), - - TYPE_MASK : parseInt('0770000', 8) - }; -})({ - EXEC : 1, - WRITE : 2, - READ : 4 -}); - -//@ -//@ ### chmod(octal_mode || octal_string, file) -//@ ### chmod(symbolic_mode, file) -//@ -//@ Available options: -//@ -//@ + `-v`: output a diagnostic for every file processed//@ -//@ + `-c`: like verbose but report only when a change is made//@ -//@ + `-R`: change files and directories recursively//@ -//@ -//@ Examples: -//@ -//@ ```javascript -//@ chmod(755, '/Users/brandon'); -//@ chmod('755', '/Users/brandon'); // same as above -//@ chmod('u+x', '/Users/brandon'); -//@ ``` -//@ -//@ Alters the permissions of a file or directory by either specifying the -//@ absolute permissions in octal form or expressing the changes in symbols. -//@ This command tries to mimic the POSIX behavior as much as possible. -//@ Notable exceptions: -//@ -//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is -//@ given to the umask. -//@ + There is no "quiet" option since default behavior is to run silent. -function _chmod(options, mode, filePattern) { - if (!filePattern) { - if (options.length > 0 && options.charAt(0) === '-') { - // Special case where the specified file permissions started with - to subtract perms, which - // get picked up by the option parser as command flags. - // If we are down by one argument and options starts with -, shift everything over. - filePattern = mode; - mode = options; - options = ''; - } - else { - common.error('You must specify a file.'); - } - } - - options = common.parseOptions(options, { - 'R': 'recursive', - 'c': 'changes', - 'v': 'verbose' - }); - - if (typeof filePattern === 'string') { - filePattern = [ filePattern ]; - } - - var files; - - if (options.recursive) { - files = []; - common.expand(filePattern).forEach(function addFile(expandedFile) { - var stat = fs.lstatSync(expandedFile); - - if (!stat.isSymbolicLink()) { - files.push(expandedFile); - - if (stat.isDirectory()) { // intentionally does not follow symlinks. - fs.readdirSync(expandedFile).forEach(function (child) { - addFile(expandedFile + '/' + child); - }); - } - } - }); - } - else { - files = common.expand(filePattern); - } - - files.forEach(function innerChmod(file) { - file = path.resolve(file); - if (!fs.existsSync(file)) { - common.error('File not found: ' + file); - } - - // When recursing, don't follow symlinks. - if (options.recursive && fs.lstatSync(file).isSymbolicLink()) { - return; - } - - var perms = fs.statSync(file).mode; - var type = perms & PERMS.TYPE_MASK; - - var newPerms = perms; - - if (isNaN(parseInt(mode, 8))) { - // parse options - mode.split(',').forEach(function (symbolicMode) { - /*jshint regexdash:true */ - var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; - var matches = pattern.exec(symbolicMode); - - if (matches) { - var applyTo = matches[1]; - var operator = matches[2]; - var change = matches[3]; - - var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === ''; - var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === ''; - var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === ''; - - var changeRead = change.indexOf('r') != -1; - var changeWrite = change.indexOf('w') != -1; - var changeExec = change.indexOf('x') != -1; - var changeSticky = change.indexOf('t') != -1; - var changeSetuid = change.indexOf('s') != -1; - - var mask = 0; - if (changeOwner) { - mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); - } - if (changeGroup) { - mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); - } - if (changeOther) { - mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); - } - - // Sticky bit is special - it's not tied to user, group or other. - if (changeSticky) { - mask |= PERMS.STICKY; - } - - switch (operator) { - case '+': - newPerms |= mask; - break; - - case '-': - newPerms &= ~mask; - break; - - case '=': - newPerms = type + mask; - - // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared. - if (fs.statSync(file).isDirectory()) { - newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; - } - break; - } - - if (options.verbose) { - log(file + ' -> ' + newPerms.toString(8)); - } - - if (perms != newPerms) { - if (!options.verbose && options.changes) { - log(file + ' -> ' + newPerms.toString(8)); - } - fs.chmodSync(file, newPerms); - } - } - else { - common.error('Invalid symbolic mode change: ' + symbolicMode); - } - }); - } - else { - // they gave us a full number - newPerms = type + parseInt(mode, 8); - - // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared. - if (fs.statSync(file).isDirectory()) { - newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; - } - - fs.chmodSync(file, newPerms); - } - }); -} -module.exports = _chmod; diff --git a/node_modules/shelljs/src/common.js b/node_modules/shelljs/src/common.js deleted file mode 100644 index fe20871..0000000 --- a/node_modules/shelljs/src/common.js +++ /dev/null @@ -1,189 +0,0 @@ -var os = require('os'); -var fs = require('fs'); -var _ls = require('./ls'); - -// Module globals -var config = { - silent: false, - fatal: false -}; -exports.config = config; - -var state = { - error: null, - currentCmd: 'shell.js', - tempDir: null -}; -exports.state = state; - -var platform = os.type().match(/^Win/) ? 'win' : 'unix'; -exports.platform = platform; - -function log() { - if (!config.silent) - console.log.apply(this, arguments); -} -exports.log = log; - -// Shows error message. Throws unless _continue or config.fatal are true -function error(msg, _continue) { - if (state.error === null) - state.error = ''; - state.error += state.currentCmd + ': ' + msg + '\n'; - - if (msg.length > 0) - log(state.error); - - if (config.fatal) - process.exit(1); - - if (!_continue) - throw ''; -} -exports.error = error; - -// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings. -// For now, this is a dummy function to bookmark places we need such strings -function ShellString(str) { - return str; -} -exports.ShellString = ShellString; - -// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.: -// parseOptions('-a', {'a':'alice', 'b':'bob'}); -function parseOptions(str, map) { - if (!map) - error('parseOptions() internal error: no map given'); - - // All options are false by default - var options = {}; - for (var letter in map) - options[map[letter]] = false; - - if (!str) - return options; // defaults - - if (typeof str !== 'string') - error('parseOptions() internal error: wrong str'); - - // e.g. match[1] = 'Rf' for str = '-Rf' - var match = str.match(/^\-(.+)/); - if (!match) - return options; - - // e.g. chars = ['R', 'f'] - var chars = match[1].split(''); - - chars.forEach(function(c) { - if (c in map) - options[map[c]] = true; - else - error('option not recognized: '+c); - }); - - return options; -} -exports.parseOptions = parseOptions; - -// Expands wildcards with matching (ie. existing) file names. -// For example: -// expand(['file*.js']) = ['file1.js', 'file2.js', ...] -// (if the files 'file1.js', 'file2.js', etc, exist in the current dir) -function expand(list) { - var expanded = []; - list.forEach(function(listEl) { - // Wildcard present? - if (listEl.search(/\*/) > -1) { - _ls('', listEl).forEach(function(file) { - expanded.push(file); - }); - } else { - expanded.push(listEl); - } - }); - return expanded; -} -exports.expand = expand; - -// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. -// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 -function unlinkSync(file) { - try { - fs.unlinkSync(file); - } catch(e) { - // Try to override file permission - if (e.code === 'EPERM') { - fs.chmodSync(file, '0666'); - fs.unlinkSync(file); - } else { - throw e; - } - } -} -exports.unlinkSync = unlinkSync; - -// e.g. 'shelljs_a5f185d0443ca...' -function randomFileName() { - function randomHash(count) { - if (count === 1) - return parseInt(16*Math.random(), 10).toString(16); - else { - var hash = ''; - for (var i=0; i< files.length; i++) { - var srcFile = sourceDir + "/" + files[i]; - var destFile = destDir + "/" + files[i]; - var srcFileStat = fs.lstatSync(srcFile); - - if (srcFileStat.isDirectory()) { - /* recursion this thing right on back. */ - cpdirSyncRecursive(srcFile, destFile, opts); - } else if (srcFileStat.isSymbolicLink()) { - var symlinkFull = fs.readlinkSync(srcFile); - fs.symlinkSync(symlinkFull, destFile); - } else { - /* At this point, we've hit a file actually worth copying... so copy it on over. */ - if (fs.existsSync(destFile) && !opts.force) { - common.log('skipping existing file: ' + files[i]); - } else { - copyFileSync(srcFile, destFile); - } - } - - } // for files -} // cpdirSyncRecursive - - -//@ -//@ ### cp([options ,] source [,source ...], dest) -//@ ### cp([options ,] source_array, dest) -//@ Available options: -//@ -//@ + `-f`: force -//@ + `-r, -R`: recursive -//@ -//@ Examples: -//@ -//@ ```javascript -//@ cp('file1', 'dir1'); -//@ cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); -//@ cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above -//@ ``` -//@ -//@ Copies files. The wildcard `*` is accepted. -function _cp(options, sources, dest) { - options = common.parseOptions(options, { - 'f': 'force', - 'R': 'recursive', - 'r': 'recursive' - }); - - // Get sources, dest - if (arguments.length < 3) { - common.error('missing and/or '); - } else if (arguments.length > 3) { - sources = [].slice.call(arguments, 1, arguments.length - 1); - dest = arguments[arguments.length - 1]; - } else if (typeof sources === 'string') { - sources = [sources]; - } else if ('length' in sources) { - sources = sources; // no-op for array - } else { - common.error('invalid arguments'); - } - - var exists = fs.existsSync(dest), - stats = exists && fs.statSync(dest); - - // Dest is not existing dir, but multiple sources given - if ((!exists || !stats.isDirectory()) && sources.length > 1) - common.error('dest is not a directory (too many sources)'); - - // Dest is an existing file, but no -f given - if (exists && stats.isFile() && !options.force) - common.error('dest file already exists: ' + dest); - - if (options.recursive) { - // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*" - // (see Github issue #15) - sources.forEach(function(src, i) { - if (src[src.length - 1] === '/') - sources[i] += '*'; - }); - - // Create dest - try { - fs.mkdirSync(dest, parseInt('0777', 8)); - } catch (e) { - // like Unix's cp, keep going even if we can't create dest dir - } - } - - sources = common.expand(sources); - - sources.forEach(function(src) { - if (!fs.existsSync(src)) { - common.error('no such file or directory: '+src, true); - return; // skip file - } - - // If here, src exists - if (fs.statSync(src).isDirectory()) { - if (!options.recursive) { - // Non-Recursive - common.log(src + ' is a directory (not copied)'); - } else { - // Recursive - // 'cp /a/source dest' should create 'source' in 'dest' - var newDest = path.join(dest, path.basename(src)), - checkDir = fs.statSync(src); - try { - fs.mkdirSync(newDest, checkDir.mode); - } catch (e) { - //if the directory already exists, that's okay - if (e.code !== 'EEXIST') throw e; - } - - cpdirSyncRecursive(src, newDest, {force: options.force}); - } - return; // done with dir - } - - // If here, src is a file - - // When copying to '/path/dir': - // thisDest = '/path/dir/file1' - var thisDest = dest; - if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) - thisDest = path.normalize(dest + '/' + path.basename(src)); - - if (fs.existsSync(thisDest) && !options.force) { - common.error('dest file already exists: ' + thisDest, true); - return; // skip file - } - - copyFileSync(src, thisDest); - }); // forEach(src) -} -module.exports = _cp; diff --git a/node_modules/shelljs/src/dirs.js b/node_modules/shelljs/src/dirs.js deleted file mode 100644 index 58fae8b..0000000 --- a/node_modules/shelljs/src/dirs.js +++ /dev/null @@ -1,191 +0,0 @@ -var common = require('./common'); -var _cd = require('./cd'); -var path = require('path'); - -// Pushd/popd/dirs internals -var _dirStack = []; - -function _isStackIndex(index) { - return (/^[\-+]\d+$/).test(index); -} - -function _parseStackIndex(index) { - if (_isStackIndex(index)) { - if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd - return (/^-/).test(index) ? Number(index) - 1 : Number(index); - } else { - common.error(index + ': directory stack index out of range'); - } - } else { - common.error(index + ': invalid number'); - } -} - -function _actualDirStack() { - return [process.cwd()].concat(_dirStack); -} - -//@ -//@ ### pushd([options,] [dir | '-N' | '+N']) -//@ -//@ Available options: -//@ -//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. -//@ -//@ Arguments: -//@ -//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. -//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. -//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ // process.cwd() === '/usr' -//@ pushd('/etc'); // Returns /etc /usr -//@ pushd('+1'); // Returns /usr /etc -//@ ``` -//@ -//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. -function _pushd(options, dir) { - if (_isStackIndex(options)) { - dir = options; - options = ''; - } - - options = common.parseOptions(options, { - 'n' : 'no-cd' - }); - - var dirs = _actualDirStack(); - - if (dir === '+0') { - return dirs; // +0 is a noop - } else if (!dir) { - if (dirs.length > 1) { - dirs = dirs.splice(1, 1).concat(dirs); - } else { - return common.error('no other directory'); - } - } else if (_isStackIndex(dir)) { - var n = _parseStackIndex(dir); - dirs = dirs.slice(n).concat(dirs.slice(0, n)); - } else { - if (options['no-cd']) { - dirs.splice(1, 0, dir); - } else { - dirs.unshift(dir); - } - } - - if (options['no-cd']) { - dirs = dirs.slice(1); - } else { - dir = path.resolve(dirs.shift()); - _cd('', dir); - } - - _dirStack = dirs; - return _dirs(''); -} -exports.pushd = _pushd; - -//@ -//@ ### popd([options,] ['-N' | '+N']) -//@ -//@ Available options: -//@ -//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. -//@ -//@ Arguments: -//@ -//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. -//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ echo(process.cwd()); // '/usr' -//@ pushd('/etc'); // '/etc /usr' -//@ echo(process.cwd()); // '/etc' -//@ popd(); // '/usr' -//@ echo(process.cwd()); // '/usr' -//@ ``` -//@ -//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. -function _popd(options, index) { - if (_isStackIndex(options)) { - index = options; - options = ''; - } - - options = common.parseOptions(options, { - 'n' : 'no-cd' - }); - - if (!_dirStack.length) { - return common.error('directory stack empty'); - } - - index = _parseStackIndex(index || '+0'); - - if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { - index = index > 0 ? index - 1 : index; - _dirStack.splice(index, 1); - } else { - var dir = path.resolve(_dirStack.shift()); - _cd('', dir); - } - - return _dirs(''); -} -exports.popd = _popd; - -//@ -//@ ### dirs([options | '+N' | '-N']) -//@ -//@ Available options: -//@ -//@ + `-c`: Clears the directory stack by deleting all of the elements. -//@ -//@ Arguments: -//@ -//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. -//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. -//@ -//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. -//@ -//@ See also: pushd, popd -function _dirs(options, index) { - if (_isStackIndex(options)) { - index = options; - options = ''; - } - - options = common.parseOptions(options, { - 'c' : 'clear' - }); - - if (options['clear']) { - _dirStack = []; - return _dirStack; - } - - var stack = _actualDirStack(); - - if (index) { - index = _parseStackIndex(index); - - if (index < 0) { - index = stack.length + index; - } - - common.log(stack[index]); - return stack[index]; - } - - common.log(stack.join(' ')); - - return stack; -} -exports.dirs = _dirs; diff --git a/node_modules/shelljs/src/echo.js b/node_modules/shelljs/src/echo.js deleted file mode 100644 index 760ea84..0000000 --- a/node_modules/shelljs/src/echo.js +++ /dev/null @@ -1,20 +0,0 @@ -var common = require('./common'); - -//@ -//@ ### echo(string [,string ...]) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ echo('hello world'); -//@ var str = echo('hello world'); -//@ ``` -//@ -//@ Prints string to stdout, and returns string with additional utility methods -//@ like `.to()`. -function _echo() { - var messages = [].slice.call(arguments, 0); - console.log.apply(this, messages); - return common.ShellString(messages.join(' ')); -} -module.exports = _echo; diff --git a/node_modules/shelljs/src/error.js b/node_modules/shelljs/src/error.js deleted file mode 100644 index cca3efb..0000000 --- a/node_modules/shelljs/src/error.js +++ /dev/null @@ -1,10 +0,0 @@ -var common = require('./common'); - -//@ -//@ ### error() -//@ Tests if error occurred in the last command. Returns `null` if no error occurred, -//@ otherwise returns string explaining the error -function error() { - return common.state.error; -}; -module.exports = error; diff --git a/node_modules/shelljs/src/exec.js b/node_modules/shelljs/src/exec.js deleted file mode 100644 index 7ccdbc0..0000000 --- a/node_modules/shelljs/src/exec.js +++ /dev/null @@ -1,181 +0,0 @@ -var common = require('./common'); -var _tempDir = require('./tempdir'); -var _pwd = require('./pwd'); -var path = require('path'); -var fs = require('fs'); -var child = require('child_process'); - -// Hack to run child_process.exec() synchronously (sync avoids callback hell) -// Uses a custom wait loop that checks for a flag file, created when the child process is done. -// (Can't do a wait loop that checks for internal Node variables/messages as -// Node is single-threaded; callbacks and other internal state changes are done in the -// event loop). -function execSync(cmd, opts) { - var tempDir = _tempDir(); - var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()), - codeFile = path.resolve(tempDir+'/'+common.randomFileName()), - scriptFile = path.resolve(tempDir+'/'+common.randomFileName()), - sleepFile = path.resolve(tempDir+'/'+common.randomFileName()); - - var options = common.extend({ - silent: common.config.silent - }, opts); - - var previousStdoutContent = ''; - // Echoes stdout changes from running process, if not silent - function updateStdout() { - if (options.silent || !fs.existsSync(stdoutFile)) - return; - - var stdoutContent = fs.readFileSync(stdoutFile, 'utf8'); - // No changes since last time? - if (stdoutContent.length <= previousStdoutContent.length) - return; - - process.stdout.write(stdoutContent.substr(previousStdoutContent.length)); - previousStdoutContent = stdoutContent; - } - - function escape(str) { - return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0"); - } - - cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix - - var script = - "var child = require('child_process')," + - " fs = require('fs');" + - "child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {" + - " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');" + - "});"; - - if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile); - if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); - if (fs.existsSync(codeFile)) common.unlinkSync(codeFile); - - fs.writeFileSync(scriptFile, script); - child.exec('"'+process.execPath+'" '+scriptFile, { - env: process.env, - cwd: _pwd(), - maxBuffer: 20*1024*1024 - }); - - // The wait loop - // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage - // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing - // CPU usage, though apparently not so much on Windows) - while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } - while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } - - // At this point codeFile exists, but it's not necessarily flushed yet. - // Keep reading it until it is. - var code = parseInt('', 10); - while (isNaN(code)) { - code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10); - } - - var stdout = fs.readFileSync(stdoutFile, 'utf8'); - - // No biggie if we can't erase the files now -- they're in a temp dir anyway - try { common.unlinkSync(scriptFile); } catch(e) {} - try { common.unlinkSync(stdoutFile); } catch(e) {} - try { common.unlinkSync(codeFile); } catch(e) {} - try { common.unlinkSync(sleepFile); } catch(e) {} - - // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html - if (code === 1 || code === 2 || code >= 126) { - common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes - } - // True if successful, false if not - var obj = { - code: code, - output: stdout - }; - return obj; -} // execSync() - -// Wrapper around exec() to enable echoing output to console in real time -function execAsync(cmd, opts, callback) { - var output = ''; - - var options = common.extend({ - silent: common.config.silent - }, opts); - - var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) { - if (callback) - callback(err ? err.code : 0, output); - }); - - c.stdout.on('data', function(data) { - output += data; - if (!options.silent) - process.stdout.write(data); - }); - - c.stderr.on('data', function(data) { - output += data; - if (!options.silent) - process.stdout.write(data); - }); - - return c; -} - -//@ -//@ ### exec(command [, options] [, callback]) -//@ Available options (all `false` by default): -//@ -//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided. -//@ + `silent`: Do not echo program output to console. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var version = exec('node --version', {silent:true}).output; -//@ -//@ var child = exec('some_long_running_process', {async:true}); -//@ child.stdout.on('data', function(data) { -//@ /* ... do something with data ... */ -//@ }); -//@ -//@ exec('some_long_running_process', function(code, output) { -//@ console.log('Exit code:', code); -//@ console.log('Program output:', output); -//@ }); -//@ ``` -//@ -//@ Executes the given `command` _synchronously_, unless otherwise specified. -//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's -//@ `output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and -//@ the `callback` gets the arguments `(code, output)`. -//@ -//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as -//@ the current synchronous implementation uses a lot of CPU. This should be getting -//@ fixed soon. -function _exec(command, options, callback) { - if (!command) - common.error('must specify command'); - - // Callback is defined instead of options. - if (typeof options === 'function') { - callback = options; - options = { async: true }; - } - - // Callback is defined with options. - if (typeof options === 'object' && typeof callback === 'function') { - options.async = true; - } - - options = common.extend({ - silent: common.config.silent, - async: false - }, options); - - if (options.async) - return execAsync(command, options, callback); - else - return execSync(command, options); -} -module.exports = _exec; diff --git a/node_modules/shelljs/src/find.js b/node_modules/shelljs/src/find.js deleted file mode 100644 index d9eeec2..0000000 --- a/node_modules/shelljs/src/find.js +++ /dev/null @@ -1,51 +0,0 @@ -var fs = require('fs'); -var common = require('./common'); -var _ls = require('./ls'); - -//@ -//@ ### find(path [,path ...]) -//@ ### find(path_array) -//@ Examples: -//@ -//@ ```javascript -//@ find('src', 'lib'); -//@ find(['src', 'lib']); // same as above -//@ find('.').filter(function(file) { return file.match(/\.js$/); }); -//@ ``` -//@ -//@ Returns array of all files (however deep) in the given paths. -//@ -//@ The main difference from `ls('-R', path)` is that the resulting file names -//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`. -function _find(options, paths) { - if (!paths) - common.error('no path specified'); - else if (typeof paths === 'object') - paths = paths; // assume array - else if (typeof paths === 'string') - paths = [].slice.call(arguments, 1); - - var list = []; - - function pushFile(file) { - if (common.platform === 'win') - file = file.replace(/\\/g, '/'); - list.push(file); - } - - // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs - // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory - - paths.forEach(function(file) { - pushFile(file); - - if (fs.statSync(file).isDirectory()) { - _ls('-RA', file+'/*').forEach(function(subfile) { - pushFile(subfile); - }); - } - }); - - return list; -} -module.exports = _find; diff --git a/node_modules/shelljs/src/grep.js b/node_modules/shelljs/src/grep.js deleted file mode 100644 index 00c7d6a..0000000 --- a/node_modules/shelljs/src/grep.js +++ /dev/null @@ -1,52 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### grep([options ,] regex_filter, file [, file ...]) -//@ ### grep([options ,] regex_filter, file_array) -//@ Available options: -//@ -//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); -//@ grep('GLOBAL_VARIABLE', '*.js'); -//@ ``` -//@ -//@ Reads input string from given files and returns a string containing all lines of the -//@ file that match the given `regex_filter`. Wildcard `*` accepted. -function _grep(options, regex, files) { - options = common.parseOptions(options, { - 'v': 'inverse' - }); - - if (!files) - common.error('no paths given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 2); - // if it's array leave it as it is - - files = common.expand(files); - - var grep = ''; - files.forEach(function(file) { - if (!fs.existsSync(file)) { - common.error('no such file or directory: ' + file, true); - return; - } - - var contents = fs.readFileSync(file, 'utf8'), - lines = contents.split(/\r*\n/); - lines.forEach(function(line) { - var matched = line.match(regex); - if ((options.inverse && !matched) || (!options.inverse && matched)) - grep += line + '\n'; - }); - }); - - return common.ShellString(grep); -} -module.exports = _grep; diff --git a/node_modules/shelljs/src/ls.js b/node_modules/shelljs/src/ls.js deleted file mode 100644 index 3345db4..0000000 --- a/node_modules/shelljs/src/ls.js +++ /dev/null @@ -1,126 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var common = require('./common'); -var _cd = require('./cd'); -var _pwd = require('./pwd'); - -//@ -//@ ### ls([options ,] path [,path ...]) -//@ ### ls([options ,] path_array) -//@ Available options: -//@ -//@ + `-R`: recursive -//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ ls('projs/*.js'); -//@ ls('-R', '/users/me', '/tmp'); -//@ ls('-R', ['/users/me', '/tmp']); // same as above -//@ ``` -//@ -//@ Returns array of files in the given path, or in current directory if no path provided. -function _ls(options, paths) { - options = common.parseOptions(options, { - 'R': 'recursive', - 'A': 'all', - 'a': 'all_deprecated' - }); - - if (options.all_deprecated) { - // We won't support the -a option as it's hard to image why it's useful - // (it includes '.' and '..' in addition to '.*' files) - // For backwards compatibility we'll dump a deprecated message and proceed as before - common.log('ls: Option -a is deprecated. Use -A instead'); - options.all = true; - } - - if (!paths) - paths = ['.']; - else if (typeof paths === 'object') - paths = paths; // assume array - else if (typeof paths === 'string') - paths = [].slice.call(arguments, 1); - - var list = []; - - // Conditionally pushes file to list - returns true if pushed, false otherwise - // (e.g. prevents hidden files to be included unless explicitly told so) - function pushFile(file, query) { - // hidden file? - if (path.basename(file)[0] === '.') { - // not explicitly asking for hidden files? - if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1)) - return false; - } - - if (common.platform === 'win') - file = file.replace(/\\/g, '/'); - - list.push(file); - return true; - } - - paths.forEach(function(p) { - if (fs.existsSync(p)) { - var stats = fs.statSync(p); - // Simple file? - if (stats.isFile()) { - pushFile(p, p); - return; // continue - } - - // Simple dir? - if (stats.isDirectory()) { - // Iterate over p contents - fs.readdirSync(p).forEach(function(file) { - if (!pushFile(file, p)) - return; - - // Recursive? - if (options.recursive) { - var oldDir = _pwd(); - _cd('', p); - if (fs.statSync(file).isDirectory()) - list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*')); - _cd('', oldDir); - } - }); - return; // continue - } - } - - // p does not exist - possible wildcard present - - var basename = path.basename(p); - var dirname = path.dirname(p); - // Wildcard present on an existing dir? (e.g. '/tmp/*.js') - if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) { - // Escape special regular expression chars - var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1'); - // Translates wildcard into regex - regexp = '^' + regexp.replace(/\*/g, '.*') + '$'; - // Iterate over directory contents - fs.readdirSync(dirname).forEach(function(file) { - if (file.match(new RegExp(regexp))) { - if (!pushFile(path.normalize(dirname+'/'+file), basename)) - return; - - // Recursive? - if (options.recursive) { - var pp = dirname + '/' + file; - if (fs.lstatSync(pp).isDirectory()) - list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*')); - } // recursive - } // if file matches - }); // forEach - return; - } - - common.error('no such file or directory: ' + p, true); - }); - - return list; -} -module.exports = _ls; diff --git a/node_modules/shelljs/src/mkdir.js b/node_modules/shelljs/src/mkdir.js deleted file mode 100644 index 5a7088f..0000000 --- a/node_modules/shelljs/src/mkdir.js +++ /dev/null @@ -1,68 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -// Recursively creates 'dir' -function mkdirSyncRecursive(dir) { - var baseDir = path.dirname(dir); - - // Base dir exists, no recursion necessary - if (fs.existsSync(baseDir)) { - fs.mkdirSync(dir, parseInt('0777', 8)); - return; - } - - // Base dir does not exist, go recursive - mkdirSyncRecursive(baseDir); - - // Base dir created, can create dir - fs.mkdirSync(dir, parseInt('0777', 8)); -} - -//@ -//@ ### mkdir([options ,] dir [, dir ...]) -//@ ### mkdir([options ,] dir_array) -//@ Available options: -//@ -//@ + `p`: full path (will create intermediate dirs if necessary) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); -//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above -//@ ``` -//@ -//@ Creates directories. -function _mkdir(options, dirs) { - options = common.parseOptions(options, { - 'p': 'fullpath' - }); - if (!dirs) - common.error('no paths given'); - - if (typeof dirs === 'string') - dirs = [].slice.call(arguments, 1); - // if it's array leave it as it is - - dirs.forEach(function(dir) { - if (fs.existsSync(dir)) { - if (!options.fullpath) - common.error('path already exists: ' + dir, true); - return; // skip dir - } - - // Base dir does not exist, and no -p option given - var baseDir = path.dirname(dir); - if (!fs.existsSync(baseDir) && !options.fullpath) { - common.error('no such file or directory: ' + baseDir, true); - return; // skip dir - } - - if (options.fullpath) - mkdirSyncRecursive(dir); - else - fs.mkdirSync(dir, parseInt('0777', 8)); - }); -} // mkdir -module.exports = _mkdir; diff --git a/node_modules/shelljs/src/mv.js b/node_modules/shelljs/src/mv.js deleted file mode 100644 index 11f9607..0000000 --- a/node_modules/shelljs/src/mv.js +++ /dev/null @@ -1,80 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var common = require('./common'); - -//@ -//@ ### mv(source [, source ...], dest') -//@ ### mv(source_array, dest') -//@ Available options: -//@ -//@ + `f`: force -//@ -//@ Examples: -//@ -//@ ```javascript -//@ mv('-f', 'file', 'dir/'); -//@ mv('file1', 'file2', 'dir/'); -//@ mv(['file1', 'file2'], 'dir/'); // same as above -//@ ``` -//@ -//@ Moves files. The wildcard `*` is accepted. -function _mv(options, sources, dest) { - options = common.parseOptions(options, { - 'f': 'force' - }); - - // Get sources, dest - if (arguments.length < 3) { - common.error('missing and/or '); - } else if (arguments.length > 3) { - sources = [].slice.call(arguments, 1, arguments.length - 1); - dest = arguments[arguments.length - 1]; - } else if (typeof sources === 'string') { - sources = [sources]; - } else if ('length' in sources) { - sources = sources; // no-op for array - } else { - common.error('invalid arguments'); - } - - sources = common.expand(sources); - - var exists = fs.existsSync(dest), - stats = exists && fs.statSync(dest); - - // Dest is not existing dir, but multiple sources given - if ((!exists || !stats.isDirectory()) && sources.length > 1) - common.error('dest is not a directory (too many sources)'); - - // Dest is an existing file, but no -f given - if (exists && stats.isFile() && !options.force) - common.error('dest file already exists: ' + dest); - - sources.forEach(function(src) { - if (!fs.existsSync(src)) { - common.error('no such file or directory: '+src, true); - return; // skip file - } - - // If here, src exists - - // When copying to '/path/dir': - // thisDest = '/path/dir/file1' - var thisDest = dest; - if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) - thisDest = path.normalize(dest + '/' + path.basename(src)); - - if (fs.existsSync(thisDest) && !options.force) { - common.error('dest file already exists: ' + thisDest, true); - return; // skip file - } - - if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { - common.error('cannot move to self: '+src, true); - return; // skip file - } - - fs.renameSync(src, thisDest); - }); // forEach(src) -} // mv -module.exports = _mv; diff --git a/node_modules/shelljs/src/popd.js b/node_modules/shelljs/src/popd.js deleted file mode 100644 index 11ea24f..0000000 --- a/node_modules/shelljs/src/popd.js +++ /dev/null @@ -1 +0,0 @@ -// see dirs.js \ No newline at end of file diff --git a/node_modules/shelljs/src/pushd.js b/node_modules/shelljs/src/pushd.js deleted file mode 100644 index 11ea24f..0000000 --- a/node_modules/shelljs/src/pushd.js +++ /dev/null @@ -1 +0,0 @@ -// see dirs.js \ No newline at end of file diff --git a/node_modules/shelljs/src/pwd.js b/node_modules/shelljs/src/pwd.js deleted file mode 100644 index 41727bb..0000000 --- a/node_modules/shelljs/src/pwd.js +++ /dev/null @@ -1,11 +0,0 @@ -var path = require('path'); -var common = require('./common'); - -//@ -//@ ### pwd() -//@ Returns the current directory. -function _pwd(options) { - var pwd = path.resolve(process.cwd()); - return common.ShellString(pwd); -} -module.exports = _pwd; diff --git a/node_modules/shelljs/src/rm.js b/node_modules/shelljs/src/rm.js deleted file mode 100644 index 3abe6e1..0000000 --- a/node_modules/shelljs/src/rm.js +++ /dev/null @@ -1,145 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -// Recursively removes 'dir' -// Adapted from https://github.com/ryanmcgrath/wrench-js -// -// Copyright (c) 2010 Ryan McGrath -// Copyright (c) 2012 Artur Adib -// -// Licensed under the MIT License -// http://www.opensource.org/licenses/mit-license.php -function rmdirSyncRecursive(dir, force) { - var files; - - files = fs.readdirSync(dir); - - // Loop through and delete everything in the sub-tree after checking it - for(var i = 0; i < files.length; i++) { - var file = dir + "/" + files[i], - currFile = fs.lstatSync(file); - - if(currFile.isDirectory()) { // Recursive function back to the beginning - rmdirSyncRecursive(file, force); - } - - else if(currFile.isSymbolicLink()) { // Unlink symlinks - if (force || isWriteable(file)) { - try { - common.unlinkSync(file); - } catch (e) { - common.error('could not remove file (code '+e.code+'): ' + file, true); - } - } - } - - else // Assume it's a file - perhaps a try/catch belongs here? - if (force || isWriteable(file)) { - try { - common.unlinkSync(file); - } catch (e) { - common.error('could not remove file (code '+e.code+'): ' + file, true); - } - } - } - - // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. - // Huzzah for the shopkeep. - - var result; - try { - result = fs.rmdirSync(dir); - } catch(e) { - common.error('could not remove directory (code '+e.code+'): ' + dir, true); - } - - return result; -} // rmdirSyncRecursive - -// Hack to determine if file has write permissions for current user -// Avoids having to check user, group, etc, but it's probably slow -function isWriteable(file) { - var writePermission = true; - try { - var __fd = fs.openSync(file, 'a'); - fs.closeSync(__fd); - } catch(e) { - writePermission = false; - } - - return writePermission; -} - -//@ -//@ ### rm([options ,] file [, file ...]) -//@ ### rm([options ,] file_array) -//@ Available options: -//@ -//@ + `-f`: force -//@ + `-r, -R`: recursive -//@ -//@ Examples: -//@ -//@ ```javascript -//@ rm('-rf', '/tmp/*'); -//@ rm('some_file.txt', 'another_file.txt'); -//@ rm(['some_file.txt', 'another_file.txt']); // same as above -//@ ``` -//@ -//@ Removes files. The wildcard `*` is accepted. -function _rm(options, files) { - options = common.parseOptions(options, { - 'f': 'force', - 'r': 'recursive', - 'R': 'recursive' - }); - if (!files) - common.error('no paths given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 1); - // if it's array leave it as it is - - files = common.expand(files); - - files.forEach(function(file) { - if (!fs.existsSync(file)) { - // Path does not exist, no force flag given - if (!options.force) - common.error('no such file or directory: '+file, true); - - return; // skip file - } - - // If here, path exists - - var stats = fs.lstatSync(file); - if (stats.isFile() || stats.isSymbolicLink()) { - - // Do not check for file writing permissions - if (options.force) { - common.unlinkSync(file); - return; - } - - if (isWriteable(file)) - common.unlinkSync(file); - else - common.error('permission denied: '+file, true); - - return; - } // simple file - - // Path is an existing directory, but no -r flag given - if (stats.isDirectory() && !options.recursive) { - common.error('path is a directory', true); - return; // skip path - } - - // Recursively remove existing directory - if (stats.isDirectory() && options.recursive) { - rmdirSyncRecursive(file, options.force); - } - }); // forEach(file) -} // rm -module.exports = _rm; diff --git a/node_modules/shelljs/src/sed.js b/node_modules/shelljs/src/sed.js deleted file mode 100644 index 9783252..0000000 --- a/node_modules/shelljs/src/sed.js +++ /dev/null @@ -1,43 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### sed([options ,] search_regex, replace_str, file) -//@ Available options: -//@ -//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ -//@ -//@ Examples: -//@ -//@ ```javascript -//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); -//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); -//@ ``` -//@ -//@ Reads an input string from `file` and performs a JavaScript `replace()` on the input -//@ using the given search regex and replacement string. Returns the new string after replacement. -function _sed(options, regex, replacement, file) { - options = common.parseOptions(options, { - 'i': 'inplace' - }); - - if (typeof replacement === 'string') - replacement = replacement; // no-op - else if (typeof replacement === 'number') - replacement = replacement.toString(); // fallback - else - common.error('invalid replacement string'); - - if (!file) - common.error('no file given'); - - if (!fs.existsSync(file)) - common.error('no such file or directory: ' + file); - - var result = fs.readFileSync(file, 'utf8').replace(regex, replacement); - if (options.inplace) - fs.writeFileSync(file, result, 'utf8'); - - return common.ShellString(result); -} -module.exports = _sed; diff --git a/node_modules/shelljs/src/tempdir.js b/node_modules/shelljs/src/tempdir.js deleted file mode 100644 index 45953c2..0000000 --- a/node_modules/shelljs/src/tempdir.js +++ /dev/null @@ -1,56 +0,0 @@ -var common = require('./common'); -var os = require('os'); -var fs = require('fs'); - -// Returns false if 'dir' is not a writeable directory, 'dir' otherwise -function writeableDir(dir) { - if (!dir || !fs.existsSync(dir)) - return false; - - if (!fs.statSync(dir).isDirectory()) - return false; - - var testFile = dir+'/'+common.randomFileName(); - try { - fs.writeFileSync(testFile, ' '); - common.unlinkSync(testFile); - return dir; - } catch (e) { - return false; - } -} - - -//@ -//@ ### tempdir() -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var tmp = tempdir(); // "/tmp" for most *nix platforms -//@ ``` -//@ -//@ Searches and returns string containing a writeable, platform-dependent temporary directory. -//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). -function _tempDir() { - var state = common.state; - if (state.tempDir) - return state.tempDir; // from cache - - state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+ - writeableDir(process.env['TMPDIR']) || - writeableDir(process.env['TEMP']) || - writeableDir(process.env['TMP']) || - writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS - writeableDir('C:\\TEMP') || // Windows - writeableDir('C:\\TMP') || // Windows - writeableDir('\\TEMP') || // Windows - writeableDir('\\TMP') || // Windows - writeableDir('/tmp') || - writeableDir('/var/tmp') || - writeableDir('/usr/tmp') || - writeableDir('.'); // last resort - - return state.tempDir; -} -module.exports = _tempDir; diff --git a/node_modules/shelljs/src/test.js b/node_modules/shelljs/src/test.js deleted file mode 100644 index 8a4ac7d..0000000 --- a/node_modules/shelljs/src/test.js +++ /dev/null @@ -1,85 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### test(expression) -//@ Available expression primaries: -//@ -//@ + `'-b', 'path'`: true if path is a block device -//@ + `'-c', 'path'`: true if path is a character device -//@ + `'-d', 'path'`: true if path is a directory -//@ + `'-e', 'path'`: true if path exists -//@ + `'-f', 'path'`: true if path is a regular file -//@ + `'-L', 'path'`: true if path is a symboilc link -//@ + `'-p', 'path'`: true if path is a pipe (FIFO) -//@ + `'-S', 'path'`: true if path is a socket -//@ -//@ Examples: -//@ -//@ ```javascript -//@ if (test('-d', path)) { /* do something with dir */ }; -//@ if (!test('-f', path)) continue; // skip if it's a regular file -//@ ``` -//@ -//@ Evaluates expression using the available primaries and returns corresponding value. -function _test(options, path) { - if (!path) - common.error('no path given'); - - // hack - only works with unary primaries - options = common.parseOptions(options, { - 'b': 'block', - 'c': 'character', - 'd': 'directory', - 'e': 'exists', - 'f': 'file', - 'L': 'link', - 'p': 'pipe', - 'S': 'socket' - }); - - var canInterpret = false; - for (var key in options) - if (options[key] === true) { - canInterpret = true; - break; - } - - if (!canInterpret) - common.error('could not interpret expression'); - - if (options.link) { - try { - return fs.lstatSync(path).isSymbolicLink(); - } catch(e) { - return false; - } - } - - if (!fs.existsSync(path)) - return false; - - if (options.exists) - return true; - - var stats = fs.statSync(path); - - if (options.block) - return stats.isBlockDevice(); - - if (options.character) - return stats.isCharacterDevice(); - - if (options.directory) - return stats.isDirectory(); - - if (options.file) - return stats.isFile(); - - if (options.pipe) - return stats.isFIFO(); - - if (options.socket) - return stats.isSocket(); -} // test -module.exports = _test; diff --git a/node_modules/shelljs/src/to.js b/node_modules/shelljs/src/to.js deleted file mode 100644 index f029999..0000000 --- a/node_modules/shelljs/src/to.js +++ /dev/null @@ -1,29 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -//@ -//@ ### 'string'.to(file) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ cat('input.txt').to('output.txt'); -//@ ``` -//@ -//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as -//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ -function _to(options, file) { - if (!file) - common.error('wrong arguments'); - - if (!fs.existsSync( path.dirname(file) )) - common.error('no such file or directory: ' + path.dirname(file)); - - try { - fs.writeFileSync(file, this.toString(), 'utf8'); - } catch(e) { - common.error('could not write to file (code '+e.code+'): '+file, true); - } -} -module.exports = _to; diff --git a/node_modules/shelljs/src/toEnd.js b/node_modules/shelljs/src/toEnd.js deleted file mode 100644 index f6d099d..0000000 --- a/node_modules/shelljs/src/toEnd.js +++ /dev/null @@ -1,29 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -//@ -//@ ### 'string'.toEnd(file) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ cat('input.txt').toEnd('output.txt'); -//@ ``` -//@ -//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as -//@ those returned by `cat`, `grep`, etc). -function _toEnd(options, file) { - if (!file) - common.error('wrong arguments'); - - if (!fs.existsSync( path.dirname(file) )) - common.error('no such file or directory: ' + path.dirname(file)); - - try { - fs.appendFileSync(file, this.toString(), 'utf8'); - } catch(e) { - common.error('could not append to file (code '+e.code+'): '+file, true); - } -} -module.exports = _toEnd; diff --git a/node_modules/shelljs/src/which.js b/node_modules/shelljs/src/which.js deleted file mode 100644 index fadb96c..0000000 --- a/node_modules/shelljs/src/which.js +++ /dev/null @@ -1,79 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -// Cross-platform method for splitting environment PATH variables -function splitPath(p) { - for (i=1;i<2;i++) {} - - if (!p) - return []; - - if (common.platform === 'win') - return p.split(';'); - else - return p.split(':'); -} - -//@ -//@ ### which(command) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var nodeExec = which('node'); -//@ ``` -//@ -//@ Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. -//@ Returns string containing the absolute path to the command. -function _which(options, cmd) { - if (!cmd) - common.error('must specify command'); - - var pathEnv = process.env.path || process.env.Path || process.env.PATH, - pathArray = splitPath(pathEnv), - where = null; - - // No relative/absolute paths provided? - if (cmd.search(/\//) === -1) { - // Search for command in PATH - pathArray.forEach(function(dir) { - if (where) - return; // already found it - - var attempt = path.resolve(dir + '/' + cmd); - if (fs.existsSync(attempt)) { - where = attempt; - return; - } - - if (common.platform === 'win') { - var baseAttempt = attempt; - attempt = baseAttempt + '.exe'; - if (fs.existsSync(attempt)) { - where = attempt; - return; - } - attempt = baseAttempt + '.cmd'; - if (fs.existsSync(attempt)) { - where = attempt; - return; - } - attempt = baseAttempt + '.bat'; - if (fs.existsSync(attempt)) { - where = attempt; - return; - } - } // if 'win' - }); - } - - // Command not found anywhere? - if (!fs.existsSync(cmd) && !where) - return null; - - where = where || path.resolve(cmd); - - return common.ShellString(where); -} -module.exports = _which; diff --git a/node_modules/supports-color/browser.js b/node_modules/supports-color/browser.js deleted file mode 100644 index 62afa3a..0000000 --- a/node_modules/supports-color/browser.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; -module.exports = { - stdout: false, - stderr: false -}; diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js deleted file mode 100644 index 1704131..0000000 --- a/node_modules/supports-color/index.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict'; -const os = require('os'); -const hasFlag = require('has-flag'); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; diff --git a/node_modules/supports-color/license b/node_modules/supports-color/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/supports-color/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/supports-color/package.json b/node_modules/supports-color/package.json deleted file mode 100644 index 2055b81..0000000 --- a/node_modules/supports-color/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_from": "supports-color@^5.3.0", - "_id": "supports-color@5.5.0", - "_inBundle": false, - "_integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "_location": "/supports-color", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "supports-color@^5.3.0", - "name": "supports-color", - "escapedName": "supports-color", - "rawSpec": "^5.3.0", - "saveSpec": null, - "fetchSpec": "^5.3.0" - }, - "_requiredBy": [ - "/chalk" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "_shasum": "e2e69a44ac8772f78a1ec0b35b689df6530efc8f", - "_spec": "supports-color@^5.3.0", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "bundleDependencies": false, - "dependencies": { - "has-flag": "^3.0.0" - }, - "deprecated": false, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "ava": "^0.25.0", - "import-fresh": "^2.0.0", - "xo": "^0.20.0" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "browser.js" - ], - "homepage": "https://github.com/chalk/supports-color#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "license": "MIT", - "name": "supports-color", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "5.5.0" -} diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md deleted file mode 100644 index f6e4019..0000000 --- a/node_modules/supports-color/readme.md +++ /dev/null @@ -1,66 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) - -> Detect whether a terminal supports color - - -## Install - -``` -$ npm install supports-color -``` - - -## Usage - -```js -const supportsColor = require('supports-color'); - -if (supportsColor.stdout) { - console.log('Terminal stdout supports color'); -} - -if (supportsColor.stdout.has256) { - console.log('Terminal stdout supports 256 colors'); -} - -if (supportsColor.stderr.has16m) { - console.log('Terminal stderr supports 16 million colors (truecolor)'); -} -``` - - -## API - -Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. - -The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: - -- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) -- `.level = 2` and `.has256 = true`: 256 color support -- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) - - -## Info - -It obeys the `--color` and `--no-color` CLI flags. - -Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - - -## Related - -- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md deleted file mode 100644 index 3d83d26..0000000 --- a/node_modules/which/CHANGELOG.md +++ /dev/null @@ -1,152 +0,0 @@ -# Changes - - -## 1.3.1 - -* update deps -* update travis - -## v1.3.0 - -* Add nothrow option to which.sync -* update tap - -## v1.2.14 - -* appveyor: drop node 5 and 0.x -* travis-ci: add node 6, drop 0.x - -## v1.2.13 - -* test: Pass missing option to pass on windows -* update tap -* update isexe to 2.0.0 -* neveragain.tech pledge request - -## v1.2.12 - -* Removed unused require - -## v1.2.11 - -* Prevent changelog script from being included in package - -## v1.2.10 - -* Use env.PATH only, not env.Path - -## v1.2.9 - -* fix for paths starting with ../ -* Remove unused `is-absolute` module - -## v1.2.8 - -* bullet items in changelog that contain (but don't start with) # - -## v1.2.7 - -* strip 'update changelog' changelog entries out of changelog - -## v1.2.6 - -* make the changelog bulleted - -## v1.2.5 - -* make a changelog, and keep it up to date -* don't include tests in package -* Properly handle relative-path executables -* appveyor -* Attach error code to Not Found error -* Make tests pass on Windows - -## v1.2.4 - -* Fix typo - -## v1.2.3 - -* update isexe, fix regression in pathExt handling - -## v1.2.2 - -* update deps, use isexe module, test windows - -## v1.2.1 - -* Sometimes windows PATH entries are quoted -* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. -* doc cli - -## v1.2.0 - -* Add support for opt.all and -as cli flags -* test the bin -* update travis -* Allow checking for multiple programs in bin/which -* tap 2 - -## v1.1.2 - -* travis -* Refactored and fixed undefined error on Windows -* Support strict mode - -## v1.1.1 - -* test +g exes against secondary groups, if available -* Use windows exe semantics on cygwin & msys -* cwd should be first in path on win32, not last -* Handle lower-case 'env.Path' on Windows -* Update docs -* use single-quotes - -## v1.1.0 - -* Add tests, depend on is-absolute - -## v1.0.9 - -* which.js: root is allowed to execute files owned by anyone - -## v1.0.8 - -* don't use graceful-fs - -## v1.0.7 - -* add license to package.json - -## v1.0.6 - -* isc license - -## 1.0.5 - -* Awful typo - -## 1.0.4 - -* Test for path absoluteness properly -* win: Allow '' as a pathext if cmd has a . in it - -## 1.0.3 - -* Remove references to execPath -* Make `which.sync()` work on Windows by honoring the PATHEXT variable. -* Make `isExe()` always return true on Windows. -* MIT - -## 1.0.2 - -* Only files can be exes - -## 1.0.1 - -* Respect the PATHEXT env for win32 support -* should 0755 the bin -* binary -* guts -* package -* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/which/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/which/README.md b/node_modules/which/README.md deleted file mode 100644 index 8c0b0cb..0000000 --- a/node_modules/which/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# which - -Like the unix `which` utility. - -Finds the first instance of a specified executable in the PATH -environment variable. Does not cache the results, so `hash -r` is not -needed when the PATH changes. - -## USAGE - -```javascript -var which = require('which') - -// async usage -which('node', function (er, resolvedPath) { - // er is returned if no "node" is found on the PATH - // if it is found, then the absolute path to the exec is returned -}) - -// sync usage -// throws if not found -var resolved = which.sync('node') - -// if nothrow option is used, returns null if not found -resolved = which.sync('node', {nothrow: true}) - -// Pass options to override the PATH and PATHEXT environment vars. -which('node', { path: someOtherPath }, function (er, resolved) { - if (er) - throw er - console.log('found at %j', resolved) -}) -``` - -## CLI USAGE - -Same as the BSD `which(1)` binary. - -``` -usage: which [-as] program ... -``` - -## OPTIONS - -You may pass an options object as the second argument. - -- `path`: Use instead of the `PATH` environment variable. -- `pathExt`: Use instead of the `PATHEXT` environment variable. -- `all`: Return all matches, instead of just the first one. Note that - this means the function returns an array of strings instead of a - single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which deleted file mode 100755 index 7cee372..0000000 --- a/node_modules/which/bin/which +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) - usage() - -function usage () { - console.error('usage: which [-as] program ...') - process.exit(1) -} - -var all = false -var silent = false -var dashdash = false -var args = process.argv.slice(2).filter(function (arg) { - if (dashdash || !/^-/.test(arg)) - return true - - if (arg === '--') { - dashdash = true - return false - } - - var flags = arg.substr(1).split('') - for (var f = 0; f < flags.length; f++) { - var flag = flags[f] - switch (flag) { - case 's': - silent = true - break - case 'a': - all = true - break - default: - console.error('which: illegal option -- ' + flag) - usage() - } - } - return false -}) - -process.exit(args.reduce(function (pv, current) { - try { - var f = which.sync(current, { all: all }) - if (all) - f = f.join('\n') - if (!silent) - console.log(f) - return pv; - } catch (e) { - return 1; - } -}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json deleted file mode 100644 index 64895fb..0000000 --- a/node_modules/which/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "which@1.3.1", - "_id": "which@1.3.1", - "_inBundle": false, - "_integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "_location": "/which", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "which@1.3.1", - "name": "which", - "escapedName": "which", - "rawSpec": "1.3.1", - "saveSpec": null, - "fetchSpec": "1.3.1" - }, - "_requiredBy": [ - "/", - "/cross-spawn" - ], - "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "_shasum": "a45043d54f5805316da8d62f9f50918d3da70b0a", - "_spec": "which@1.3.1", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "bin": { - "which": "./bin/which" - }, - "bugs": { - "url": "https://github.com/isaacs/node-which/issues" - }, - "bundleDependencies": false, - "dependencies": { - "isexe": "^2.0.0" - }, - "deprecated": false, - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "devDependencies": { - "mkdirp": "^0.5.0", - "rimraf": "^2.6.2", - "tap": "^12.0.1" - }, - "files": [ - "which.js", - "bin/which" - ], - "homepage": "https://github.com/isaacs/node-which#readme", - "license": "ISC", - "main": "which.js", - "name": "which", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "scripts": { - "changelog": "bash gen-changelog.sh", - "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", - "test": "tap test/*.js --cov" - }, - "version": "1.3.1" -} diff --git a/node_modules/which/which.js b/node_modules/which/which.js deleted file mode 100644 index 4347f91..0000000 --- a/node_modules/which/which.js +++ /dev/null @@ -1,135 +0,0 @@ -module.exports = which -which.sync = whichSync - -var isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -var path = require('path') -var COLON = isWindows ? ';' : ':' -var isexe = require('isexe') - -function getNotFoundError (cmd) { - var er = new Error('not found: ' + cmd) - er.code = 'ENOENT' - - return er -} - -function getPathInfo (cmd, opt) { - var colon = opt.colon || COLON - var pathEnv = opt.path || process.env.PATH || '' - var pathExt = [''] - - pathEnv = pathEnv.split(colon) - - var pathExtExe = '' - if (isWindows) { - pathEnv.unshift(process.cwd()) - pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') - pathExt = pathExtExe.split(colon) - - - // Always test the cmd itself first. isexe will check to make sure - // it's found in the pathExt set. - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } - - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) - pathEnv = [''] - - return { - env: pathEnv, - ext: pathExt, - extExe: pathExtExe - } -} - -function which (cmd, opt, cb) { - if (typeof opt === 'function') { - cb = opt - opt = {} - } - - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] - - ;(function F (i, l) { - if (i === l) { - if (opt.all && found.length) - return cb(null, found) - else - return cb(getNotFoundError(cmd)) - } - - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) - - var p = path.join(pathPart, cmd) - if (!pathPart && (/^\.[\\\/]/).test(cmd)) { - p = cmd.slice(0, 2) + p - } - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { - if (!er && is) { - if (opt.all) - found.push(p + ext) - else - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} - -function whichSync (cmd, opt) { - opt = opt || {} - - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] - - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) - - var p = path.join(pathPart, cmd) - if (!pathPart && /^\.[\\\/]/.test(cmd)) { - p = cmd.slice(0, 2) + p - } - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var is - try { - is = isexe.sync(cur, { pathExt: pathExtExe }) - if (is) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} - } - } - - if (opt.all && found.length) - return found - - if (opt.nothrow) - return null - - throw getNotFoundError(cmd) -} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..389acfe --- /dev/null +++ b/package-lock.json @@ -0,0 +1,997 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", + "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + } + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, + "changelogplease": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.2.0.tgz", + "integrity": "sha1-1o0CqlS6oZAzJRLUfx1bR+cSNQ4=", + "requires": { + "git-tools": "0.1.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz", + "integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-config-jquery": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-jquery/-/eslint-config-jquery-3.0.0.tgz", + "integrity": "sha512-VDdRAIlNq1EM5P7J4JGQSCnZEIvIlNGGTUTCPT2wQNZ2GT69rsAwSIqZVcoiyZbwY7TaaMwLOxwSjqm+DEUjbA==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "git-tools": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/git-tools/-/git-tools-0.1.0.tgz", + "integrity": "sha1-QnCaq85mfofueJ+BZ9vgGR25oQs=" + }, + "github-request": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/github-request/-/github-request-1.2.4.tgz", + "integrity": "sha1-SPZN26rSH9gF+12X9aVUh0R7+0k=" + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "table": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "dev": true, + "requires": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ajv": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.1.tgz", + "integrity": "sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/package.json b/package.json index 32cce55..45ea871 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { "dependencies": { - "chalk": "2.4.2", + "chalk": "4.1.0", "changelogplease": "1.2.0", - "enquirer": "2.3.4", + "enquirer": "2.3.6", "github-request": "1.2.4", - "semver": "6.3.0", - "shelljs": "0.2.6", - "which": "1.3.1" + "semver": "7.3.4", + "shelljs": "0.8.4", + "which": "2.0.2" }, "devDependencies": { - "eslint": "6.5.1", - "eslint-config-jquery": "2.0.0" + "eslint": "7.21.0", + "eslint-config-jquery": "3.0.0" }, "scripts": { "test": "eslint .", From a62ff7a341f77afaf2c06e19b7f7e5bc079a9221 Mon Sep 17 00:00:00 2001 From: Timmy Willison <4timmywil@gmail.com> Date: Mon, 1 Mar 2021 18:10:36 -0500 Subject: [PATCH 72/83] Build: fix scripts for new shelljs - Also refactored a few things to help testing mid-release --- lib/bootstrap.js | 7 +++---- lib/npm.js | 4 ++-- lib/repo.js | 13 ++++++++----- lib/util.js | 2 +- release.js | 4 ++-- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/lib/bootstrap.js b/lib/bootstrap.js index ccee740..0952537 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -63,6 +63,9 @@ Release.define( { } else { console.log( "This is a real release. GitHub and npm will be updated." ); } + + Release.dir = { base: process.cwd() + "/__release" }; + Release.dir.repo = Release.dir.base + "/repo"; }, _parseRemote: function() { @@ -87,10 +90,6 @@ Release.define( { }, _createReleaseDirectory: function() { - console.log( "Determining directories..." ); - Release.dir = { base: process.cwd() + "/__release" }; - Release.dir.repo = Release.dir.base + "/repo"; - if ( fs.existsSync( Release.dir.base ) ) { console.log( "The directory '" + Release.dir.base + "' already exists." ); console.log( "Aborting." ); diff --git a/lib/npm.js b/lib/npm.js index 3cf8667..51d1e6b 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -22,7 +22,7 @@ module.exports = function( Release ) { if ( result.code !== 0 ) { // The npm package may not exist yet - if ( result.output.split( "\n" ).some( + if ( result.stdout.split( /\r?\n/ ).some( function( line ) { return ( /ERR! 404/ ).test( line ); } ) @@ -33,7 +33,7 @@ module.exports = function( Release ) { Release.abort( "Error getting npm owners." ); } - return result.output.trim().split( "\n" ).map( function( owner ) { + return result.stdout.trim().split( /\r?\n/ ).map( function( owner ) { return owner.split( " " )[ 0 ]; } ); }, diff --git a/lib/repo.js b/lib/repo.js index b310db9..0c4a7f6 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -7,8 +7,9 @@ module.exports = function( Release ) { Release.define( { _jsonFiles: [ "package.json", "package-lock.json", "bower.json" ], + _cloneRepo: function() { - var projectRelease, releaseDependencies; + var releaseDependencies, projectRelease; Release.chdir( Release.dir.base ); console.log( "Cloning " + chalk.cyan( Release.remote ) + "..." ); @@ -25,7 +26,6 @@ Release.define( { console.log(); projectRelease = require( Release.dir.repo + "/build/release" ); - if ( projectRelease.dependencies ) { console.log( "Installing release dependencies..." ); releaseDependencies = projectRelease.dependencies.join( " " ); @@ -33,8 +33,11 @@ Release.define( { "Error installing release dependencies." ); console.log(); } + }, + _loadReleaseScript: function() { console.log( "Loading project-specific release script..." ); + var projectRelease = require( Release.dir.repo + "/build/release" ); projectRelease( Release ); console.log(); }, @@ -62,18 +65,18 @@ Release.define( { _checkAuthorsTxt: function() { console.log( "Checking AUTHORS.txt..." ); + Release.chdir( Release.dir.repo ); var result, lastActualAuthor, lastListedAuthor = fs.readFileSync( "AUTHORS.txt", "utf8" ) .trim() .split( /\r?\n/ ) .pop(); - Release.chdir( Release.dir.repo ); result = Release.exec( { - command: "grunt authors", + command: "npx grunt authors", silent: true }, "Error getting list of authors." ); - lastActualAuthor = result.split( /\r?\n/ ).splice( -4, 1 )[ 0 ]; + lastActualAuthor = result.split( /\r?\n/ ).splice( -3, 1 )[ 0 ]; if ( lastListedAuthor !== lastActualAuthor ) { console.log( "Last listed author is " + chalk.red( lastListedAuthor ) + "." ); diff --git a/lib/util.js b/lib/util.js index 10695c6..1131530 100644 --- a/lib/util.js +++ b/lib/util.js @@ -26,7 +26,7 @@ Release.define( { Release.abort( errorMessage ); } - return result.output; + return result.stdout.trim(); }, chdir: function( directory ) { diff --git a/release.js b/release.js index 93da9cf..c6f4691 100644 --- a/release.js +++ b/release.js @@ -34,10 +34,10 @@ commonTasks = [ Release._parseArguments, Release.confirm, - Release._createReleaseDirectory, - Release._section( "setting up repo" ), + Release._createReleaseDirectory, Release._cloneRepo, + Release._loadReleaseScript, Release._checkRepoState, Release._checkNpmCredentials, From 78950c513143706b5b1730abc3d64ed8dee57603 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Jun 2021 23:21:55 +0200 Subject: [PATCH 73/83] Bump glob-parent from 5.1.1 to 5.1.2 Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2. - [Release notes](https://github.com/gulpjs/glob-parent/releases) - [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md) - [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2) --- updated-dependencies: - dependency-name: glob-parent dependency-type: indirect ... Closes gh-108 Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 389acfe..0d8a195 100644 --- a/package-lock.json +++ b/package-lock.json @@ -505,9 +505,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" From 63a6b0f54457c6e23a617fddd16a599a69b8b433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Thu, 5 Aug 2021 14:41:22 +0200 Subject: [PATCH 74/83] Docs: Specify a manual `npm install` is needed --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 05ce969..f29d820 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Creating a release is as simple as cloning this repository and telling the scrip ```sh git clone git@github.com:jquery/jquery-release.git cd jquery-release +npm install node release.js --remote=jquery/ ``` From 603935035e8ce401530a27d4271efb0008e75f4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:10:02 +0200 Subject: [PATCH 75/83] Bump path-parse from 1.0.6 to 1.0.7 Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) Closes gh-109 --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d8a195..61f89e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -725,9 +725,9 @@ "dev": true }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "prelude-ls": { "version": "1.2.1", From 9fae5759a21fb26640430d30a78959dd2fc96cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Fri, 31 Dec 2021 01:08:53 +0100 Subject: [PATCH 76/83] Build: Switch CI to GitHub Actions Closes gh-110. --- .github/workflows/node.js.yml | 35 +++++++++++++++++++++++++++++++++++ .travis.yml | 3 --- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/node.js.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..fe06fad --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,35 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + NODE_VERSION: [16.x] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock- + + - name: Use Node.js ${{ matrix.NODE_VERSION }} + uses: actions/setup-node@v2.1.2 + with: + node-version: ${{ matrix.NODE_VERSION }} + + - name: Install dependencies + run: | + npm install + + - name: Run tests + run: | + npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cdcdfc9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "12" From 1c4fc0ae54998db0a3b3ce2f17a1c3808f07f1c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Jan 2022 10:06:37 +0100 Subject: [PATCH 77/83] Bump shelljs from 0.8.4 to 0.8.5 (#111) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 28 +++++++++++++++++----------- package.json | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61f89e5..6ab01df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -577,9 +577,9 @@ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" }, "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "requires": { "has": "^1.0.3" } @@ -768,12 +768,13 @@ "dev": true }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz", + "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==", "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-from": { @@ -815,9 +816,9 @@ "dev": true }, "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "requires": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -901,6 +902,11 @@ "has-flag": "^4.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, "table": { "version": "6.0.7", "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", diff --git a/package.json b/package.json index 45ea871..6abbed9 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "enquirer": "2.3.6", "github-request": "1.2.4", "semver": "7.3.4", - "shelljs": "0.8.4", + "shelljs": "0.8.5", "which": "2.0.2" }, "devDependencies": { From a704c4990a7f6d92645d90da86643d7e7080d42a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Jan 2022 10:09:38 +0100 Subject: [PATCH 78/83] Bump ansi-regex from 5.0.0 to 5.0.1 (#112) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6ab01df..3af3b82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -103,9 +103,9 @@ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { From a5f9f6cfbd1821c869af740aa1a6d899a06b8d80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 01:25:32 +0100 Subject: [PATCH 79/83] Bump minimatch from 3.0.4 to 3.1.2 Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2) Closes gh-113 --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3af3b82..b928d2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -663,9 +663,9 @@ } }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } From f45eaf8e91c525953d81cf421044a9bf69e028bb Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 7 Mar 2023 16:36:43 -0500 Subject: [PATCH 80/83] Build: update dependencies --- package-lock.json | 1449 +++++++++++++++++++++++++++------------------ package.json | 8 +- 2 files changed, 879 insertions(+), 578 deletions(-) diff --git a/package-lock.json b/package-lock.json index b928d2f..1ff88b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,1003 +1,1304 @@ { + "name": "jquery-release", + "lockfileVersion": 3, "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" + "packages": { + "": { + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "changelogplease": "1.2.0", + "enquirer": "2.3.6", + "github-request": "1.2.4", + "semver": "7.3.8", + "shelljs": "0.8.5", + "which": "3.0.0" + }, + "devDependencies": { + "eslint": "8.35.0", + "eslint-config-jquery": "3.0.0" } }, - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true + "node_modules/@eslint/eslintrc": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", + "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } }, - "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "node_modules/@eslint/js": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", + "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "@eslint/eslintrc": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, - "requires": { - "ajv": "^6.12.4", + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" } }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, - "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, - "ajv": { + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "requires": { + "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "engines": { + "node": ">=6" + } }, - "ansi-regex": { + "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "requires": { - "color-convert": "^1.9.0" + "engines": { + "node": ">=8" } }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "brace-expansion": { + "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "callsites": { + "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - } + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "changelogplease": { + "node_modules/changelogplease": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.2.0.tgz", - "integrity": "sha1-1o0CqlS6oZAzJRLUfx1bR+cSNQ4=", - "requires": { + "integrity": "sha512-ecIEvrRlWvtXypAS0GGTCj38n1CtYqrtfOoBGwuJeer92S0jof0YFVtbhCOpDLXgwcdrO4NIdlvFYKBBLxk7+A==", + "dependencies": { "git-tools": "0.1.0" } }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "concat-map": { + "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, - "cross-spawn": { + "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "requires": { + "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" } }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "requires": { + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "doctrine": { + "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "requires": { + "dependencies": { "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "enquirer": { + "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "requires": { + "dependencies": { "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" } }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "eslint": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz", - "integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==", + "node_modules/eslint": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", + "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", "dev": true, - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.0", + "dependencies": { + "@eslint/eslintrc": "^2.0.0", + "@eslint/js": "8.35.0", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.20", - "minimatch": "^3.0.4", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.4", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "eslint-config-jquery": { + "node_modules/eslint-config-jquery": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/eslint-config-jquery/-/eslint-config-jquery-3.0.0.tgz", "integrity": "sha512-VDdRAIlNq1EM5P7J4JGQSCnZEIvIlNGGTUTCPT2wQNZ2GT69rsAwSIqZVcoiyZbwY7TaaMwLOxwSjqm+DEUjbA==", "dev": true }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, - "requires": { + "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" } }, - "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "dev": true + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "node_modules/espree": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, - "requires": { + "dependencies": { "estraverse": "^5.1.0" }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } + "engines": { + "node": ">=0.10" } }, - "esrecurse": { + "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "requires": { + "dependencies": { "estraverse": "^5.2.0" }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } + "engines": { + "node": ">=4.0" } }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } }, - "esutils": { + "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "fast-deep-equal": { + "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "fast-json-stable-stringify": { + "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, - "fast-levenshtein": { + "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, - "file-entry-cache": { + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, - "requires": { + "dependencies": { "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" } }, - "flat-cache": { + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, - "requires": { + "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" } }, - "flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, - "fs.realpath": { + "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, - "function-bind": { + "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "git-tools": { + "node_modules/git-tools": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/git-tools/-/git-tools-0.1.0.tgz", - "integrity": "sha1-QnCaq85mfofueJ+BZ9vgGR25oQs=" + "integrity": "sha512-D4VlAJBzuULqt+XL7oxldyQ/V30qCxKfYRAwyh/XwGpXjWXVAV1kgaBnjUA67KifmJ6kSIXu2GRbgfDuxihSYQ==" }, - "github-request": { + "node_modules/github-request": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/github-request/-/github-request-1.2.4.tgz", - "integrity": "sha1-SPZN26rSH9gF+12X9aVUh0R7+0k=" + "integrity": "sha512-v1FYu2xcme9J46ULM9pSbr2Uyz8YLuSMQ50sKdoQx9Y0QUTIBbUHG6/hcB2qwcBChUjs/R1A527BJ6raMlOHmQ==" }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "requires": { - "is-glob": "^4.0.1" + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" } }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, - "requires": { - "type-fest": "^0.8.1" + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "has": { + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, + "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { + "dependencies": { "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" } }, - "has-flag": { + "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } }, - "import-fresh": { + "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "requires": { + "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "imurmurhash": { + "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } }, - "inflight": { + "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "interpret": { + "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } }, - "is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "requires": { + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dependencies": { "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-extglob": { + "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "requires": { + "dependencies": { "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" } }, - "isexe": { + "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "node_modules/js-sdsl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "json-schema-traverse": { + "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "json-stable-stringify-without-jsonify": { + "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "levn": { + "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "requires": { + "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "lru-cache": { + "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { + "dependencies": { "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "minimatch": { + "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { + "dependencies": { "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "ms": { + "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "natural-compare": { + "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { "wrappy": "1" } }, - "optionator": { + "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, - "requires": { + "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "parent-module": { + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "requires": { + "dependencies": { "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" } }, - "path-is-absolute": { + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } }, - "path-key": { + "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "path-parse": { + "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, - "prelude-ls": { + "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.8.0" + } }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "rechoir": { + "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "requires": { + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dependencies": { "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" } }, - "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } }, - "resolve": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz", - "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==", - "requires": { - "is-core-module": "^2.8.0", + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dependencies": { + "is-core-module": "^2.9.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "resolve-from": { + "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } }, - "rimraf": { + "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "requires": { + "dependencies": { "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "requires": { + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "shebang-command": { + "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "requires": { + "dependencies": { "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "shebang-regex": { + "node_modules/shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "shelljs": { + "node_modules/shelljs": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "requires": { + "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" } }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "requires": { - "ansi-regex": "^5.0.0" + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "strip-json-comments": { + "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "supports-color": { + "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { + "dependencies": { "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "supports-preserve-symlinks-flag": { + "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" - }, - "table": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", - "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", - "dev": true, - "requires": { - "ajv": "^7.0.2", - "lodash": "^4.17.20", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" - }, - "dependencies": { - "ajv": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.1.tgz", - "integrity": "sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "text-table": { + "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "type-check": { + "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "requires": { + "dependencies": { "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" } }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "uri-js": { + "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "requires": { + "dependencies": { "punycode": "^2.1.0" } }, - "v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { + "node_modules/which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "word-wrap": { + "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "yallist": { + "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 6abbed9..43211a2 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { "dependencies": { - "chalk": "4.1.0", + "chalk": "4.1.2", "changelogplease": "1.2.0", "enquirer": "2.3.6", "github-request": "1.2.4", - "semver": "7.3.4", + "semver": "7.3.8", "shelljs": "0.8.5", - "which": "2.0.2" + "which": "3.0.0" }, "devDependencies": { - "eslint": "7.21.0", + "eslint": "8.35.0", "eslint-config-jquery": "3.0.0" }, "scripts": { From 47b0bffd83d0a4ce947180f793f36dea2f633a1d Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 7 Mar 2023 16:36:54 -0500 Subject: [PATCH 81/83] Build: add __release to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 02ebf08..2c74a18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules test-*.sh +__release From f8b3bfd1af5728210f1901766b53565cc14d6c89 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Thu, 11 May 2023 14:34:01 -0400 Subject: [PATCH 82/83] Release: move tag push below cdn clone - I hit a windows failure on the clone. This makes it so nothing is pushed until both the main repo and the cdn repo have at least been cloned. Then push both. --- release.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release.js b/release.js index c6f4691..89bd0d2 100644 --- a/release.js +++ b/release.js @@ -54,10 +54,6 @@ commonTasks = [ Release._section( "gathering contributors" ), Release._gatherContributors, - Release._section( "pushing tag" ), - Release.confirmReview, - Release._pushRelease, - function( fn ) { if ( Release.cdnPublish ) { Release._section( "publishing to jQuery CDN" )(); @@ -71,6 +67,10 @@ commonTasks = [ } }, + Release._section( "pushing tag" ), + Release.confirmReview, + Release._pushRelease, + function( fn ) { if ( Release.dist ) { Release._section( "additional custom distribution" ); From 3cf48c5ee2d63ea122304012f7dfc2bcd9662d1a Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 18 Feb 2025 15:13:14 -0500 Subject: [PATCH 83/83] Docs: add archived note to README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f29d820..0694542 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # jQuery Project Release Automation -This script automates releases for all jQuery projects. It is designed to create consistency between projects and reduce the burden of maintaining individual release scripts. +> [!IMPORTANT] +> This script is no longer used. It has been archived for historical purposes. ## Creating a Release