diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b512c09..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/db/knex.js b/db/knex.js new file mode 100644 index 0000000..fcf149a --- /dev/null +++ b/db/knex.js @@ -0,0 +1,3 @@ +var environment = process.env.NODE_ENV || 'development'; +var config = require('..knexfile.js')[enviroment]; +module.exports = require('knex')(config); \ No newline at end of file diff --git a/db/migrations/20200215115622_Descriptions.js b/db/migrations/20200215115622_Descriptions.js new file mode 100644 index 0000000..2d29046 --- /dev/null +++ b/db/migrations/20200215115622_Descriptions.js @@ -0,0 +1,25 @@ + +exports.up = async function(knex, Promise) { + await knex.schema.createTable("productDescription", table => { + table + .increments("id") + .unsigned() + .primary(); + table + .string("Title") + .unique() + .notNullable(); + table + .string("Description") + .notNullable(); + table + .integer("Price") + .unique() + .notNullable(); + }) + +}; + +exports.down = async function(knex, Promise) { + await knex.schema.dropTable("productDescription"); +}; diff --git a/docker.aws.json b/docker.aws.json deleted file mode 100644 index 71013f7..0000000 --- a/docker.aws.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "AWSEBDockerrunVersion": "1", - "Image": { - "Name": "royolivarez/royproxyserver" - }, - "Ports": [ - { - "ContainerPort": "8005" - } - ] -} \ No newline at end of file diff --git a/dockerfile b/dockerfile deleted file mode 100644 index 138fe9e..0000000 --- a/dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# Use an official Node runtime as a parent image -FROM node:12.7.0-alpine - -# Set the working directory to /app -WORKDIR '/app' - -# Copy package.json to the working directory -COPY package.json . - -# Install any needed packages specified in package.json -RUN npm install - -# Copying the rest of the code to the working directory -COPY . . - -# Make port 8005 available to the world outside this container -EXPOSE 8005 - -# Run index.js when the container launches -CMD ["node", "server.js"] \ No newline at end of file diff --git a/index.html b/index.html deleted file mode 100644 index 9660b34..0000000 --- a/index.html +++ /dev/null @@ -1,128 +0,0 @@ - - -
-| method | +description | +returns | +
|---|---|---|
| var promise = await(item1, item2, ... itemN) |
+ Returns a promise, pending the fulfillment of the given set of things. The new keyword is not needed. Accepts one or more args which can be strings or other promises, which allows grouping. Order of arguments is unimportant. |
+ promise | +
| promise.run(callback[, context]) | +Runs callback immediately (synchronously), which contains whatever promise fulfillment logic you want. callback is passed a reference to the promise. If defined and not null, context will be this in callback. Exceptions thrown by callback automatically fail the promise. |
+ itself | +
| promise.onkeep(callback[, context]) | +Calls callback when every item of the promise is fulfilled. If the promise is already fulfilled, callback runs immediately. callback is passed a map of all the things in the promise, keyed by the strings passed to await(). If defined and not null, context will be this in callback. |
+ itself | +
| promise.onfail(callback[, context]) | +Calls callback when promise fails. If promise already failed, callback runs immediately. callback is passed the error object representing the reason for the failure, which was passed to fail() method triggering the failure. If defined and not null, context will be this in callback. |
+ itself | +
| promise.onresolve(callback[, context]) | +Calls callback when promise either keeps or fails. If promise has already been kept or failed, callback runs immediately. If defined and not null, context will be this in callback. |
+ itself | +
| promise.onprogress(callback[, context]) | +Calls callback whenever there is progress to report. callback is only called while promise is unresolved. callback may be called any number of times, or never called at all. If promise has already been kept or failed, callback is ignored and discarded. callback is passed an object keyed by names and valued by numbers between 0.0 and 1.0. If defined and not null, context will be this in callback. |
+ itself | +
| promise.then(onkeep, onfail, onprogress) | +Conforms to the signature and behavioral conventions outlined in the Promises/A+ spec. | +A new await.js promise | +
| promise.catch(onfail) | +Convenience method that behaves equivalent to promise.then(null, onfail). |
+ A new await.js promise | +
| promise.keep(item[, data]) | +Fulfills one of the things of this promise. data is optional and if not defined, defaults to null. |
+ itself | +
| promise.fail(reason) | +Fail the promise for the given reason. The first argument should be an error object. |
+ itself | +
| promise.progress(name, amount) | +Notify any progress listeners of progress on item name. amount is a fractional value between 0.0 and 1.0. Lower values will be converted to 0.0, higher ones converted to 1.0. |
+ itself | +
| promise.take(otherPromise[, map]) | +Set up a dependency chain so that promise depends on otherPromise. map is optional and provides custom mapping from otherPromise to promise. The dependency is such that if otherPromise fails, promise fails. |
+ itself | +
| promise.things() | +Retrieve a list of things this promise is awaiting. | +array | +
| promise.map(mapping) | +Get a copy of this promise. mapping updates the names of the things in the new promise, which is useful for avoiding naming conflicts during grouping. The copy is automatically chained to the original. |
+ different promise | +
| promise.nodify(item1, item2, ... itemN) | +This method is intended for use with node.js's error-first callback signature. It returns a function that can be used as a callback in a node.js async call. If an error is passed to the callback, it fails the promise. Otherwise, success params are matched to each named item, in the order provided. | +function | +
| promise.nodify(callback[, context]) | +This method is intended for use with node.js's error-first callback signature. It returns a function that can be used as a callback in a node.js async call. If an error is passed to the callback, it fails the promise. Otherwise, the callback is executed with the given context, if provided. | +function | +
+
+
+
+
+
+
+
+[](https://travis-ci.org/petkaantonov/bluebird)
+[](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
+
+**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises)
+
+# Introduction
+
+Bluebird is a fully featured promise library with focus on innovative features and performance
+
+See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html) for further documentation, references and instructions. See the [**API reference**](http://bluebirdjs.com/docs/api-reference.html) here.
+
+For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x).
+
+### Note
+
+Promises in Node.js 10 are significantly faster than before. Bluebird still includes a lot of features like cancellation, iteration methods and warnings that native promises don't. If you are using Bluebird for performance rather than for those - please consider giving native promises a shot and running the benchmarks yourself.
+
+# Questions and issues
+
+The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
+
+
+
+## Thanks
+
+Thanks to BrowserStack for providing us with a free account which lets us support old browsers like IE8.
+
+# License
+
+The MIT License (MIT)
+
+Copyright (c) 2013-2019 Petka Antonov
+
+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/bluebird/changelog.md b/node_modules/bluebird/changelog.md
new file mode 100644
index 0000000..73b2eb6
--- /dev/null
+++ b/node_modules/bluebird/changelog.md
@@ -0,0 +1 @@
+[http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html)
diff --git a/node_modules/bluebird/js/browser/bluebird.core.js b/node_modules/bluebird/js/browser/bluebird.core.js
new file mode 100644
index 0000000..24a8bf2
--- /dev/null
+++ b/node_modules/bluebird/js/browser/bluebird.core.js
@@ -0,0 +1,3914 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2018 Petka Antonov
+ *
+ * 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.
+ *
+ */
+/**
+ * bluebird build version 3.7.2
+ * Features enabled: core
+ * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
+*/
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;ostyle(string)
+
+Returns a string wrapped in the corresponding ANSI escape code.
+
+```js
+red("Red Alert") //=> \u001b[31mRed Alert\u001b[39m
+```
+
+### `options.enabled`
+
+Colorette is enabled if your terminal supports color, `FORCE_COLOR=1` or if `NO_COLOR` isn't in the environment, but you can always override it when you need to.
+
+```js
+const { options } = require("colorette")
+
+options.enabled = false
+```
+
+## Run the benchmarks
+
+```
+npm i -C bench && node bench
+```
+
++# Using Styles +chalk × 14,468 ops/sec +colorette × 901,148 ops/sec + +# Combining Styles +chalk × 44,067 ops/sec +colorette × 2,566,778 ops/sec + +# Nesting Styles +chalk × 40,165 ops/sec +colorette × 506,494 ops/sec ++ +## License + +[MIT](LICENSE.md) diff --git a/node_modules/colorette/colorette.d.ts b/node_modules/colorette/colorette.d.ts new file mode 100644 index 0000000..53082ee --- /dev/null +++ b/node_modules/colorette/colorette.d.ts @@ -0,0 +1,48 @@ +interface Style { + (string: string): string +} + +export const options: { + enabled: boolean +} +export const reset: Style +export const bold: Style +export const dim: Style +export const italic: Style +export const underline: Style +export const inverse: Style +export const hidden: Style +export const strikethrough: Style +export const black: Style +export const red: Style +export const green: Style +export const yellow: Style +export const blue: Style +export const magenta: Style +export const cyan: Style +export const white: Style +export const gray: Style +export const bgBlack: Style +export const bgRed: Style +export const bgGreen: Style +export const bgYellow: Style +export const bgBlue: Style +export const bgMagenta: Style +export const bgCyan: Style +export const bgWhite: Style +export const blackBright: Style +export const redBright: Style +export const greenBright: Style +export const yellowBright: Style +export const blueBright: Style +export const magentaBright: Style +export const cyanBright: Style +export const whiteBright: Style +export const bgBlackBright: Style +export const bgRedBright: Style +export const bgGreenBright: Style +export const bgYellowBright: Style +export const bgBlueBright: Style +export const bgMagentaBright: Style +export const bgCyanBright: Style +export const bgWhiteBright: Style diff --git a/node_modules/colorette/index.js b/node_modules/colorette/index.js new file mode 100644 index 0000000..11546c9 --- /dev/null +++ b/node_modules/colorette/index.js @@ -0,0 +1,76 @@ +"use strict" + +let enabled = + !("NO_COLOR" in process.env) && + process.env.FORCE_COLOR !== "0" && + (process.platform === "win32" || + (process.stdout != null && + process.stdout.isTTY && + process.env.TERM && + process.env.TERM !== "dumb")) + +const rawInit = (open, close, searchRegex, replaceValue) => s => + enabled + ? open + + (~(s += "").indexOf(close, 4) // skip opening \x1b[ + ? s.replace(searchRegex, replaceValue) + : s) + + close + : s + +const init = (open, close) => { + return rawInit( + `\x1b[${open}m`, + `\x1b[${close}m`, + new RegExp(`\\x1b\\[${close}m`, "g"), + `\x1b[${open}m` + ) +} + +module.exports = { + options: Object.defineProperty({}, "enabled", { + get: () => enabled, + set: value => (enabled = value) + }), + reset: init(0, 0), + bold: rawInit("\x1b[1m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[1m"), + dim: rawInit("\x1b[2m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[2m"), + italic: init(3, 23), + underline: init(4, 24), + inverse: init(7, 27), + hidden: init(8, 28), + strikethrough: init(9, 29), + black: init(30, 39), + red: init(31, 39), + green: init(32, 39), + yellow: init(33, 39), + blue: init(34, 39), + magenta: init(35, 39), + cyan: init(36, 39), + white: init(37, 39), + gray: init(90, 39), + bgBlack: init(40, 49), + bgRed: init(41, 49), + bgGreen: init(42, 49), + bgYellow: init(43, 49), + bgBlue: init(44, 49), + bgMagenta: init(45, 49), + bgCyan: init(46, 49), + bgWhite: init(47, 49), + blackBright: init(90, 39), + redBright: init(91, 39), + greenBright: init(92, 39), + yellowBright: init(93, 39), + blueBright: init(94, 39), + magentaBright: init(95, 39), + cyanBright: init(96, 39), + whiteBright: init(97, 39), + bgBlackBright: init(100, 49), + bgRedBright: init(101, 49), + bgGreenBright: init(102, 49), + bgYellowBright: init(103, 49), + bgBlueBright: init(104, 49), + bgMagentaBright: init(105, 49), + bgCyanBright: init(106, 49), + bgWhiteBright: init(107, 49) +} diff --git a/node_modules/colorette/package.json b/node_modules/colorette/package.json new file mode 100644 index 0000000..39cde08 --- /dev/null +++ b/node_modules/colorette/package.json @@ -0,0 +1,63 @@ +{ + "_from": "colorette@1.1.0", + "_id": "colorette@1.1.0", + "_inBundle": false, + "_integrity": "sha512-6S062WDQUXi6hOfkO/sBPVwE5ASXY4G2+b4atvhJfSsuUUhIaUKlkjLe9692Ipyt5/a+IPF5aVTu3V5gvXq5cg==", + "_location": "/colorette", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "colorette@1.1.0", + "name": "colorette", + "escapedName": "colorette", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/knex" + ], + "_resolved": "https://registry.npmjs.org/colorette/-/colorette-1.1.0.tgz", + "_shasum": "1f943e5a357fac10b4e0f5aaef3b14cdc1af6ec7", + "_spec": "colorette@1.1.0", + "_where": "/Users/royolivarez/Desktop/SDC-PostgresDB/node_modules/knex", + "author": { + "name": "Jorge Bucaran" + }, + "bugs": { + "url": "https://github.com/jorgebucaran/colorette/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Color your terminal using pure idiomatic JavaScript.", + "devDependencies": { + "nyc": "14.1.1", + "testmatrix": "0.1.2" + }, + "files": [ + "index.js", + "colorette.d.ts" + ], + "homepage": "https://github.com/jorgebucaran/colorette", + "keywords": [ + "colorette", + "terminal", + "styles", + "color", + "ansi" + ], + "license": "MIT", + "main": "index.js", + "name": "colorette", + "repository": { + "type": "git", + "url": "git+https://github.com/jorgebucaran/colorette.git" + }, + "scripts": { + "release": "v=$npm_package_version; git commit -am $v && git tag -s $v -m $v && git push && git push --tags && npm publish", + "test": "nyc -r lcov testmatrix test/index.js" + }, + "types": "colorette.d.ts", + "version": "1.1.0" +} diff --git a/node_modules/commander/CHANGELOG.md b/node_modules/commander/CHANGELOG.md new file mode 100644 index 0000000..f00cb2b --- /dev/null +++ b/node_modules/commander/CHANGELOG.md @@ -0,0 +1,436 @@ +# Changelog + +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). (Format adopted after v3.0.0.) + + + +## [4.1.1] (2020-02-02) + +### Fixed + +* TypeScript definition for `.action()` should include Promise for async ([#1157]) + +## [4.1.0] (2020-01-06) + +### Added + +* two routines to change how option values are handled, and eliminate name clashes with command properties ([#933] [#1102]) + * see storeOptionsAsProperties and passCommandToAction in README +* `.parseAsync` to use instead of `.parse` if supply async action handlers ([#806] [#1118]) + +### Fixed + +* Remove trailing blanks from wrapped help text ([#1096]) + +### Changed + +* update dependencies +* extend security coverage for Commander 2.x to 2020-02-03 +* improvements to README +* improvements to TypeScript definition documentation +* move old versions out of main CHANGELOG +* removed explicit use of `ts-node` in tests + +## [4.0.1] (2019-11-12) + +### Fixed + +* display help when requested, even if there are missing required options ([#1091]) + +## [4.0.0] (2019-11-02) + +### Added + +* automatically wrap and indent help descriptions for options and commands ([#1051]) +* `.exitOverride()` allows override of calls to `process.exit` for additional error handling and to keep program running ([#1040]) +* support for declaring required options with `.requiredOptions()` ([#1071]) +* GitHub Actions support ([#1027]) +* translation links in README + +### Changed + +* dev: switch tests from Sinon+Should to Jest with major rewrite of tests ([#1035]) +* call default subcommand even when there are unknown options ([#1047]) +* *Breaking* Commander is only officially supported on Node 8 and above, and requires Node 6 ([#1053]) + +### Fixed + +* *Breaking* keep command object out of program.args when action handler called ([#1048]) + * also, action handler now passed array of unknown arguments +* complain about unknown options when program argument supplied and action handler ([#1049]) + * this changes parameters to `command:*` event to include unknown arguments +* removed deprecated `customFds` option from call to `child_process.spawn` ([#1052]) +* rework TypeScript declarations to bring all types into imported namespace ([#1081]) + +### Migration Tips + +#### Testing for no arguments + +If you were previously using code like: + +```js +if (!program.args.length) ... +``` + +a partial replacement is: + +```js +if (program.rawArgs.length < 3) ... +``` + +## [4.0.0-1] Prerelease (2019-10-08) + +(Released in 4.0.0) + +## [4.0.0-0] Prerelease (2019-10-01) + +(Released in 4.0.0) + +## [2.20.1] (2019-09-29) + +### Fixed + +* Improve tracking of executable subcommands. + +### Changed + +* update development dependencies + +## [3.0.2] (2019-09-27) + +### Fixed + +* Improve tracking of executable subcommands. + +### Changed + +* update development dependencies + +## [3.0.1] (2019-08-30) + +### Added + +* .name and .usage to README ([#1010]) +* Table of Contents to README ([#1010]) +* TypeScript definition for `executableFile` in CommandOptions ([#1028]) + +### Changed + +* consistently use `const` rather than `var` in README ([#1026]) + +### Fixed + +* help for sub commands with custom executableFile ([#1018]) + +## [3.0.0] / 2019-08-08 + +* Add option to specify executable file name ([#999]) + * e.g. `.command('clone', 'clone description', { executableFile: 'myClone' })` +* Change docs for `.command` to contrast action handler vs git-style executable. ([#938] [#990]) +* **Breaking** Change TypeScript to use overloaded function for `.command`. ([#938] [#990]) +* Change to use straight quotes around strings in error messages (like 'this' instead of `this') ([#915]) +* Add TypeScript "reference types" for node ([#974]) +* Add support for hyphen as an option argument in subcommands ([#697]) +* Add support for a short option flag and its value to be concatenated for action handler subcommands ([#599]) + * e.g. `-p 80` can also be supplied as `-p80` +* Add executable arguments to spawn in win32, for git-style executables ([#611]) + * e.g. `node --harmony myCommand.js clone` +* Add parent command as prefix of subcommand in help ([#980]) +* Add optional custom description to `.version` ([#963]) + * e.g. `program.version('0.0.1', '-v, --vers', 'output the current version')` +* Add `.helpOption(flags, description)` routine to customise help flags and description ([#963]) + * e.g. `.helpOption('-e, --HELP', 'read more information')` +* Fix behavior of --no-* options ([#795]) + * can now define both `--foo` and `--no-foo` + * **Breaking** custom event listeners: `--no-foo` on cli now emits `option:no-foo` (previously `option:foo`) + * **Breaking** default value: defining `--no-foo` after defining `--foo` leaves the default value unchanged (previously set it to false) + * allow boolean default value, such as from environment ([#987]) +* Increment inspector port for spawned subcommands ([#991]) + * e.g. `node --inspect myCommand.js clone` + +### Migration Tips + +The custom event for a negated option like `--no-foo` is `option:no-foo` (previously `option:foo`). + +```js +program + .option('--no-foo') + .on('option:no-foo', () => { + console.log('removing foo'); + }); +``` + +When using TypeScript, adding a command does not allow an explicit `undefined` for an unwanted executable description (e.g +for a command with an action handler). + +```js +program + .command('action1', undefined, { noHelp: true }) // No longer valid + .command('action2', { noHelp: true }) // Correct +``` + +## 3.0.0-0 Prerelease / 2019-07-28 + +(Released as 3.0.0) + +## 2.20.0 / 2019-04-02 + +* fix: resolve symbolic links completely when hunting for subcommands (#935) +* Update index.d.ts (#930) +* Update Readme.md (#924) +* Remove --save option as it isn't required anymore (#918) +* Add link to the license file (#900) +* Added example of receiving args from options (#858) +* Added missing semicolon (#882) +* Add extension to .eslintrc (#876) + +## 2.19.0 / 2018-10-02 + +* Removed newline after Options and Commands headers (#864) +* Bugfix - Error output (#862) +* Fix to change default value to string (#856) + +## 2.18.0 / 2018-09-07 + +* Standardize help output (#853) +* chmod 644 travis.yml (#851) +* add support for execute typescript subcommand via ts-node (#849) + +## 2.17.1 / 2018-08-07 + +* Fix bug in command emit (#844) + +## 2.17.0 / 2018-08-03 + +* fixed newline output after help information (#833) +* Fix to emit the action even without command (#778) +* npm update (#823) + +## 2.16.0 / 2018-06-29 + +* Remove Makefile and `test/run` (#821) +* Make 'npm test' run on Windows (#820) +* Add badge to display install size (#807) +* chore: cache node_modules (#814) +* chore: remove Node.js 4 (EOL), add Node.js 10 (#813) +* fixed typo in readme (#812) +* Fix types (#804) +* Update eslint to resolve vulnerabilities in lodash (#799) +* updated readme with custom event listeners. (#791) +* fix tests (#794) + +## 2.15.0 / 2018-03-07 + +* Update downloads badge to point to graph of downloads over time instead of duplicating link to npm +* Arguments description + +## 2.14.1 / 2018-02-07 + +* Fix typing of help function + +## 2.14.0 / 2018-02-05 + +* only register the option:version event once +* Fixes issue #727: Passing empty string for option on command is set to undefined +* enable eqeqeq rule +* resolves #754 add linter configuration to project +* resolves #560 respect custom name for version option +* document how to override the version flag +* document using options per command + +## 2.13.0 / 2018-01-09 + +* Do not print default for --no- +* remove trailing spaces in command help +* Update CI's Node.js to LTS and latest version +* typedefs: Command and Option types added to commander namespace + +## 2.12.2 / 2017-11-28 + +* fix: typings are not shipped + +## 2.12.1 / 2017-11-23 + +* Move @types/node to dev dependency + +## 2.12.0 / 2017-11-22 + +* add attributeName() method to Option objects +* Documentation updated for options with --no prefix +* typings: `outputHelp` takes a string as the first parameter +* typings: use overloads +* feat(typings): update to match js api +* Print default value in option help +* Fix translation error +* Fail when using same command and alias (#491) +* feat(typings): add help callback +* fix bug when description is add after command with options (#662) +* Format js code +* Rename History.md to CHANGELOG.md (#668) +* feat(typings): add typings to support TypeScript (#646) +* use current node + +## 2.11.0 / 2017-07-03 + +* Fix help section order and padding (#652) +* feature: support for signals to subcommands (#632) +* Fixed #37, --help should not display first (#447) +* Fix translation errors. (#570) +* Add package-lock.json +* Remove engines +* Upgrade package version +* Prefix events to prevent conflicts between commands and options (#494) +* Removing dependency on graceful-readlink +* Support setting name in #name function and make it chainable +* Add .vscode directory to .gitignore (Visual Studio Code metadata) +* Updated link to ruby commander in readme files + +## 2.10.0 / 2017-06-19 + +* Update .travis.yml. drop support for older node.js versions. +* Fix require arguments in README.md +* On SemVer you do not start from 0.0.1 +* Add missing semi colon in readme +* Add save param to npm install +* node v6 travis test +* Update Readme_zh-CN.md +* Allow literal '--' to be passed-through as an argument +* Test subcommand alias help +* link build badge to master branch +* Support the alias of Git style sub-command +* added keyword commander for better search result on npm +* Fix Sub-Subcommands +* test node.js stable +* Fixes TypeError when a command has an option called `--description` +* Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets. +* Add chinese Readme file + +## 2.9.0 / 2015-10-13 + +* Add option `isDefault` to set default subcommand #415 @Qix- +* Add callback to allow filtering or post-processing of help text #434 @djulien +* Fix `undefined` text in help information close #414 #416 @zhiyelee + +## 2.8.1 / 2015-04-22 + +* Back out `support multiline description` Close #396 #397 + +## 2.8.0 / 2015-04-07 + +* Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee +* Fix bug in Git-style sub-commands #372 @zhiyelee +* Allow commands to be hidden from help #383 @tonylukasavage +* When git-style sub-commands are in use, yet none are called, display help #382 @claylo +* Add ability to specify arguments syntax for top-level command #258 @rrthomas +* Support multiline descriptions #208 @zxqfox + +## 2.7.1 / 2015-03-11 + +* Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367. + +## 2.7.0 / 2015-03-09 + +* Fix git-style bug when installed globally. Close #335 #349 @zhiyelee +* Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage +* Add support for camelCase on `opts()`. Close #353 @nkzawa +* Add node.js 0.12 and io.js to travis.yml +* Allow RegEx options. #337 @palanik +* Fixes exit code when sub-command failing. Close #260 #332 @pirelenito +* git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee + +## 2.6.0 / 2014-12-30 + +* added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee +* Add application description to the help msg. Close #112 @dalssoft + +## 2.5.1 / 2014-12-15 + +* fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee + +## 2.5.0 / 2014-10-24 + +* add support for variadic arguments. Closes #277 @whitlockjc + +## 2.4.0 / 2014-10-17 + +* fixed a bug on executing the coercion function of subcommands option. Closes #270 +* added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage +* added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage +* fixed a bug on subcommand name. Closes #248 @jonathandelgado +* fixed function normalize doesn’t honor option terminator. Closes #216 @abbr + +## 2.3.0 / 2014-07-16 + +* add command alias'. Closes PR #210 +* fix: Typos. Closes #99 +* fix: Unused fs module. Closes #217 + +## 2.2.0 / 2014-03-29 + +* add passing of previous option value +* fix: support subcommands on windows. Closes #142 +* Now the defaultValue passed as the second argument of the coercion function. + +## 2.1.0 / 2013-11-21 + +* add: allow cflag style option params, unit test, fixes #174 + +## 2.0.0 / 2013-07-18 + +* remove input methods (.prompt, .confirm, etc) + +## Older versions + +* [1.x](./changelogs/CHANGELOG-1.md) +* [0.x](./changelogs/CHANGELOG-0.md) + +[#599]: https://github.com/tj/commander.js/issues/599 +[#611]: https://github.com/tj/commander.js/issues/611 +[#697]: https://github.com/tj/commander.js/issues/697 +[#795]: https://github.com/tj/commander.js/issues/795 +[#806]: https://github.com/tj/commander.js/issues/806 +[#915]: https://github.com/tj/commander.js/issues/915 +[#938]: https://github.com/tj/commander.js/issues/938 +[#963]: https://github.com/tj/commander.js/issues/963 +[#974]: https://github.com/tj/commander.js/issues/974 +[#980]: https://github.com/tj/commander.js/issues/980 +[#987]: https://github.com/tj/commander.js/issues/987 +[#990]: https://github.com/tj/commander.js/issues/990 +[#991]: https://github.com/tj/commander.js/issues/991 +[#993]: https://github.com/tj/commander.js/issues/993 +[#999]: https://github.com/tj/commander.js/issues/999 +[#1010]: https://github.com/tj/commander.js/pull/1010 +[#1018]: https://github.com/tj/commander.js/pull/1018 +[#1026]: https://github.com/tj/commander.js/pull/1026 +[#1027]: https://github.com/tj/commander.js/pull/1027 +[#1028]: https://github.com/tj/commander.js/pull/1028 +[#1035]: https://github.com/tj/commander.js/pull/1035 +[#1040]: https://github.com/tj/commander.js/pull/1040 +[#1047]: https://github.com/tj/commander.js/pull/1047 +[#1048]: https://github.com/tj/commander.js/pull/1048 +[#1049]: https://github.com/tj/commander.js/pull/1049 +[#1051]: https://github.com/tj/commander.js/pull/1051 +[#1052]: https://github.com/tj/commander.js/pull/1052 +[#1053]: https://github.com/tj/commander.js/pull/1053 +[#1071]: https://github.com/tj/commander.js/pull/1071 +[#1081]: https://github.com/tj/commander.js/pull/1081 +[#1091]: https://github.com/tj/commander.js/pull/1091 +[#1096]: https://github.com/tj/commander.js/pull/1096 +[#1102]: https://github.com/tj/commander.js/pull/1102 +[#1118]: https://github.com/tj/commander.js/pull/1118 +[#1157]: https://github.com/tj/commander.js/pull/1157 + +[Unreleased]: https://github.com/tj/commander.js/compare/master...develop +[4.1.1]: https://github.com/tj/commander.js/compare/v4.0.0..v4.1.1 +[4.1.0]: https://github.com/tj/commander.js/compare/v4.0.1..v4.1.0 +[4.0.1]: https://github.com/tj/commander.js/compare/v4.0.0..v4.0.1 +[4.0.0]: https://github.com/tj/commander.js/compare/v3.0.2..v4.0.0 +[4.0.0-1]: https://github.com/tj/commander.js/compare/v4.0.0-0..v4.0.0-1 +[4.0.0-0]: https://github.com/tj/commander.js/compare/v3.0.2...v4.0.0-0 +[3.0.2]: https://github.com/tj/commander.js/compare/v3.0.1...v3.0.2 +[3.0.1]: https://github.com/tj/commander.js/compare/v3.0.0...v3.0.1 +[3.0.0]: https://github.com/tj/commander.js/compare/v2.20.1...v3.0.0 +[2.20.1]: https://github.com/tj/commander.js/compare/v2.20.0...v2.20.1 diff --git a/node_modules/cors/LICENSE b/node_modules/commander/LICENSE similarity index 94% rename from node_modules/cors/LICENSE rename to node_modules/commander/LICENSE index fd10c84..10f997a 100644 --- a/node_modules/cors/LICENSE +++ b/node_modules/commander/LICENSE @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2013 Troy Goode
{ | |||||||||||||||||||||||
"cjs":true | A boolean or object for toggling CJS features in ESM. A boolean for storing ES modules in A boolean for A boolean for respecting A boolean for mutable namespace objects. A boolean for importing named exports of CJS modules. A boolean for following CJS path rules in ESM. A boolean for A boolean for requiring ES modules without the dangling A boolean for top-level | ||||||||||||||||||||||
"mainFields":["main"] | An array of fields checked when importing a package. | ||||||||||||||||||||||
"mode":"auto" | A string mode:
| ||||||||||||||||||||||
"await":false | A boolean for top-level | ||||||||||||||||||||||
"force":false | A boolean to apply these options to all module loads. | ||||||||||||||||||||||
"wasm":false | A boolean for WebAssembly module support. (Node 8+) | ||||||||||||||||||||||
} | |||||||||||||||||||||||
{ | |
"cache":true | A boolean for toggling cache creation or a cache directory path. |
"sourceMap":false | A boolean for including inline source maps. |
} | |
+
+
+
+
+
+
+
+
+
+
+
+
/[!-@[-`{-~][\s\s]\*/.
+
+```js
+getopts(["-ab", "-c"]) //=> { _: [], a:true, b:true, c:true }
+```
+
+```js
+getopts(["-a", "alpha"]) //=> { _: [], a:"alpha" }
+```
+
+```js
+getopts(["-abc1"]) //=> { _: [], a:true, b:true, c:1 }
+```
+
+The last character in a cluster of options can be parsed as a string or as a number depending on the argument that follows it. Any options preceding it will be `true`. You can use [`opts.string`](#optsstring) to specify if one or more options should be parsed as strings instead.
+
+```js
+getopts(["-abc-100"], {
+ string: ["b"]
+}) //=> { _: [], a:true, b:"c-100" }
+```
+
+The argument immediately following a short or a long option, which is not an option itself, will be parsed as the value of that option. You can use [`opts.boolean`](#optsboolean) to specify if one or more options should be parsed as booleans, causing any adjacent argument to be parsed as an operand instead.
+
+```js
+getopts(["-a", "alpha"], {
+ boolean: ["a"]
+}) //=> { _: ["alpha"], a:true }
+```
+
+Any character listed in the ASCII table can be used as a short option if it's the first character after the dash.
+
+```js
+getopts(["-9", "-#10", "-%0.01"]) //=> { _:[], 9:true, #:10, %:0.01 }
+```
+
+### Long Options
+
+- A long option consists of two dashes `--` followed by one or more characters. Any character listed in the ASCII table can be used to create a long option except the `=` symbol, which separates an option's name and value.
+
+ ```js
+ getopts(["--turbo", "--warp=10"]) //=> { _: [], turbo:true, warp:10 }
+ ```
+
+ ```js
+ getopts(["--warp=e=mc^2"]) //=> { _: [], warp:"e=mc^2" }
+ ```
+
+ ```js
+ getopts(["----", "alpha"]) //=> { _: [], --:"alpha" }
+ ```
+
+- Options can be negated if they are prefixed with the sequence `--no-`. Their value is always `false`.
+
+ ```js
+ getopts(["--no-turbo"]) //=> { _: [], turbo:false }
+ ```
+
+### Operands
+
+- Every argument after the first double-dash sequence `--` is saved to the operands array `_`.
+
+ ```js
+ getopts(["--", "--alpha", "001"]) //=> { _:["--alpha", "001"] }
+ ```
+
+- Every non-option standalone argument is an operand.
+
+ ```js
+ getopts(["alpha", "-w9"]) //=> { _: ["alpha"], w:9 }
+ ```
+
+ ```js
+ getopts(["--code=alpha", "beta"]) //=> { _: ["beta"], code:"alpha" }
+ ```
+
+- A dash `-` is an operand.
+
+ ```js
+ getopts(["--turbo", "-"]) //=> { _:["-"], turbo:true }
+ ```
+
+### Other
+
+- Options missing from the arguments array designated as a boolean or string type will be added to the result object as `false` and `""` respectively.
+
+ ```js
+ getopts([], {
+ string: ["a"],
+ boolean: ["b"]
+ }) //=> { _:[], a:"", b:false }
+ ```
+
+* The string `"false"` is always cast to a boolean `false`.
+
+ ```js
+ getopts(["--turbo=false"]) //=> { _:[], turbo:false }
+ ```
+
+* Options that appear multiple times are parsed as an array that consists of every value in the order they are found.
+
+ ```js
+ getopts(["-a?alpha=beta", "-aa0.1"] //=> { _:[], a:["?alpha=beta", true, 0.1] }
+ ```
+
+* A value may contain newlines or other control characters.
+
+ ```js
+ getopts(["--text=top\n\tcenter\bottom"]) //=> { _:[], text:"top\n\tcenter\bottom" }
+ ```
+
+## API
+
+### `getopts(argv, opts)`
+
+Parse command line arguments. Expects an array of arguments, e.g., [`process.argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv), options configuration object, and returns an object mapping argument names to their values.
+
+### `argv`
+
+An array of arguments.
+
+### `opts.alias`
+
+An object of option aliases. An alias can be a string or an array of strings. Aliases let you declare substitute names for an option, e.g., the short (abbreviated) and long (canonical) variations.
+
+```js
+getopts(["-t"], {
+ alias: {
+ turbo: ["t", "T"]
+ }
+}) //=> { _:[], t:true, T:true, turbo:true }
+```
+
+### `opts.boolean`
+
+An array to indicate boolean options. In the next example, declaring `t` as boolean causes the next argument to be parsed as an operand and not as a value.
+
+```js
+getopts(["-t", "alpha"], {
+ boolean: ["t"]
+}) //=> { _:["alpha"], t:true }
+```
+
+### `opts.string`
+
+An array to indicate string options. In the next example, by declaring `t` as a string, all adjacent characters are parsed as a single value and not as individual options.
+
+```js
+getopts(["-atabc"], {
+ string: ["t"]
+}) //=> { _:[], a:true, t:"abc" }
+```
+
+### `opts.default`
+
+An object of default values for options that are not present in the arguments array.
+
+```js
+getopts(["--warp=10"], {
+ default: {
+ warp: 15,
+ turbo: true
+ }
+}) //=> { _:[], warp:10, turbo:true }
+```
+
+### `opts.unknown`
+
+A function that will be invoked for every unknown option. Return `false` to discard the option. Unknown options are those that appear in the arguments array, but are not present in `opts.string`, `opts.boolean`, `opts.default`, or `opts.alias`.
+
+```js
+getopts(["-abc"], {
+ unknown: option => "a" === option
+}) //=> { _:[], a:true }
+```
+
+### `opts.stopEarly`
+
+A boolean property. If true, the operands array `_` will be populated with all the arguments after the first non-option.
+
+```js
+getopts(["-w9", "alpha", "--turbo", "beta"], {
+ stopEarly: true
+}) //=> { _:["alpha", "--turbo", "beta"], w:9 }
+```
+
+This property is useful when implementing sub-commands in a CLI.
+
+```js
+const { install, update, uninstall } = require("./commands")
+
+const options = getopts(process.argv.slice(2), {
+ stopEarly: true
+})
+
+const [command, subargs] = options._
+
+if (command === "install") {
+ install(subargs)
+} else if (command === "update") {
+ update(subargs)
+} else if (command === "uninstall") {
+ uninstall(subargs)
+}
+```
+
+## Run the benchmarks
+
+```
+npm i -C bench && node bench
+```
+
++getopts × 1,769,415 ops/sec +minimist × 314,240 ops/sec +yargs × 33,179 ops/sec ++ +## License + +[MIT](LICENSE.md) diff --git a/node_modules/getopts/getopts.d.ts b/node_modules/getopts/getopts.d.ts new file mode 100644 index 0000000..368e843 --- /dev/null +++ b/node_modules/getopts/getopts.d.ts @@ -0,0 +1,27 @@ +/** + * @param argv Arguments to parse. + * @param options Parsing options (configuration). + * @returns An object with parsed options. + */ +declare function getopts( + argv: string[], + options?: getopts.Options +): getopts.ParsedOptions + +export = getopts + +declare namespace getopts { + export interface ParsedOptions { + _: string[] + [key: string]: any + } + + export interface Options { + alias?: { [key: string]: string | string[] } + string?: string[] + boolean?: string[] + default?: { [key: string]: any } + unknown?: (optionName: string) => boolean + stopEarly?: boolean + } +} diff --git a/node_modules/getopts/index.js b/node_modules/getopts/index.js new file mode 100644 index 0000000..c418663 --- /dev/null +++ b/node_modules/getopts/index.js @@ -0,0 +1,205 @@ +"use strict" + +const EMPTYARR = [] +const SHORTSPLIT = /$|[!-@[-`{-~][\s\S]*/g +const isArray = Array.isArray + +const parseValue = function(any) { + if (any === "") return "" + if (any === "false") return false + const maybe = Number(any) + return maybe * 0 === 0 ? maybe : any +} + +const parseAlias = function(aliases) { + let out = {}, + key, + alias, + prev, + len, + any, + i, + k + + for (key in aliases) { + any = aliases[key] + alias = out[key] = isArray(any) ? any : [any] + + for (i = 0, len = alias.length; i < len; i++) { + prev = out[alias[i]] = [key] + + for (k = 0; k < len; k++) { + if (i !== k) prev.push(alias[k]) + } + } + } + + return out +} + +const parseDefault = function(aliases, defaults) { + let out = {}, + key, + alias, + value, + len, + i + + for (key in defaults) { + value = defaults[key] + alias = aliases[key] + + out[key] = value + + if (alias === undefined) { + aliases[key] = EMPTYARR + } else { + for (i = 0, len = alias.length; i < len; i++) { + out[alias[i]] = value + } + } + } + + return out +} + +const parseOptions = function(aliases, options, value) { + let out = {}, + key, + alias, + len, + end, + i, + k + + if (options !== undefined) { + for (i = 0, len = options.length; i < len; i++) { + key = options[i] + alias = aliases[key] + + out[key] = value + + if (alias === undefined) { + aliases[key] = EMPTYARR + } else { + for (k = 0, end = alias.length; k < end; k++) { + out[alias[k]] = value + } + } + } + } + + return out +} + +const write = function(out, key, value, aliases, unknown) { + let i, + prev, + alias = aliases[key], + len = alias === undefined ? -1 : alias.length + + if (len >= 0 || unknown === undefined || unknown(key)) { + prev = out[key] + + if (prev === undefined) { + out[key] = value + } else { + if (isArray(prev)) { + prev.push(value) + } else { + out[key] = [prev, value] + } + } + + for (i = 0; i < len; i++) { + out[alias[i]] = out[key] + } + } +} + +const getopts = function(argv, opts) { + let unknown = (opts = opts || {}).unknown, + aliases = parseAlias(opts.alias), + strings = parseOptions(aliases, opts.string, ""), + values = parseDefault(aliases, opts.default), + bools = parseOptions(aliases, opts.boolean, false), + stopEarly = opts.stopEarly, + _ = [], + out = { _ }, + i = 0, + k = 0, + len = argv.length, + key, + arg, + end, + match, + value + + for (; i < len; i++) { + arg = argv[i] + + if (arg[0] !== "-" || arg === "-") { + if (stopEarly) while (i < len) _.push(argv[i++]) + else _.push(arg) + } else if (arg === "--") { + while (++i < len) _.push(argv[i]) + } else if (arg[1] === "-") { + end = arg.indexOf("=", 2) + if (arg[2] === "n" && arg[3] === "o" && arg[4] === "-") { + key = arg.slice(5, end >= 0 ? end : undefined) + value = false + } else if (end >= 0) { + key = arg.slice(2, end) + value = + bools[key] !== undefined || + (strings[key] === undefined + ? parseValue(arg.slice(end + 1)) + : arg.slice(end + 1)) + } else { + key = arg.slice(2) + value = + bools[key] !== undefined || + (len === i + 1 || argv[i + 1][0] === "-" + ? strings[key] === undefined + ? true + : "" + : strings[key] === undefined + ? parseValue(argv[++i]) + : argv[++i]) + } + write(out, key, value, aliases, unknown) + } else { + SHORTSPLIT.lastIndex = 2 + match = SHORTSPLIT.exec(arg) + end = match.index + value = match[0] + + for (k = 1; k < end; k++) { + write( + out, + (key = arg[k]), + k + 1 < end + ? strings[key] === undefined || + arg.substring(k + 1, (k = end)) + value + : value === "" + ? len === i + 1 || argv[i + 1][0] === "-" + ? strings[key] === undefined || "" + : bools[key] !== undefined || + (strings[key] === undefined ? parseValue(argv[++i]) : argv[++i]) + : bools[key] !== undefined || + (strings[key] === undefined ? parseValue(value) : value), + aliases, + unknown + ) + } + } + } + + for (key in values) if (out[key] === undefined) out[key] = values[key] + for (key in bools) if (out[key] === undefined) out[key] = false + for (key in strings) if (out[key] === undefined) out[key] = "" + + return out +} + +module.exports = getopts diff --git a/node_modules/getopts/package.json b/node_modules/getopts/package.json new file mode 100644 index 0000000..1617b04 --- /dev/null +++ b/node_modules/getopts/package.json @@ -0,0 +1,67 @@ +{ + "_from": "getopts@2.2.5", + "_id": "getopts@2.2.5", + "_inBundle": false, + "_integrity": "sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA==", + "_location": "/getopts", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "getopts@2.2.5", + "name": "getopts", + "escapedName": "getopts", + "rawSpec": "2.2.5", + "saveSpec": null, + "fetchSpec": "2.2.5" + }, + "_requiredBy": [ + "/knex" + ], + "_resolved": "https://registry.npmjs.org/getopts/-/getopts-2.2.5.tgz", + "_shasum": "67a0fe471cacb9c687d817cab6450b96dde8313b", + "_spec": "getopts@2.2.5", + "_where": "/Users/royolivarez/Desktop/SDC-PostgresDB/node_modules/knex", + "author": { + "name": "Jorge Bucaran" + }, + "bugs": { + "url": "https://github.com/jorgebucaran/getopts/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Parse CLI options, better.", + "devDependencies": { + "nyc": "^14.1.1", + "testmatrix": "^0.1.2", + "typescript": "^3.5.2" + }, + "files": [ + "index.js", + "getopts.d.ts" + ], + "homepage": "https://github.com/jorgebucaran/getopts#readme", + "keywords": [ + "getopts", + "cli", + "argv", + "flags", + "yargs", + "options", + "minimist", + "cli-parser" + ], + "license": "MIT", + "main": "index.js", + "name": "getopts", + "repository": { + "type": "git", + "url": "git+https://github.com/jorgebucaran/getopts.git" + }, + "scripts": { + "release": "v=$npm_package_version; git commit -am $v && git tag -s $v -m $v && git push && git push --tags && npm publish", + "test": "nyc -r lcov testmatrix test/*.test.js && nyc report && tsc -p test/ts" + }, + "types": "getopts.d.ts", + "version": "2.2.5" +} diff --git a/node_modules/global-modules/LICENSE b/node_modules/global-modules/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/global-modules/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, 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. \ No newline at end of file diff --git a/node_modules/global-modules/README.md b/node_modules/global-modules/README.md new file mode 100644 index 0000000..a076f65 --- /dev/null +++ b/node_modules/global-modules/README.md @@ -0,0 +1,75 @@ +# global-modules [](https://www.npmjs.com/package/global-modules) [](https://npmjs.org/package/global-modules) [](https://npmjs.org/package/global-modules) [](https://travis-ci.org/jonschlinkert/global-modules) + +> The directory used by npm for globally installed npm modules. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save global-modules +``` + +## Usage + +```js +var globalModules = require('global-modules'); +console.log(globalModules); +//=> '/usr/local/lib/node_modules' +``` +_(Note that this path might be different based on OS or user defined configuration settings)_ + +## About + +### Related projects + +* [git-config-path](https://www.npmjs.com/package/git-config-path): Resolve the path to the user's local or global .gitconfig. | [homepage](https://github.com/jonschlinkert/git-config-path "Resolve the path to the user's local or global .gitconfig.") +* [global-prefix](https://www.npmjs.com/package/global-prefix): Get the npm global path prefix. | [homepage](https://github.com/jonschlinkert/global-prefix "Get the npm global path prefix.") +* [homedir-polyfill](https://www.npmjs.com/package/homedir-polyfill): Node.js os.homedir polyfill for older versions of node.js. | [homepage](https://github.com/doowb/homedir-polyfill "Node.js os.homedir polyfill for older versions of node.js.") +* [npm-paths](https://www.npmjs.com/package/npm-paths): Returns an array of unique "npm" directories based on the user's platform and environment. | [homepage](https://github.com/jonschlinkert/npm-paths "Returns an array of unique "npm" directories based on the user's platform and environment.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 14 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [jason-chang](https://github.com/jason-chang) | +| 1 | [Kikobeats](https://github.com/Kikobeats) | + +### 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 +``` + +### 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 +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 28, 2017._ \ No newline at end of file diff --git a/node_modules/global-modules/index.js b/node_modules/global-modules/index.js new file mode 100644 index 0000000..e4c2b8b --- /dev/null +++ b/node_modules/global-modules/index.js @@ -0,0 +1,31 @@ +/*! + * global-modules
+
+
+
+
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+
+
+
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+