Adding sign with google in NPM

This commit is contained in:
SamX
2022-10-27 03:45:07 +00:00
parent 5070499cfd
commit 9a756d44da
952 changed files with 131008 additions and 6 deletions

21
node_modules/nodemon/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2010 - present, Remy Sharp, https://remysharp.com <remy@remysharp.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.

423
node_modules/nodemon/README.md generated vendored Normal file
View File

@ -0,0 +1,423 @@
<p align="center">
<a href="https://nodemon.io/"><img src="https://user-images.githubusercontent.com/13700/35731649-652807e8-080e-11e8-88fd-1b2f6d553b2d.png" alt="Nodemon Logo"></a>
</p>
# nodemon
nodemon is a tool that helps develop Node.js based applications by automatically restarting the node application when file changes in the directory are detected.
nodemon does **not** require *any* additional changes to your code or method of development. nodemon is a replacement wrapper for `node`. To use `nodemon`, replace the word `node` on the command line when executing your script.
[![NPM version](https://badge.fury.io/js/nodemon.svg)](https://npmjs.org/package/nodemon)
[![Travis Status](https://travis-ci.org/remy/nodemon.svg?branch=master)](https://travis-ci.org/remy/nodemon) [![Backers on Open Collective](https://opencollective.com/nodemon/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/nodemon/sponsors/badge.svg)](#sponsors)
# Installation
Either through cloning with git or by using [npm](http://npmjs.org) (the recommended way):
```bash
npm install -g nodemon # or using yarn: yarn global add nodemon
```
And nodemon will be installed globally to your system path.
You can also install nodemon as a development dependency:
```bash
npm install --save-dev nodemon # or using yarn: yarn add nodemon -D
```
With a local installation, nodemon will not be available in your system path or you can't use it directly from the command line. Instead, the local installation of nodemon can be run by calling it from within an npm script (such as `npm start`) or using `npx nodemon`.
# Usage
nodemon wraps your application, so you can pass all the arguments you would normally pass to your app:
```bash
nodemon [your node app]
```
For CLI options, use the `-h` (or `--help`) argument:
```bash
nodemon -h
```
Using nodemon is simple, if my application accepted a host and port as the arguments, I would start it as so:
```bash
nodemon ./server.js localhost 8080
```
Any output from this script is prefixed with `[nodemon]`, otherwise all output from your application, errors included, will be echoed out as expected.
You can also pass the `inspect` flag to node through the command line as you would normally:
```bash
nodemon --inspect ./server.js 80
```
If you have a `package.json` file for your app, you can omit the main script entirely and nodemon will read the `package.json` for the `main` property and use that value as the app ([ref](https://github.com/remy/nodemon/issues/14)).
nodemon will also search for the `scripts.start` property in `package.json` (as of nodemon 1.1.x).
Also check out the [FAQ](https://github.com/remy/nodemon/blob/master/faq.md) or [issues](https://github.com/remy/nodemon/issues) for nodemon.
## Automatic re-running
nodemon was originally written to restart hanging processes such as web servers, but now supports apps that cleanly exit. If your script exits cleanly, nodemon will continue to monitor the directory (or directories) and restart the script if there are any changes.
## Manual restarting
Whilst nodemon is running, if you need to manually restart your application, instead of stopping and restart nodemon, you can type `rs` with a carriage return, and nodemon will restart your process.
## Config files
nodemon supports local and global configuration files. These are usually named `nodemon.json` and can be located in the current working directory or in your home directory. An alternative local configuration file can be specified with the `--config <file>` option.
The specificity is as follows, so that a command line argument will always override the config file settings:
- command line arguments
- local config
- global config
A config file can take any of the command line arguments as JSON key values, for example:
```json
{
"verbose": true,
"ignore": ["*.test.js", "**/fixtures/**"],
"execMap": {
"rb": "ruby",
"pde": "processing --sketch={{pwd}} --run"
}
}
```
The above `nodemon.json` file might be my global config so that I have support for ruby files and processing files, and I can run `nodemon demo.pde` and nodemon will automatically know how to run the script even though out of the box support for processing scripts.
A further example of options can be seen in [sample-nodemon.md](https://github.com/remy/nodemon/blob/master/doc/sample-nodemon.md)
### package.json
If you want to keep all your package configurations in one place, nodemon supports using `package.json` for configuration.
Specify the config in the same format as you would for a config file but under `nodemonConfig` in the `package.json` file, for example, take the following `package.json`:
```json
{
"name": "nodemon",
"homepage": "http://nodemon.io",
"...": "... other standard package.json values",
"nodemonConfig": {
"ignore": ["**/test/**", "**/docs/**"],
"delay": 2500
}
}
```
Note that if you specify a `--config` file or provide a local `nodemon.json` any `package.json` config is ignored.
*This section needs better documentation, but for now you can also see `nodemon --help config` ([also here](https://github.com/remy/nodemon/blob/master/doc/cli/config.txt))*.
## Using nodemon as a module
Please see [doc/requireable.md](doc/requireable.md)
## Using nodemon as child process
Please see [doc/events.md](doc/events.md#Using_nodemon_as_child_process)
## Running non-node scripts
nodemon can also be used to execute and monitor other programs. nodemon will read the file extension of the script being run and monitor that extension instead of `.js` if there's no `nodemon.json`:
```bash
nodemon --exec "python -v" ./app.py
```
Now nodemon will run `app.py` with python in verbose mode (note that if you're not passing args to the exec program, you don't need the quotes), and look for new or modified files with the `.py` extension.
### Default executables
Using the `nodemon.json` config file, you can define your own default executables using the `execMap` property. This is particularly useful if you're working with a language that isn't supported by default by nodemon.
To add support for nodemon to know about the `.pl` extension (for Perl), the `nodemon.json` file would add:
```json
{
"execMap": {
"pl": "perl"
}
}
```
Now running the following, nodemon will know to use `perl` as the executable:
```bash
nodemon script.pl
```
It's generally recommended to use the global `nodemon.json` to add your own `execMap` options. However, if there's a common default that's missing, this can be merged in to the project so that nodemon supports it by default, by changing [default.js](https://github.com/remy/nodemon/blob/master/lib/config/defaults.js) and sending a pull request.
## Monitoring multiple directories
By default nodemon monitors the current working directory. If you want to take control of that option, use the `--watch` option to add specific paths:
```bash
nodemon --watch app --watch libs app/server.js
```
Now nodemon will only restart if there are changes in the `./app` or `./libs` directory. By default nodemon will traverse sub-directories, so there's no need in explicitly including sub-directories.
Nodemon also supports unix globbing, e.g `--watch './lib/*'`. The globbing pattern must be quoted.
## Specifying extension watch list
By default, nodemon looks for files with the `.js`, `.mjs`, `.coffee`, `.litcoffee`, and `.json` extensions. If you use the `--exec` option and monitor `app.py` nodemon will monitor files with the extension of `.py`. However, you can specify your own list with the `-e` (or `--ext`) switch like so:
```bash
nodemon -e js,pug
```
Now nodemon will restart on any changes to files in the directory (or subdirectories) with the extensions `.js`, `.pug`.
## Ignoring files
By default, nodemon will only restart when a `.js` JavaScript file changes. In some cases you will want to ignore some specific files, directories or file patterns, to prevent nodemon from prematurely restarting your application.
This can be done via the command line:
```bash
nodemon --ignore lib/ --ignore tests/
```
Or specific files can be ignored:
```bash
nodemon --ignore lib/app.js
```
Patterns can also be ignored (but be sure to quote the arguments):
```bash
nodemon --ignore 'lib/*.js'
```
**Important** the ignore rules are patterns matched to the full absolute path, and this determines how many files are monitored. If using a wild card glob pattern, it needs to be used as `**` or omitted entirely. For example, `nodemon --ignore '**/test/**'` will work, whereas `--ignore '*/test/*'` will not.
Note that by default, nodemon will ignore the `.git`, `node_modules`, `bower_components`, `.nyc_output`, `coverage` and `.sass-cache` directories and *add* your ignored patterns to the list. If you want to indeed watch a directory like `node_modules`, you need to [override the underlying default ignore rules](https://github.com/remy/nodemon/blob/master/faq.md#overriding-the-underlying-default-ignore-rules).
## Application isn't restarting
In some networked environments (such as a container running nodemon reading across a mounted drive), you will need to use the `legacyWatch: true` which enables Chokidar's polling.
Via the CLI, use either `--legacy-watch` or `-L` for short:
```bash
nodemon -L
```
Though this should be a last resort as it will poll every file it can find.
## Delaying restarting
In some situations, you may want to wait until a number of files have changed. The timeout before checking for new file changes is 1 second. If you're uploading a number of files and it's taking some number of seconds, this could cause your app to restart multiple times unnecessarily.
To add an extra throttle, or delay restarting, use the `--delay` command:
```bash
nodemon --delay 10 server.js
```
For more precision, milliseconds can be specified. Either as a float:
```bash
nodemon --delay 2.5 server.js
```
Or using the time specifier (ms):
```bash
nodemon --delay 2500ms server.js
```
The delay figure is number of seconds (or milliseconds, if specified) to delay before restarting. So nodemon will only restart your app the given number of seconds after the *last* file change.
If you are setting this value in `nodemon.json`, the value will always be interpreted in milliseconds. E.g., the following are equivalent:
```bash
nodemon --delay 2.5
{
"delay": 2500
}
```
## Gracefully reloading down your script
It is possible to have nodemon send any signal that you specify to your application.
```bash
nodemon --signal SIGHUP server.js
```
Your application can handle the signal as follows.
```js
process.once("SIGHUP", function () {
reloadSomeConfiguration();
})
```
Please note that nodemon will send this signal to every process in the process tree.
If you are using `cluster`, then each workers (as well as the master) will receive the signal. If you wish to terminate all workers on receiving a `SIGHUP`, a common pattern is to catch the `SIGHUP` in the master, and forward `SIGTERM` to all workers, while ensuring that all workers ignore `SIGHUP`.
```js
if (cluster.isMaster) {
process.on("SIGHUP", function () {
for (const worker of Object.values(cluster.workers)) {
worker.process.kill("SIGTERM");
}
});
} else {
process.on("SIGHUP", function() {})
}
```
## Controlling shutdown of your script
nodemon sends a kill signal to your application when it sees a file update. If you need to clean up on shutdown inside your script you can capture the kill signal and handle it yourself.
The following example will listen once for the `SIGUSR2` signal (used by nodemon to restart), run the clean up process and then kill itself for nodemon to continue control:
```js
process.once('SIGUSR2', function () {
gracefulShutdown(function () {
process.kill(process.pid, 'SIGUSR2');
});
});
```
Note that the `process.kill` is *only* called once your shutdown jobs are complete. Hat tip to [Benjie Gillam](http://www.benjiegillam.com/2011/08/node-js-clean-restart-and-faster-development-with-nodemon/) for writing this technique up.
## Triggering events when nodemon state changes
If you want growl like notifications when nodemon restarts or to trigger an action when an event happens, then you can either `require` nodemon or add event actions to your `nodemon.json` file.
For example, to trigger a notification on a Mac when nodemon restarts, `nodemon.json` looks like this:
```json
{
"events": {
"restart": "osascript -e 'display notification \"app restarted\" with title \"nodemon\"'"
}
}
```
A full list of available events is listed on the [event states wiki](https://github.com/remy/nodemon/wiki/Events#states). Note that you can bind to both states and messages.
## Pipe output to somewhere else
```js
nodemon({
script: ...,
stdout: false // important: this tells nodemon not to output to console
}).on('readable', function() { // the `readable` event indicates that data is ready to pick up
this.stdout.pipe(fs.createWriteStream('output.txt'));
this.stderr.pipe(fs.createWriteStream('err.txt'));
});
```
## Using nodemon in your gulp workflow
Check out the [gulp-nodemon](https://github.com/JacksonGariety/gulp-nodemon) plugin to integrate nodemon with the rest of your project's gulp workflow.
## Using nodemon in your Grunt workflow
Check out the [grunt-nodemon](https://github.com/ChrisWren/grunt-nodemon) plugin to integrate nodemon with the rest of your project's grunt workflow.
## Pronunciation
> nodemon, is it pronounced: node-mon, no-demon or node-e-mon (like pokémon)?
Well...I've been asked this many times before. I like that I've been asked this before. There's been bets as to which one it actually is.
The answer is simple, but possibly frustrating. I'm not saying (how I pronounce it). It's up to you to call it as you like. All answers are correct :)
## Design principles
- Fewer flags is better
- Works across all platforms
- Fewer features
- Let individuals build on top of nodemon
- Offer all CLI functionality as an API
- Contributions must have and pass tests
Nodemon is not perfect, and CLI arguments has sprawled beyond where I'm completely happy, but perhaps it can be reduced a little one day.
## FAQ
See the [FAQ](https://github.com/remy/nodemon/blob/master/faq.md) and please add your own questions if you think they would help others.
## Backers
Thank you to all [our backers](https://opencollective.com/nodemon#backer)! 🙏
[![nodemon backers](https://opencollective.com/nodemon/backers.svg?width=890)](https://opencollective.com/nodemon#backers)
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Sponsor this project today ❤️](https://opencollective.com/nodemon#sponsor)
<div style="overflow: hidden; margin-bottom: 80px;"><a title='Netpositive' data-id='162674' href='https://najlepsibukmacherzy.pl/ranking-legalnych-bukmacherow/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/52acecf0-608a-11eb-b17f-5bca7c67fe7b.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='CasinoHEX Australia' data-id='177373' href='https://online-aussie-casino.com/'><img alt='#1 Aussie Gambling Guide' src='https://opencollective-production.s3.us-west-1.amazonaws.com/89ea5890-6d1c-11ea-9dd9-330b3b2faf8b.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='NettiCasinoHEX.com' data-id='177375' href='https://netticasinohex.com/'><img alt='NettiCasinoHEX.com is a real giant among casino guides. It provides Finnish players with the most informative and honest casino rewievs. Beside that, there are free casino games and tips there which help to win the best jackpots.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/b802aa50-7b1a-11ea-bcaf-0dc68ad9bc17.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='KasynoHEX.com' data-id='177376' href='https://polskiekasynohex.com/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/2bb0d6e0-99c8-11ea-9349-199aa0d5d24a.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Casinoonlineaams.com' data-id='198634' href='https://www.casinoonlineaams.com'><img alt='Review of the best online casino in Italy' src='https://opencollective-production.s3.us-west-1.amazonaws.com/a0694620-b88f-11eb-b3a4-b97529e4b911.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Casino utan svensk licens' data-id='209052' href='https://www.casinoutanlicens.io/'><img alt='Casino utan svensk licens' src='https://opencollective-production.s3.us-west-1.amazonaws.com/52f13c30-0d78-11eb-88e4-510439e2a88d.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Casino Whizz' data-id='215685' href='https://casinowhizz.com'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/23256a80-f5c1-11eb-99f7-fbf8e4d6c6be.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Aussielowdepositcasino' data-id='215800' href='https://aussielowdepositcasino.com/'><img alt='aussielowdepositcasino.com' src='https://user-images.githubusercontent.com/13700/151881982-04677f3d-e2e1-44ee-a168-258b242b1ef4.svg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Casinot.net' data-id='220487' href='https://www.casinot.net'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/73b4fc10-7591-11ea-a1d4-01a20d893b4f.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Parhaatkasinot' data-id='220749' href='https://www.parhaatkasinot.com'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/4dfc1820-b6ee-11ea-9fa9-e39f53823609.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Kasinot.fi' data-id='229606' href='https://www.kasinot.fi'><img alt='null' src='https://logo.clearbit.com/www.kasinot.fi' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Beto_mania' data-id='232473' href='https://betomania.pl/ranking-bukmacherow/'><img alt='null' src='https://logo.clearbit.com/betomania.pl' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Targeted Web Traffic' data-id='235849' href='https://www.targetedwebtraffic.com'><img alt='null' src='https://logo.clearbit.com/targetedwebtraffic.com' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Casino Wise' data-id='243140' href='https://casino-wise.com/'><img alt='The UKs number one place for all things GamStop.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/734011b0-46ac-11eb-8d3c-79b2cf7dfe51.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Paraskasino' data-id='248269' href='https://www.paraskasino.fi'><img alt='null' src='https://logo.clearbit.com/www.paraskasino.fi' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Free Bets' data-id='269861' href='https://freebets.ltd.uk'><img alt='Free Bets' src='https://logo.clearbit.com/freebets.ltd.uk' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='TheCasinoDB' data-id='270835' href='https://www.thecasinodb.com'><img alt='null' src='https://logo.clearbit.com/thecasinodb.com' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Online Casinos XYZ' data-id='270836' href='https://online-casinos.xyz'><img alt='Provides reviews of online casinos along with exclusive offers and bonuses.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/bd4ff1f0-279b-11ec-9a5a-0519330cdfea.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Ace Online Casino' data-id='270837' href='https://www.aceonlinecasino.co.uk'><img alt='Offers real money online gambling games, slots, roulette and blackjack to players in the United Kingdom.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/b3376c80-279f-11ec-9a5a-0519330cdfea.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='null' data-id='padlet' href='https://padlet.com'><img alt='null' src='https://images.opencollective.com/padlet/320fa3e/logo/256.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Casino Utan Svenska Licensen' data-id='285700' href='https://www.casinoutansvenskalicensen.se/'><img alt='Marketing' src='https://opencollective-production.s3.us-west-1.amazonaws.com/ed105cb0-b01f-11ec-935f-77c14be20a90.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='null' data-id='snyk' href='https://snyk.co/nodemon'><img alt='null' src='https://user-images.githubusercontent.com/13700/165926338-ae9458ab-89c5-4c97-bc9b-86b5049576bf.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Online Casinos Australia' data-id='297999' href='https://online-casinos-australia.com/'><img alt='Best Online Casino Guide in Australia' src='https://opencollective-production.s3.us-west-1.amazonaws.com/88bb6d20-900a-11ec-8a5a-a92310c15e5b.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Betting sites Australia' data-id='303335' href='https://hellsbet.com/en-au/'><img alt='Rating of best betting sites in Australia' src='https://opencollective-production.s3.us-west-1.amazonaws.com/aeb99e10-d1ec-11ec-88be-f9a15ca9f6f8.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='inkedin' data-id='305884' href='https://inkedin.com/free-spins-no-deposit/'><img alt='null' src='https://logo.clearbit.com/inkedin.com' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='New Casinos Australia' data-id='318011' href='https://www.newcasinosaustralia.com/'><img alt='null' src='https://logo.clearbit.com/newcasinosaustralia.com' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='AU Online Pokies' data-id='318650' href='https://www.australiaonlinepokies.com/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/b5779d90-221b-11ed-b874-23b20736a51e.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='CasinoAus' data-id='318653' href='https://www.casinoaus.net/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/e4943b80-2219-11ed-b874-23b20736a51e.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='AU Online Casinos' data-id='318656' href='https://www.australiaonlinecasinosites.com/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/f3aa3b60-2219-11ed-b2b0-83767ea0d654.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Top Australian Gambling' data-id='318659' href='https://www.topaustraliangambling.com/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/d7687f70-2219-11ed-a0b5-97427086b4aa.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Internet Pokies' data-id='318660' href='https://www.internetpokies.org/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/b3792060-2219-11ed-a0b5-97427086b4aa.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Casinostranieri.net' data-id='319480' href='https://casinostranieri.net/'><img alt='' src='https://opencollective-production.s3.us-west-1.amazonaws.com/7aae8900-0c02-11ed-9aa8-2bd811fd6f10.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Goread.io' data-id='320564' href='https://goread.io/buy-instagram-followers'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/7d1302a0-0f33-11ed-a094-3dca78aec7cd.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='SureBet' data-id='321121' href='https://www.sure.bet/casinos-not-on-gamstop/'><img alt='We are the most advanced casino guide!' src='https://logo.clearbit.com/sure.bet' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Scommetteronline.info' data-id='321538' href='https://scommetteronline.info/bonus-scommesse-online/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/5536b3d0-17f8-11ed-98eb-57cc2820dbee.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Correct Casinos Australia' data-id='322445' href='https://www.correctcasinos.com/australian-online-casinos/'><img alt='Best Australian online casinos. Reviewed by Correct Casinos.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/fef95200-1551-11ed-ba3f-410c614877c8.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='null' data-id='Empire Srls (double)' href='https://casinosicuri.info/'><img alt='casino online sicuri' src='https://user-images.githubusercontent.com/13700/183862257-d13855b6-68ad-4c06-a474-af1d6efcc430.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Ilcasinoitaliano' data-id='326857' href='https://ilcasinoitaliano.eu/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/3b057540-12fe-11ed-b410-97951f343249.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Casino utan svensk licens' data-id='326858' href='https://casinoburst.com/casino-utan-licens/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/ac61d790-1d3c-11ed-b8db-7b79b65b0dbb.PNG' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Vedonlyontibonukset.com' data-id='326863' href='https://www.vedonlyontibonukset.com/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/276ec220-df06-11eb-a5cf-7b18267f7c27.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='spinsify.com/uk' data-id='326864' href='https://www.spinsify.com/uk/new-casinos'><img alt='' src='https://opencollective-production.s3.us-west-1.amazonaws.com/2bacf2f0-df04-11eb-a5cf-7b18267f7c27.PNG' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='uudetkasinot.com' data-id='326865' href='https://www.uudetkasinot.com'><img alt='' src='https://opencollective-production.s3.us-west-1.amazonaws.com/b6055950-df00-11eb-9caa-b58f40adecd5.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Gem M' data-id='327241' href='https://www.noneedtostudy.com/take-my-online-class/'><img alt='null' src='https://user-images.githubusercontent.com/13700/187039696-e2d8cd59-8b4e-438f-a052-69095212427d.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Best Slots World' data-id='329117' href='https://bestslotsworld.com/'><img alt='Best Online Casinos' src='https://logo.clearbit.com/bestslotsworld.com' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='Slotmachineweb.com' data-id='329195' href='https://www.slotmachineweb.com/'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/172f9eb0-22c2-11ed-a0b5-97427086b4aa.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
<a title='likewave' data-id='334265' href='https://likewave.io/buy-instagram-likes'><img alt='null' src='https://opencollective-production.s3.us-west-1.amazonaws.com/ec927700-359e-11ed-97d0-014826afdf06.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
</div>
# License
MIT [http://rem.mit-license.org](http://rem.mit-license.org)

16
node_modules/nodemon/bin/nodemon.js generated vendored Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env node
const cli = require('../lib/cli');
const nodemon = require('../lib/');
const options = cli.parse(process.argv);
nodemon(options);
const fs = require('fs');
// checks for available update and returns an instance
const pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json'));
if (pkg.version.indexOf('0.0.0') !== 0 && options.noUpdateNotifier !== true) {
require('simple-update-notifier')({ pkg });
}

BIN
node_modules/nodemon/bin/windows-kill.exe generated vendored Normal file

Binary file not shown.

8
node_modules/nodemon/doc/cli/authors.txt generated vendored Normal file
View File

@ -0,0 +1,8 @@
Remy Sharp - author and maintainer
https://github.com/remy
https://twitter.com/rem
Contributors: https://github.com/remy/nodemon/graphs/contributors ❤︎
Please help make nodemon better: https://github.com/remy/nodemon/

44
node_modules/nodemon/doc/cli/config.txt generated vendored Normal file
View File

@ -0,0 +1,44 @@
Typically the options to control nodemon are passed in via the CLI and are
listed under: nodemon --help options
nodemon can also be configured via a local and global config file:
* $HOME/nodemon.json
* $PWD/nodemon.json OR --config <file>
* nodemonConfig in package.json
All config options in the .json file map 1-to-1 with the CLI options, so a
config could read as:
{
"ext": "*.pde",
"verbose": true,
"exec": "processing --sketch=game --run"
}
There are a limited number of variables available in the config (since you
could use backticks on the CLI to use a variable, backticks won't work in
the .json config).
* {{pwd}} - the current directory
* {{filename}} - the filename you pass to nodemon
For example:
{
"ext": "*.pde",
"verbose": true,
"exec": "processing --sketch={{pwd}} --run"
}
The global config file is useful for setting up default executables
instead of repeating the same option in each of your local configs:
{
"verbose": true,
"execMap": {
"rb": "ruby",
"pde": "processing --sketch={{pwd}} --run"
}
}

29
node_modules/nodemon/doc/cli/help.txt generated vendored Normal file
View File

@ -0,0 +1,29 @@
Usage: nodemon [options] [script.js] [args]
Options:
--config file ............ alternate nodemon.json config file to use
-e, --ext ................ extensions to look for, ie. js,pug,hbs.
-x, --exec app ........... execute script with "app", ie. -x "python -v".
-w, --watch path ......... watch directory "path" or files. use once for
each directory or file to watch.
-i, --ignore ............. ignore specific files or directories.
-V, --verbose ............ show detail on what is causing restarts.
-- <your args> ........... to tell nodemon stop slurping arguments.
Note: if the script is omitted, nodemon will try to read "main" from
package.json and without a nodemon.json, nodemon will monitor .js, .mjs, .coffee,
.litcoffee, and .json by default.
For advanced nodemon configuration use nodemon.json: nodemon --help config
See also the sample: https://github.com/remy/nodemon/wiki/Sample-nodemon.json
Examples:
$ nodemon server.js
$ nodemon -w ../foo server.js apparg1 apparg2
$ nodemon --exec python app.py
$ nodemon --exec "make build" -e "styl hbs"
$ nodemon app.js -- --config # pass config to app.js
\x1B[1mAll options are documented under: \x1B[4mnodemon --help options\x1B[0m

20
node_modules/nodemon/doc/cli/logo.txt generated vendored Normal file
View File

@ -0,0 +1,20 @@
; ;
kO. x0
KMX, .:x0kc. 'KMN
0MMM0: 'oKMMMMMMMXd, ;OMMMX
oMMMMMWKOONMMMMMMMMMMMMMWOOKWMMMMMx
OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK.
.oWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMd.
KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN
KMMMMMMMMMMMMMMW0k0WMMMMMMMMMMMMMMW
KMMMMMMMMMMMNk:. :xNMMMMMMMMMMMW
KMMMMMMMMMMK OMMMMMMMMMMW
KMMMMMMMMMMO xMMMMMMMMMMN
KMMMMMMMMMMO xMMMMMMMMMMN
KMMMMMMMMMMO xMMMMMMMMMMN
KMMMMMMMMMMO xMMMMMMMMMMN
KMMMMMMMMMMO xMMMMMMMMMMN
KMMMMMMMMMNc ;NMMMMMMMMMN
KMMMMMW0o' .lOWMMMMMN
KMMKd; ,oKMMN
kX: ,K0

36
node_modules/nodemon/doc/cli/options.txt generated vendored Normal file
View File

@ -0,0 +1,36 @@
Configuration
--config <file> .......... alternate nodemon.json config file to use
--exitcrash .............. exit on crash, allows nodemon to work with other watchers
-i, --ignore ............. ignore specific files or directories
--no-colors .............. disable color output
--signal <signal> ........ use specified kill signal instead of default (ex. SIGTERM)
-w, --watch path ......... watch directory "dir" or files. use once for each
directory or file to watch
--no-update-notifier ..... opt-out of update version check
Execution
-C, --on-change-only ..... execute script on change only, not startup
--cwd <dir> .............. change into <dir> before running the script
-e, --ext ................ extensions to look for, ie. "js,pug,hbs"
-I, --no-stdin ........... nodemon passes stdin directly to child process
--spawn .................. force nodemon to use spawn (over fork) [node only]
-x, --exec app ........... execute script with "app", ie. -x "python -v"
-- <your args> ........... to tell nodemon stop slurping arguments
Watching
-d, --delay n ............ debounce restart for "n" seconds
-L, --legacy-watch ....... use polling to watch for changes (typically needed
when watching over a network/Docker)
-P, --polling-interval ... combined with -L, milliseconds to poll for (default 100)
Information
--dump ................... print full debug configuration
-h, --help ............... default help
--help <topic> ........... help on a specific feature. Try "--help topics"
-q, --quiet .............. minimise nodemon messages to start/stop only
-v, --version ............ current nodemon version
-V, --verbose ............ show detail on what is causing restarts
> Note that any unrecognised arguments are passed to the executing command.

8
node_modules/nodemon/doc/cli/topics.txt generated vendored Normal file
View File

@ -0,0 +1,8 @@
options .................. show all available nodemon options
config ................... default config options using nodemon.json
authors .................. contributors to this project
logo ..................... <3
whoami ................... I, AM, NODEMON \o/
Please support https://github.com/remy/nodemon/

3
node_modules/nodemon/doc/cli/usage.txt generated vendored Normal file
View File

@ -0,0 +1,3 @@
Usage: nodemon [nodemon options] [script.js] [args]
See "nodemon --help" for more.

9
node_modules/nodemon/doc/cli/whoami.txt generated vendored Normal file
View File

@ -0,0 +1,9 @@
__/\\\\\_____/\\\_______/\\\\\_______/\\\\\\\\\\\\_____/\\\\\\\\\\\\\\\__/\\\\____________/\\\\_______/\\\\\_______/\\\\\_____/\\\_
_\/\\\\\\___\/\\\_____/\\\///\\\____\/\\\////////\\\__\/\\\///////////__\/\\\\\\________/\\\\\\_____/\\\///\\\____\/\\\\\\___\/\\\_
_\/\\\/\\\__\/\\\___/\\\/__\///\\\__\/\\\______\//\\\_\/\\\_____________\/\\\//\\\____/\\\//\\\___/\\\/__\///\\\__\/\\\/\\\__\/\\\_
_\/\\\//\\\_\/\\\__/\\\______\//\\\_\/\\\_______\/\\\_\/\\\\\\\\\\\_____\/\\\\///\\\/\\\/_\/\\\__/\\\______\//\\\_\/\\\//\\\_\/\\\_
_\/\\\\//\\\\/\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/\\\///////______\/\\\__\///\\\/___\/\\\_\/\\\_______\/\\\_\/\\\\//\\\\/\\\_
_\/\\\_\//\\\/\\\_\//\\\______/\\\__\/\\\_______\/\\\_\/\\\_____________\/\\\____\///_____\/\\\_\//\\\______/\\\__\/\\\_\//\\\/\\\_
_\/\\\__\//\\\\\\__\///\\\__/\\\____\/\\\_______/\\\__\/\\\_____________\/\\\_____________\/\\\__\///\\\__/\\\____\/\\\__\//\\\\\\_
_\/\\\___\//\\\\\____\///\\\\\/_____\/\\\\\\\\\\\\/___\/\\\\\\\\\\\\\\\_\/\\\_____________\/\\\____\///\\\\\/_____\/\\\___\//\\\\\_
_\///_____\/////_______\/////_______\////////////_____\///////////////__\///______________\///_______\/////_______\///_____\/////__

49
node_modules/nodemon/lib/cli/index.js generated vendored Normal file
View File

@ -0,0 +1,49 @@
var parse = require('./parse');
/**
* Converts a string to command line args, in particular
* groups together quoted values.
* This is a utility function to allow calling nodemon as a required
* library, but with the CLI args passed in (instead of an object).
*
* @param {String} string
* @return {Array}
*/
function stringToArgs(string) {
var args = [];
var parts = string.split(' ');
var length = parts.length;
var i = 0;
var open = false;
var grouped = '';
var lead = '';
for (; i < length; i++) {
lead = parts[i].substring(0, 1);
if (lead === '"' || lead === '\'') {
open = lead;
grouped = parts[i].substring(1);
} else if (open && parts[i].slice(-1) === open) {
open = false;
grouped += ' ' + parts[i].slice(0, -1);
args.push(grouped);
} else if (open) {
grouped += ' ' + parts[i];
} else {
args.push(parts[i]);
}
}
return args;
}
module.exports = {
parse: function (argv) {
if (typeof argv === 'string') {
argv = stringToArgs(argv);
}
return parse(argv);
},
};

230
node_modules/nodemon/lib/cli/parse.js generated vendored Normal file
View File

@ -0,0 +1,230 @@
/*
nodemon is a utility for node, and replaces the use of the executable
node. So the user calls `nodemon foo.js` instead.
nodemon can be run in a number of ways:
`nodemon` - tries to use package.json#main property to run
`nodemon` - if no package, looks for index.js
`nodemon app.js` - runs app.js
`nodemon --arg app.js --apparg` - eats arg1, and runs app.js with apparg
`nodemon --apparg` - as above, but passes apparg to package.json#main (or
index.js)
`nodemon --debug app.js
*/
var fs = require('fs');
var path = require('path');
var existsSync = fs.existsSync || path.existsSync;
module.exports = parse;
/**
* Parses the command line arguments `process.argv` and returns the
* nodemon options, the user script and the executable script.
*
* @param {Array} full process arguments, including `node` leading arg
* @return {Object} { options, script, args }
*/
function parse(argv) {
if (typeof argv === 'string') {
argv = argv.split(' ');
}
var eat = function (i, args) {
if (i <= args.length) {
return args.splice(i + 1, 1).pop();
}
};
var args = argv.slice(2);
var script = null;
var nodemonOptions = { scriptPosition: null };
var nodemonOpt = nodemonOption.bind(null, nodemonOptions);
var lookForArgs = true;
// move forward through the arguments
for (var i = 0; i < args.length; i++) {
// if the argument looks like a file, then stop eating
if (!script) {
if (args[i] === '.' || existsSync(args[i])) {
script = args.splice(i, 1).pop();
// we capture the position of the script because we'll reinsert it in
// the right place in run.js:command (though I'm not sure we should even
// take it out of the array in the first place, but this solves passing
// arguments to the exec process for now).
nodemonOptions.scriptPosition = i;
i--;
continue;
}
}
if (lookForArgs) {
// respect the standard way of saying: hereafter belongs to my script
if (args[i] === '--') {
args.splice(i, 1);
nodemonOptions.scriptPosition = i;
// cycle back one argument, as we just ate this one up
i--;
// ignore all further nodemon arguments
lookForArgs = false;
// move to the next iteration
continue;
}
if (nodemonOpt(args[i], eat.bind(null, i, args)) !== false) {
args.splice(i, 1);
// cycle back one argument, as we just ate this one up
i--;
}
}
}
nodemonOptions.script = script;
nodemonOptions.args = args;
return nodemonOptions;
}
/**
* Given an argument (ie. from process.argv), sets nodemon
* options and can eat up the argument value
*
* @param {Object} options object that will be updated
* @param {Sting} current argument from argv
* @param {Function} the callback to eat up the next argument in argv
* @return {Boolean} false if argument was not a nodemon arg
*/
function nodemonOption(options, arg, eatNext) {
// line separation on purpose to help legibility
if (arg === '--help' || arg === '-h' || arg === '-?') {
var help = eatNext();
options.help = help ? help : true;
} else
if (arg === '--version' || arg === '-v') {
options.version = true;
} else
if (arg === '--no-update-notifier') {
options.noUpdateNotifier = true;
} else
if (arg === '--spawn') {
options.spawn = true;
} else
if (arg === '--dump') {
options.dump = true;
} else
if (arg === '--verbose' || arg === '-V') {
options.verbose = true;
} else
if (arg === '--legacy-watch' || arg === '-L') {
options.legacyWatch = true;
} else
if (arg === '--polling-interval' || arg === '-P') {
options.pollingInterval = parseInt(eatNext(), 10);
} else
// Depricated as this is "on" by default
if (arg === '--js') {
options.js = true;
} else
if (arg === '--quiet' || arg === '-q') {
options.quiet = true;
} else
if (arg === '--config') {
options.configFile = eatNext();
} else
if (arg === '--watch' || arg === '-w') {
if (!options.watch) { options.watch = []; }
options.watch.push(eatNext());
} else
if (arg === '--ignore' || arg === '-i') {
if (!options.ignore) { options.ignore = []; }
options.ignore.push(eatNext());
} else
if (arg === '--exitcrash') {
options.exitcrash = true;
} else
if (arg === '--delay' || arg === '-d') {
options.delay = parseDelay(eatNext());
} else
if (arg === '--exec' || arg === '-x') {
options.exec = eatNext();
} else
if (arg === '--no-stdin' || arg === '-I') {
options.stdin = false;
} else
if (arg === '--on-change-only' || arg === '-C') {
options.runOnChangeOnly = true;
} else
if (arg === '--ext' || arg === '-e') {
options.ext = eatNext();
} else
if (arg === '--no-colours' || arg === '--no-colors') {
options.colours = false;
} else
if (arg === '--signal' || arg === '-s') {
options.signal = eatNext();
} else
if (arg === '--cwd') {
options.cwd = eatNext();
// go ahead and change directory. This is primarily for nodemon tools like
// grunt-nodemon - we're doing this early because it will affect where the
// user script is searched for.
process.chdir(path.resolve(options.cwd));
} else {
// this means we didn't match
return false;
}
}
/**
* Given an argument (ie. from nodemonOption()), will parse and return the
* equivalent millisecond value or 0 if the argument cannot be parsed
*
* @param {String} argument value given to the --delay option
* @return {Number} millisecond equivalent of the argument
*/
function parseDelay(value) {
var millisPerSecond = 1000;
var millis = 0;
if (value.match(/^\d*ms$/)) {
// Explicitly parse for milliseconds when using ms time specifier
millis = parseInt(value, 10);
} else {
// Otherwise, parse for seconds, with or without time specifier then convert
millis = parseFloat(value) * millisPerSecond;
}
return isNaN(millis) ? 0 : millis;
}

43
node_modules/nodemon/lib/config/command.js generated vendored Normal file
View File

@ -0,0 +1,43 @@
module.exports = command;
/**
* command constructs the executable command to run in a shell including the
* user script, the command arguments.
*
* @param {Object} settings Object as:
* { execOptions: {
* exec: String,
* [script: String],
* [scriptPosition: Number],
* [execArgs: Array<string>]
* }
* }
* @return {Object} an object with the node executable and the
* arguments to the command
*/
function command(settings) {
var options = settings.execOptions;
var executable = options.exec;
var args = [];
// after "executable" go the exec args (like --debug, etc)
if (options.execArgs) {
[].push.apply(args, options.execArgs);
}
// then goes the user's script arguments
if (options.args) {
[].push.apply(args, options.args);
}
// after the "executable" goes the user's script
if (options.script) {
args.splice((options.scriptPosition || 0) +
options.execArgs.length, 0, options.script);
}
return {
executable: executable,
args: args,
};
}

28
node_modules/nodemon/lib/config/defaults.js generated vendored Normal file
View File

@ -0,0 +1,28 @@
var ignoreRoot = require('ignore-by-default').directories();
// default options for config.options
module.exports = {
restartable: 'rs',
colours: true,
execMap: {
py: 'python',
rb: 'ruby',
ts: 'ts-node',
// more can be added here such as ls: lsc - but please ensure it's cross
// compatible with linux, mac and windows, or make the default.js
// dynamically append the `.cmd` for node based utilities
},
ignoreRoot: ignoreRoot.map(_ => `**/${_}/**`),
watch: ['*.*'],
stdin: true,
runOnChangeOnly: false,
verbose: false,
signal: 'SIGUSR2',
// 'stdout' refers to the default behaviour of a required nodemon's child,
// but also includes stderr. If this is false, data is still dispatched via
// nodemon.on('stdout/stderr')
stdout: true,
watchOptions: {
},
};

225
node_modules/nodemon/lib/config/exec.js generated vendored Normal file
View File

@ -0,0 +1,225 @@
const path = require('path');
const fs = require('fs');
const existsSync = fs.existsSync;
const utils = require('../utils');
module.exports = exec;
module.exports.expandScript = expandScript;
/**
* Reads the cwd/package.json file and looks to see if it can load a script
* and possibly an exec first from package.main, then package.start.
*
* @return {Object} exec & script if found
*/
function execFromPackage() {
// doing a try/catch because we can't use the path.exist callback pattern
// or we could, but the code would get messy, so this will do exactly
// what we're after - if the file doesn't exist, it'll throw.
try {
// note: this isn't nodemon's package, it's the user's cwd package
var pkg = require(path.join(process.cwd(), 'package.json'));
if (pkg.main !== undefined) {
// no app found to run - so give them a tip and get the feck out
return { exec: null, script: pkg.main };
}
if (pkg.scripts && pkg.scripts.start) {
return { exec: pkg.scripts.start };
}
} catch (e) { }
return null;
}
function replace(map, str) {
var re = new RegExp('{{(' + Object.keys(map).join('|') + ')}}', 'g');
return str.replace(re, function (all, m) {
return map[m] || all || '';
});
}
function expandScript(script, ext) {
if (!ext) {
ext = '.js';
}
if (script.indexOf(ext) !== -1) {
return script;
}
if (existsSync(path.resolve(script))) {
return script;
}
if (existsSync(path.resolve(script + ext))) {
return script + ext;
}
return script;
}
/**
* Discovers all the options required to run the script
* and if a custom exec has been passed in, then it will
* also try to work out what extensions to monitor and
* whether there's a special way of running that script.
*
* @param {Object} nodemonOptions
* @param {Object} execMap
* @return {Object} new and updated version of nodemonOptions
*/
function exec(nodemonOptions, execMap) {
if (!execMap) {
execMap = {};
}
var options = utils.clone(nodemonOptions || {});
var script;
// if there's no script passed, try to get it from the first argument
if (!options.script && (options.args || []).length) {
script = expandScript(options.args[0],
options.ext && ('.' + (options.ext || 'js').split(',')[0]));
// if the script was found, shift it off our args
if (script !== options.args[0]) {
options.script = script;
options.args.shift();
}
}
// if there's no exec found yet, then try to read it from the local
// package.json this logic used to sit in the cli/parse, but actually the cli
// should be parsed first, then the user options (via nodemon.json) then
// finally default down to pot shots at the directory via package.json
if (!options.exec && !options.script) {
var found = execFromPackage();
if (found !== null) {
if (found.exec) {
options.exec = found.exec;
}
if (!options.script) {
options.script = found.script;
}
if (Array.isArray(options.args) &&
options.scriptPosition === null) {
options.scriptPosition = options.args.length;
}
}
}
// var options = utils.clone(nodemonOptions || {});
script = path.basename(options.script || '');
var scriptExt = path.extname(script).slice(1);
var extension = options.ext;
if (extension === undefined) {
var isJS = scriptExt === 'js' || scriptExt === 'mjs';
extension = (isJS || !scriptExt) ? 'js,mjs' : scriptExt;
extension += ',json'; // Always watch JSON files
}
var execDefined = !!options.exec;
// allows the user to simplify cli usage:
// https://github.com/remy/nodemon/issues/195
// but always give preference to the user defined argument
if (!options.exec && execMap[scriptExt] !== undefined) {
options.exec = execMap[scriptExt];
execDefined = true;
}
options.execArgs = nodemonOptions.execArgs || [];
if (Array.isArray(options.exec)) {
options.execArgs = options.exec;
options.exec = options.execArgs.shift();
}
if (options.exec === undefined) {
options.exec = 'node';
} else {
// allow variable substitution for {{filename}} and {{pwd}}
var substitution = replace.bind(null, {
filename: options.script,
pwd: process.cwd(),
});
var newExec = substitution(options.exec);
if (newExec !== options.exec &&
options.exec.indexOf('{{filename}}') !== -1) {
options.script = null;
}
options.exec = newExec;
var newExecArgs = options.execArgs.map(substitution);
if (newExecArgs.join('') !== options.execArgs.join('')) {
options.execArgs = newExecArgs;
delete options.script;
}
}
if (options.exec === 'node' && options.nodeArgs && options.nodeArgs.length) {
options.execArgs = options.execArgs.concat(options.nodeArgs);
}
// note: indexOf('coffee') handles both .coffee and .litcoffee
if (!execDefined && options.exec === 'node' &&
scriptExt.indexOf('coffee') !== -1) {
options.exec = 'coffee';
// we need to get execArgs set before the script
// for example, in `nodemon --debug my-script.coffee --my-flag`, debug is an
// execArg, while my-flag is a script arg
var leadingArgs = (options.args || []).splice(0, options.scriptPosition);
options.execArgs = options.execArgs.concat(leadingArgs);
options.scriptPosition = 0;
if (options.execArgs.length > 0) {
// because this is the coffee executable, we need to combine the exec args
// into a single argument after the nodejs flag
options.execArgs = ['--nodejs', options.execArgs.join(' ')];
}
}
if (options.exec === 'coffee') {
// don't override user specified extension tracking
if (options.ext === undefined) {
if (extension) { extension += ','; }
extension += 'coffee,litcoffee';
}
// because windows can't find 'coffee', it needs the real file 'coffee.cmd'
if (utils.isWindows) {
options.exec += '.cmd';
}
}
// allow users to make a mistake on the extension to monitor
// converts .js, pug => js,pug
// BIG NOTE: user can't do this: nodemon -e *.js
// because the terminal will automatically expand the glob against
// the file system :(
extension = (extension.match(/[^,*\s]+/g) || [])
.map(ext => ext.replace(/^\./, ''))
.join(',');
options.ext = extension;
if (options.script) {
options.script = expandScript(options.script,
extension && ('.' + extension.split(',')[0]));
}
options.env = {};
// make sure it's an object (and since we don't have )
if (({}).toString.apply(nodemonOptions.env) === '[object Object]') {
options.env = utils.clone(nodemonOptions.env);
} else if (nodemonOptions.env !== undefined) {
throw new Error('nodemon env values must be an object: { PORT: 8000 }');
}
return options;
}

93
node_modules/nodemon/lib/config/index.js generated vendored Normal file
View File

@ -0,0 +1,93 @@
/**
* Manages the internal config of nodemon, checking for the state of support
* with fs.watch, how nodemon can watch files (using find or fs methods).
*
* This is *not* the user's config.
*/
var debug = require('debug')('nodemon');
var load = require('./load');
var rules = require('../rules');
var utils = require('../utils');
var pinVersion = require('../version').pin;
var command = require('./command');
var rulesToMonitor = require('../monitor/match').rulesToMonitor;
var bus = utils.bus;
function reset() {
rules.reset();
config.dirs = [];
config.options = { ignore: [], watch: [], monitor: [] };
config.lastStarted = 0;
config.loaded = [];
}
var config = {
run: false,
system: {
cwd: process.cwd(),
},
required: false,
dirs: [],
timeout: 1000,
options: {},
};
/**
* Take user defined settings, then detect the local machine capability, then
* look for local and global nodemon.json files and merge together the final
* settings with the config for nodemon.
*
* @param {Object} settings user defined settings for nodemon (typically on
* the cli)
* @param {Function} ready callback fired once the config is loaded
*/
config.load = function (settings, ready) {
reset();
var config = this;
load(settings, config.options, config, function (options) {
config.options = options;
if (options.watch.length === 0) {
// this is to catch when the watch is left blank
options.watch.push('*.*');
}
if (options['watch_interval']) { // jshint ignore:line
options.watchInterval = options['watch_interval']; // jshint ignore:line
}
config.watchInterval = options.watchInterval || null;
if (options.signal) {
config.signal = options.signal;
}
var cmd = command(config.options);
config.command = {
raw: cmd,
string: utils.stringify(cmd.executable, cmd.args),
};
// now run automatic checks on system adding to the config object
options.monitor = rulesToMonitor(options.watch, options.ignore, config);
var cwd = process.cwd();
debug('config: dirs', config.dirs);
if (config.dirs.length === 0) {
config.dirs.unshift(cwd);
}
bus.emit('config:update', config);
pinVersion().then(function () {
ready(config);
}).catch(e => {
// this doesn't help testing, but does give exposure on syntax errors
console.error(e.stack);
setTimeout(() => { throw e; }, 0);
});
});
};
config.reset = reset;
module.exports = config;

256
node_modules/nodemon/lib/config/load.js generated vendored Normal file
View File

@ -0,0 +1,256 @@
var debug = require('debug')('nodemon');
var fs = require('fs');
var path = require('path');
var exists = fs.exists || path.exists;
var utils = require('../utils');
var rules = require('../rules');
var parse = require('../rules/parse');
var exec = require('./exec');
var defaults = require('./defaults');
module.exports = load;
module.exports.mutateExecOptions = mutateExecOptions;
var existsSync = fs.existsSync || path.existsSync;
function findAppScript() {
// nodemon has been run alone, so try to read the package file
// or try to read the index.js file
if (existsSync('./index.js')) {
return 'index.js';
}
}
/**
* Load the nodemon config, first reading the global root/nodemon.json, then
* the local nodemon.json to the exec and then overwriting using any user
* specified settings (i.e. from the cli)
*
* @param {Object} settings user defined settings
* @param {Function} ready callback that receives complete config
*/
function load(settings, options, config, callback) {
config.loaded = [];
// first load the root nodemon.json
loadFile(options, config, utils.home, function (options) {
// then load the user's local configuration file
if (settings.configFile) {
options.configFile = path.resolve(settings.configFile);
}
loadFile(options, config, process.cwd(), function (options) {
// Then merge over with the user settings (parsed from the cli).
// Note that merge protects and favours existing values over new values,
// and thus command line arguments get priority
options = utils.merge(settings, options);
// legacy support
if (!Array.isArray(options.ignore)) {
options.ignore = [options.ignore];
}
if (!options.ignoreRoot) {
options.ignoreRoot = defaults.ignoreRoot;
}
// blend the user ignore and the default ignore together
if (options.ignoreRoot && options.ignore) {
if (!Array.isArray(options.ignoreRoot)) {
options.ignoreRoot = [options.ignoreRoot];
}
options.ignore = options.ignoreRoot.concat(options.ignore);
} else {
options.ignore = defaults.ignore.concat(options.ignore);
}
// add in any missing defaults
options = utils.merge(options, defaults);
if (!options.script && !options.exec) {
var found = findAppScript();
if (found) {
if (!options.args) {
options.args = [];
}
// if the script is found as a result of not being on the command
// line, then we move any of the pre double-dash args in execArgs
const n = options.scriptPosition === null ?
options.args.length : options.scriptPosition;
options.execArgs = (options.execArgs || [])
.concat(options.args.splice(0, n));
options.scriptPosition = null;
options.script = found;
}
}
mutateExecOptions(options);
if (options.quiet) {
utils.quiet();
}
if (options.verbose) {
utils.debug = true;
}
// simplify the ready callback to be called after the rules are normalised
// from strings to regexp through the rules lib. Note that this gets
// created *after* options is overwritten twice in the lines above.
var ready = function (options) {
normaliseRules(options, callback);
};
// if we didn't pick up a nodemon.json file & there's no cli ignores
// then try loading an old style .nodemonignore file
if (config.loaded.length === 0) {
var legacy = loadLegacyIgnore.bind(null, options, config, ready);
// first try .nodemonignore, if that doesn't exist, try nodemon-ignore
return legacy('.nodemonignore', function () {
legacy('nodemon-ignore', function (options) {
ready(options);
});
});
}
ready(options);
});
});
}
/**
* Loads the old style nodemonignore files which is a list of patterns
* in a file to ignore
*
* @param {Object} options nodemon user options
* @param {Function} success
* @param {String} filename ignore file (.nodemonignore or nodemon-ignore)
* @param {Function} fail (optional) failure callback
*/
function loadLegacyIgnore(options, config, success, filename, fail) {
var ignoreFile = path.join(process.cwd(), filename);
exists(ignoreFile, function (exists) {
if (exists) {
config.loaded.push(ignoreFile);
return parse(ignoreFile, function (error, rules) {
options.ignore = rules.raw;
success(options);
});
}
if (fail) {
fail(options);
} else {
success(options);
}
});
}
function normaliseRules(options, ready) {
// convert ignore and watch options to rules/regexp
rules.watch.add(options.watch);
rules.ignore.add(options.ignore);
// normalise the watch and ignore arrays
options.watch = options.watch === false ? false : rules.rules.watch;
options.ignore = rules.rules.ignore;
ready(options);
}
/**
* Looks for a config in the current working directory, and a config in the
* user's home directory, merging the two together, giving priority to local
* config. This can then be overwritten later by command line arguments
*
* @param {Function} ready callback to pass loaded settings to
*/
function loadFile(options, config, dir, ready) {
if (!ready) {
ready = function () { };
}
var callback = function (settings) {
// prefer the local nodemon.json and fill in missing items using
// the global options
ready(utils.merge(settings, options));
};
if (!dir) {
return callback({});
}
var filename = options.configFile || path.join(dir, 'nodemon.json');
if (config.loaded.indexOf(filename) !== -1) {
// don't bother re-parsing the same config file
return callback({});
}
fs.readFile(filename, 'utf8', function (err, data) {
if (err) {
if (err.code === 'ENOENT') {
if (!options.configFile && dir !== utils.home) {
// if no specified local config file and local nodemon.json
// doesn't exist, try the package.json
return loadPackageJSON(config, callback);
}
}
return callback({});
}
var settings = {};
try {
settings = JSON.parse(data.toString('utf8').replace(/^\uFEFF/, ''));
if (!filename.endsWith('package.json') || settings.nodemonConfig) {
config.loaded.push(filename);
}
} catch (e) {
utils.log.fail('Failed to parse config ' + filename);
console.error(e);
process.exit(1);
}
// options values will overwrite settings
callback(settings);
});
}
function loadPackageJSON(config, ready) {
if (!ready) {
ready = () => { };
}
const dir = process.cwd();
const filename = path.join(dir, 'package.json');
const packageLoadOptions = { configFile: filename };
return loadFile(packageLoadOptions, config, dir, settings => {
ready(settings.nodemonConfig || {});
});
}
function mutateExecOptions(options) {
// work out the execOptions based on the final config we have
options.execOptions = exec({
script: options.script,
exec: options.exec,
args: options.args,
scriptPosition: options.scriptPosition,
nodeArgs: options.nodeArgs,
execArgs: options.execArgs,
ext: options.ext,
env: options.env,
}, options.execMap);
// clean up values that we don't need at the top level
delete options.scriptPosition;
delete options.script;
delete options.args;
delete options.ext;
return options;
}

27
node_modules/nodemon/lib/help/index.js generated vendored Normal file
View File

@ -0,0 +1,27 @@
var fs = require('fs');
var path = require('path');
const supportsColor = require('supports-color');
module.exports = help;
const highlight = supportsColor.stdout ? '\x1B\[$1m' : '';
function help(item) {
if (!item) {
item = 'help';
} else if (item === true) { // if used with -h or --help and no args
item = 'help';
}
// cleanse the filename to only contain letters
// aka: /\W/g but figured this was eaiser to read
item = item.replace(/[^a-z]/gi, '');
try {
var dir = path.join(__dirname, '..', '..', 'doc', 'cli', item + '.txt');
var body = fs.readFileSync(dir, 'utf8');
return body.replace(/\\x1B\[(.)m/g, highlight);
} catch (e) {
return '"' + item + '" help can\'t be found';
}
}

1
node_modules/nodemon/lib/index.js generated vendored Normal file
View File

@ -0,0 +1 @@
module.exports = require('./nodemon');

4
node_modules/nodemon/lib/monitor/index.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
module.exports = {
run: require('./run'),
watch: require('./watch').watch,
};

276
node_modules/nodemon/lib/monitor/match.js generated vendored Normal file
View File

@ -0,0 +1,276 @@
const minimatch = require('minimatch');
const path = require('path');
const fs = require('fs');
const debug = require('debug')('nodemon:match');
const utils = require('../utils');
module.exports = match;
module.exports.rulesToMonitor = rulesToMonitor;
function rulesToMonitor(watch, ignore, config) {
var monitor = [];
if (!Array.isArray(ignore)) {
if (ignore) {
ignore = [ignore];
} else {
ignore = [];
}
}
if (!Array.isArray(watch)) {
if (watch) {
watch = [watch];
} else {
watch = [];
}
}
if (watch && watch.length) {
monitor = utils.clone(watch);
}
if (ignore) {
[].push.apply(monitor, (ignore || []).map(function (rule) {
return '!' + rule;
}));
}
var cwd = process.cwd();
// next check if the monitored paths are actual directories
// or just patterns - and expand the rule to include *.*
monitor = monitor.map(function (rule) {
var not = rule.slice(0, 1) === '!';
if (not) {
rule = rule.slice(1);
}
if (rule === '.' || rule === '.*') {
rule = '*.*';
}
var dir = path.resolve(cwd, rule);
try {
var stat = fs.statSync(dir);
if (stat.isDirectory()) {
rule = dir;
if (rule.slice(-1) !== '/') {
rule += '/';
}
rule += '**/*';
// `!not` ... sorry.
if (!not) {
config.dirs.push(dir);
}
} else {
// ensures we end up in the check that tries to get a base directory
// and then adds it to the watch list
throw new Error();
}
} catch (e) {
var base = tryBaseDir(dir);
if (!not && base) {
if (config.dirs.indexOf(base) === -1) {
config.dirs.push(base);
}
}
}
if (rule.slice(-1) === '/') {
// just slap on a * anyway
rule += '*';
}
// if the url ends with * but not **/* and not *.*
// then convert to **/* - somehow it was missed :-\
if (rule.slice(-4) !== '**/*' &&
rule.slice(-1) === '*' &&
rule.indexOf('*.') === -1) {
if (rule.slice(-2) !== '**') {
rule += '*/*';
}
}
return (not ? '!' : '') + rule;
});
return monitor;
}
function tryBaseDir(dir) {
var stat;
if (/[?*\{\[]+/.test(dir)) { // if this is pattern, then try to find the base
try {
var base = path.dirname(dir.replace(/([?*\{\[]+.*$)/, 'foo'));
stat = fs.statSync(base);
if (stat.isDirectory()) {
return base;
}
} catch (error) {
// console.log(error);
}
} else {
try {
stat = fs.statSync(dir);
// if this path is actually a single file that exists, then just monitor
// that, *specifically*.
if (stat.isFile() || stat.isDirectory()) {
return dir;
}
} catch (e) { }
}
return false;
}
function match(files, monitor, ext) {
// sort the rules by highest specificity (based on number of slashes)
// ignore rules (!) get sorted highest as they take precedent
const cwd = process.cwd();
var rules = monitor.sort(function (a, b) {
var r = b.split(path.sep).length - a.split(path.sep).length;
var aIsIgnore = a.slice(0, 1) === '!';
var bIsIgnore = b.slice(0, 1) === '!';
if (aIsIgnore || bIsIgnore) {
if (aIsIgnore) {
return -1;
}
return 1;
}
if (r === 0) {
return b.length - a.length;
}
return r;
}).map(function (s) {
var prefix = s.slice(0, 1);
if (prefix === '!') {
if (s.indexOf('!' + cwd) === 0) {
return s;
}
// if it starts with a period, then let's get the relative path
if (s.indexOf('!.') === 0) {
return '!' + path.resolve(cwd, s.substring(1));
}
return '!**' + (prefix !== path.sep ? path.sep : '') + s.slice(1);
}
// if it starts with a period, then let's get the relative path
if (s.indexOf('.') === 0) {
return path.resolve(cwd, s);
}
if (s.indexOf(cwd) === 0) {
return s;
}
return '**' + (prefix !== path.sep ? path.sep : '') + s;
});
debug('rules', rules);
var good = [];
var whitelist = []; // files that we won't check against the extension
var ignored = 0;
var watched = 0;
var usedRules = [];
var minimatchOpts = {
dot: true,
};
// enable case-insensitivity on Windows
if (utils.isWindows) {
minimatchOpts.nocase = true;
}
files.forEach(function (file) {
file = path.resolve(cwd, file);
var matched = false;
for (var i = 0; i < rules.length; i++) {
if (rules[i].slice(0, 1) === '!') {
if (!minimatch(file, rules[i], minimatchOpts)) {
debug('ignored', file, 'rule:', rules[i]);
ignored++;
matched = true;
break;
}
} else {
debug('matched', file, 'rule:', rules[i]);
if (minimatch(file, rules[i], minimatchOpts)) {
watched++;
// don't repeat the output if a rule is matched
if (usedRules.indexOf(rules[i]) === -1) {
usedRules.push(rules[i]);
utils.log.detail('matched rule: ' + rules[i]);
}
// if the rule doesn't match the WATCH EVERYTHING
// but *does* match a rule that ends with *.*, then
// white list it - in that we don't run it through
// the extension check too.
if (rules[i] !== '**' + path.sep + '*.*' &&
rules[i].slice(-3) === '*.*') {
whitelist.push(file);
} else if (path.basename(file) === path.basename(rules[i])) {
// if the file matches the actual rule, then it's put on whitelist
whitelist.push(file);
} else {
good.push(file);
}
matched = true;
break;
} else {
// utils.log.detail('no match: ' + rules[i], file);
}
}
}
if (!matched) {
ignored++;
}
});
debug('good', good)
// finally check the good files against the extensions that we're monitoring
if (ext) {
if (ext.indexOf(',') === -1) {
ext = '**/*.' + ext;
} else {
ext = '**/*.{' + ext + '}';
}
good = good.filter(function (file) {
// only compare the filename to the extension test
return minimatch(path.basename(file), ext, minimatchOpts);
});
} // else assume *.*
var result = good.concat(whitelist);
if (utils.isWindows) {
// fix for windows testing - I *think* this is okay to do
result = result.map(function (file) {
return file.slice(0, 1).toLowerCase() + file.slice(1);
});
}
return {
result: result,
ignored: ignored,
watched: watched,
total: files.length,
};
}

541
node_modules/nodemon/lib/monitor/run.js generated vendored Normal file
View File

@ -0,0 +1,541 @@
var debug = require('debug')('nodemon:run');
const statSync = require('fs').statSync;
var utils = require('../utils');
var bus = utils.bus;
var childProcess = require('child_process');
var spawn = childProcess.spawn;
var exec = childProcess.exec;
var execSync = childProcess.execSync;
var fork = childProcess.fork;
var watch = require('./watch').watch;
var config = require('../config');
var child = null; // the actual child process we spawn
var killedAfterChange = false;
var noop = () => {};
var restart = null;
var psTree = require('pstree.remy');
var path = require('path');
var signals = require('./signals');
const osRelease = parseInt(require('os').release().split('.')[0], 10);
function run(options) {
var cmd = config.command.raw;
// moved up
// we need restart function below in the global scope for run.kill
/*jshint validthis:true*/
restart = run.bind(this, options);
run.restart = restart;
// binding options with instance of run
// so that we can use it in run.kill
run.options = options;
var runCmd = !options.runOnChangeOnly || config.lastStarted !== 0;
if (runCmd) {
utils.log.status('starting `' + config.command.string + '`');
} else {
// should just watch file if command is not to be run
// had another alternate approach
// to stop process being forked/spawned in the below code
// but this approach does early exit and makes code cleaner
debug('start watch on: %s', config.options.watch);
if (config.options.watch !== false) {
watch();
return;
}
}
config.lastStarted = Date.now();
var stdio = ['pipe', 'pipe', 'pipe'];
if (config.options.stdout) {
stdio = ['pipe', process.stdout, process.stderr];
}
if (config.options.stdin === false) {
stdio = [process.stdin, process.stdout, process.stderr];
}
var sh = 'sh';
var shFlag = '-c';
const binPath = process.cwd() + '/node_modules/.bin';
const spawnOptions = {
env: Object.assign({}, process.env, options.execOptions.env, {
PATH: binPath + path.delimiter + process.env.PATH,
}),
stdio: stdio,
};
var executable = cmd.executable;
if (utils.isWindows) {
// if the exec includes a forward slash, reverse it for windows compat
// but *only* apply to the first command, and none of the arguments.
// ref #1251 and #1236
if (executable.indexOf('/') !== -1) {
executable = executable
.split(' ')
.map((e, i) => {
if (i === 0) {
return path.normalize(e);
}
return e;
})
.join(' ');
}
// taken from npm's cli: https://git.io/vNFD4
sh = process.env.comspec || 'cmd';
shFlag = '/d /s /c';
spawnOptions.windowsVerbatimArguments = true;
}
var args = runCmd ? utils.stringify(executable, cmd.args) : ':';
var spawnArgs = [sh, [shFlag, args], spawnOptions];
const firstArg = cmd.args[0] || '';
var inBinPath = false;
try {
inBinPath = statSync(`${binPath}/${executable}`).isFile();
} catch (e) {}
// hasStdio allows us to correctly handle stdin piping
// see: https://git.io/vNtX3
const hasStdio = utils.satisfies('>= 6.4.0 || < 5');
// forking helps with sub-process handling and tends to clean up better
// than spawning, but it should only be used under specific conditions
const shouldFork =
!config.options.spawn &&
!inBinPath &&
!(firstArg.indexOf('-') === 0) && // don't fork if there's a node exec arg
firstArg !== 'inspect' && // don't fork it's `inspect` debugger
executable === 'node' && // only fork if node
utils.version.major > 4; // only fork if node version > 4
if (shouldFork) {
// this assumes the first argument is the script and slices it out, since
// we're forking
var forkArgs = cmd.args.slice(1);
var env = utils.merge(options.execOptions.env, process.env);
stdio.push('ipc');
child = fork(options.execOptions.script, forkArgs, {
env: env,
stdio: stdio,
silent: !hasStdio,
});
utils.log.detail('forking');
debug('fork', sh, shFlag, args);
} else {
utils.log.detail('spawning');
child = spawn.apply(null, spawnArgs);
debug('spawn', sh, shFlag, args);
}
if (config.required) {
var emit = {
stdout: function (data) {
bus.emit('stdout', data);
},
stderr: function (data) {
bus.emit('stderr', data);
},
};
// now work out what to bind to...
if (config.options.stdout) {
child.on('stdout', emit.stdout).on('stderr', emit.stderr);
} else {
child.stdout.on('data', emit.stdout);
child.stderr.on('data', emit.stderr);
bus.stdout = child.stdout;
bus.stderr = child.stderr;
}
if (shouldFork) {
child.on('message', function (message, sendHandle) {
bus.emit('message', message, sendHandle);
});
}
}
bus.emit('start');
utils.log.detail('child pid: ' + child.pid);
child.on('error', function (error) {
bus.emit('error', error);
if (error.code === 'ENOENT') {
utils.log.error('unable to run executable: "' + cmd.executable + '"');
process.exit(1);
} else {
utils.log.error('failed to start child process: ' + error.code);
throw error;
}
});
child.on('exit', function (code, signal) {
if (child && child.stdin) {
process.stdin.unpipe(child.stdin);
}
if (code === 127) {
utils.log.error(
'failed to start process, "' + cmd.executable + '" exec not found'
);
bus.emit('error', code);
process.exit();
}
// If the command failed with code 2, it may or may not be a syntax error
// See: http://git.io/fNOAR
// We will only assume a parse error, if the child failed quickly
if (code === 2 && Date.now() < config.lastStarted + 500) {
utils.log.error('process failed, unhandled exit code (2)');
utils.log.error('');
utils.log.error('Either the command has a syntax error,');
utils.log.error('or it is exiting with reserved code 2.');
utils.log.error('');
utils.log.error('To keep nodemon running even after a code 2,');
utils.log.error('add this to the end of your command: || exit 1');
utils.log.error('');
utils.log.error('Read more here: https://git.io/fNOAG');
utils.log.error('');
utils.log.error('nodemon will stop now so that you can fix the command.');
utils.log.error('');
bus.emit('error', code);
process.exit();
}
// In case we killed the app ourselves, set the signal thusly
if (killedAfterChange) {
killedAfterChange = false;
signal = config.signal;
}
// this is nasty, but it gives it windows support
if (utils.isWindows && signal === 'SIGTERM') {
signal = config.signal;
}
if (signal === config.signal || code === 0) {
// this was a clean exit, so emit exit, rather than crash
debug('bus.emit(exit) via ' + config.signal);
bus.emit('exit', signal);
// exit the monitor, but do it gracefully
if (signal === config.signal) {
return restart();
}
if (code === 0) {
// clean exit - wait until file change to restart
if (runCmd) {
utils.log.status('clean exit - waiting for changes before restart');
}
child = null;
}
} else {
bus.emit('crash');
if (options.exitcrash) {
utils.log.fail('app crashed');
if (!config.required) {
process.exit(1);
}
} else {
utils.log.fail(
'app crashed - waiting for file changes before' + ' starting...'
);
child = null;
}
}
if (config.options.restartable) {
// stdin needs to kick in again to be able to listen to the
// restart command
process.stdin.resume();
}
});
// moved the run.kill outside to handle both the cases
// intial start
// no start
// connect stdin to the child process (options.stdin is on by default)
if (options.stdin) {
process.stdin.resume();
// FIXME decide whether or not we need to decide the encoding
// process.stdin.setEncoding('utf8');
// swallow the stdin error if it happens
// ref: https://github.com/remy/nodemon/issues/1195
if (hasStdio) {
child.stdin.on('error', () => {});
process.stdin.pipe(child.stdin);
} else {
if (child.stdout) {
child.stdout.pipe(process.stdout);
} else {
utils.log.error(
'running an unsupported version of node ' + process.version
);
utils.log.error(
'nodemon may not work as expected - ' +
'please consider upgrading to LTS'
);
}
}
bus.once('exit', function () {
if (child && process.stdin.unpipe) {
// node > 0.8
process.stdin.unpipe(child.stdin);
}
});
}
debug('start watch on: %s', config.options.watch);
if (config.options.watch !== false) {
watch();
}
}
function waitForSubProcesses(pid, callback) {
debug('checking ps tree for pids of ' + pid);
psTree(pid, (err, pids) => {
if (!pids.length) {
return callback();
}
utils.log.status(
`still waiting for ${pids.length} sub-process${
pids.length > 2 ? 'es' : ''
} to finish...`
);
setTimeout(() => waitForSubProcesses(pid, callback), 1000);
});
}
function kill(child, signal, callback) {
if (!callback) {
callback = noop;
}
if (utils.isWindows) {
const taskKill = () => {
try {
exec('taskkill /pid ' + child.pid + ' /T /F');
} catch (e) {
utils.log.error('Could not shutdown sub process cleanly');
}
};
// We are handling a 'SIGKILL' , 'SIGUSR2' and 'SIGUSR1' POSIX signal under Windows the
// same way it is handled on a UNIX system: We are performing
// a hard shutdown without waiting for the process to clean-up.
if (signal === 'SIGKILL' || osRelease < 10 || signal === 'SIGUSR2' || signal==="SIGUSR1" ) {
debug('terminating process group by force: %s', child.pid);
// We are using the taskkill utility to terminate the whole
// process group ('/t') of the child ('/pid') by force ('/f').
// We need to end all sub processes, because the 'child'
// process in this context is actually a cmd.exe wrapper.
taskKill();
callback();
return;
}
try {
// We are using the Windows Management Instrumentation Command-line
// (wmic.exe) to resolve the sub-child process identifier, because the
// 'child' process in this context is actually a cmd.exe wrapper.
// We want to send the termination signal directly to the node process.
// The '2> nul' silences the no process found error message.
const resultBuffer = execSync(
`wmic process where (ParentProcessId=${child.pid}) get ProcessId 2> nul`
);
const result = resultBuffer.toString().match(/^[0-9]+/m);
// If there is no sub-child process we fall back to the child process.
const processId = Array.isArray(result) ? result[0] : child.pid;
debug('sending kill signal SIGINT to process: %s', processId);
// We are using the standalone 'windows-kill' executable to send the
// standard POSIX signal 'SIGINT' to the node process. This fixes #1720.
const windowsKill = path.normalize(
`${__dirname}/../../bin/windows-kill.exe`
);
// We have to detach the 'windows-kill' execution completely from this
// process group to avoid terminating the nodemon process itself.
// See: https://github.com/alirdn/windows-kill#how-it-works--limitations
//
// Therefore we are using 'start' to create a new cmd.exe context.
// The '/min' option hides the new terminal window and the '/wait'
// option lets the process wait for the command to finish.
execSync(
`start "windows-kill" /min /wait "${windowsKill}" -SIGINT ${processId}`
);
} catch (e) {
taskKill();
}
callback();
} else {
// we use psTree to kill the full subtree of nodemon, because when
// spawning processes like `coffee` under the `--debug` flag, it'll spawn
// it's own child, and that can't be killed by nodemon, so psTree gives us
// an array of PIDs that have spawned under nodemon, and we send each the
// configured signal (default: SIGUSR2) signal, which fixes #335
// note that psTree also works if `ps` is missing by looking in /proc
let sig = signal.replace('SIG', '');
psTree(child.pid, function (err, pids) {
// if ps isn't native to the OS, then we need to send the numeric value
// for the signal during the kill, `signals` is a lookup table for that.
if (!psTree.hasPS) {
sig = signals[signal];
}
// the sub processes need to be killed from smallest to largest
debug('sending kill signal to ' + pids.join(', '));
child.kill(signal);
pids.sort().forEach((pid) => exec(`kill -${sig} ${pid}`, noop));
waitForSubProcesses(child.pid, () => {
// finally kill the main user process
exec(`kill -${sig} ${child.pid}`, callback);
});
});
}
}
run.kill = function (noRestart, callback) {
// I hate code like this :( - Remy (author of said code)
if (typeof noRestart === 'function') {
callback = noRestart;
noRestart = false;
}
if (!callback) {
callback = noop;
}
if (child !== null) {
// if the stdin piping is on, we need to unpipe, but also close stdin on
// the child, otherwise linux can throw EPIPE or ECONNRESET errors.
if (run.options.stdin) {
process.stdin.unpipe(child.stdin);
}
// For the on('exit', ...) handler above the following looks like a
// crash, so we set the killedAfterChange flag if a restart is planned
if (!noRestart) {
killedAfterChange = true;
}
/* Now kill the entire subtree of processes belonging to nodemon */
var oldPid = child.pid;
if (child) {
kill(child, config.signal, function () {
// this seems to fix the 0.11.x issue with the "rs" restart command,
// though I'm unsure why. it seems like more data is streamed in to
// stdin after we close.
if (child && run.options.stdin && child.stdin && oldPid === child.pid) {
child.stdin.end();
}
callback();
});
}
} else if (!noRestart) {
// if there's no child, then we need to manually start the process
// this is because as there was no child, the child.on('exit') event
// handler doesn't exist which would normally trigger the restart.
bus.once('start', callback);
run.restart();
} else {
callback();
}
};
run.restart = noop;
bus.on('quit', function onQuit(code) {
if (code === undefined) {
code = 0;
}
// remove event listener
var exitTimer = null;
var exit = function () {
clearTimeout(exitTimer);
exit = noop; // null out in case of race condition
child = null;
if (!config.required) {
// Execute all other quit listeners.
bus.listeners('quit').forEach(function (listener) {
if (listener !== onQuit) {
listener();
}
});
process.exit(code);
} else {
bus.emit('exit');
}
};
// if we're not running already, don't bother with trying to kill
if (config.run === false) {
return exit();
}
// immediately try to stop any polling
config.run = false;
if (child) {
// give up waiting for the kids after 10 seconds
exitTimer = setTimeout(exit, 10 * 1000);
child.removeAllListeners('exit');
child.once('exit', exit);
kill(child, 'SIGINT');
} else {
exit();
}
});
bus.on('restart', function () {
// run.kill will send a SIGINT to the child process, which will cause it
// to terminate, which in turn uses the 'exit' event handler to restart
run.kill();
});
// remove the child file on exit
process.on('exit', function () {
utils.log.detail('exiting');
if (child) {
child.kill();
}
});
// because windows borks when listening for the SIG* events
if (!utils.isWindows) {
bus.once('boot', () => {
// usual suspect: ctrl+c exit
process.once('SIGINT', () => bus.emit('quit', 130));
process.once('SIGTERM', () => {
bus.emit('quit', 143);
if (child) {
child.kill('SIGTERM');
}
});
});
}
module.exports = run;

34
node_modules/nodemon/lib/monitor/signals.js generated vendored Normal file
View File

@ -0,0 +1,34 @@
module.exports = {
SIGHUP: 1,
SIGINT: 2,
SIGQUIT: 3,
SIGILL: 4,
SIGTRAP: 5,
SIGABRT: 6,
SIGBUS: 7,
SIGFPE: 8,
SIGKILL: 9,
SIGUSR1: 10,
SIGSEGV: 11,
SIGUSR2: 12,
SIGPIPE: 13,
SIGALRM: 14,
SIGTERM: 15,
SIGSTKFLT: 16,
SIGCHLD: 17,
SIGCONT: 18,
SIGSTOP: 19,
SIGTSTP: 20,
SIGTTIN: 21,
SIGTTOU: 22,
SIGURG: 23,
SIGXCPU: 24,
SIGXFSZ: 25,
SIGVTALRM: 26,
SIGPROF: 27,
SIGWINCH: 28,
SIGIO: 29,
SIGPWR: 30,
SIGSYS: 31,
SIGRTMIN: 35,
}

239
node_modules/nodemon/lib/monitor/watch.js generated vendored Normal file
View File

@ -0,0 +1,239 @@
module.exports.watch = watch;
module.exports.resetWatchers = resetWatchers;
var debug = require('debug')('nodemon:watch');
var debugRoot = require('debug')('nodemon');
var chokidar = require('chokidar');
var undefsafe = require('undefsafe');
var config = require('../config');
var path = require('path');
var utils = require('../utils');
var bus = utils.bus;
var match = require('./match');
var watchers = [];
var debouncedBus;
bus.on('reset', resetWatchers);
function resetWatchers() {
debugRoot('resetting watchers');
watchers.forEach(function (watcher) {
watcher.close();
});
watchers = [];
}
function watch() {
if (watchers.length) {
debug('early exit on watch, still watching (%s)', watchers.length);
return;
}
var dirs = [].slice.call(config.dirs);
debugRoot('start watch on: %s', dirs.join(', '));
const rootIgnored = config.options.ignore;
debugRoot('ignored', rootIgnored);
var watchedFiles = [];
const promise = new Promise(function (resolve) {
const dotFilePattern = /[/\\]\./;
var ignored = match.rulesToMonitor(
[], // not needed
Array.from(rootIgnored),
config
).map(pattern => pattern.slice(1));
const addDotFile = dirs.filter(dir => dir.match(dotFilePattern));
// don't ignore dotfiles if explicitly watched.
if (addDotFile.length === 0) {
ignored.push(dotFilePattern);
}
var watchOptions = {
ignorePermissionErrors: true,
ignored: ignored,
persistent: true,
usePolling: config.options.legacyWatch || false,
interval: config.options.pollingInterval,
// note to future developer: I've gone back and forth on adding `cwd`
// to the props and in some cases it fixes bugs but typically it causes
// bugs elsewhere (since nodemon is used is so many ways). the final
// decision is to *not* use it at all and work around it
// cwd: ...
};
if (utils.isWindows) {
watchOptions.disableGlobbing = true;
}
if (process.env.TEST) {
watchOptions.useFsEvents = false;
}
var watcher = chokidar.watch(
dirs,
Object.assign({}, watchOptions, config.options.watchOptions || {})
);
watcher.ready = false;
var total = 0;
watcher.on('change', filterAndRestart);
watcher.on('add', function (file) {
if (watcher.ready) {
return filterAndRestart(file);
}
watchedFiles.push(file);
bus.emit('watching', file);
debug('chokidar watching: %s', file);
});
watcher.on('ready', function () {
watchedFiles = Array.from(new Set(watchedFiles)); // ensure no dupes
total = watchedFiles.length;
watcher.ready = true;
resolve(total);
debugRoot('watch is complete');
});
watcher.on('error', function (error) {
if (error.code === 'EINVAL') {
utils.log.error(
'Internal watch failed. Likely cause: too many ' +
'files being watched (perhaps from the root of a drive?\n' +
'See https://github.com/paulmillr/chokidar/issues/229 for details'
);
} else {
utils.log.error('Internal watch failed: ' + error.message);
process.exit(1);
}
});
watchers.push(watcher);
});
return promise.catch(e => {
// this is a core error and it should break nodemon - so I have to break
// out of a promise using the setTimeout
setTimeout(() => {
throw e;
});
}).then(function () {
utils.log.detail(`watching ${watchedFiles.length} file${
watchedFiles.length === 1 ? '' : 's'}`);
return watchedFiles;
});
}
function filterAndRestart(files) {
if (!Array.isArray(files)) {
files = [files];
}
if (files.length) {
var cwd = process.cwd();
if (this.options && this.options.cwd) {
cwd = this.options.cwd;
}
utils.log.detail(
'files triggering change check: ' +
files
.map(file => {
const res = path.relative(cwd, file);
return res;
})
.join(', ')
);
// make sure the path is right and drop an empty
// filenames (sometimes on windows)
files = files.filter(Boolean).map(file => {
return path.relative(process.cwd(), path.relative(cwd, file));
});
if (utils.isWindows) {
// ensure the drive letter is in uppercase (c:\foo -> C:\foo)
files = files.map(f => {
if (f.indexOf(':') === -1) { return f; }
return f[0].toUpperCase() + f.slice(1);
});
}
debug('filterAndRestart on', files);
var matched = match(
files,
config.options.monitor,
undefsafe(config, 'options.execOptions.ext')
);
debug('matched?', JSON.stringify(matched));
// if there's no matches, then test to see if the changed file is the
// running script, if so, let's allow a restart
if (config.options.execOptions && config.options.execOptions.script) {
const script = path.resolve(config.options.execOptions.script);
if (matched.result.length === 0 && script) {
const length = script.length;
files.find(file => {
if (file.substr(-length, length) === script) {
matched = {
result: [file],
total: 1,
};
return true;
}
});
}
}
utils.log.detail(
'changes after filters (before/after): ' +
[files.length, matched.result.length].join('/')
);
// reset the last check so we're only looking at recently modified files
config.lastStarted = Date.now();
if (matched.result.length) {
if (config.options.delay > 0) {
utils.log.detail('delaying restart for ' + config.options.delay + 'ms');
if (debouncedBus === undefined) {
debouncedBus = debounce(restartBus, config.options.delay);
}
debouncedBus(matched);
} else {
return restartBus(matched);
}
}
}
}
function restartBus(matched) {
utils.log.status('restarting due to changes...');
matched.result.map(file => {
utils.log.detail(path.relative(process.cwd(), file));
});
if (config.options.verbose) {
utils.log._log('');
}
bus.emit('restart', matched.result);
}
function debounce(fn, delay) {
var timer = null;
return function () {
const context = this;
const args = arguments;
clearTimeout(timer);
timer = setTimeout(() =>fn.apply(context, args), delay);
};
}

311
node_modules/nodemon/lib/nodemon.js generated vendored Normal file
View File

@ -0,0 +1,311 @@
var debug = require('debug')('nodemon');
var path = require('path');
var monitor = require('./monitor');
var cli = require('./cli');
var version = require('./version');
var util = require('util');
var utils = require('./utils');
var bus = utils.bus;
var help = require('./help');
var config = require('./config');
var spawn = require('./spawn');
const defaults = require('./config/defaults')
var eventHandlers = {};
// this is fairly dirty, but theoretically sound since it's part of the
// stable module API
config.required = utils.isRequired;
function nodemon(settings) {
bus.emit('boot');
nodemon.reset();
// allow the cli string as the argument to nodemon, and allow for
// `node nodemon -V app.js` or just `-V app.js`
if (typeof settings === 'string') {
settings = settings.trim();
if (settings.indexOf('node') !== 0) {
if (settings.indexOf('nodemon') !== 0) {
settings = 'nodemon ' + settings;
}
settings = 'node ' + settings;
}
settings = cli.parse(settings);
}
// set the debug flag as early as possible to get all the detailed logging
if (settings.verbose) {
utils.debug = true;
}
if (settings.help) {
if (process.stdout.isTTY) {
process.stdout._handle.setBlocking(true); // nodejs/node#6456
}
console.log(help(settings.help));
if (!config.required) {
process.exit(0);
}
}
if (settings.version) {
version().then(function (v) {
console.log(v);
if (!config.required) {
process.exit(0);
}
});
return;
}
// nodemon tools like grunt-nodemon. This affects where
// the script is being run from, and will affect where
// nodemon looks for the nodemon.json files
if (settings.cwd) {
// this is protection to make sure we haven't dont the chdir already...
// say like in cli/parse.js (which is where we do this once already!)
if (process.cwd() !== path.resolve(config.system.cwd, settings.cwd)) {
process.chdir(settings.cwd);
}
}
const cwd = process.cwd();
config.load(settings, function (config) {
if (!config.options.dump && !config.options.execOptions.script &&
config.options.execOptions.exec === 'node') {
if (!config.required) {
console.log(help('usage'));
process.exit();
}
return;
}
// before we print anything, update the colour setting on logging
utils.colours = config.options.colours;
// always echo out the current version
utils.log.info(version.pinned);
const cwd = process.cwd();
if (config.options.cwd) {
utils.log.detail('process root: ' + cwd);
}
config.loaded.map(file => file.replace(cwd, '.')).forEach(file => {
utils.log.detail('reading config ' + file);
});
if (config.options.stdin && config.options.restartable) {
// allow nodemon to restart when the use types 'rs\n'
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', data => {
const str = data.toString().trim().toLowerCase();
// if the keys entered match the restartable value, then restart!
if (str === config.options.restartable) {
bus.emit('restart');
} else if (data.charCodeAt(0) === 12) { // ctrl+l
console.clear();
}
});
} else if (config.options.stdin) {
// so let's make sure we don't eat the key presses
// but also, since we're wrapping, watch out for
// special keys, like ctrl+c x 2 or '.exit' or ctrl+d or ctrl+l
var ctrlC = false;
var buffer = '';
process.stdin.on('data', function (data) {
data = data.toString();
buffer += data;
const chr = data.charCodeAt(0);
// if restartable, echo back
if (chr === 3) {
if (ctrlC) {
process.exit(0);
}
ctrlC = true;
return;
} else if (buffer === '.exit' || chr === 4) { // ctrl+d
process.exit();
} else if (chr === 13 || chr === 10) { // enter / carriage return
buffer = '';
} else if (chr === 12) { // ctrl+l
console.clear();
buffer = '';
}
ctrlC = false;
});
if (process.stdin.setRawMode) {
process.stdin.setRawMode(true);
}
}
if (config.options.restartable) {
utils.log.info('to restart at any time, enter `' +
config.options.restartable + '`');
}
if (!config.required) {
const restartSignal = config.options.signal === 'SIGUSR2' ? 'SIGHUP' : 'SIGUSR2';
process.on(restartSignal, nodemon.restart);
utils.bus.on('error', () => {
utils.log.fail((new Error().stack));
});
utils.log.detail((config.options.restartable ? 'or ' : '') + 'send ' +
restartSignal + ' to ' + process.pid + ' to restart');
}
const ignoring = config.options.monitor.map(function (rule) {
if (rule.slice(0, 1) !== '!') {
return false;
}
rule = rule.slice(1);
// don't notify of default ignores
if (defaults.ignoreRoot.indexOf(rule) !== -1) {
return false;
return rule.slice(3).slice(0, -3);
}
if (rule.startsWith(cwd)) {
return rule.replace(cwd, '.');
}
return rule;
}).filter(Boolean).join(' ');
if (ignoring) utils.log.detail('ignoring: ' + ignoring);
utils.log.info('watching path(s): ' + config.options.monitor.map(function (rule) {
if (rule.slice(0, 1) !== '!') {
try {
rule = path.relative(process.cwd(), rule);
} catch (e) {}
return rule;
}
return false;
}).filter(Boolean).join(' '));
utils.log.info('watching extensions: ' + (config.options.execOptions.ext || '(all)'));
if (config.options.dump) {
utils.log._log('log', '--------------');
utils.log._log('log', 'node: ' + process.version);
utils.log._log('log', 'nodemon: ' + version.pinned);
utils.log._log('log', 'command: ' + process.argv.join(' '));
utils.log._log('log', 'cwd: ' + cwd);
utils.log._log('log', ['OS:', process.platform, process.arch].join(' '));
utils.log._log('log', '--------------');
utils.log._log('log', util.inspect(config, { depth: null }));
utils.log._log('log', '--------------');
if (!config.required) {
process.exit();
}
return;
}
config.run = true;
if (config.options.stdout === false) {
nodemon.on('start', function () {
nodemon.stdout = bus.stdout;
nodemon.stderr = bus.stderr;
bus.emit('readable');
});
}
if (config.options.events && Object.keys(config.options.events).length) {
Object.keys(config.options.events).forEach(function (key) {
utils.log.detail('bind ' + key + ' -> `' +
config.options.events[key] + '`');
nodemon.on(key, function () {
if (config.options && config.options.events) {
spawn(config.options.events[key], config,
[].slice.apply(arguments));
}
});
});
}
monitor.run(config.options);
});
return nodemon;
}
nodemon.restart = function () {
utils.log.status('restarting child process');
bus.emit('restart');
return nodemon;
};
nodemon.addListener = nodemon.on = function (event, handler) {
if (!eventHandlers[event]) { eventHandlers[event] = []; }
eventHandlers[event].push(handler);
bus.on(event, handler);
return nodemon;
};
nodemon.once = function (event, handler) {
if (!eventHandlers[event]) { eventHandlers[event] = []; }
eventHandlers[event].push(handler);
bus.once(event, function () {
debug('bus.once(%s)', event);
eventHandlers[event].splice(eventHandlers[event].indexOf(handler), 1);
handler.apply(this, arguments);
});
return nodemon;
};
nodemon.emit = function () {
bus.emit.apply(bus, [].slice.call(arguments));
return nodemon;
};
nodemon.removeAllListeners = function (event) {
// unbind only the `nodemon.on` event handlers
Object.keys(eventHandlers).filter(function (e) {
return event ? e === event : true;
}).forEach(function (event) {
eventHandlers[event].forEach(function (handler) {
bus.removeListener(event, handler);
eventHandlers[event].splice(eventHandlers[event].indexOf(handler), 1);
});
});
return nodemon;
};
nodemon.reset = function (done) {
bus.emit('reset', done);
};
bus.on('reset', function (done) {
debug('reset');
nodemon.removeAllListeners();
monitor.run.kill(true, function () {
utils.reset();
config.reset();
config.run = false;
if (done) {
done();
}
});
});
// expose the full config
nodemon.config = config;
module.exports = nodemon;

89
node_modules/nodemon/lib/rules/add.js generated vendored Normal file
View File

@ -0,0 +1,89 @@
'use strict';
var utils = require('../utils');
// internal
var reEscComments = /\\#/g;
// note that '^^' is used in place of escaped comments
var reUnescapeComments = /\^\^/g;
var reComments = /#.*$/;
var reEscapeChars = /[.|\-[\]()\\]/g;
var reAsterisk = /\*/g;
module.exports = add;
/**
* Converts file patterns or regular expressions to nodemon
* compatible RegExp matching rules. Note: the `rules` argument
* object is modified to include the new rule and new RegExp
*
* ### Example:
*
* var rules = { watch: [], ignore: [] };
* add(rules, 'watch', '*.js');
* add(rules, 'ignore', '/public/');
* add(rules, 'watch', ':(\d)*\.js'); // note: string based regexp
* add(rules, 'watch', /\d*\.js/);
*
* @param {Object} rules containing `watch` and `ignore`. Also updated during
* execution
* @param {String} which must be either "watch" or "ignore"
* @param {String|RegExp} the actual rule.
*/
function add(rules, which, rule) {
if (!{ ignore: 1, watch: 1}[which]) {
throw new Error('rules/index.js#add requires "ignore" or "watch" as the ' +
'first argument');
}
if (Array.isArray(rule)) {
rule.forEach(function (rule) {
add(rules, which, rule);
});
return;
}
// support the rule being a RegExp, but reformat it to
// the custom :<regexp> format that we're working with.
if (rule instanceof RegExp) {
// rule = ':' + rule.toString().replace(/^\/(.*?)\/$/g, '$1');
utils.log.error('RegExp format no longer supported, but globs are.');
return;
}
// remove comments and trim lines
// this mess of replace methods is escaping "\#" to allow for emacs temp files
// first up strip comments and remove blank head or tails
rule = (rule || '').replace(reEscComments, '^^')
.replace(reComments, '')
.replace(reUnescapeComments, '#').trim();
var regexp = false;
if (typeof rule === 'string' && rule.substring(0, 1) === ':') {
rule = rule.substring(1);
utils.log.error('RegExp no longer supported: ' + rule);
regexp = true;
} else if (rule.length === 0) {
// blank line (or it was a comment)
return;
}
if (regexp) {
// rules[which].push(rule);
} else {
// rule = rule.replace(reEscapeChars, '\\$&')
// .replace(reAsterisk, '.*');
rules[which].push(rule);
// compile a regexp of all the rules for this ignore or watch
var re = rules[which].map(function (rule) {
return rule.replace(reEscapeChars, '\\$&')
.replace(reAsterisk, '.*');
}).join('|');
// used for the directory matching
rules[which].re = new RegExp(re);
}
}

53
node_modules/nodemon/lib/rules/index.js generated vendored Normal file
View File

@ -0,0 +1,53 @@
'use strict';
var utils = require('../utils');
var add = require('./add');
var parse = require('./parse');
// exported
var rules = { ignore: [], watch: [] };
/**
* Loads a nodemon config file and populates the ignore
* and watch rules with it's contents, and calls callback
* with the new rules
*
* @param {String} filename
* @param {Function} callback
*/
function load(filename, callback) {
parse(filename, function (err, result) {
if (err) {
// we should have bombed already, but
utils.log.error(err);
callback(err);
}
if (result.raw) {
result.raw.forEach(add.bind(null, rules, 'ignore'));
} else {
result.ignore.forEach(add.bind(null, rules, 'ignore'));
result.watch.forEach(add.bind(null, rules, 'watch'));
}
callback(null, rules);
});
}
module.exports = {
reset: function () { // just used for testing
rules.ignore.length = rules.watch.length = 0;
delete rules.ignore.re;
delete rules.watch.re;
},
load: load,
ignore: {
test: add.bind(null, rules, 'ignore'),
add: add.bind(null, rules, 'ignore'),
},
watch: {
test: add.bind(null, rules, 'watch'),
add: add.bind(null, rules, 'watch'),
},
add: add.bind(null, rules),
rules: rules,
};

43
node_modules/nodemon/lib/rules/parse.js generated vendored Normal file
View File

@ -0,0 +1,43 @@
'use strict';
var fs = require('fs');
/**
* Parse the nodemon config file, supporting both old style
* plain text config file, and JSON version of the config
*
* @param {String} filename
* @param {Function} callback
*/
function parse(filename, callback) {
var rules = {
ignore: [],
watch: [],
};
fs.readFile(filename, 'utf8', function (err, content) {
if (err) {
return callback(err);
}
var json = null;
try {
json = JSON.parse(content);
} catch (e) {}
if (json !== null) {
rules = {
ignore: json.ignore || [],
watch: json.watch || [],
};
return callback(null, rules);
}
// otherwise return the raw file
return callback(null, { raw: content.split(/\n/) });
});
}
module.exports = parse;

73
node_modules/nodemon/lib/spawn.js generated vendored Normal file
View File

@ -0,0 +1,73 @@
const path = require('path');
const utils = require('./utils');
const merge = utils.merge;
const bus = utils.bus;
const spawn = require('child_process').spawn;
module.exports = function spawnCommand(command, config, eventArgs) {
var stdio = ['pipe', 'pipe', 'pipe'];
if (config.options.stdout) {
stdio = ['pipe', process.stdout, process.stderr];
}
const env = merge(process.env, { FILENAME: eventArgs[0] });
var sh = 'sh';
var shFlag = '-c';
var spawnOptions = {
env: merge(config.options.execOptions.env, env),
stdio: stdio,
};
if (!Array.isArray(command)) {
command = [command];
}
if (utils.isWindows) {
// if the exec includes a forward slash, reverse it for windows compat
// but *only* apply to the first command, and none of the arguments.
// ref #1251 and #1236
command = command.map(executable => {
if (executable.indexOf('/') === -1) {
return executable;
}
return executable.split(' ').map((e, i) => {
if (i === 0) {
return path.normalize(e);
}
return e;
}).join(' ');
});
// taken from npm's cli: https://git.io/vNFD4
sh = process.env.comspec || 'cmd';
shFlag = '/d /s /c';
spawnOptions.windowsVerbatimArguments = true;
}
const args = command.join(' ');
const child = spawn(sh, [shFlag, args], spawnOptions);
if (config.required) {
var emit = {
stdout: function (data) {
bus.emit('stdout', data);
},
stderr: function (data) {
bus.emit('stderr', data);
},
};
// now work out what to bind to...
if (config.options.stdout) {
child.on('stdout', emit.stdout).on('stderr', emit.stderr);
} else {
child.stdout.on('data', emit.stdout);
child.stderr.on('data', emit.stderr);
bus.stdout = child.stdout;
bus.stderr = child.stderr;
}
}
};

44
node_modules/nodemon/lib/utils/bus.js generated vendored Normal file
View File

@ -0,0 +1,44 @@
var events = require('events');
var debug = require('debug')('nodemon');
var util = require('util');
var Bus = function () {
events.EventEmitter.call(this);
};
util.inherits(Bus, events.EventEmitter);
var bus = new Bus();
// /*
var collected = {};
bus.on('newListener', function (event) {
debug('bus new listener: %s (%s)', event, bus.listeners(event).length);
if (!collected[event]) {
collected[event] = true;
bus.on(event, function () {
debug('bus emit: %s', event);
});
}
});
// */
// proxy process messages (if forked) to the bus
process.on('message', function (event) {
debug('process.message(%s)', event);
bus.emit(event);
});
var emit = bus.emit;
// if nodemon was spawned via a fork, allow upstream communication
// via process.send
if (process.send) {
bus.emit = function (event, data) {
process.send({ type: event, data: data });
emit.apply(bus, arguments);
};
}
module.exports = bus;

40
node_modules/nodemon/lib/utils/clone.js generated vendored Normal file
View File

@ -0,0 +1,40 @@
module.exports = clone;
// via http://stackoverflow.com/a/728694/22617
function clone(obj) {
// Handle the 3 simple types, and null or undefined
if (null === obj || 'object' !== typeof obj) {
return obj;
}
var copy;
// Handle Date
if (obj instanceof Date) {
copy = new Date();
copy.setTime(obj.getTime());
return copy;
}
// Handle Array
if (obj instanceof Array) {
copy = [];
for (var i = 0, len = obj.length; i < len; i++) {
copy[i] = clone(obj[i]);
}
return copy;
}
// Handle Object
if (obj instanceof Object) {
copy = {};
for (var attr in obj) {
if (obj.hasOwnProperty && obj.hasOwnProperty(attr)) {
copy[attr] = clone(obj[attr]);
}
}
return copy;
}
throw new Error('Unable to copy obj! Its type isn\'t supported.');
}

26
node_modules/nodemon/lib/utils/colour.js generated vendored Normal file
View File

@ -0,0 +1,26 @@
/**
* Encodes a string in a colour: red, yellow or green
* @param {String} c colour to highlight in
* @param {String} str the string to encode
* @return {String} coloured string for terminal printing
*/
function colour(c, str) {
return (colour[c] || colour.black) + str + colour.black;
}
function strip(str) {
re.lastIndex = 0; // reset position
return str.replace(re, '');
}
colour.red = '\x1B[31m';
colour.yellow = '\x1B[33m';
colour.green = '\x1B[32m';
colour.black = '\x1B[39m';
var reStr = Object.keys(colour).map(key => colour[key]).join('|');
var re = new RegExp(('(' + reStr + ')').replace(/\[/g, '\\['), 'g');
colour.strip = strip;
module.exports = colour;

102
node_modules/nodemon/lib/utils/index.js generated vendored Normal file
View File

@ -0,0 +1,102 @@
var noop = function () { };
var path = require('path');
const semver = require('semver');
var version = process.versions.node.split('.') || [null, null, null];
var utils = (module.exports = {
semver: semver,
satisfies: test => semver.satisfies(process.versions.node, test),
version: {
major: parseInt(version[0] || 0, 10),
minor: parseInt(version[1] || 0, 10),
patch: parseInt(version[2] || 0, 10),
},
clone: require('./clone'),
merge: require('./merge'),
bus: require('./bus'),
isWindows: process.platform === 'win32',
isMac: process.platform === 'darwin',
isLinux: process.platform === 'linux',
isRequired: (function () {
var p = module.parent;
while (p) {
// in electron.js engine it happens
if (!p.filename) {
return true;
}
if (p.filename.indexOf('bin' + path.sep + 'nodemon.js') !== -1) {
return false;
}
p = p.parent;
}
return true;
})(),
home: process.env.HOME || process.env.HOMEPATH,
quiet: function () {
// nukes the logging
if (!this.debug) {
for (var method in utils.log) {
if (typeof utils.log[method] === 'function') {
utils.log[method] = noop;
}
}
}
},
reset: function () {
if (!this.debug) {
for (var method in utils.log) {
if (typeof utils.log[method] === 'function') {
delete utils.log[method];
}
}
}
this.debug = false;
},
regexpToText: function (t) {
return t
.replace(/\.\*\\./g, '*.')
.replace(/\\{2}/g, '^^')
.replace(/\\/g, '')
.replace(/\^\^/g, '\\');
},
stringify: function (exec, args) {
// serializes an executable string and array of arguments into a string
args = args || [];
return [exec]
.concat(
args.map(function (arg) {
// if an argument contains a space, we want to show it with quotes
// around it to indicate that it is a single argument
if (arg.length > 0 && arg.indexOf(' ') === -1) {
return arg;
}
// this should correctly escape nested quotes
return JSON.stringify(arg);
})
)
.join(' ')
.trim();
},
});
utils.log = require('./log')(utils.isRequired);
Object.defineProperty(utils, 'debug', {
set: function (value) {
this.log.debug = value;
},
get: function () {
return this.log.debug;
},
});
Object.defineProperty(utils, 'colours', {
set: function (value) {
this.log.useColours = value;
},
get: function () {
return this.log.useColours;
},
});

82
node_modules/nodemon/lib/utils/log.js generated vendored Normal file
View File

@ -0,0 +1,82 @@
var colour = require('./colour');
var bus = require('./bus');
var required = false;
var useColours = true;
var coding = {
log: 'black',
info: 'yellow',
status: 'green',
detail: 'yellow',
fail: 'red',
error: 'red',
};
function log(type, text) {
var msg = '[nodemon] ' + (text || '');
if (useColours) {
msg = colour(coding[type], msg);
}
// always push the message through our bus, using nextTick
// to help testing and get _out of_ promises.
process.nextTick(() => {
bus.emit('log', { type: type, message: text, colour: msg });
});
// but if we're running on the command line, also echo out
// question: should we actually just consume our own events?
if (!required) {
if (type === 'error') {
console.error(msg);
} else {
console.log(msg || '');
}
}
}
var Logger = function (r) {
if (!(this instanceof Logger)) {
return new Logger(r);
}
this.required(r);
return this;
};
Object.keys(coding).forEach(function (type) {
Logger.prototype[type] = log.bind(null, type);
});
// detail is for messages that are turned on during debug
Logger.prototype.detail = function (msg) {
if (this.debug) {
log('detail', msg);
}
};
Logger.prototype.required = function (val) {
required = val;
};
Logger.prototype.debug = false;
Logger.prototype._log = function (type, msg) {
if (required) {
bus.emit('log', { type: type, message: msg || '', colour: msg || '' });
} else if (type === 'error') {
console.error(msg);
} else {
console.log(msg || '');
}
};
Object.defineProperty(Logger.prototype, 'useColours', {
set: function (val) {
useColours = val;
},
get: function () {
return useColours;
},
});
module.exports = Logger;

47
node_modules/nodemon/lib/utils/merge.js generated vendored Normal file
View File

@ -0,0 +1,47 @@
var clone = require('./clone');
module.exports = merge;
function typesMatch(a, b) {
return (typeof a === typeof b) && (Array.isArray(a) === Array.isArray(b));
}
/**
* A deep merge of the source based on the target.
* @param {Object} source [description]
* @param {Object} target [description]
* @return {Object} [description]
*/
function merge(source, target, result) {
if (result === undefined) {
result = clone(source);
}
// merge missing values from the target to the source
Object.getOwnPropertyNames(target).forEach(function (key) {
if (source[key] === undefined) {
result[key] = target[key];
}
});
Object.getOwnPropertyNames(source).forEach(function (key) {
var value = source[key];
if (target[key] && typesMatch(value, target[key])) {
// merge empty values
if (value === '') {
result[key] = target[key];
}
if (Array.isArray(value)) {
if (value.length === 0 && target[key].length) {
result[key] = target[key].slice(0);
}
} else if (typeof value === 'object') {
result[key] = merge(value, target[key]);
}
}
});
return result;
}

100
node_modules/nodemon/lib/version.js generated vendored Normal file
View File

@ -0,0 +1,100 @@
module.exports = version;
module.exports.pin = pin;
var fs = require('fs');
var path = require('path');
var exec = require('child_process').exec;
var root = null;
function pin() {
return version().then(function (v) {
version.pinned = v;
});
}
function version(callback) {
// first find the package.json as this will be our root
var promise = findPackage(path.dirname(module.parent.filename))
.then(function (dir) {
// now try to load the package
var v = require(path.resolve(dir, 'package.json')).version;
if (v && v !== '0.0.0-development') {
return v;
}
root = dir;
// else we're in development, give the commit out
// get the last commit and whether the working dir is dirty
var promises = [
branch().catch(function () { return 'master'; }),
commit().catch(function () { return '<none>'; }),
dirty().catch(function () { return 0; }),
];
// use the cached result as the export
return Promise.all(promises).then(function (res) {
var branch = res[0];
var commit = res[1];
var dirtyCount = parseInt(res[2], 10);
var curr = branch + ': ' + commit;
if (dirtyCount !== 0) {
curr += ' (' + dirtyCount + ' dirty files)';
}
return curr;
});
}).catch(function (error) {
console.log(error.stack);
throw error;
});
if (callback) {
promise.then(function (res) {
callback(null, res);
}, callback);
}
return promise;
}
function findPackage(dir) {
if (dir === '/') {
return Promise.reject(new Error('package not found'));
}
return new Promise(function (resolve) {
fs.stat(path.resolve(dir, 'package.json'), function (error, exists) {
if (error || !exists) {
return resolve(findPackage(path.resolve(dir, '..')));
}
resolve(dir);
});
});
}
function command(cmd) {
return new Promise(function (resolve, reject) {
exec(cmd, { cwd: root }, function (err, stdout, stderr) {
var error = stderr.trim();
if (error) {
return reject(new Error(error));
}
resolve(stdout.split('\n').join(''));
});
});
}
function commit() {
return command('git rev-parse HEAD');
}
function branch() {
return command('git rev-parse --abbrev-ref HEAD');
}
function dirty() {
return command('expr $(git status --porcelain 2>/dev/null| ' +
'egrep "^(M| M)" | wc -l)');
}

395
node_modules/nodemon/node_modules/debug/CHANGELOG.md generated vendored Normal file
View File

@ -0,0 +1,395 @@
3.1.0 / 2017-09-26
==================
* Add `DEBUG_HIDE_DATE` env var (#486)
* Remove ReDoS regexp in %o formatter (#504)
* Remove "component" from package.json
* Remove `component.json`
* Ignore package-lock.json
* Examples: fix colors printout
* Fix: browser detection
* Fix: spelling mistake (#496, @EdwardBetts)
3.0.1 / 2017-08-24
==================
* Fix: Disable colors in Edge and Internet Explorer (#489)
3.0.0 / 2017-08-08
==================
* Breaking: Remove DEBUG_FD (#406)
* Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
* Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
* Addition: document `enabled` flag (#465)
* Addition: add 256 colors mode (#481)
* Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
* Update: component: update "ms" to v2.0.0
* Update: separate the Node and Browser tests in Travis-CI
* Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
* Update: separate Node.js and web browser examples for organization
* Update: update "browserify" to v14.4.0
* Fix: fix Readme typo (#473)
2.6.9 / 2017-09-22
==================
* remove ReDoS regexp in %o formatter (#504)
2.6.8 / 2017-05-18
==================
* Fix: Check for undefined on browser globals (#462, @marbemac)
2.6.7 / 2017-05-16
==================
* Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
* Fix: Inline extend function in node implementation (#452, @dougwilson)
* Docs: Fix typo (#455, @msasad)
2.6.5 / 2017-04-27
==================
* Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
* Misc: clean up browser reference checks (#447, @thebigredgeek)
* Misc: add npm-debug.log to .gitignore (@thebigredgeek)
2.6.4 / 2017-04-20
==================
* Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
* Misc: update "ms" to v0.7.3 (@tootallnate)
2.6.3 / 2017-03-13
==================
* Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
* Docs: Changelog fix (@thebigredgeek)
2.6.2 / 2017-03-10
==================
* Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
* Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
* Docs: Add Slackin invite badge (@tootallnate)
2.6.1 / 2017-02-10
==================
* Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
* Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
* Fix: IE8 "Expected identifier" error (#414, @vgoma)
* Fix: Namespaces would not disable once enabled (#409, @musikov)
2.6.0 / 2016-12-28
==================
* Fix: added better null pointer checks for browser useColors (@thebigredgeek)
* Improvement: removed explicit `window.debug` export (#404, @tootallnate)
* Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
2.5.2 / 2016-12-25
==================
* Fix: reference error on window within webworkers (#393, @KlausTrainer)
* Docs: fixed README typo (#391, @lurch)
* Docs: added notice about v3 api discussion (@thebigredgeek)
2.5.1 / 2016-12-20
==================
* Fix: babel-core compatibility
2.5.0 / 2016-12-20
==================
* Fix: wrong reference in bower file (@thebigredgeek)
* Fix: webworker compatibility (@thebigredgeek)
* Fix: output formatting issue (#388, @kribblo)
* Fix: babel-loader compatibility (#383, @escwald)
* Misc: removed built asset from repo and publications (@thebigredgeek)
* Misc: moved source files to /src (#378, @yamikuronue)
* Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
* Test: coveralls integration (#378, @yamikuronue)
* Docs: simplified language in the opening paragraph (#373, @yamikuronue)
2.4.5 / 2016-12-17
==================
* Fix: `navigator` undefined in Rhino (#376, @jochenberger)
* Fix: custom log function (#379, @hsiliev)
* Improvement: bit of cleanup + linting fixes (@thebigredgeek)
* Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
* Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
2.4.4 / 2016-12-14
==================
* Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
2.4.3 / 2016-12-14
==================
* Fix: navigation.userAgent error for react native (#364, @escwald)
2.4.2 / 2016-12-14
==================
* Fix: browser colors (#367, @tootallnate)
* Misc: travis ci integration (@thebigredgeek)
* Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
2.4.1 / 2016-12-13
==================
* Fix: typo that broke the package (#356)
2.4.0 / 2016-12-13
==================
* Fix: bower.json references unbuilt src entry point (#342, @justmatt)
* Fix: revert "handle regex special characters" (@tootallnate)
* Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
* Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
* Improvement: allow colors in workers (#335, @botverse)
* Improvement: use same color for same namespace. (#338, @lchenay)
2.3.3 / 2016-11-09
==================
* Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
* Fix: Returning `localStorage` saved values (#331, Levi Thomason)
* Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
2.3.2 / 2016-11-09
==================
* Fix: be super-safe in index.js as well (@TooTallNate)
* Fix: should check whether process exists (Tom Newby)
2.3.1 / 2016-11-09
==================
* Fix: Added electron compatibility (#324, @paulcbetts)
* Improvement: Added performance optimizations (@tootallnate)
* Readme: Corrected PowerShell environment variable example (#252, @gimre)
* Misc: Removed yarn lock file from source control (#321, @fengmk2)
2.3.0 / 2016-11-07
==================
* Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
* Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
* Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
* Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
* Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
* Package: Update "ms" to 0.7.2 (#315, @DevSide)
* Package: removed superfluous version property from bower.json (#207 @kkirsche)
* Readme: fix USE_COLORS to DEBUG_COLORS
* Readme: Doc fixes for format string sugar (#269, @mlucool)
* Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
* Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
* Readme: better docs for browser support (#224, @matthewmueller)
* Tooling: Added yarn integration for development (#317, @thebigredgeek)
* Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
* Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
* Misc: Updated contributors (@thebigredgeek)
2.2.0 / 2015-05-09
==================
* package: update "ms" to v0.7.1 (#202, @dougwilson)
* README: add logging to file example (#193, @DanielOchoa)
* README: fixed a typo (#191, @amir-s)
* browser: expose `storage` (#190, @stephenmathieson)
* Makefile: add a `distclean` target (#189, @stephenmathieson)
2.1.3 / 2015-03-13
==================
* Updated stdout/stderr example (#186)
* Updated example/stdout.js to match debug current behaviour
* Renamed example/stderr.js to stdout.js
* Update Readme.md (#184)
* replace high intensity foreground color for bold (#182, #183)
2.1.2 / 2015-03-01
==================
* dist: recompile
* update "ms" to v0.7.0
* package: update "browserify" to v9.0.3
* component: fix "ms.js" repo location
* changed bower package name
* updated documentation about using debug in a browser
* fix: security error on safari (#167, #168, @yields)
2.1.1 / 2014-12-29
==================
* browser: use `typeof` to check for `console` existence
* browser: check for `console.log` truthiness (fix IE 8/9)
* browser: add support for Chrome apps
* Readme: added Windows usage remarks
* Add `bower.json` to properly support bower install
2.1.0 / 2014-10-15
==================
* node: implement `DEBUG_FD` env variable support
* package: update "browserify" to v6.1.0
* package: add "license" field to package.json (#135, @panuhorsmalahti)
2.0.0 / 2014-09-01
==================
* package: update "browserify" to v5.11.0
* node: use stderr rather than stdout for logging (#29, @stephenmathieson)
1.0.4 / 2014-07-15
==================
* dist: recompile
* example: remove `console.info()` log usage
* example: add "Content-Type" UTF-8 header to browser example
* browser: place %c marker after the space character
* browser: reset the "content" color via `color: inherit`
* browser: add colors support for Firefox >= v31
* debug: prefer an instance `log()` function over the global one (#119)
* Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
1.0.3 / 2014-07-09
==================
* Add support for multiple wildcards in namespaces (#122, @seegno)
* browser: fix lint
1.0.2 / 2014-06-10
==================
* browser: update color palette (#113, @gscottolson)
* common: make console logging function configurable (#108, @timoxley)
* node: fix %o colors on old node <= 0.8.x
* Makefile: find node path using shell/which (#109, @timoxley)
1.0.1 / 2014-06-06
==================
* browser: use `removeItem()` to clear localStorage
* browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
* package: add "contributors" section
* node: fix comment typo
* README: list authors
1.0.0 / 2014-06-04
==================
* make ms diff be global, not be scope
* debug: ignore empty strings in enable()
* node: make DEBUG_COLORS able to disable coloring
* *: export the `colors` array
* npmignore: don't publish the `dist` dir
* Makefile: refactor to use browserify
* package: add "browserify" as a dev dependency
* Readme: add Web Inspector Colors section
* node: reset terminal color for the debug content
* node: map "%o" to `util.inspect()`
* browser: map "%j" to `JSON.stringify()`
* debug: add custom "formatters"
* debug: use "ms" module for humanizing the diff
* Readme: add "bash" syntax highlighting
* browser: add Firebug color support
* browser: add colors for WebKit browsers
* node: apply log to `console`
* rewrite: abstract common logic for Node & browsers
* add .jshintrc file
0.8.1 / 2014-04-14
==================
* package: re-add the "component" section
0.8.0 / 2014-03-30
==================
* add `enable()` method for nodejs. Closes #27
* change from stderr to stdout
* remove unnecessary index.js file
0.7.4 / 2013-11-13
==================
* remove "browserify" key from package.json (fixes something in browserify)
0.7.3 / 2013-10-30
==================
* fix: catch localStorage security error when cookies are blocked (Chrome)
* add debug(err) support. Closes #46
* add .browser prop to package.json. Closes #42
0.7.2 / 2013-02-06
==================
* fix package.json
* fix: Mobile Safari (private mode) is broken with debug
* fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
0.7.1 / 2013-02-05
==================
* add repository URL to package.json
* add DEBUG_COLORED to force colored output
* add browserify support
* fix component. Closes #24
0.7.0 / 2012-05-04
==================
* Added .component to package.json
* Added debug.component.js build
0.6.0 / 2012-03-16
==================
* Added support for "-" prefix in DEBUG [Vinay Pulim]
* Added `.enabled` flag to the node version [TooTallNate]
0.5.0 / 2012-02-02
==================
* Added: humanize diffs. Closes #8
* Added `debug.disable()` to the CS variant
* Removed padding. Closes #10
* Fixed: persist client-side variant again. Closes #9
0.4.0 / 2012-02-01
==================
* Added browser variant support for older browsers [TooTallNate]
* Added `debug.enable('project:*')` to browser variant [TooTallNate]
* Added padding to diff (moved it to the right)
0.3.0 / 2012-01-26
==================
* Added millisecond diff when isatty, otherwise UTC string
0.2.0 / 2012-01-22
==================
* Added wildcard support
0.1.0 / 2011-12-02
==================
* Added: remove colors unless stderr isatty [TooTallNate]
0.0.1 / 2010-01-03
==================
* Initial release

19
node_modules/nodemon/node_modules/debug/LICENSE generated vendored Normal file
View File

@ -0,0 +1,19 @@
(The MIT License)
Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
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.

437
node_modules/nodemon/node_modules/debug/README.md generated vendored Normal file
View File

@ -0,0 +1,437 @@
# debug
[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
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:
<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
#### 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.
<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
#### 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).
<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
## 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.
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
## 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
```
## 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)]
<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
## Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
## License
(The MIT License)
Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
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.

1
node_modules/nodemon/node_modules/debug/node.js generated vendored Normal file
View File

@ -0,0 +1 @@
module.exports = require('./src/node');

51
node_modules/nodemon/node_modules/debug/package.json generated vendored Normal file
View File

@ -0,0 +1,51 @@
{
"name": "debug",
"version": "3.2.7",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
"description": "small debugging utility",
"keywords": [
"debug",
"log",
"debugger"
],
"files": [
"src",
"node.js",
"dist/debug.js",
"LICENSE",
"README.md"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
"Andrew Rhyne <rhyneandrew@gmail.com>"
],
"license": "MIT",
"dependencies": {
"ms": "^2.1.1"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^3.0.2",
"istanbul": "^0.4.5",
"karma": "^3.0.0",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.4",
"xo": "^0.23.0"
},
"main": "./src/index.js",
"browser": "./src/browser.js",
"unpkg": "./dist/debug.js"
}

180
node_modules/nodemon/node_modules/debug/src/browser.js generated vendored Normal file
View File

@ -0,0 +1,180 @@
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/* eslint-env browser */
/**
* This is the web browser implementation of `debug()`.
*/
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
/**
* Colors.
*/
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
* to support "%c" CSS customizations.
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
// eslint-disable-next-line complexity
function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
return true;
} // Internet Explorer and Edge do not support colors.
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
} // Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
/**
* Colorize log arguments if enabled.
*
* @api public
*/
function formatArgs(args) {
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
if (!this.useColors) {
return;
}
var c = 'color: ' + this.color;
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
var index = 0;
var lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, function (match) {
if (match === '%%') {
return;
}
index++;
if (match === '%c') {
// We only are interested in the *last* %c
// (the user may have provided their own)
lastC = index;
}
});
args.splice(lastC, 0, c);
}
/**
* Invokes `console.log()` when available.
* No-op when `console.log` is not a "function".
*
* @api public
*/
function log() {
var _console;
// This hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
try {
if (namespaces) {
exports.storage.setItem('debug', namespaces);
} else {
exports.storage.removeItem('debug');
}
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
var r;
try {
r = exports.storage.getItem('debug');
} catch (error) {} // Swallow
// XXX (@Qix-) should we be logging these?
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}
return r;
}
/**
* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
* when a user disables cookies/localstorage
* and you attempt to access it.
*
* @return {LocalStorage}
* @api private
*/
function localstorage() {
try {
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
// The Browser also has localStorage in the global context.
return localStorage;
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/
formatters.j = function (v) {
try {
return JSON.stringify(v);
} catch (error) {
return '[UnexpectedJSONParseError]: ' + error.message;
}
};

249
node_modules/nodemon/node_modules/debug/src/common.js generated vendored Normal file
View File

@ -0,0 +1,249 @@
"use strict";
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*/
function setup(env) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require('ms');
Object.keys(env).forEach(function (key) {
createDebug[key] = env[key];
});
/**
* Active `debug` instances.
*/
createDebug.instances = [];
/**
* The currently active debug mode names, and names to skip.
*/
createDebug.names = [];
createDebug.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
createDebug.formatters = {};
/**
* Selects a color for a debug namespace
* @param {String} namespace The namespace string for the for the debug instance to be colored
* @return {Number|String} An ANSI color code for the given namespace
* @api private
*/
function selectColor(namespace) {
var hash = 0;
for (var i = 0; i < namespace.length; i++) {
hash = (hash << 5) - hash + namespace.charCodeAt(i);
hash |= 0; // Convert to 32bit integer
}
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
createDebug.selectColor = selectColor;
/**
* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/
function createDebug(namespace) {
var prevTime;
function debug() {
// Disabled?
if (!debug.enabled) {
return;
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var self = debug; // Set `diff` timestamp
var curr = Number(new Date());
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
if (typeof args[0] !== 'string') {
// Anything else let's inspect with %O
args.unshift('%O');
} // Apply any `formatters` transformations
var index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
// If we encounter an escaped % then don't increase the array index
if (match === '%%') {
return match;
}
index++;
var formatter = createDebug.formatters[format];
if (typeof formatter === 'function') {
var val = args[index];
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
}); // Apply env-specific formatting (colors, etc.)
createDebug.formatArgs.call(self, args);
var logFn = self.log || createDebug.log;
logFn.apply(self, args);
}
debug.namespace = namespace;
debug.enabled = createDebug.enabled(namespace);
debug.useColors = createDebug.useColors();
debug.color = selectColor(namespace);
debug.destroy = destroy;
debug.extend = extend; // Debug.formatArgs = formatArgs;
// debug.rawLog = rawLog;
// env-specific initialization logic for debug instances
if (typeof createDebug.init === 'function') {
createDebug.init(debug);
}
createDebug.instances.push(debug);
return debug;
}
function destroy() {
var index = createDebug.instances.indexOf(this);
if (index !== -1) {
createDebug.instances.splice(index, 1);
return true;
}
return false;
}
function extend(namespace, delimiter) {
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
}
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.names = [];
createDebug.skips = [];
var i;
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
// ignore empty strings
continue;
}
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
createDebug.names.push(new RegExp('^' + namespaces + '$'));
}
}
for (i = 0; i < createDebug.instances.length; i++) {
var instance = createDebug.instances[i];
instance.enabled = createDebug.enabled(instance.namespace);
}
}
/**
* Disable debug output.
*
* @api public
*/
function disable() {
createDebug.enable('');
}
/**
* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/
function enabled(name) {
if (name[name.length - 1] === '*') {
return true;
}
var i;
var len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
/**
* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
createDebug.enable(createDebug.load());
return createDebug;
}
module.exports = setup;

12
node_modules/nodemon/node_modules/debug/src/index.js generated vendored Normal file
View File

@ -0,0 +1,12 @@
"use strict";
/**
* Detect Electron renderer / nwjs process, which is node, but we should
* treat as a browser.
*/
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
module.exports = require('./browser.js');
} else {
module.exports = require('./node.js');
}

177
node_modules/nodemon/node_modules/debug/src/node.js generated vendored Normal file
View File

@ -0,0 +1,177 @@
"use strict";
/**
* Module dependencies.
*/
var tty = require('tty');
var util = require('util');
/**
* This is the Node.js implementation of `debug()`.
*/
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
/**
* Colors.
*/
exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
var supportsColor = require('supports-color');
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
}
} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
/**
* Build up the default `inspectOpts` object from the environment variables.
*
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
exports.inspectOpts = Object.keys(process.env).filter(function (key) {
return /^debug_/i.test(key);
}).reduce(function (obj, key) {
// Camel-case
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
return k.toUpperCase();
}); // Coerce string value into JS value
var val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
}
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
var name = this.namespace,
useColors = this.useColors;
if (useColors) {
var c = this.color;
var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
} else {
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log() {
return process.stderr.write(util.format.apply(util, arguments) + '\n');
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
* differently for a particular `debug` instance.
*/
function init(debug) {
debug.inspectOpts = {};
var keys = Object.keys(exports.inspectOpts);
for (var i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Map %o to `util.inspect()`, all on a single line.
*/
formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(function (str) { return str.trim(); })
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
formatters.O = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};

8
node_modules/nodemon/node_modules/has-flag/index.js generated vendored Normal file
View File

@ -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);
};

9
node_modules/nodemon/node_modules/has-flag/license generated vendored Normal file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,44 @@
{
"name": "has-flag",
"version": "3.0.0",
"description": "Check if argv has a specific flag",
"license": "MIT",
"repository": "sindresorhus/has-flag",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"has",
"check",
"detect",
"contains",
"find",
"flag",
"cli",
"command-line",
"argv",
"process",
"arg",
"args",
"argument",
"arguments",
"getopt",
"minimist",
"optimist"
],
"devDependencies": {
"ava": "*",
"xo": "*"
}
}

70
node_modules/nodemon/node_modules/has-flag/readme.md generated vendored Normal file
View File

@ -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[]`<br>
Default: `process.argv`
CLI arguments.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

162
node_modules/nodemon/node_modules/ms/index.js generated vendored Normal file
View File

@ -0,0 +1,162 @@
/**
* Helpers.
*/
var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
var w = d * 7;
var y = d * 365.25;
/**
* Parse or format the given `val`.
*
* Options:
*
* - `long` verbose formatting [false]
*
* @param {String|Number} val
* @param {Object} [options]
* @throws {Error} throw an error if val is not a non-empty string or a number
* @return {String|Number}
* @api public
*/
module.exports = function (val, options) {
options = options || {};
var type = typeof val;
if (type === 'string' && val.length > 0) {
return parse(val);
} else if (type === 'number' && isFinite(val)) {
return options.long ? fmtLong(val) : fmtShort(val);
}
throw new Error(
'val is not a non-empty string or a valid number. val=' +
JSON.stringify(val)
);
};
/**
* Parse the given `str` and return milliseconds.
*
* @param {String} str
* @return {Number}
* @api private
*/
function parse(str) {
str = String(str);
if (str.length > 100) {
return;
}
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
return;
}
var n = parseFloat(match[1]);
var type = (match[2] || 'ms').toLowerCase();
switch (type) {
case 'years':
case 'year':
case 'yrs':
case 'yr':
case 'y':
return n * y;
case 'weeks':
case 'week':
case 'w':
return n * w;
case 'days':
case 'day':
case 'd':
return n * d;
case 'hours':
case 'hour':
case 'hrs':
case 'hr':
case 'h':
return n * h;
case 'minutes':
case 'minute':
case 'mins':
case 'min':
case 'm':
return n * m;
case 'seconds':
case 'second':
case 'secs':
case 'sec':
case 's':
return n * s;
case 'milliseconds':
case 'millisecond':
case 'msecs':
case 'msec':
case 'ms':
return n;
default:
return undefined;
}
}
/**
* Short format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtShort(ms) {
var msAbs = Math.abs(ms);
if (msAbs >= d) {
return Math.round(ms / d) + 'd';
}
if (msAbs >= h) {
return Math.round(ms / h) + 'h';
}
if (msAbs >= m) {
return Math.round(ms / m) + 'm';
}
if (msAbs >= s) {
return Math.round(ms / s) + 's';
}
return ms + 'ms';
}
/**
* Long format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtLong(ms) {
var msAbs = Math.abs(ms);
if (msAbs >= d) {
return plural(ms, msAbs, d, 'day');
}
if (msAbs >= h) {
return plural(ms, msAbs, h, 'hour');
}
if (msAbs >= m) {
return plural(ms, msAbs, m, 'minute');
}
if (msAbs >= s) {
return plural(ms, msAbs, s, 'second');
}
return ms + ' ms';
}
/**
* Pluralization helper.
*/
function plural(ms, msAbs, n, name) {
var isPlural = msAbs >= n * 1.5;
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
}

21
node_modules/nodemon/node_modules/ms/license.md generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2020 Vercel, Inc.
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.

38
node_modules/nodemon/node_modules/ms/package.json generated vendored Normal file
View File

@ -0,0 +1,38 @@
{
"name": "ms",
"version": "2.1.3",
"description": "Tiny millisecond conversion utility",
"repository": "vercel/ms",
"main": "./index",
"files": [
"index.js"
],
"scripts": {
"precommit": "lint-staged",
"lint": "eslint lib/* bin/*",
"test": "mocha tests.js"
},
"eslintConfig": {
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
}
},
"lint-staged": {
"*.js": [
"npm run lint",
"prettier --single-quote --write",
"git add"
]
},
"license": "MIT",
"devDependencies": {
"eslint": "4.18.2",
"expect.js": "0.3.1",
"husky": "0.14.3",
"lint-staged": "5.0.0",
"mocha": "4.0.1",
"prettier": "2.0.5"
}
}

59
node_modules/nodemon/node_modules/ms/readme.md generated vendored Normal file
View File

@ -0,0 +1,59 @@
# ms
![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)
Use this package to easily convert various time formats to milliseconds.
## Examples
```js
ms('2 days') // 172800000
ms('1d') // 86400000
ms('10h') // 36000000
ms('2.5 hrs') // 9000000
ms('2h') // 7200000
ms('1m') // 60000
ms('5s') // 5000
ms('1y') // 31557600000
ms('100') // 100
ms('-3 days') // -259200000
ms('-1h') // -3600000
ms('-200') // -200
```
### Convert from Milliseconds
```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
ms(-3 * 60000) // "-3m"
ms(ms('10 hours')) // "10h"
```
### Time Format Written-Out
```js
ms(60000, { long: true }) // "1 minute"
ms(2 * 60000, { long: true }) // "2 minutes"
ms(-3 * 60000, { long: true }) // "-3 minutes"
ms(ms('10 hours'), { long: true }) // "10 hours"
```
## Features
- Works both in [Node.js](https://nodejs.org) and in the browser
- If a number is supplied to `ms`, a string with a unit is returned
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
## Related Packages
- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
## Caught a Bug?
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Link the package to the global module directory: `npm link`
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
As always, you can run the tests using: `npm test`

View File

@ -0,0 +1,5 @@
'use strict';
module.exports = {
stdout: false,
stderr: false
};

View File

@ -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)
};

View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,53 @@
{
"name": "supports-color",
"version": "5.5.0",
"description": "Detect whether a terminal supports color",
"license": "MIT",
"repository": "chalk/supports-color",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js",
"browser.js"
],
"keywords": [
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"ansi",
"styles",
"tty",
"rgb",
"256",
"shell",
"xterm",
"command-line",
"support",
"supports",
"capability",
"detect",
"truecolor",
"16m"
],
"dependencies": {
"has-flag": "^3.0.0"
},
"devDependencies": {
"ava": "^0.25.0",
"import-fresh": "^2.0.0",
"xo": "^0.20.0"
},
"browser": "browser.js"
}

View File

@ -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

74
node_modules/nodemon/package.json generated vendored Normal file
View File

@ -0,0 +1,74 @@
{
"name": "nodemon",
"homepage": "https://nodemon.io",
"author": {
"name": "Remy Sharp",
"url": "https://github.com/remy"
},
"bin": {
"nodemon": "./bin/nodemon.js"
},
"engines": {
"node": ">=8.10.0"
},
"repository": {
"type": "git",
"url": "https://github.com/remy/nodemon.git"
},
"description": "Simple monitor script for use during development of a Node.js app.",
"keywords": [
"cli",
"monitor",
"monitor",
"development",
"restart",
"autoload",
"reload",
"terminal"
],
"license": "MIT",
"main": "./lib/nodemon",
"scripts": {
"commitmsg": "commitlint -e",
"coverage": "istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js",
"lint": "eslint lib/**/*.js",
"test": "npm run lint && npm run spec",
"spec": "for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done",
"postspec": "npm run clean",
"clean": "rm -rf test/fixtures/test*.js test/fixtures/test*.md",
"web": "node web",
"semantic-release": "semantic-release",
"prepush": "npm run lint",
"killall": "ps auxww | grep node | grep -v grep | awk '{ print $2 }' | xargs kill -9"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"async": "1.4.2",
"coffee-script": "~1.7.1",
"eslint": "^7.32.0",
"husky": "^7.0.4",
"mocha": "^2.5.3",
"nyc": "^15.1.0",
"proxyquire": "^1.8.0",
"semantic-release": "^18.0.0",
"should": "~4.0.0"
},
"dependencies": {
"chokidar": "^3.5.2",
"debug": "^3.2.7",
"ignore-by-default": "^1.0.1",
"minimatch": "^3.1.2",
"pstree.remy": "^1.1.8",
"semver": "^5.7.1",
"simple-update-notifier": "^1.0.7",
"supports-color": "^5.5.0",
"touch": "^3.1.0",
"undefsafe": "^2.0.5"
},
"version": "2.0.20",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/nodemon"
}
}