feat: 添加多项功能和修复
功能新增: - OSS 存储使用情况显示(文件页面) - OSS 当日流量统计(阿里云云监控API) - 分享页面路由修复(/s/xxx 格式支持) Bug修复: - 修复分享页面资源路径(相对路径改绝对路径) - 修复分享码获取逻辑(支持路径格式) - 修复OSS配额undefined显示问题 - 修复登录流程OSS配置检查 - 修复文件数为null时的显示问题 依赖更新: - 添加 @alicloud/cms20190101 云监控SDK - 添加 @alicloud/openapi-client Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
3
backend/node_modules/nodemon/.prettierrc.json
generated
vendored
Normal file
3
backend/node_modules/nodemon/.prettierrc.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"singleQuote": true
|
||||
}
|
||||
21
backend/node_modules/nodemon/LICENSE
generated
vendored
Normal file
21
backend/node_modules/nodemon/LICENSE
generated
vendored
Normal 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.
|
||||
436
backend/node_modules/nodemon/README.md
generated
vendored
Normal file
436
backend/node_modules/nodemon/README.md
generated
vendored
Normal file
@@ -0,0 +1,436 @@
|
||||
<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.
|
||||
|
||||
[](https://npmjs.org/package/nodemon)
|
||||
[](#backers) [](#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. For advanced globbing, [see `picomatch` documentation](https://github.com/micromatch/picomatch#advanced-globbing), the library that nodemon uses through `chokidar` (which in turn uses it through `anymatch`).
|
||||
|
||||
## 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.on("SIGHUP", function () {
|
||||
reloadSomeConfiguration();
|
||||
process.kill(process.pid, "SIGTERM");
|
||||
})
|
||||
```
|
||||
|
||||
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
|
||||
// important to use `on` and not `once` as nodemon can re-send the kill signal
|
||||
process.on('SIGUSR2', function () {
|
||||
gracefulShutdown(function () {
|
||||
process.kill(process.pid, 'SIGTERM');
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
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)! 🙏
|
||||
|
||||
[](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;"><!--oc--><a title='Netpositive' data-id='162674' data-tier='1' href='https://najlepsibukmacherzy.pl/ranking-legalnych-bukmacherow/'><img alt='Netpositive' 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='Best online casinos not on GamStop in the UK' data-id='243140' data-tier='1' href='https://casino-wise.com/'><img alt='Best online casinos not on GamStop in the UK' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/f889d209-a931-4c06-a529-fe1f86c411bf/casino-wise-logo.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='TheCasinoDB' data-id='270835' data-tier='1' href='https://www.thecasinodb.com'><img alt='TheCasinoDB' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/7fbc2acb-ba5c-4a5c-99d2-17e205e9a151/8a0f6204-f303-4129-a498-2263fd21e640.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Goread.io' data-id='320564' data-tier='1' href='https://goread.io/buy-instagram-followers'><img alt='Goread.io' 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='Best Australian online casinos. Reviewed by Correct Casinos.' data-id='322445' data-tier='1' 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='Website dedicated to finding the best and safest licensed online casinos in India' data-id='342390' data-tier='1' href='https://www.ghotala.com/'><img alt='Website dedicated to finding the best and safest licensed online casinos in India' src='https://opencollective-production.s3.us-west-1.amazonaws.com/75afa9e0-4ac6-11ed-8d6a-fdcc8c0d0736.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='nongamstopcasinos.net' data-id='367236' data-tier='1' href='https://www.pieria.co.uk/'><img alt='nongamstopcasinos.net' src='https://opencollective-production.s3.us-west-1.amazonaws.com/fb8b5ba0-3904-11ed-8516-edd7b7687a36.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Buy Instagram Likes' data-id='411448' data-tier='1' href='https://poprey.com/'><img alt='Buy Instagram Likes' src='https://opencollective-production.s3.us-west-1.amazonaws.com/fe650970-c21c-11ec-a499-b55e54a794b4.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='OnlineCasinosSpelen' data-id='423738' data-tier='1' href='https://onlinecasinosspelen.com'><img alt='OnlineCasinosSpelen' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/47e87426-6a55-4f69-9fb5-4e5032dc35a8/5d10dd22-320e-47d4-84e6-d144874f1f5f.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Beoordelen van nieuwe online casino's 2023' data-id='424449' data-tier='1' href='https://Nieuwe-Casinos.net'><img alt='Beoordelen van nieuwe online casino's 2023' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/b803f279-c2a2-42da-8f05-d23e73cb8b26/aba64d6d-97e8-468c-b598-db08e0a134c5.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='CasinoZonderRegistratie.net - Nederlandse Top Casino's' data-id='424450' data-tier='1' href='https://casinozonderregistratie.net/'><img alt='CasinoZonderRegistratie.net - Nederlandse Top Casino's' src='https://opencollective-production.s3.us-west-1.amazonaws.com/aeb624c0-7ae7-11ed-8d0e-bda59436695a.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Famoid is a digital marketing agency that specializes in social media services and tools.' data-id='434604' data-tier='1' href='https://famoid.com/'><img alt='Famoid is a digital marketing agency that specializes in social media services and tools.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/3b090b0d-d2cb-4b96-8a7a-7d86971b10ee/famoid-5182491824.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='ігрові автомати беткінг' data-id='443264' data-tier='1' href='https://betking.com.ua/games/all-slots/'><img alt='ігрові автомати беткінг' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/94601d07-3205-4c60-9c2d-9b8194dbefb7/skg-blue.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='We are the leading Nearshore Technology Solutions company. We architect and engineer scalable and high-performing software solutions.' data-id='452424' data-tier='1' href='https://www.bairesdev.com/sponsoring-open-source-projects/'><img alt='We are the leading Nearshore Technology Solutions company. We architect and engineer scalable and high-performing software solutions.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/dc38bc3b-7430-4cf7-9b77-36467eb92915/logo8.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site to buy followers from the likes of US Magazine.' data-id='453050' data-tier='1' href='https://twicsy.com/buy-instagram-followers'><img alt='Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site to buy followers from the likes of US Magazine.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/f07b6f83-d0ed-43c6-91ae-ec8fa90512cd/twicsy-followers.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='SocialWick offers the best Instagram Followers in the market. If you are looking to boost your organic growth, buy Instagram followers from SocialWick' data-id='462750' data-tier='1' href='https://www.socialwick.com/instagram/followers'><img alt='SocialWick offers the best Instagram Followers in the market. If you are looking to boost your organic growth, buy Instagram followers from SocialWick' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/9c0f2545-f4ed-4534-9282-d1e9e13eb242/720c58bb-c32e-4c7c-a35b-8591b5eebd60.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Online United States Casinos' data-id='466446' data-tier='1' href='https://www.onlineunitedstatescasinos.com/'><img alt='Online United States Casinos' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/689398e1-79ef-4b8b-9b93-1eb4f031c204/0eafd4f6-a115-4bca-ae4e-5b9154ef1f49.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Looking to boost your YouTube channel? Buy YouTube subscribers with Views4You and watch your audience grow!' data-id='493616' data-tier='1' href='https://views4you.com/buy-youtube-subscribers/'><img alt='Looking to boost your YouTube channel? Buy YouTube subscribers with Views4You and watch your audience grow!' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/47999f5f-7c5b-4698-bf4f-58807b339873/d8e31e0f-8a76-472f-a13b-18a3d653cdec.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Buy Telegram Members' data-id='501897' data-tier='1' href='https://buycheapestfollowers.com/buy-telegram-channel-members'><img alt='Buy Telegram Members' src='https://github-production-user-asset-6210df.s3.amazonaws.com/13700/286696172-747dca05-a1e8-4d93-a9e9-95054d1566df.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='We review the entire iGaming industry from A to Z' data-id='504258' data-tier='1' href='https://casinolandia.com'><img alt='We review the entire iGaming industry from A to Z' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/5f858add-77f1-47a2-b577-39eecb299c8c/Logo264.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='UpGrow is the Best Instagram Growth Service in 2024. Get more real Instagram followers with our AI-powered growth engine to get 10x faster results. ' data-id='519002' data-tier='1' href='https://www.upgrow.com/'><img alt='UpGrow is the Best Instagram Growth Service in 2024. Get more real Instagram followers with our AI-powered growth engine to get 10x faster results. ' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/63ab7268-5ce4-4e61-b9f1-93a1bd89cd3e/ms-icon-310x310.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='CryptoCasinos.online' data-id='525119' data-tier='1' href='https://cryptocasinos.online/'><img alt='CryptoCasinos.online' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/97712948-3b1b-4026-a109-257d879baa23/CryptoCasinos.Online-FBcover18.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more.' data-id='540890' data-tier='1' href='https://www.ownedcore.com/casino'><img alt='No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/8bd4b78c-95e2-4c41-b4f4-d7fd6c0e12cd/logo4-e6140c27.webp' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Online casino.' data-id='541128' data-tier='1' href='https://www.fruityking.co.nz'><img alt='Online casino.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/7cde3c6f-052c-41bb-93f0-8be187682791/10e42029-c513-4edd-ac24-a8e41d697a96.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Find the social proof you need to reach your audience! Boost conversions. Quickly buy Twitter Followers & more with no sign-up. Taking you to the next' data-id='568449' data-tier='1' href='https://Bulkoid.com/buy-twitter-followers'><img alt='Find the social proof you need to reach your audience! Boost conversions. Quickly buy Twitter Followers & more with no sign-up. Taking you to the next' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/f1d2ea3b-a84c-47b4-9252-f43213b2b191/11d31846-9e82-49dd-a1f8-34b35c833262.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Boost your social media presence effortlessly with top-quality Instagram and TikTok followers and likes.' data-id='579911' data-tier='1' href='https://leofame.com/buy-instagram-followers'><img alt='Boost your social media presence effortlessly with top-quality Instagram and TikTok followers and likes.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/186c0e19-b195-4228-901a-ab1b70d63ee5/WhatsApp%20Image%202024-06-21%20at%203.50.43%20AM.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Social Media Management and all kinds of followers' data-id='587050' data-tier='1' href='https://www.socialfollowers.uk/buy-tiktok-followers/'><img alt='Social Media Management and all kinds of followers' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/8941f043-5d00-4e33-a1fd-f2d27ca54963/Social%20Followers%20Uk%20logo%20black.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Betwinner is an online bookmaker offering sports betting, casino games, and more.' data-id='594768' data-tier='1' href='https://guidebook.betwinner.com/'><img alt='Betwinner is an online bookmaker offering sports betting, casino games, and more.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/82cab29a-7002-4924-83bf-2eecb03d07c4/0x0.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rated world's #1 IG service since 2012.' data-id='602382' data-tier='1' href='https://buzzoid.com/buy-instagram-followers/'><img alt='At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rated world's #1 IG service since 2012.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/f77464f7-0457-451a-b29d-8e3b161ce83f/285fbc9f-6461-4393-8942-da62d1bed968.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Zamsino.com' data-id='608094' data-tier='1' href='https://zamsino.com/'><img alt='Zamsino.com' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/e3e99af5-a024-4d85-8594-8fd22e506bc9/Zamsino.com%20Logo.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Reviewing and comparing online casinos available to Finnish players. In addition, we publish relevant news and blog posts about the world of iGaming.' data-id='620398' data-tier='1' href='https://uusimmatkasinot.com/'><img alt='Reviewing and comparing online casinos available to Finnish players. In addition, we publish relevant news and blog posts about the world of iGaming.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/d5326d0f-3cde-41f4-b480-78ef8a2fb015/Uusimmatkasinot_head_siteicon.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Онлайн казино та БК (ставки на спорт) в Україні' data-id='638974' data-tier='1' href='https://betking.com.ua/'><img alt='Онлайн казино та БК (ставки на спорт) в Україні' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/08587758-582c-4136-aba5-2519230960d3/betking.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Prank Caller - #1 Prank Calling App' data-id='642864' data-tier='1' href='https://prankcaller.io'><img alt='Prank Caller - #1 Prank Calling App' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/b53aba7e-fc1a-458f-9822-e04d281f013c/69e51c7c-c9df-494e-b44f-3d14d9fca30b.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Buzzvoice is your one-stop shop for all your social media marketing needs. With Buzzvoice, you can buy followers, comments, likes, video views and more!' data-id='646075' data-tier='1' href='https://buzzvoice.com/'><img alt='Buzzvoice is your one-stop shop for all your social media marketing needs. With Buzzvoice, you can buy followers, comments, likes, video views and more!' src='https://opencollective-production.s3.us-west-1.amazonaws.com/acd68da0-e71e-11ec-a84e-fd82f80383c1.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='At Famety, you can grow your social media following quickly, safely, and easily with just a few clicks. Rated the world’s #1 social media service since 2013.' data-id='646341' data-tier='1' href='https://www.famety.net/'><img alt='At Famety, you can grow your social media following quickly, safely, and easily with just a few clicks. Rated the world’s #1 social media service since 2013.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/cfb851d7-3d7e-451b-b872-b653b28c976f/favicon_001.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='' data-id='648524' data-tier='1' href='https://casinoinsights.cl/'><img alt='' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/01b96d4c-4852-4499-8c70-e3ec57d0c58c/2024-05-09_17-27%20(1).png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Buy Twitter Followers Visit TweSocial' data-id='651653' data-tier='1' href='https://twesocial.com'><img alt='Buy Twitter Followers Visit TweSocial' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/60755b21-bd71-466a-9477-cb1228cbe0fb/68694e14-e741-4cb7-8260-b243b44cd015.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='SocialBoosting: Buy Instagram & TikTok Followers, Likes, Views' data-id='653711' data-tier='1' href='https://www.socialboosting.com/'><img alt='SocialBoosting: Buy Instagram & TikTok Followers, Likes, Views' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/80a54dfd-8952-4851-8cab-dcfa4a8a0a87/favicon.gif' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Buy Youtube Subscribers from the #1 rated company. Our exclusive high quality Youtube subscribers come with a lifetime guarantee!' data-id='654211' data-tier='1' href='https://mysocialfollowing.com/youtube/subscribers'><img alt='Buy Youtube Subscribers from the #1 rated company. Our exclusive high quality Youtube subscribers come with a lifetime guarantee!' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/eb5da272-eba5-49b7-b26e-d0271809edac/logo.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Ігрові автомати онлайн' data-id='655295' data-tier='1' href='https://casino.ua/casino/slots/'><img alt='Ігрові автомати онлайн' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/3c8fa725-e203-4c57-933c-0a884527fd5b/images.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Kasinohai.com' data-id='673849' data-tier='1' href='https://www.kasinohai.com/nettikasinot'><img alt='Kasinohai.com' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/ad75f68f-cb97-46f8-8981-bbe81ad6ffc9/51bafb1d-ed66-482f-8a8e-9b7b07d55f96.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Casino Online Chile' data-id='678929' data-tier='1' href='https://www.acee.cl/'><img alt='Casino Online Chile' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/292c66d6-0c5c-40e8-96f0-900dcdeaaf47/acee-casino-chile.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='At Buzzoid, you can buy YouTube views easily and safely.' data-id='692961' data-tier='1' href='https://buzzoid.com/buy-youtube-views/'><img alt='At Buzzoid, you can buy YouTube views easily and safely.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/d633cb10-8f5a-40ce-9e90-b1baeb6b3407/e4e945f5-ad19-4a2b-85ad-96443614f5c5.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Webisoft' data-id='695240' data-tier='1' href='https://webisoft.com/'><img alt='Webisoft' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/f0474fa8-8bd5-48c6-a2a8-ac1d062120f2/download.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='casinos sin licencia en España' data-id='705585' data-tier='1' href='https://casinossinlicencia.eu/'><img alt='casinos sin licencia en España' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/c3b79324-86f9-42b2-aeab-4a61fbe6cd5a/img.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='casino online chile' data-id='709152' data-tier='1' href='https://chilecasinoonline.cl/'><img alt='casino online chile' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/7f3780b2-b7a7-47aa-9837-c01099585495/casino-online-chile-logo.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='online casino australia JokaCasino' data-id='717691' data-tier='1' href='null'><img alt='online casino australia JokaCasino' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/546cd8a8-c89a-4462-94b8-5916c7fcc7b1/Joka%20Casino.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Vanguard Media évalue les casinos en ligne pour joueurs français, testant les sites en France. Nos classements stricts garantissent des casinos fiables et sûrs.' data-id='723517' data-tier='1' href='https://www.vanguardngr.com/casino/fr/'><img alt='Vanguard Media évalue les casinos en ligne pour joueurs français, testant les sites en France. Nos classements stricts garantissent des casinos fiables et sûrs.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/38065879-ef15-4e67-80a1-bdbb30ecb485/101895f1-ca10-49e3-a297-23a915fb9524.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='kasyno online polska' data-id='724626' data-tier='1' href='https://esportspot.pl/kasyna-online/'><img alt='kasyno online polska' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/abb76056-d696-41f6-93f3-95c528521a10/polskie%20kasyna%20online.webp' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='FAVBET' data-id='725832' data-tier='1' href='https://www.favbet.ro/ro/casino/pacanele/'><img alt='FAVBET' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/d86d313e-7b17-42fa-8b76-3f17fbf681a2/favbet-logo.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Bei Releaf erhalten Sie schnell und diskret Ihr Cannabis Rezept online. Unsere Ärzte prüfen Ihre Angaben und stellen bei Eignung das Rezept aus. Anschließend können Sie legal und sicher medizinisches Cannabis über unsere Partnerapotheken kaufen.' data-id='727109' data-tier='1' href='https://releaf.com/de'><img alt='Bei Releaf erhalten Sie schnell und diskret Ihr Cannabis Rezept online. Unsere Ärzte prüfen Ihre Angaben und stellen bei Eignung das Rezept aus. Anschließend können Sie legal und sicher medizinisches Cannabis über unsere Partnerapotheken kaufen.' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/b686d646-5029-4b4c-8cab-9645ab2679de/9da596d1-f48a-41ec-947d-a64dd8e7529c.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Kasyno Online' data-id='727891' data-tier='1' href='https://www.casinobillions.com/pl/'><img alt='Kasyno Online' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/04b23e6d-d4a6-4da8-9236-9de023368fb6/kasyno-online.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Analysis of online casinos with the best payouts' data-id='728673' data-tier='1' href='https://payidpokies.bet/'><img alt='Analysis of online casinos with the best payouts' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/854e333b-14ac-48da-9bab-b108deee06ba/payid-pokies-logo.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Нова українська букмекерська контора' data-id='742475' data-tier='1' href='https://betking.com.ua/sports-book/'><img alt='Нова українська букмекерська контора' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/c56d2fe2-f9fb-4d63-947c-77575f4b15c6/stavki.jpg' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a>
|
||||
<a title='Buy TikTok Custom Comments' data-id='747955' data-tier='1' href='https://buylikesservices.com/buy-tiktok-custom-comments/'><img alt='Buy TikTok Custom Comments' src='https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/bad8cbaa-3efa-4c70-b6f4-86f3439a5b01/buylikesservices-favicon.png' style='object-fit: contain; float: left; margin:12px' height='120' width='120'></a><!--oc-->
|
||||
</div>
|
||||
|
||||
Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project.
|
||||
|
||||
# License
|
||||
|
||||
MIT [http://rem.mit-license.org](http://rem.mit-license.org)
|
||||
16
backend/node_modules/nodemon/bin/nodemon.js
generated
vendored
Executable file
16
backend/node_modules/nodemon/bin/nodemon.js
generated
vendored
Executable 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
backend/node_modules/nodemon/bin/windows-kill.exe
generated
vendored
Normal file
BIN
backend/node_modules/nodemon/bin/windows-kill.exe
generated
vendored
Normal file
Binary file not shown.
8
backend/node_modules/nodemon/doc/cli/authors.txt
generated
vendored
Normal file
8
backend/node_modules/nodemon/doc/cli/authors.txt
generated
vendored
Normal 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
backend/node_modules/nodemon/doc/cli/config.txt
generated
vendored
Normal file
44
backend/node_modules/nodemon/doc/cli/config.txt
generated
vendored
Normal 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
backend/node_modules/nodemon/doc/cli/help.txt
generated
vendored
Normal file
29
backend/node_modules/nodemon/doc/cli/help.txt
generated
vendored
Normal 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
backend/node_modules/nodemon/doc/cli/logo.txt
generated
vendored
Normal file
20
backend/node_modules/nodemon/doc/cli/logo.txt
generated
vendored
Normal 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
backend/node_modules/nodemon/doc/cli/options.txt
generated
vendored
Normal file
36
backend/node_modules/nodemon/doc/cli/options.txt
generated
vendored
Normal 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
backend/node_modules/nodemon/doc/cli/topics.txt
generated
vendored
Normal file
8
backend/node_modules/nodemon/doc/cli/topics.txt
generated
vendored
Normal 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
backend/node_modules/nodemon/doc/cli/usage.txt
generated
vendored
Normal file
3
backend/node_modules/nodemon/doc/cli/usage.txt
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
Usage: nodemon [nodemon options] [script.js] [args]
|
||||
|
||||
See "nodemon --help" for more.
|
||||
9
backend/node_modules/nodemon/doc/cli/whoami.txt
generated
vendored
Normal file
9
backend/node_modules/nodemon/doc/cli/whoami.txt
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
__/\\\\\_____/\\\_______/\\\\\_______/\\\\\\\\\\\\_____/\\\\\\\\\\\\\\\__/\\\\____________/\\\\_______/\\\\\_______/\\\\\_____/\\\_
|
||||
_\/\\\\\\___\/\\\_____/\\\///\\\____\/\\\////////\\\__\/\\\///////////__\/\\\\\\________/\\\\\\_____/\\\///\\\____\/\\\\\\___\/\\\_
|
||||
_\/\\\/\\\__\/\\\___/\\\/__\///\\\__\/\\\______\//\\\_\/\\\_____________\/\\\//\\\____/\\\//\\\___/\\\/__\///\\\__\/\\\/\\\__\/\\\_
|
||||
_\/\\\//\\\_\/\\\__/\\\______\//\\\_\/\\\_______\/\\\_\/\\\\\\\\\\\_____\/\\\\///\\\/\\\/_\/\\\__/\\\______\//\\\_\/\\\//\\\_\/\\\_
|
||||
_\/\\\\//\\\\/\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/\\\///////______\/\\\__\///\\\/___\/\\\_\/\\\_______\/\\\_\/\\\\//\\\\/\\\_
|
||||
_\/\\\_\//\\\/\\\_\//\\\______/\\\__\/\\\_______\/\\\_\/\\\_____________\/\\\____\///_____\/\\\_\//\\\______/\\\__\/\\\_\//\\\/\\\_
|
||||
_\/\\\__\//\\\\\\__\///\\\__/\\\____\/\\\_______/\\\__\/\\\_____________\/\\\_____________\/\\\__\///\\\__/\\\____\/\\\__\//\\\\\\_
|
||||
_\/\\\___\//\\\\\____\///\\\\\/_____\/\\\\\\\\\\\\/___\/\\\\\\\\\\\\\\\_\/\\\_____________\/\\\____\///\\\\\/_____\/\\\___\//\\\\\_
|
||||
_\///_____\/////_______\/////_______\////////////_____\///////////////__\///______________\///_______\/////_______\///_____\/////__
|
||||
125
backend/node_modules/nodemon/index.d.ts
generated
vendored
Normal file
125
backend/node_modules/nodemon/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
import type { WatchOptions } from 'chokidar'
|
||||
|
||||
export type NodemonEventHandler =
|
||||
| 'start'
|
||||
| 'crash'
|
||||
| 'exit'
|
||||
| 'quit'
|
||||
| 'restart'
|
||||
| 'config:update'
|
||||
| 'log'
|
||||
| 'readable'
|
||||
| 'stdout'
|
||||
| 'stderr';
|
||||
|
||||
export type NodemonEventListener = {
|
||||
on(event: 'start' | 'crash' | 'readable', listener: () => void): Nodemon;
|
||||
on(event: 'log', listener: (e: NodemonEventLog) => void): Nodemon;
|
||||
on(event: 'stdout' | 'stderr', listener: (e: string) => void): Nodemon;
|
||||
on(event: 'restart', listener: (e?: NodemonEventRestart) => void): Nodemon;
|
||||
on(event: 'quit', listener: (e?: NodemonEventQuit) => void): Nodemon;
|
||||
on(event: 'exit', listener: (e?: number) => void): Nodemon;
|
||||
on(event: 'config:update', listener: (e?: NodemonEventConfig) => void): Nodemon;
|
||||
};
|
||||
|
||||
export type NodemonEventLog = {
|
||||
/**
|
||||
- detail: what you get with nodemon --verbose.
|
||||
- status: subprocess starting, restarting.
|
||||
- fail: is the subprocess crashing.
|
||||
- error: is a nodemon system error.
|
||||
*/
|
||||
type: 'detail' | 'log' | 'status' | 'error' | 'fail';
|
||||
/** the plain text message */
|
||||
message: string;
|
||||
/** contains the terminal escape codes to add colour, plus the "[nodemon]" prefix */
|
||||
colour: string;
|
||||
};
|
||||
|
||||
export interface NodemonEventRestart {
|
||||
matched?: {
|
||||
result: string[];
|
||||
total: number;
|
||||
};
|
||||
}
|
||||
|
||||
export type NodemonEventQuit = 143 | 130;
|
||||
|
||||
export type NodemonEventConfig = {
|
||||
run: boolean;
|
||||
system: {
|
||||
cwd: string;
|
||||
};
|
||||
required: boolean;
|
||||
dirs: string[];
|
||||
timeout: number;
|
||||
options: NodemonConfig;
|
||||
lastStarted: number;
|
||||
loaded: string[];
|
||||
load: (settings: NodemonSettings, ready: (config: NodemonEventConfig) => void) => void;
|
||||
reset: () => void;
|
||||
};
|
||||
|
||||
export interface NodemonExecOptions {
|
||||
script: string;
|
||||
scriptPosition?: number;
|
||||
args?: string[];
|
||||
ext?: string; // "js,mjs" etc (should really support an array of strings, but I don't think it does right now)
|
||||
exec?: string; // node, python, etc
|
||||
execArgs?: string[]; // args passed to node, etc,
|
||||
nodeArgs?: string[]; // args passed to node, etc,
|
||||
}
|
||||
|
||||
export interface NodemonConfig {
|
||||
/** restartable defaults to "rs" as a string the user enters */
|
||||
restartable?: false | string;
|
||||
colours?: boolean;
|
||||
execMap?: { [key: string]: string };
|
||||
ignoreRoot?: string[];
|
||||
watch?: string[];
|
||||
ignore?: string[];
|
||||
stdin?: boolean;
|
||||
runOnChangeOnly?: boolean;
|
||||
verbose?: boolean;
|
||||
signal?: string;
|
||||
stdout?: boolean;
|
||||
watchOptions?: WatchOptions;
|
||||
help?: string;
|
||||
version?: boolean;
|
||||
cwd?: string;
|
||||
dump?: boolean;
|
||||
delay?: number;
|
||||
monitor?: string[];
|
||||
spawn?: boolean;
|
||||
noUpdateNotifier?: boolean;
|
||||
legacyWatch?: boolean;
|
||||
pollingInterval?: number;
|
||||
/** @deprecated as this is "on" by default */
|
||||
js?: boolean;
|
||||
quiet?: boolean;
|
||||
configFile?: string;
|
||||
exitCrash?: boolean;
|
||||
execOptions?: NodemonExecOptions;
|
||||
}
|
||||
|
||||
export interface NodemonSettings extends NodemonConfig, NodemonExecOptions {
|
||||
events?: Record<string, string>;
|
||||
env?: Record<string, string>;
|
||||
}
|
||||
|
||||
export type Nodemon = {
|
||||
(settings: NodemonSettings): Nodemon;
|
||||
removeAllListeners(event: NodemonEventHandler): Nodemon;
|
||||
emit(type: NodemonEventHandler, event?: any): Nodemon;
|
||||
reset(callback: Function): Nodemon;
|
||||
restart(): Nodemon;
|
||||
config: NodemonSettings;
|
||||
} & NodemonEventListener & {
|
||||
[K in keyof NodemonEventListener as "addListener"]: NodemonEventListener[K];
|
||||
} & {
|
||||
[K in keyof NodemonEventListener as "once"]: NodemonEventListener[K];
|
||||
};
|
||||
|
||||
declare const nodemon: Nodemon;
|
||||
|
||||
export = nodemon;
|
||||
7
backend/node_modules/nodemon/jsconfig.json
generated
vendored
Normal file
7
backend/node_modules/nodemon/jsconfig.json
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"typeRoots": ["./index.d.ts", "./node_modules/@types"],
|
||||
"checkJs": true
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
49
backend/node_modules/nodemon/lib/cli/index.js
generated
vendored
Normal file
49
backend/node_modules/nodemon/lib/cli/index.js
generated
vendored
Normal 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
backend/node_modules/nodemon/lib/cli/parse.js
generated
vendored
Normal file
230
backend/node_modules/nodemon/lib/cli/parse.js
generated
vendored
Normal 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<string> | string} argv 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 {import('../..').NodemonSettings} options object that will be updated
|
||||
* @param {String} arg current argument from argv
|
||||
* @param {Function} eatNext 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} value 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
backend/node_modules/nodemon/lib/config/command.js
generated
vendored
Normal file
43
backend/node_modules/nodemon/lib/config/command.js
generated
vendored
Normal 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,
|
||||
};
|
||||
}
|
||||
34
backend/node_modules/nodemon/lib/config/defaults.js
generated
vendored
Normal file
34
backend/node_modules/nodemon/lib/config/defaults.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
var ignoreRoot = require('ignore-by-default').directories();
|
||||
|
||||
// default options for config.options
|
||||
const defaults = {
|
||||
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: {},
|
||||
};
|
||||
|
||||
const nodeOptions = process.env.NODE_OPTIONS || ''; // ?
|
||||
|
||||
if (/--(loader|import)\b/.test(nodeOptions)) {
|
||||
delete defaults.execMap.ts;
|
||||
}
|
||||
|
||||
module.exports = defaults;
|
||||
240
backend/node_modules/nodemon/lib/config/exec.js
generated
vendored
Normal file
240
backend/node_modules/nodemon/lib/config/exec.js
generated
vendored
Normal file
@@ -0,0 +1,240 @@
|
||||
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) {
|
||||
const parts = pkg.scripts.start.split(' ');
|
||||
|
||||
// fixes a loop issue where the script repeats over and over #2258
|
||||
if (parts.includes('nodemon')) {
|
||||
return null;
|
||||
}
|
||||
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' || scriptExt === 'cjs';
|
||||
extension = isJS || !scriptExt ? 'js,mjs,cjs' : 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
backend/node_modules/nodemon/lib/config/index.js
generated
vendored
Normal file
93
backend/node_modules/nodemon/lib/config/index.js
generated
vendored
Normal 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;
|
||||
225
backend/node_modules/nodemon/lib/config/load.js
generated
vendored
Normal file
225
backend/node_modules/nodemon/lib/config/load.js
generated
vendored
Normal file
@@ -0,0 +1,225 @@
|
||||
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
|
||||
|
||||
var pkg =
|
||||
existsSync(path.join(process.cwd(), 'package.json')) &&
|
||||
require(path.join(process.cwd(), 'package.json'));
|
||||
if ((!pkg || pkg.main == undefined) && 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 {Object} options global options
|
||||
* @param {Object} config the config object to be updated
|
||||
* @param {Function} 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);
|
||||
};
|
||||
|
||||
ready(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
backend/node_modules/nodemon/lib/help/index.js
generated
vendored
Normal file
27
backend/node_modules/nodemon/lib/help/index.js
generated
vendored
Normal 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
backend/node_modules/nodemon/lib/index.js
generated
vendored
Normal file
1
backend/node_modules/nodemon/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('./nodemon');
|
||||
4
backend/node_modules/nodemon/lib/monitor/index.js
generated
vendored
Normal file
4
backend/node_modules/nodemon/lib/monitor/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
run: require('./run'),
|
||||
watch: require('./watch').watch,
|
||||
};
|
||||
287
backend/node_modules/nodemon/lib/monitor/match.js
generated
vendored
Normal file
287
backend/node_modules/nodemon/lib/monitor/match.js
generated
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
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;
|
||||
} else {
|
||||
// utils.log.detail('no match: ' + rules[i], file);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!matched) {
|
||||
ignored++;
|
||||
}
|
||||
});
|
||||
|
||||
// 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);
|
||||
});
|
||||
debug('good (filtered by ext)', good);
|
||||
} else {
|
||||
// else assume *.*
|
||||
debug('good', good);
|
||||
}
|
||||
|
||||
if (whitelist.length) debug('whitelist', whitelist);
|
||||
|
||||
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,
|
||||
};
|
||||
}
|
||||
562
backend/node_modules/nodemon/lib/monitor/run.js
generated
vendored
Normal file
562
backend/node_modules/nodemon/lib/monitor/run.js
generated
vendored
Normal file
@@ -0,0 +1,562 @@
|
||||
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 undefsafe = require('undefsafe');
|
||||
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({}, options.execOptions.env, process.env, {
|
||||
PATH:
|
||||
binPath +
|
||||
path.delimiter +
|
||||
(undefsafe(options, '.execOptions.env.PATH') || 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;
|
||||
spawnOptions.windowsHide = 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');
|
||||
const forkOptions = {
|
||||
env: env,
|
||||
stdio: stdio,
|
||||
silent: !hasStdio,
|
||||
};
|
||||
if (utils.isWindows) {
|
||||
forkOptions.windowsHide = true;
|
||||
}
|
||||
child = fork(options.execOptions.script, forkArgs, forkOptions);
|
||||
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');
|
||||
|
||||
// support the old syntax of `exitcrash` - 2024-12-13
|
||||
if (options.exitcrash) {
|
||||
options.exitCrash = true;
|
||||
delete options.exitcrash;
|
||||
}
|
||||
|
||||
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
backend/node_modules/nodemon/lib/monitor/signals.js
generated
vendored
Normal file
34
backend/node_modules/nodemon/lib/monitor/signals.js
generated
vendored
Normal 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,
|
||||
}
|
||||
244
backend/node_modules/nodemon/lib/monitor/watch.js
generated
vendored
Normal file
244
backend/node_modules/nodemon/lib/monitor/watch.js
generated
vendored
Normal file
@@ -0,0 +1,244 @@
|
||||
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 (utils.isIBMi) {
|
||||
watchOptions.usePolling = 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('unlink', 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);
|
||||
};
|
||||
}
|
||||
317
backend/node_modules/nodemon/lib/nodemon.js
generated
vendored
Normal file
317
backend/node_modules/nodemon/lib/nodemon.js
generated
vendored
Normal file
@@ -0,0 +1,317 @@
|
||||
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');
|
||||
/** @type {import('..').NodemonEventConfig} */
|
||||
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;
|
||||
|
||||
/**
|
||||
* @param {import('..').NodemonSettings | string} settings
|
||||
* @returns {import('..').Nodemon}
|
||||
*/
|
||||
function nodemon(settings) {
|
||||
bus.emit('boot');
|
||||
nodemon.reset();
|
||||
|
||||
/** @type {import('..').NodemonSettings} */
|
||||
let options
|
||||
|
||||
// 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;
|
||||
}
|
||||
options = cli.parse(settings);
|
||||
} else options = settings;
|
||||
|
||||
// set the debug flag as early as possible to get all the detailed logging
|
||||
if (options.verbose) {
|
||||
utils.debug = true;
|
||||
}
|
||||
|
||||
if (options.help) {
|
||||
if (process.stdout.isTTY) {
|
||||
process.stdout._handle.setBlocking(true); // nodejs/node#6456
|
||||
}
|
||||
console.log(help(options.help));
|
||||
if (!config.required) {
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (options.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 (options.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, options.cwd)) {
|
||||
process.chdir(options.cwd);
|
||||
}
|
||||
}
|
||||
|
||||
config.load(options, 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
backend/node_modules/nodemon/lib/rules/add.js
generated
vendored
Normal file
89
backend/node_modules/nodemon/lib/rules/add.js
generated
vendored
Normal 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} rule 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
backend/node_modules/nodemon/lib/rules/index.js
generated
vendored
Normal file
53
backend/node_modules/nodemon/lib/rules/index.js
generated
vendored
Normal 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
backend/node_modules/nodemon/lib/rules/parse.js
generated
vendored
Normal file
43
backend/node_modules/nodemon/lib/rules/parse.js
generated
vendored
Normal 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;
|
||||
|
||||
74
backend/node_modules/nodemon/lib/spawn.js
generated
vendored
Normal file
74
backend/node_modules/nodemon/lib/spawn.js
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
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;
|
||||
spawnOptions.windowsHide = 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
backend/node_modules/nodemon/lib/utils/bus.js
generated
vendored
Normal file
44
backend/node_modules/nodemon/lib/utils/bus.js
generated
vendored
Normal 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
backend/node_modules/nodemon/lib/utils/clone.js
generated
vendored
Normal file
40
backend/node_modules/nodemon/lib/utils/clone.js
generated
vendored
Normal 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
backend/node_modules/nodemon/lib/utils/colour.js
generated
vendored
Normal file
26
backend/node_modules/nodemon/lib/utils/colour.js
generated
vendored
Normal 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;
|
||||
103
backend/node_modules/nodemon/lib/utils/index.js
generated
vendored
Normal file
103
backend/node_modules/nodemon/lib/utils/index.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
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',
|
||||
isIBMi: require('os').type() === 'OS400',
|
||||
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
backend/node_modules/nodemon/lib/utils/log.js
generated
vendored
Normal file
82
backend/node_modules/nodemon/lib/utils/log.js
generated
vendored
Normal 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
backend/node_modules/nodemon/lib/utils/merge.js
generated
vendored
Normal file
47
backend/node_modules/nodemon/lib/utils/merge.js
generated
vendored
Normal 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
backend/node_modules/nodemon/lib/version.js
generated
vendored
Normal file
100
backend/node_modules/nodemon/lib/version.js
generated
vendored
Normal 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)');
|
||||
}
|
||||
21
backend/node_modules/nodemon/node_modules/brace-expansion/LICENSE
generated
vendored
Normal file
21
backend/node_modules/nodemon/node_modules/brace-expansion/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
||||
129
backend/node_modules/nodemon/node_modules/brace-expansion/README.md
generated
vendored
Normal file
129
backend/node_modules/nodemon/node_modules/brace-expansion/README.md
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
# brace-expansion
|
||||
|
||||
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
||||
as known from sh/bash, in JavaScript.
|
||||
|
||||
[](http://travis-ci.org/juliangruber/brace-expansion)
|
||||
[](https://www.npmjs.org/package/brace-expansion)
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
[](https://ci.testling.com/juliangruber/brace-expansion)
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
|
||||
expand('file-{a,b,c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('-v{,,}')
|
||||
// => ['-v', '-v', '-v']
|
||||
|
||||
expand('file{0..2}.jpg')
|
||||
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
|
||||
|
||||
expand('file-{a..c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('file{2..0}.jpg')
|
||||
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
|
||||
|
||||
expand('file{0..4..2}.jpg')
|
||||
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
|
||||
|
||||
expand('file-{a..e..2}.jpg')
|
||||
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
|
||||
|
||||
expand('file{00..10..5}.jpg')
|
||||
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
|
||||
|
||||
expand('{{A..C},{a..c}}')
|
||||
// => ['A', 'B', 'C', 'a', 'b', 'c']
|
||||
|
||||
expand('ppp{,config,oe{,conf}}')
|
||||
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
```
|
||||
|
||||
### var expanded = expand(str)
|
||||
|
||||
Return an array of all possible and valid expansions of `str`. If none are
|
||||
found, `[str]` is returned.
|
||||
|
||||
Valid expansions are:
|
||||
|
||||
```js
|
||||
/^(.*,)+(.+)?$/
|
||||
// {a,b,...}
|
||||
```
|
||||
|
||||
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
A numeric sequence from `x` to `y` inclusive, with optional increment.
|
||||
If `x` or `y` start with a leading `0`, all the numbers will be padded
|
||||
to have equal length. Negative numbers and backwards iteration work too.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
|
||||
`x` and `y` must be exactly one character, and if given, `incr` must be a
|
||||
number.
|
||||
|
||||
For compatibility reasons, the string `${` is not eligible for brace expansion.
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```bash
|
||||
npm install brace-expansion
|
||||
```
|
||||
|
||||
## Contributors
|
||||
|
||||
- [Julian Gruber](https://github.com/juliangruber)
|
||||
- [Isaac Z. Schlueter](https://github.com/isaacs)
|
||||
|
||||
## Sponsors
|
||||
|
||||
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
|
||||
|
||||
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
||||
201
backend/node_modules/nodemon/node_modules/brace-expansion/index.js
generated
vendored
Normal file
201
backend/node_modules/nodemon/node_modules/brace-expansion/index.js
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
var concatMap = require('concat-map');
|
||||
var balanced = require('balanced-match');
|
||||
|
||||
module.exports = expandTop;
|
||||
|
||||
var escSlash = '\0SLASH'+Math.random()+'\0';
|
||||
var escOpen = '\0OPEN'+Math.random()+'\0';
|
||||
var escClose = '\0CLOSE'+Math.random()+'\0';
|
||||
var escComma = '\0COMMA'+Math.random()+'\0';
|
||||
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
||||
|
||||
function numeric(str) {
|
||||
return parseInt(str, 10) == str
|
||||
? parseInt(str, 10)
|
||||
: str.charCodeAt(0);
|
||||
}
|
||||
|
||||
function escapeBraces(str) {
|
||||
return str.split('\\\\').join(escSlash)
|
||||
.split('\\{').join(escOpen)
|
||||
.split('\\}').join(escClose)
|
||||
.split('\\,').join(escComma)
|
||||
.split('\\.').join(escPeriod);
|
||||
}
|
||||
|
||||
function unescapeBraces(str) {
|
||||
return str.split(escSlash).join('\\')
|
||||
.split(escOpen).join('{')
|
||||
.split(escClose).join('}')
|
||||
.split(escComma).join(',')
|
||||
.split(escPeriod).join('.');
|
||||
}
|
||||
|
||||
|
||||
// Basically just str.split(","), but handling cases
|
||||
// where we have nested braced sections, which should be
|
||||
// treated as individual members, like {a,{b,c},d}
|
||||
function parseCommaParts(str) {
|
||||
if (!str)
|
||||
return [''];
|
||||
|
||||
var parts = [];
|
||||
var m = balanced('{', '}', str);
|
||||
|
||||
if (!m)
|
||||
return str.split(',');
|
||||
|
||||
var pre = m.pre;
|
||||
var body = m.body;
|
||||
var post = m.post;
|
||||
var p = pre.split(',');
|
||||
|
||||
p[p.length-1] += '{' + body + '}';
|
||||
var postParts = parseCommaParts(post);
|
||||
if (post.length) {
|
||||
p[p.length-1] += postParts.shift();
|
||||
p.push.apply(p, postParts);
|
||||
}
|
||||
|
||||
parts.push.apply(parts, p);
|
||||
|
||||
return parts;
|
||||
}
|
||||
|
||||
function expandTop(str) {
|
||||
if (!str)
|
||||
return [];
|
||||
|
||||
// I don't know why Bash 4.3 does this, but it does.
|
||||
// Anything starting with {} will have the first two bytes preserved
|
||||
// but *only* at the top level, so {},a}b will not expand to anything,
|
||||
// but a{},b}c will be expanded to [a}c,abc].
|
||||
// One could argue that this is a bug in Bash, but since the goal of
|
||||
// this module is to match Bash's rules, we escape a leading {}
|
||||
if (str.substr(0, 2) === '{}') {
|
||||
str = '\\{\\}' + str.substr(2);
|
||||
}
|
||||
|
||||
return expand(escapeBraces(str), true).map(unescapeBraces);
|
||||
}
|
||||
|
||||
function identity(e) {
|
||||
return e;
|
||||
}
|
||||
|
||||
function embrace(str) {
|
||||
return '{' + str + '}';
|
||||
}
|
||||
function isPadded(el) {
|
||||
return /^-?0\d/.test(el);
|
||||
}
|
||||
|
||||
function lte(i, y) {
|
||||
return i <= y;
|
||||
}
|
||||
function gte(i, y) {
|
||||
return i >= y;
|
||||
}
|
||||
|
||||
function expand(str, isTop) {
|
||||
var expansions = [];
|
||||
|
||||
var m = balanced('{', '}', str);
|
||||
if (!m || /\$$/.test(m.pre)) return [str];
|
||||
|
||||
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isSequence = isNumericSequence || isAlphaSequence;
|
||||
var isOptions = m.body.indexOf(',') >= 0;
|
||||
if (!isSequence && !isOptions) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,(?!,).*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
return expand(str);
|
||||
}
|
||||
return [str];
|
||||
}
|
||||
|
||||
var n;
|
||||
if (isSequence) {
|
||||
n = m.body.split(/\.\./);
|
||||
} else {
|
||||
n = parseCommaParts(m.body);
|
||||
if (n.length === 1) {
|
||||
// x{{a,b}}y ==> x{a}y x{b}y
|
||||
n = expand(n[0], false).map(embrace);
|
||||
if (n.length === 1) {
|
||||
var post = m.post.length
|
||||
? expand(m.post, false)
|
||||
: [''];
|
||||
return post.map(function(p) {
|
||||
return m.pre + n[0] + p;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// at this point, n is the parts, and we know it's not a comma set
|
||||
// with a single entry.
|
||||
|
||||
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
var pre = m.pre;
|
||||
var post = m.post.length
|
||||
? expand(m.post, false)
|
||||
: [''];
|
||||
|
||||
var N;
|
||||
|
||||
if (isSequence) {
|
||||
var x = numeric(n[0]);
|
||||
var y = numeric(n[1]);
|
||||
var width = Math.max(n[0].length, n[1].length)
|
||||
var incr = n.length == 3
|
||||
? Math.abs(numeric(n[2]))
|
||||
: 1;
|
||||
var test = lte;
|
||||
var reverse = y < x;
|
||||
if (reverse) {
|
||||
incr *= -1;
|
||||
test = gte;
|
||||
}
|
||||
var pad = n.some(isPadded);
|
||||
|
||||
N = [];
|
||||
|
||||
for (var i = x; test(i, y); i += incr) {
|
||||
var c;
|
||||
if (isAlphaSequence) {
|
||||
c = String.fromCharCode(i);
|
||||
if (c === '\\')
|
||||
c = '';
|
||||
} else {
|
||||
c = String(i);
|
||||
if (pad) {
|
||||
var need = width - c.length;
|
||||
if (need > 0) {
|
||||
var z = new Array(need + 1).join('0');
|
||||
if (i < 0)
|
||||
c = '-' + z + c.slice(1);
|
||||
else
|
||||
c = z + c;
|
||||
}
|
||||
}
|
||||
}
|
||||
N.push(c);
|
||||
}
|
||||
} else {
|
||||
N = concatMap(n, function(el) { return expand(el, false) });
|
||||
}
|
||||
|
||||
for (var j = 0; j < N.length; j++) {
|
||||
for (var k = 0; k < post.length; k++) {
|
||||
var expansion = pre + N[j] + post[k];
|
||||
if (!isTop || isSequence || expansion)
|
||||
expansions.push(expansion);
|
||||
}
|
||||
}
|
||||
|
||||
return expansions;
|
||||
}
|
||||
|
||||
50
backend/node_modules/nodemon/node_modules/brace-expansion/package.json
generated
vendored
Normal file
50
backend/node_modules/nodemon/node_modules/brace-expansion/package.json
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "brace-expansion",
|
||||
"description": "Brace expansion as known from sh/bash",
|
||||
"version": "1.1.12",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/brace-expansion.git"
|
||||
},
|
||||
"homepage": "https://github.com/juliangruber/brace-expansion",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "tape test/*.js",
|
||||
"gentest": "bash test/generate.sh",
|
||||
"bench": "matcha test/perf/bench.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"matcha": "^0.7.0",
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"license": "MIT",
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/25..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
},
|
||||
"publishConfig": {
|
||||
"tag": "1.x"
|
||||
}
|
||||
}
|
||||
20
backend/node_modules/nodemon/node_modules/debug/LICENSE
generated
vendored
Normal file
20
backend/node_modules/nodemon/node_modules/debug/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
|
||||
Copyright (c) 2018-2021 Josh Junon
|
||||
|
||||
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.
|
||||
|
||||
481
backend/node_modules/nodemon/node_modules/debug/README.md
generated
vendored
Normal file
481
backend/node_modules/nodemon/node_modules/debug/README.md
generated
vendored
Normal file
@@ -0,0 +1,481 @@
|
||||
# debug
|
||||
[](#backers)
|
||||
[](#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);
|
||||
```
|
||||
|
||||
In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
|
||||
|
||||
<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
|
||||
|
||||
## Output streams
|
||||
|
||||
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
|
||||
|
||||
Example [_stdout.js_](./examples/node/stdout.js):
|
||||
|
||||
```js
|
||||
var debug = require('debug');
|
||||
var error = debug('app:error');
|
||||
|
||||
// by default stderr is used
|
||||
error('goes to stderr!');
|
||||
|
||||
var log = debug('app:log');
|
||||
// set this namespace to log via console.log
|
||||
log.log = console.log.bind(console); // don't forget to bind to console!
|
||||
log('goes to stdout');
|
||||
error('still goes to stderr!');
|
||||
|
||||
// set all output to go via console.info
|
||||
// overrides all per-namespace log settings
|
||||
debug.log = console.info.bind(console);
|
||||
error('now goes to stdout via console.info');
|
||||
log('still goes to stdout, but via console.info now');
|
||||
```
|
||||
|
||||
## Extend
|
||||
You can simply extend debugger
|
||||
```js
|
||||
const log = require('debug')('auth');
|
||||
|
||||
//creates new debug instance with extended namespace
|
||||
const logSign = log.extend('sign');
|
||||
const logLogin = log.extend('login');
|
||||
|
||||
log('hello'); // auth hello
|
||||
logSign('hello'); //auth:sign hello
|
||||
logLogin('hello'); //auth:login hello
|
||||
```
|
||||
|
||||
## Set dynamically
|
||||
|
||||
You can also enable debug dynamically by calling the `enable()` method :
|
||||
|
||||
```js
|
||||
let debug = require('debug');
|
||||
|
||||
console.log(1, debug.enabled('test'));
|
||||
|
||||
debug.enable('test');
|
||||
console.log(2, debug.enabled('test'));
|
||||
|
||||
debug.disable();
|
||||
console.log(3, debug.enabled('test'));
|
||||
|
||||
```
|
||||
|
||||
print :
|
||||
```
|
||||
1 false
|
||||
2 true
|
||||
3 false
|
||||
```
|
||||
|
||||
Usage :
|
||||
`enable(namespaces)`
|
||||
`namespaces` can include modes separated by a colon and wildcards.
|
||||
|
||||
Note that calling `enable()` completely overrides previously set DEBUG variable :
|
||||
|
||||
```
|
||||
$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
|
||||
=> false
|
||||
```
|
||||
|
||||
`disable()`
|
||||
|
||||
Will disable all namespaces. The functions returns the namespaces currently
|
||||
enabled (and skipped). This can be useful if you want to disable debugging
|
||||
temporarily without knowing what was enabled to begin with.
|
||||
|
||||
For example:
|
||||
|
||||
```js
|
||||
let debug = require('debug');
|
||||
debug.enable('foo:*,-foo:bar');
|
||||
let namespaces = debug.disable();
|
||||
debug.enable(namespaces);
|
||||
```
|
||||
|
||||
Note: There is no guarantee that the string will be identical to the initial
|
||||
enable string, but semantically they will be identical.
|
||||
|
||||
## Checking whether a debug target is enabled
|
||||
|
||||
After you've created a debug instance, you can determine whether or not it is
|
||||
enabled by checking the `enabled` property:
|
||||
|
||||
```javascript
|
||||
const debug = require('debug')('http');
|
||||
|
||||
if (debug.enabled) {
|
||||
// do stuff...
|
||||
}
|
||||
```
|
||||
|
||||
You can also manually toggle this property to force the debug instance to be
|
||||
enabled or disabled.
|
||||
|
||||
## Usage in child processes
|
||||
|
||||
Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
|
||||
For example:
|
||||
|
||||
```javascript
|
||||
worker = fork(WORKER_WRAP_PATH, [workerPath], {
|
||||
stdio: [
|
||||
/* stdin: */ 0,
|
||||
/* stdout: */ 'pipe',
|
||||
/* stderr: */ 'pipe',
|
||||
'ipc',
|
||||
],
|
||||
env: Object.assign({}, process.env, {
|
||||
DEBUG_COLORS: 1 // without this settings, colors won't be shown
|
||||
}),
|
||||
});
|
||||
|
||||
worker.stderr.pipe(process.stderr, { end: false });
|
||||
```
|
||||
|
||||
|
||||
## Authors
|
||||
|
||||
- TJ Holowaychuk
|
||||
- Nathan Rajlich
|
||||
- Andrew Rhyne
|
||||
- Josh Junon
|
||||
|
||||
## 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 <tj@vision-media.ca>
|
||||
Copyright (c) 2018-2021 Josh Junon
|
||||
|
||||
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.
|
||||
64
backend/node_modules/nodemon/node_modules/debug/package.json
generated
vendored
Normal file
64
backend/node_modules/nodemon/node_modules/debug/package.json
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"name": "debug",
|
||||
"version": "4.4.3",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/debug-js/debug.git"
|
||||
},
|
||||
"description": "Lightweight debugging utility for Node.js and the browser",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"log",
|
||||
"debugger"
|
||||
],
|
||||
"files": [
|
||||
"src",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"author": "Josh Junon (https://github.com/qix-)",
|
||||
"contributors": [
|
||||
"TJ Holowaychuk <tj@vision-media.ca>",
|
||||
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
|
||||
"Andrew Rhyne <rhyneandrew@gmail.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"lint": "xo",
|
||||
"test": "npm run test:node && npm run test:browser && npm run lint",
|
||||
"test:node": "mocha test.js test.node.js",
|
||||
"test:browser": "karma start --single-run",
|
||||
"test:coverage": "cat ./coverage/lcov.info | coveralls"
|
||||
},
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"brfs": "^2.0.1",
|
||||
"browserify": "^16.2.3",
|
||||
"coveralls": "^3.0.2",
|
||||
"karma": "^3.1.4",
|
||||
"karma-browserify": "^6.0.0",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"mocha": "^5.2.0",
|
||||
"mocha-lcov-reporter": "^1.2.0",
|
||||
"sinon": "^14.0.0",
|
||||
"xo": "^0.23.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"main": "./src/index.js",
|
||||
"browser": "./src/browser.js",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"xo": {
|
||||
"rules": {
|
||||
"import/extensions": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
272
backend/node_modules/nodemon/node_modules/debug/src/browser.js
generated
vendored
Normal file
272
backend/node_modules/nodemon/node_modules/debug/src/browser.js
generated
vendored
Normal file
@@ -0,0 +1,272 @@
|
||||
/* eslint-env browser */
|
||||
|
||||
/**
|
||||
* This is the web browser implementation of `debug()`.
|
||||
*/
|
||||
|
||||
exports.formatArgs = formatArgs;
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.useColors = useColors;
|
||||
exports.storage = localstorage();
|
||||
exports.destroy = (() => {
|
||||
let warned = false;
|
||||
|
||||
return () => {
|
||||
if (!warned) {
|
||||
warned = true;
|
||||
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
let m;
|
||||
|
||||
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
||||
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
||||
// eslint-disable-next-line no-return-assign
|
||||
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 && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[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;
|
||||
}
|
||||
|
||||
const 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
|
||||
let index = 0;
|
||||
let lastC = 0;
|
||||
args[0].replace(/%[a-zA-Z%]/g, 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.debug()` when available.
|
||||
* No-op when `console.debug` is not a "function".
|
||||
* If `console.debug` is not available, falls back
|
||||
* to `console.log`.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
exports.log = console.debug || console.log || (() => {});
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
let r;
|
||||
try {
|
||||
r = exports.storage.getItem('debug') || 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);
|
||||
|
||||
const {formatters} = module.exports;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
};
|
||||
292
backend/node_modules/nodemon/node_modules/debug/src/common.js
generated
vendored
Normal file
292
backend/node_modules/nodemon/node_modules/debug/src/common.js
generated
vendored
Normal file
@@ -0,0 +1,292 @@
|
||||
|
||||
/**
|
||||
* 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');
|
||||
createDebug.destroy = destroy;
|
||||
|
||||
Object.keys(env).forEach(key => {
|
||||
createDebug[key] = env[key];
|
||||
});
|
||||
|
||||
/**
|
||||
* 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 debug instance to be colored
|
||||
* @return {Number|String} An ANSI color code for the given namespace
|
||||
* @api private
|
||||
*/
|
||||
function selectColor(namespace) {
|
||||
let hash = 0;
|
||||
|
||||
for (let 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) {
|
||||
let prevTime;
|
||||
let enableOverride = null;
|
||||
let namespacesCache;
|
||||
let enabledCache;
|
||||
|
||||
function debug(...args) {
|
||||
// Disabled?
|
||||
if (!debug.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const self = debug;
|
||||
|
||||
// Set `diff` timestamp
|
||||
const curr = Number(new Date());
|
||||
const 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
|
||||
let index = 0;
|
||||
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
||||
// If we encounter an escaped % then don't increase the array index
|
||||
if (match === '%%') {
|
||||
return '%';
|
||||
}
|
||||
index++;
|
||||
const formatter = createDebug.formatters[format];
|
||||
if (typeof formatter === 'function') {
|
||||
const 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);
|
||||
|
||||
const logFn = self.log || createDebug.log;
|
||||
logFn.apply(self, args);
|
||||
}
|
||||
|
||||
debug.namespace = namespace;
|
||||
debug.useColors = createDebug.useColors();
|
||||
debug.color = createDebug.selectColor(namespace);
|
||||
debug.extend = extend;
|
||||
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
||||
|
||||
Object.defineProperty(debug, 'enabled', {
|
||||
enumerable: true,
|
||||
configurable: false,
|
||||
get: () => {
|
||||
if (enableOverride !== null) {
|
||||
return enableOverride;
|
||||
}
|
||||
if (namespacesCache !== createDebug.namespaces) {
|
||||
namespacesCache = createDebug.namespaces;
|
||||
enabledCache = createDebug.enabled(namespace);
|
||||
}
|
||||
|
||||
return enabledCache;
|
||||
},
|
||||
set: v => {
|
||||
enableOverride = v;
|
||||
}
|
||||
});
|
||||
|
||||
// Env-specific initialization logic for debug instances
|
||||
if (typeof createDebug.init === 'function') {
|
||||
createDebug.init(debug);
|
||||
}
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
||||
function extend(namespace, delimiter) {
|
||||
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
||||
newDebug.log = this.log;
|
||||
return newDebug;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.namespaces = namespaces;
|
||||
|
||||
createDebug.names = [];
|
||||
createDebug.skips = [];
|
||||
|
||||
const split = (typeof namespaces === 'string' ? namespaces : '')
|
||||
.trim()
|
||||
.replace(/\s+/g, ',')
|
||||
.split(',')
|
||||
.filter(Boolean);
|
||||
|
||||
for (const ns of split) {
|
||||
if (ns[0] === '-') {
|
||||
createDebug.skips.push(ns.slice(1));
|
||||
} else {
|
||||
createDebug.names.push(ns);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given string matches a namespace template, honoring
|
||||
* asterisks as wildcards.
|
||||
*
|
||||
* @param {String} search
|
||||
* @param {String} template
|
||||
* @return {Boolean}
|
||||
*/
|
||||
function matchesTemplate(search, template) {
|
||||
let searchIndex = 0;
|
||||
let templateIndex = 0;
|
||||
let starIndex = -1;
|
||||
let matchIndex = 0;
|
||||
|
||||
while (searchIndex < search.length) {
|
||||
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
|
||||
// Match character or proceed with wildcard
|
||||
if (template[templateIndex] === '*') {
|
||||
starIndex = templateIndex;
|
||||
matchIndex = searchIndex;
|
||||
templateIndex++; // Skip the '*'
|
||||
} else {
|
||||
searchIndex++;
|
||||
templateIndex++;
|
||||
}
|
||||
} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
|
||||
// Backtrack to the last '*' and try to match more characters
|
||||
templateIndex = starIndex + 1;
|
||||
matchIndex++;
|
||||
searchIndex = matchIndex;
|
||||
} else {
|
||||
return false; // No match
|
||||
}
|
||||
}
|
||||
|
||||
// Handle trailing '*' in template
|
||||
while (templateIndex < template.length && template[templateIndex] === '*') {
|
||||
templateIndex++;
|
||||
}
|
||||
|
||||
return templateIndex === template.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable debug output.
|
||||
*
|
||||
* @return {String} namespaces
|
||||
* @api public
|
||||
*/
|
||||
function disable() {
|
||||
const namespaces = [
|
||||
...createDebug.names,
|
||||
...createDebug.skips.map(namespace => '-' + namespace)
|
||||
].join(',');
|
||||
createDebug.enable('');
|
||||
return namespaces;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given mode name is enabled, false otherwise.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
function enabled(name) {
|
||||
for (const skip of createDebug.skips) {
|
||||
if (matchesTemplate(name, skip)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (const ns of createDebug.names) {
|
||||
if (matchesTemplate(name, ns)) {
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* XXX DO NOT USE. This is a temporary stub function.
|
||||
* XXX It WILL be removed in the next major release.
|
||||
*/
|
||||
function destroy() {
|
||||
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
||||
}
|
||||
|
||||
createDebug.enable(createDebug.load());
|
||||
|
||||
return createDebug;
|
||||
}
|
||||
|
||||
module.exports = setup;
|
||||
10
backend/node_modules/nodemon/node_modules/debug/src/index.js
generated
vendored
Normal file
10
backend/node_modules/nodemon/node_modules/debug/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
263
backend/node_modules/nodemon/node_modules/debug/src/node.js
generated
vendored
Normal file
263
backend/node_modules/nodemon/node_modules/debug/src/node.js
generated
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
const tty = require('tty');
|
||||
const 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;
|
||||
exports.destroy = util.deprecate(
|
||||
() => {},
|
||||
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
||||
);
|
||||
|
||||
/**
|
||||
* 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
|
||||
const 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(key => {
|
||||
return /^debug_/i.test(key);
|
||||
}).reduce((obj, key) => {
|
||||
// Camel-case
|
||||
const prop = key
|
||||
.substring(6)
|
||||
.toLowerCase()
|
||||
.replace(/_([a-z])/g, (_, k) => {
|
||||
return k.toUpperCase();
|
||||
});
|
||||
|
||||
// Coerce string value into JS value
|
||||
let 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) {
|
||||
const {namespace: name, useColors} = this;
|
||||
|
||||
if (useColors) {
|
||||
const c = this.color;
|
||||
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
||||
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
||||
|
||||
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
||||
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
|
||||
} else {
|
||||
args[0] = getDate() + name + ' ' + args[0];
|
||||
}
|
||||
}
|
||||
|
||||
function getDate() {
|
||||
if (exports.inspectOpts.hideDate) {
|
||||
return '';
|
||||
}
|
||||
return new Date().toISOString() + ' ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
||||
*/
|
||||
|
||||
function log(...args) {
|
||||
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\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 = {};
|
||||
|
||||
const keys = Object.keys(exports.inspectOpts);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = require('./common')(exports);
|
||||
|
||||
const {formatters} = module.exports;
|
||||
|
||||
/**
|
||||
* 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(str => 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);
|
||||
};
|
||||
15
backend/node_modules/nodemon/node_modules/minimatch/LICENSE
generated
vendored
Normal file
15
backend/node_modules/nodemon/node_modules/minimatch/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
230
backend/node_modules/nodemon/node_modules/minimatch/README.md
generated
vendored
Normal file
230
backend/node_modules/nodemon/node_modules/minimatch/README.md
generated
vendored
Normal file
@@ -0,0 +1,230 @@
|
||||
# minimatch
|
||||
|
||||
A minimal matching utility.
|
||||
|
||||
[](http://travis-ci.org/isaacs/minimatch)
|
||||
|
||||
|
||||
This is the matching library used internally by npm.
|
||||
|
||||
It works by converting glob expressions into JavaScript `RegExp`
|
||||
objects.
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var minimatch = require("minimatch")
|
||||
|
||||
minimatch("bar.foo", "*.foo") // true!
|
||||
minimatch("bar.foo", "*.bar") // false!
|
||||
minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
Supports these glob features:
|
||||
|
||||
* Brace Expansion
|
||||
* Extended glob matching
|
||||
* "Globstar" `**` matching
|
||||
|
||||
See:
|
||||
|
||||
* `man sh`
|
||||
* `man bash`
|
||||
* `man 3 fnmatch`
|
||||
* `man 5 gitignore`
|
||||
|
||||
## Minimatch Class
|
||||
|
||||
Create a minimatch object by instantiating the `minimatch.Minimatch` class.
|
||||
|
||||
```javascript
|
||||
var Minimatch = require("minimatch").Minimatch
|
||||
var mm = new Minimatch(pattern, options)
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
* `pattern` The original pattern the minimatch object represents.
|
||||
* `options` The options supplied to the constructor.
|
||||
* `set` A 2-dimensional array of regexp or string expressions.
|
||||
Each row in the
|
||||
array corresponds to a brace-expanded pattern. Each item in the row
|
||||
corresponds to a single path-part. For example, the pattern
|
||||
`{a,b/c}/d` would expand to a set of patterns like:
|
||||
|
||||
[ [ a, d ]
|
||||
, [ b, c, d ] ]
|
||||
|
||||
If a portion of the pattern doesn't have any "magic" in it
|
||||
(that is, it's something like `"foo"` rather than `fo*o?`), then it
|
||||
will be left as a string rather than converted to a regular
|
||||
expression.
|
||||
|
||||
* `regexp` Created by the `makeRe` method. A single regular expression
|
||||
expressing the entire pattern. This is useful in cases where you wish
|
||||
to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
|
||||
* `negate` True if the pattern is negated.
|
||||
* `comment` True if the pattern is a comment.
|
||||
* `empty` True if the pattern is `""`.
|
||||
|
||||
### Methods
|
||||
|
||||
* `makeRe` Generate the `regexp` member if necessary, and return it.
|
||||
Will return `false` if the pattern is invalid.
|
||||
* `match(fname)` Return true if the filename matches the pattern, or
|
||||
false otherwise.
|
||||
* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
|
||||
filename, and match it against a single row in the `regExpSet`. This
|
||||
method is mainly for internal use, but is exposed so that it can be
|
||||
used by a glob-walker that needs to avoid excessive filesystem calls.
|
||||
|
||||
All other methods are internal, and will be called as necessary.
|
||||
|
||||
### minimatch(path, pattern, options)
|
||||
|
||||
Main export. Tests a path against the pattern using the options.
|
||||
|
||||
```javascript
|
||||
var isJS = minimatch(file, "*.js", { matchBase: true })
|
||||
```
|
||||
|
||||
### minimatch.filter(pattern, options)
|
||||
|
||||
Returns a function that tests its
|
||||
supplied argument, suitable for use with `Array.filter`. Example:
|
||||
|
||||
```javascript
|
||||
var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
|
||||
```
|
||||
|
||||
### minimatch.match(list, pattern, options)
|
||||
|
||||
Match against the list of
|
||||
files, in the style of fnmatch or glob. If nothing is matched, and
|
||||
options.nonull is set, then return a list containing the pattern itself.
|
||||
|
||||
```javascript
|
||||
var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
|
||||
```
|
||||
|
||||
### minimatch.makeRe(pattern, options)
|
||||
|
||||
Make a regular expression object from the pattern.
|
||||
|
||||
## Options
|
||||
|
||||
All options are `false` by default.
|
||||
|
||||
### debug
|
||||
|
||||
Dump a ton of stuff to stderr.
|
||||
|
||||
### nobrace
|
||||
|
||||
Do not expand `{a,b}` and `{1..3}` brace sets.
|
||||
|
||||
### noglobstar
|
||||
|
||||
Disable `**` matching against multiple folder names.
|
||||
|
||||
### dot
|
||||
|
||||
Allow patterns to match filenames starting with a period, even if
|
||||
the pattern does not explicitly have a period in that spot.
|
||||
|
||||
Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
|
||||
is set.
|
||||
|
||||
### noext
|
||||
|
||||
Disable "extglob" style patterns like `+(a|b)`.
|
||||
|
||||
### nocase
|
||||
|
||||
Perform a case-insensitive match.
|
||||
|
||||
### nonull
|
||||
|
||||
When a match is not found by `minimatch.match`, return a list containing
|
||||
the pattern itself if this option is set. When not set, an empty list
|
||||
is returned if there are no matches.
|
||||
|
||||
### matchBase
|
||||
|
||||
If set, then patterns without slashes will be matched
|
||||
against the basename of the path if it contains slashes. For example,
|
||||
`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
|
||||
|
||||
### nocomment
|
||||
|
||||
Suppress the behavior of treating `#` at the start of a pattern as a
|
||||
comment.
|
||||
|
||||
### nonegate
|
||||
|
||||
Suppress the behavior of treating a leading `!` character as negation.
|
||||
|
||||
### flipNegate
|
||||
|
||||
Returns from negate expressions the same as if they were not negated.
|
||||
(Ie, true on a hit, false on a miss.)
|
||||
|
||||
### partial
|
||||
|
||||
Compare a partial path to a pattern. As long as the parts of the path that
|
||||
are present are not contradicted by the pattern, it will be treated as a
|
||||
match. This is useful in applications where you're walking through a
|
||||
folder structure, and don't yet have the full path, but want to ensure that
|
||||
you do not walk down paths that can never be a match.
|
||||
|
||||
For example,
|
||||
|
||||
```js
|
||||
minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d
|
||||
minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
|
||||
minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
|
||||
```
|
||||
|
||||
### allowWindowsEscape
|
||||
|
||||
Windows path separator `\` is by default converted to `/`, which
|
||||
prohibits the usage of `\` as a escape character. This flag skips that
|
||||
behavior and allows using the escape character.
|
||||
|
||||
## Comparisons to other fnmatch/glob implementations
|
||||
|
||||
While strict compliance with the existing standards is a worthwhile
|
||||
goal, some discrepancies exist between minimatch and other
|
||||
implementations, and are intentional.
|
||||
|
||||
If the pattern starts with a `!` character, then it is negated. Set the
|
||||
`nonegate` flag to suppress this behavior, and treat leading `!`
|
||||
characters normally. This is perhaps relevant if you wish to start the
|
||||
pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
|
||||
characters at the start of a pattern will negate the pattern multiple
|
||||
times.
|
||||
|
||||
If a pattern starts with `#`, then it is treated as a comment, and
|
||||
will not match anything. Use `\#` to match a literal `#` at the
|
||||
start of a line, or set the `nocomment` flag to suppress this behavior.
|
||||
|
||||
The double-star character `**` is supported by default, unless the
|
||||
`noglobstar` flag is set. This is supported in the manner of bsdglob
|
||||
and bash 4.1, where `**` only has special significance if it is the only
|
||||
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
|
||||
`a/**b` will not.
|
||||
|
||||
If an escaped pattern has no matches, and the `nonull` flag is set,
|
||||
then minimatch.match returns the pattern as-provided, rather than
|
||||
interpreting the character escapes. For example,
|
||||
`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
|
||||
`"*a?"`. This is akin to setting the `nullglob` option in bash, except
|
||||
that it does not resolve escaped pattern characters.
|
||||
|
||||
If brace expansion is not disabled, then it is performed before any
|
||||
other interpretation of the glob pattern. Thus, a pattern like
|
||||
`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
|
||||
**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
|
||||
checked for validity. Since those two are valid, matching proceeds.
|
||||
947
backend/node_modules/nodemon/node_modules/minimatch/minimatch.js
generated
vendored
Normal file
947
backend/node_modules/nodemon/node_modules/minimatch/minimatch.js
generated
vendored
Normal file
@@ -0,0 +1,947 @@
|
||||
module.exports = minimatch
|
||||
minimatch.Minimatch = Minimatch
|
||||
|
||||
var path = (function () { try { return require('path') } catch (e) {}}()) || {
|
||||
sep: '/'
|
||||
}
|
||||
minimatch.sep = path.sep
|
||||
|
||||
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
|
||||
var expand = require('brace-expansion')
|
||||
|
||||
var plTypes = {
|
||||
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
|
||||
'?': { open: '(?:', close: ')?' },
|
||||
'+': { open: '(?:', close: ')+' },
|
||||
'*': { open: '(?:', close: ')*' },
|
||||
'@': { open: '(?:', close: ')' }
|
||||
}
|
||||
|
||||
// any single thing other than /
|
||||
// don't need to escape / when using new RegExp()
|
||||
var qmark = '[^/]'
|
||||
|
||||
// * => any number of characters
|
||||
var star = qmark + '*?'
|
||||
|
||||
// ** when dots are allowed. Anything goes, except .. and .
|
||||
// not (^ or / followed by one or two dots followed by $ or /),
|
||||
// followed by anything, any number of times.
|
||||
var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
|
||||
|
||||
// not a ^ or / followed by a dot,
|
||||
// followed by anything, any number of times.
|
||||
var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
|
||||
|
||||
// characters that need to be escaped in RegExp.
|
||||
var reSpecials = charSet('().*{}+?[]^$\\!')
|
||||
|
||||
// "abc" -> { a:true, b:true, c:true }
|
||||
function charSet (s) {
|
||||
return s.split('').reduce(function (set, c) {
|
||||
set[c] = true
|
||||
return set
|
||||
}, {})
|
||||
}
|
||||
|
||||
// normalizes slashes.
|
||||
var slashSplit = /\/+/
|
||||
|
||||
minimatch.filter = filter
|
||||
function filter (pattern, options) {
|
||||
options = options || {}
|
||||
return function (p, i, list) {
|
||||
return minimatch(p, pattern, options)
|
||||
}
|
||||
}
|
||||
|
||||
function ext (a, b) {
|
||||
b = b || {}
|
||||
var t = {}
|
||||
Object.keys(a).forEach(function (k) {
|
||||
t[k] = a[k]
|
||||
})
|
||||
Object.keys(b).forEach(function (k) {
|
||||
t[k] = b[k]
|
||||
})
|
||||
return t
|
||||
}
|
||||
|
||||
minimatch.defaults = function (def) {
|
||||
if (!def || typeof def !== 'object' || !Object.keys(def).length) {
|
||||
return minimatch
|
||||
}
|
||||
|
||||
var orig = minimatch
|
||||
|
||||
var m = function minimatch (p, pattern, options) {
|
||||
return orig(p, pattern, ext(def, options))
|
||||
}
|
||||
|
||||
m.Minimatch = function Minimatch (pattern, options) {
|
||||
return new orig.Minimatch(pattern, ext(def, options))
|
||||
}
|
||||
m.Minimatch.defaults = function defaults (options) {
|
||||
return orig.defaults(ext(def, options)).Minimatch
|
||||
}
|
||||
|
||||
m.filter = function filter (pattern, options) {
|
||||
return orig.filter(pattern, ext(def, options))
|
||||
}
|
||||
|
||||
m.defaults = function defaults (options) {
|
||||
return orig.defaults(ext(def, options))
|
||||
}
|
||||
|
||||
m.makeRe = function makeRe (pattern, options) {
|
||||
return orig.makeRe(pattern, ext(def, options))
|
||||
}
|
||||
|
||||
m.braceExpand = function braceExpand (pattern, options) {
|
||||
return orig.braceExpand(pattern, ext(def, options))
|
||||
}
|
||||
|
||||
m.match = function (list, pattern, options) {
|
||||
return orig.match(list, pattern, ext(def, options))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
Minimatch.defaults = function (def) {
|
||||
return minimatch.defaults(def).Minimatch
|
||||
}
|
||||
|
||||
function minimatch (p, pattern, options) {
|
||||
assertValidPattern(pattern)
|
||||
|
||||
if (!options) options = {}
|
||||
|
||||
// shortcut: comments match nothing.
|
||||
if (!options.nocomment && pattern.charAt(0) === '#') {
|
||||
return false
|
||||
}
|
||||
|
||||
return new Minimatch(pattern, options).match(p)
|
||||
}
|
||||
|
||||
function Minimatch (pattern, options) {
|
||||
if (!(this instanceof Minimatch)) {
|
||||
return new Minimatch(pattern, options)
|
||||
}
|
||||
|
||||
assertValidPattern(pattern)
|
||||
|
||||
if (!options) options = {}
|
||||
|
||||
pattern = pattern.trim()
|
||||
|
||||
// windows support: need to use /, not \
|
||||
if (!options.allowWindowsEscape && path.sep !== '/') {
|
||||
pattern = pattern.split(path.sep).join('/')
|
||||
}
|
||||
|
||||
this.options = options
|
||||
this.set = []
|
||||
this.pattern = pattern
|
||||
this.regexp = null
|
||||
this.negate = false
|
||||
this.comment = false
|
||||
this.empty = false
|
||||
this.partial = !!options.partial
|
||||
|
||||
// make the set of regexps etc.
|
||||
this.make()
|
||||
}
|
||||
|
||||
Minimatch.prototype.debug = function () {}
|
||||
|
||||
Minimatch.prototype.make = make
|
||||
function make () {
|
||||
var pattern = this.pattern
|
||||
var options = this.options
|
||||
|
||||
// empty patterns and comments match nothing.
|
||||
if (!options.nocomment && pattern.charAt(0) === '#') {
|
||||
this.comment = true
|
||||
return
|
||||
}
|
||||
if (!pattern) {
|
||||
this.empty = true
|
||||
return
|
||||
}
|
||||
|
||||
// step 1: figure out negation, etc.
|
||||
this.parseNegate()
|
||||
|
||||
// step 2: expand braces
|
||||
var set = this.globSet = this.braceExpand()
|
||||
|
||||
if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
|
||||
|
||||
this.debug(this.pattern, set)
|
||||
|
||||
// step 3: now we have a set, so turn each one into a series of path-portion
|
||||
// matching patterns.
|
||||
// These will be regexps, except in the case of "**", which is
|
||||
// set to the GLOBSTAR object for globstar behavior,
|
||||
// and will not contain any / characters
|
||||
set = this.globParts = set.map(function (s) {
|
||||
return s.split(slashSplit)
|
||||
})
|
||||
|
||||
this.debug(this.pattern, set)
|
||||
|
||||
// glob --> regexps
|
||||
set = set.map(function (s, si, set) {
|
||||
return s.map(this.parse, this)
|
||||
}, this)
|
||||
|
||||
this.debug(this.pattern, set)
|
||||
|
||||
// filter out everything that didn't compile properly.
|
||||
set = set.filter(function (s) {
|
||||
return s.indexOf(false) === -1
|
||||
})
|
||||
|
||||
this.debug(this.pattern, set)
|
||||
|
||||
this.set = set
|
||||
}
|
||||
|
||||
Minimatch.prototype.parseNegate = parseNegate
|
||||
function parseNegate () {
|
||||
var pattern = this.pattern
|
||||
var negate = false
|
||||
var options = this.options
|
||||
var negateOffset = 0
|
||||
|
||||
if (options.nonegate) return
|
||||
|
||||
for (var i = 0, l = pattern.length
|
||||
; i < l && pattern.charAt(i) === '!'
|
||||
; i++) {
|
||||
negate = !negate
|
||||
negateOffset++
|
||||
}
|
||||
|
||||
if (negateOffset) this.pattern = pattern.substr(negateOffset)
|
||||
this.negate = negate
|
||||
}
|
||||
|
||||
// Brace expansion:
|
||||
// a{b,c}d -> abd acd
|
||||
// a{b,}c -> abc ac
|
||||
// a{0..3}d -> a0d a1d a2d a3d
|
||||
// a{b,c{d,e}f}g -> abg acdfg acefg
|
||||
// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
|
||||
//
|
||||
// Invalid sets are not expanded.
|
||||
// a{2..}b -> a{2..}b
|
||||
// a{b}c -> a{b}c
|
||||
minimatch.braceExpand = function (pattern, options) {
|
||||
return braceExpand(pattern, options)
|
||||
}
|
||||
|
||||
Minimatch.prototype.braceExpand = braceExpand
|
||||
|
||||
function braceExpand (pattern, options) {
|
||||
if (!options) {
|
||||
if (this instanceof Minimatch) {
|
||||
options = this.options
|
||||
} else {
|
||||
options = {}
|
||||
}
|
||||
}
|
||||
|
||||
pattern = typeof pattern === 'undefined'
|
||||
? this.pattern : pattern
|
||||
|
||||
assertValidPattern(pattern)
|
||||
|
||||
// Thanks to Yeting Li <https://github.com/yetingli> for
|
||||
// improving this regexp to avoid a ReDOS vulnerability.
|
||||
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
||||
// shortcut. no need to expand.
|
||||
return [pattern]
|
||||
}
|
||||
|
||||
return expand(pattern)
|
||||
}
|
||||
|
||||
var MAX_PATTERN_LENGTH = 1024 * 64
|
||||
var assertValidPattern = function (pattern) {
|
||||
if (typeof pattern !== 'string') {
|
||||
throw new TypeError('invalid pattern')
|
||||
}
|
||||
|
||||
if (pattern.length > MAX_PATTERN_LENGTH) {
|
||||
throw new TypeError('pattern is too long')
|
||||
}
|
||||
}
|
||||
|
||||
// parse a component of the expanded set.
|
||||
// At this point, no pattern may contain "/" in it
|
||||
// so we're going to return a 2d array, where each entry is the full
|
||||
// pattern, split on '/', and then turned into a regular expression.
|
||||
// A regexp is made at the end which joins each array with an
|
||||
// escaped /, and another full one which joins each regexp with |.
|
||||
//
|
||||
// Following the lead of Bash 4.1, note that "**" only has special meaning
|
||||
// when it is the *only* thing in a path portion. Otherwise, any series
|
||||
// of * is equivalent to a single *. Globstar behavior is enabled by
|
||||
// default, and can be disabled by setting options.noglobstar.
|
||||
Minimatch.prototype.parse = parse
|
||||
var SUBPARSE = {}
|
||||
function parse (pattern, isSub) {
|
||||
assertValidPattern(pattern)
|
||||
|
||||
var options = this.options
|
||||
|
||||
// shortcuts
|
||||
if (pattern === '**') {
|
||||
if (!options.noglobstar)
|
||||
return GLOBSTAR
|
||||
else
|
||||
pattern = '*'
|
||||
}
|
||||
if (pattern === '') return ''
|
||||
|
||||
var re = ''
|
||||
var hasMagic = !!options.nocase
|
||||
var escaping = false
|
||||
// ? => one single character
|
||||
var patternListStack = []
|
||||
var negativeLists = []
|
||||
var stateChar
|
||||
var inClass = false
|
||||
var reClassStart = -1
|
||||
var classStart = -1
|
||||
// . and .. never match anything that doesn't start with .,
|
||||
// even when options.dot is set.
|
||||
var patternStart = pattern.charAt(0) === '.' ? '' // anything
|
||||
// not (start or / followed by . or .. followed by / or end)
|
||||
: options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
|
||||
: '(?!\\.)'
|
||||
var self = this
|
||||
|
||||
function clearStateChar () {
|
||||
if (stateChar) {
|
||||
// we had some state-tracking character
|
||||
// that wasn't consumed by this pass.
|
||||
switch (stateChar) {
|
||||
case '*':
|
||||
re += star
|
||||
hasMagic = true
|
||||
break
|
||||
case '?':
|
||||
re += qmark
|
||||
hasMagic = true
|
||||
break
|
||||
default:
|
||||
re += '\\' + stateChar
|
||||
break
|
||||
}
|
||||
self.debug('clearStateChar %j %j', stateChar, re)
|
||||
stateChar = false
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0, len = pattern.length, c
|
||||
; (i < len) && (c = pattern.charAt(i))
|
||||
; i++) {
|
||||
this.debug('%s\t%s %s %j', pattern, i, re, c)
|
||||
|
||||
// skip over any that are escaped.
|
||||
if (escaping && reSpecials[c]) {
|
||||
re += '\\' + c
|
||||
escaping = false
|
||||
continue
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
/* istanbul ignore next */
|
||||
case '/': {
|
||||
// completely not allowed, even escaped.
|
||||
// Should already be path-split by now.
|
||||
return false
|
||||
}
|
||||
|
||||
case '\\':
|
||||
clearStateChar()
|
||||
escaping = true
|
||||
continue
|
||||
|
||||
// the various stateChar values
|
||||
// for the "extglob" stuff.
|
||||
case '?':
|
||||
case '*':
|
||||
case '+':
|
||||
case '@':
|
||||
case '!':
|
||||
this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
|
||||
|
||||
// all of those are literals inside a class, except that
|
||||
// the glob [!a] means [^a] in regexp
|
||||
if (inClass) {
|
||||
this.debug(' in class')
|
||||
if (c === '!' && i === classStart + 1) c = '^'
|
||||
re += c
|
||||
continue
|
||||
}
|
||||
|
||||
// if we already have a stateChar, then it means
|
||||
// that there was something like ** or +? in there.
|
||||
// Handle the stateChar, then proceed with this one.
|
||||
self.debug('call clearStateChar %j', stateChar)
|
||||
clearStateChar()
|
||||
stateChar = c
|
||||
// if extglob is disabled, then +(asdf|foo) isn't a thing.
|
||||
// just clear the statechar *now*, rather than even diving into
|
||||
// the patternList stuff.
|
||||
if (options.noext) clearStateChar()
|
||||
continue
|
||||
|
||||
case '(':
|
||||
if (inClass) {
|
||||
re += '('
|
||||
continue
|
||||
}
|
||||
|
||||
if (!stateChar) {
|
||||
re += '\\('
|
||||
continue
|
||||
}
|
||||
|
||||
patternListStack.push({
|
||||
type: stateChar,
|
||||
start: i - 1,
|
||||
reStart: re.length,
|
||||
open: plTypes[stateChar].open,
|
||||
close: plTypes[stateChar].close
|
||||
})
|
||||
// negation is (?:(?!js)[^/]*)
|
||||
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
|
||||
this.debug('plType %j %j', stateChar, re)
|
||||
stateChar = false
|
||||
continue
|
||||
|
||||
case ')':
|
||||
if (inClass || !patternListStack.length) {
|
||||
re += '\\)'
|
||||
continue
|
||||
}
|
||||
|
||||
clearStateChar()
|
||||
hasMagic = true
|
||||
var pl = patternListStack.pop()
|
||||
// negation is (?:(?!js)[^/]*)
|
||||
// The others are (?:<pattern>)<type>
|
||||
re += pl.close
|
||||
if (pl.type === '!') {
|
||||
negativeLists.push(pl)
|
||||
}
|
||||
pl.reEnd = re.length
|
||||
continue
|
||||
|
||||
case '|':
|
||||
if (inClass || !patternListStack.length || escaping) {
|
||||
re += '\\|'
|
||||
escaping = false
|
||||
continue
|
||||
}
|
||||
|
||||
clearStateChar()
|
||||
re += '|'
|
||||
continue
|
||||
|
||||
// these are mostly the same in regexp and glob
|
||||
case '[':
|
||||
// swallow any state-tracking char before the [
|
||||
clearStateChar()
|
||||
|
||||
if (inClass) {
|
||||
re += '\\' + c
|
||||
continue
|
||||
}
|
||||
|
||||
inClass = true
|
||||
classStart = i
|
||||
reClassStart = re.length
|
||||
re += c
|
||||
continue
|
||||
|
||||
case ']':
|
||||
// a right bracket shall lose its special
|
||||
// meaning and represent itself in
|
||||
// a bracket expression if it occurs
|
||||
// first in the list. -- POSIX.2 2.8.3.2
|
||||
if (i === classStart + 1 || !inClass) {
|
||||
re += '\\' + c
|
||||
escaping = false
|
||||
continue
|
||||
}
|
||||
|
||||
// handle the case where we left a class open.
|
||||
// "[z-a]" is valid, equivalent to "\[z-a\]"
|
||||
// split where the last [ was, make sure we don't have
|
||||
// an invalid re. if so, re-walk the contents of the
|
||||
// would-be class to re-translate any characters that
|
||||
// were passed through as-is
|
||||
// TODO: It would probably be faster to determine this
|
||||
// without a try/catch and a new RegExp, but it's tricky
|
||||
// to do safely. For now, this is safe and works.
|
||||
var cs = pattern.substring(classStart + 1, i)
|
||||
try {
|
||||
RegExp('[' + cs + ']')
|
||||
} catch (er) {
|
||||
// not a valid class!
|
||||
var sp = this.parse(cs, SUBPARSE)
|
||||
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
|
||||
hasMagic = hasMagic || sp[1]
|
||||
inClass = false
|
||||
continue
|
||||
}
|
||||
|
||||
// finish up the class.
|
||||
hasMagic = true
|
||||
inClass = false
|
||||
re += c
|
||||
continue
|
||||
|
||||
default:
|
||||
// swallow any state char that wasn't consumed
|
||||
clearStateChar()
|
||||
|
||||
if (escaping) {
|
||||
// no need
|
||||
escaping = false
|
||||
} else if (reSpecials[c]
|
||||
&& !(c === '^' && inClass)) {
|
||||
re += '\\'
|
||||
}
|
||||
|
||||
re += c
|
||||
|
||||
} // switch
|
||||
} // for
|
||||
|
||||
// handle the case where we left a class open.
|
||||
// "[abc" is valid, equivalent to "\[abc"
|
||||
if (inClass) {
|
||||
// split where the last [ was, and escape it
|
||||
// this is a huge pita. We now have to re-walk
|
||||
// the contents of the would-be class to re-translate
|
||||
// any characters that were passed through as-is
|
||||
cs = pattern.substr(classStart + 1)
|
||||
sp = this.parse(cs, SUBPARSE)
|
||||
re = re.substr(0, reClassStart) + '\\[' + sp[0]
|
||||
hasMagic = hasMagic || sp[1]
|
||||
}
|
||||
|
||||
// handle the case where we had a +( thing at the *end*
|
||||
// of the pattern.
|
||||
// each pattern list stack adds 3 chars, and we need to go through
|
||||
// and escape any | chars that were passed through as-is for the regexp.
|
||||
// Go through and escape them, taking care not to double-escape any
|
||||
// | chars that were already escaped.
|
||||
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
||||
var tail = re.slice(pl.reStart + pl.open.length)
|
||||
this.debug('setting tail', re, pl)
|
||||
// maybe some even number of \, then maybe 1 \, followed by a |
|
||||
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
|
||||
if (!$2) {
|
||||
// the | isn't already escaped, so escape it.
|
||||
$2 = '\\'
|
||||
}
|
||||
|
||||
// need to escape all those slashes *again*, without escaping the
|
||||
// one that we need for escaping the | character. As it works out,
|
||||
// escaping an even number of slashes can be done by simply repeating
|
||||
// it exactly after itself. That's why this trick works.
|
||||
//
|
||||
// I am sorry that you have to see this.
|
||||
return $1 + $1 + $2 + '|'
|
||||
})
|
||||
|
||||
this.debug('tail=%j\n %s', tail, tail, pl, re)
|
||||
var t = pl.type === '*' ? star
|
||||
: pl.type === '?' ? qmark
|
||||
: '\\' + pl.type
|
||||
|
||||
hasMagic = true
|
||||
re = re.slice(0, pl.reStart) + t + '\\(' + tail
|
||||
}
|
||||
|
||||
// handle trailing things that only matter at the very end.
|
||||
clearStateChar()
|
||||
if (escaping) {
|
||||
// trailing \\
|
||||
re += '\\\\'
|
||||
}
|
||||
|
||||
// only need to apply the nodot start if the re starts with
|
||||
// something that could conceivably capture a dot
|
||||
var addPatternStart = false
|
||||
switch (re.charAt(0)) {
|
||||
case '[': case '.': case '(': addPatternStart = true
|
||||
}
|
||||
|
||||
// Hack to work around lack of negative lookbehind in JS
|
||||
// A pattern like: *.!(x).!(y|z) needs to ensure that a name
|
||||
// like 'a.xyz.yz' doesn't match. So, the first negative
|
||||
// lookahead, has to look ALL the way ahead, to the end of
|
||||
// the pattern.
|
||||
for (var n = negativeLists.length - 1; n > -1; n--) {
|
||||
var nl = negativeLists[n]
|
||||
|
||||
var nlBefore = re.slice(0, nl.reStart)
|
||||
var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
|
||||
var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
|
||||
var nlAfter = re.slice(nl.reEnd)
|
||||
|
||||
nlLast += nlAfter
|
||||
|
||||
// Handle nested stuff like *(*.js|!(*.json)), where open parens
|
||||
// mean that we should *not* include the ) in the bit that is considered
|
||||
// "after" the negated section.
|
||||
var openParensBefore = nlBefore.split('(').length - 1
|
||||
var cleanAfter = nlAfter
|
||||
for (i = 0; i < openParensBefore; i++) {
|
||||
cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
|
||||
}
|
||||
nlAfter = cleanAfter
|
||||
|
||||
var dollar = ''
|
||||
if (nlAfter === '' && isSub !== SUBPARSE) {
|
||||
dollar = '$'
|
||||
}
|
||||
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
|
||||
re = newRe
|
||||
}
|
||||
|
||||
// if the re is not "" at this point, then we need to make sure
|
||||
// it doesn't match against an empty path part.
|
||||
// Otherwise a/* will match a/, which it should not.
|
||||
if (re !== '' && hasMagic) {
|
||||
re = '(?=.)' + re
|
||||
}
|
||||
|
||||
if (addPatternStart) {
|
||||
re = patternStart + re
|
||||
}
|
||||
|
||||
// parsing just a piece of a larger pattern.
|
||||
if (isSub === SUBPARSE) {
|
||||
return [re, hasMagic]
|
||||
}
|
||||
|
||||
// skip the regexp for non-magical patterns
|
||||
// unescape anything in it, though, so that it'll be
|
||||
// an exact match against a file etc.
|
||||
if (!hasMagic) {
|
||||
return globUnescape(pattern)
|
||||
}
|
||||
|
||||
var flags = options.nocase ? 'i' : ''
|
||||
try {
|
||||
var regExp = new RegExp('^' + re + '$', flags)
|
||||
} catch (er) /* istanbul ignore next - should be impossible */ {
|
||||
// If it was an invalid regular expression, then it can't match
|
||||
// anything. This trick looks for a character after the end of
|
||||
// the string, which is of course impossible, except in multi-line
|
||||
// mode, but it's not a /m regex.
|
||||
return new RegExp('$.')
|
||||
}
|
||||
|
||||
regExp._glob = pattern
|
||||
regExp._src = re
|
||||
|
||||
return regExp
|
||||
}
|
||||
|
||||
minimatch.makeRe = function (pattern, options) {
|
||||
return new Minimatch(pattern, options || {}).makeRe()
|
||||
}
|
||||
|
||||
Minimatch.prototype.makeRe = makeRe
|
||||
function makeRe () {
|
||||
if (this.regexp || this.regexp === false) return this.regexp
|
||||
|
||||
// at this point, this.set is a 2d array of partial
|
||||
// pattern strings, or "**".
|
||||
//
|
||||
// It's better to use .match(). This function shouldn't
|
||||
// be used, really, but it's pretty convenient sometimes,
|
||||
// when you just want to work with a regex.
|
||||
var set = this.set
|
||||
|
||||
if (!set.length) {
|
||||
this.regexp = false
|
||||
return this.regexp
|
||||
}
|
||||
var options = this.options
|
||||
|
||||
var twoStar = options.noglobstar ? star
|
||||
: options.dot ? twoStarDot
|
||||
: twoStarNoDot
|
||||
var flags = options.nocase ? 'i' : ''
|
||||
|
||||
var re = set.map(function (pattern) {
|
||||
return pattern.map(function (p) {
|
||||
return (p === GLOBSTAR) ? twoStar
|
||||
: (typeof p === 'string') ? regExpEscape(p)
|
||||
: p._src
|
||||
}).join('\\\/')
|
||||
}).join('|')
|
||||
|
||||
// must match entire pattern
|
||||
// ending in a * or ** will make it less strict.
|
||||
re = '^(?:' + re + ')$'
|
||||
|
||||
// can match anything, as long as it's not this.
|
||||
if (this.negate) re = '^(?!' + re + ').*$'
|
||||
|
||||
try {
|
||||
this.regexp = new RegExp(re, flags)
|
||||
} catch (ex) /* istanbul ignore next - should be impossible */ {
|
||||
this.regexp = false
|
||||
}
|
||||
return this.regexp
|
||||
}
|
||||
|
||||
minimatch.match = function (list, pattern, options) {
|
||||
options = options || {}
|
||||
var mm = new Minimatch(pattern, options)
|
||||
list = list.filter(function (f) {
|
||||
return mm.match(f)
|
||||
})
|
||||
if (mm.options.nonull && !list.length) {
|
||||
list.push(pattern)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
Minimatch.prototype.match = function match (f, partial) {
|
||||
if (typeof partial === 'undefined') partial = this.partial
|
||||
this.debug('match', f, this.pattern)
|
||||
// short-circuit in the case of busted things.
|
||||
// comments, etc.
|
||||
if (this.comment) return false
|
||||
if (this.empty) return f === ''
|
||||
|
||||
if (f === '/' && partial) return true
|
||||
|
||||
var options = this.options
|
||||
|
||||
// windows: need to use /, not \
|
||||
if (path.sep !== '/') {
|
||||
f = f.split(path.sep).join('/')
|
||||
}
|
||||
|
||||
// treat the test path as a set of pathparts.
|
||||
f = f.split(slashSplit)
|
||||
this.debug(this.pattern, 'split', f)
|
||||
|
||||
// just ONE of the pattern sets in this.set needs to match
|
||||
// in order for it to be valid. If negating, then just one
|
||||
// match means that we have failed.
|
||||
// Either way, return on the first hit.
|
||||
|
||||
var set = this.set
|
||||
this.debug(this.pattern, 'set', set)
|
||||
|
||||
// Find the basename of the path by looking for the last non-empty segment
|
||||
var filename
|
||||
var i
|
||||
for (i = f.length - 1; i >= 0; i--) {
|
||||
filename = f[i]
|
||||
if (filename) break
|
||||
}
|
||||
|
||||
for (i = 0; i < set.length; i++) {
|
||||
var pattern = set[i]
|
||||
var file = f
|
||||
if (options.matchBase && pattern.length === 1) {
|
||||
file = [filename]
|
||||
}
|
||||
var hit = this.matchOne(file, pattern, partial)
|
||||
if (hit) {
|
||||
if (options.flipNegate) return true
|
||||
return !this.negate
|
||||
}
|
||||
}
|
||||
|
||||
// didn't get any hits. this is success if it's a negative
|
||||
// pattern, failure otherwise.
|
||||
if (options.flipNegate) return false
|
||||
return this.negate
|
||||
}
|
||||
|
||||
// set partial to true to test if, for example,
|
||||
// "/a/b" matches the start of "/*/b/*/d"
|
||||
// Partial means, if you run out of file before you run
|
||||
// out of pattern, then that's fine, as long as all
|
||||
// the parts match.
|
||||
Minimatch.prototype.matchOne = function (file, pattern, partial) {
|
||||
var options = this.options
|
||||
|
||||
this.debug('matchOne',
|
||||
{ 'this': this, file: file, pattern: pattern })
|
||||
|
||||
this.debug('matchOne', file.length, pattern.length)
|
||||
|
||||
for (var fi = 0,
|
||||
pi = 0,
|
||||
fl = file.length,
|
||||
pl = pattern.length
|
||||
; (fi < fl) && (pi < pl)
|
||||
; fi++, pi++) {
|
||||
this.debug('matchOne loop')
|
||||
var p = pattern[pi]
|
||||
var f = file[fi]
|
||||
|
||||
this.debug(pattern, p, f)
|
||||
|
||||
// should be impossible.
|
||||
// some invalid regexp stuff in the set.
|
||||
/* istanbul ignore if */
|
||||
if (p === false) return false
|
||||
|
||||
if (p === GLOBSTAR) {
|
||||
this.debug('GLOBSTAR', [pattern, p, f])
|
||||
|
||||
// "**"
|
||||
// a/**/b/**/c would match the following:
|
||||
// a/b/x/y/z/c
|
||||
// a/x/y/z/b/c
|
||||
// a/b/x/b/x/c
|
||||
// a/b/c
|
||||
// To do this, take the rest of the pattern after
|
||||
// the **, and see if it would match the file remainder.
|
||||
// If so, return success.
|
||||
// If not, the ** "swallows" a segment, and try again.
|
||||
// This is recursively awful.
|
||||
//
|
||||
// a/**/b/**/c matching a/b/x/y/z/c
|
||||
// - a matches a
|
||||
// - doublestar
|
||||
// - matchOne(b/x/y/z/c, b/**/c)
|
||||
// - b matches b
|
||||
// - doublestar
|
||||
// - matchOne(x/y/z/c, c) -> no
|
||||
// - matchOne(y/z/c, c) -> no
|
||||
// - matchOne(z/c, c) -> no
|
||||
// - matchOne(c, c) yes, hit
|
||||
var fr = fi
|
||||
var pr = pi + 1
|
||||
if (pr === pl) {
|
||||
this.debug('** at the end')
|
||||
// a ** at the end will just swallow the rest.
|
||||
// We have found a match.
|
||||
// however, it will not swallow /.x, unless
|
||||
// options.dot is set.
|
||||
// . and .. are *never* matched by **, for explosively
|
||||
// exponential reasons.
|
||||
for (; fi < fl; fi++) {
|
||||
if (file[fi] === '.' || file[fi] === '..' ||
|
||||
(!options.dot && file[fi].charAt(0) === '.')) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// ok, let's see if we can swallow whatever we can.
|
||||
while (fr < fl) {
|
||||
var swallowee = file[fr]
|
||||
|
||||
this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
|
||||
|
||||
// XXX remove this slice. Just pass the start index.
|
||||
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
||||
this.debug('globstar found match!', fr, fl, swallowee)
|
||||
// found a match.
|
||||
return true
|
||||
} else {
|
||||
// can't swallow "." or ".." ever.
|
||||
// can only swallow ".foo" when explicitly asked.
|
||||
if (swallowee === '.' || swallowee === '..' ||
|
||||
(!options.dot && swallowee.charAt(0) === '.')) {
|
||||
this.debug('dot detected!', file, fr, pattern, pr)
|
||||
break
|
||||
}
|
||||
|
||||
// ** swallows a segment, and continue.
|
||||
this.debug('globstar swallow a segment, and continue')
|
||||
fr++
|
||||
}
|
||||
}
|
||||
|
||||
// no match was found.
|
||||
// However, in partial mode, we can't say this is necessarily over.
|
||||
// If there's more *pattern* left, then
|
||||
/* istanbul ignore if */
|
||||
if (partial) {
|
||||
// ran out of file
|
||||
this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
|
||||
if (fr === fl) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// something other than **
|
||||
// non-magic patterns just have to match exactly
|
||||
// patterns with magic have been turned into regexps.
|
||||
var hit
|
||||
if (typeof p === 'string') {
|
||||
hit = f === p
|
||||
this.debug('string match', p, f, hit)
|
||||
} else {
|
||||
hit = f.match(p)
|
||||
this.debug('pattern match', p, f, hit)
|
||||
}
|
||||
|
||||
if (!hit) return false
|
||||
}
|
||||
|
||||
// Note: ending in / means that we'll get a final ""
|
||||
// at the end of the pattern. This can only match a
|
||||
// corresponding "" at the end of the file.
|
||||
// If the file ends in /, then it can only match a
|
||||
// a pattern that ends in /, unless the pattern just
|
||||
// doesn't have any more for it. But, a/b/ should *not*
|
||||
// match "a/b/*", even though "" matches against the
|
||||
// [^/]*? pattern, except in partial mode, where it might
|
||||
// simply not be reached yet.
|
||||
// However, a/b/ should still satisfy a/*
|
||||
|
||||
// now either we fell off the end of the pattern, or we're done.
|
||||
if (fi === fl && pi === pl) {
|
||||
// ran out of pattern and filename at the same time.
|
||||
// an exact hit!
|
||||
return true
|
||||
} else if (fi === fl) {
|
||||
// ran out of file, but still had pattern left.
|
||||
// this is ok if we're doing the match as part of
|
||||
// a glob fs traversal.
|
||||
return partial
|
||||
} else /* istanbul ignore else */ if (pi === pl) {
|
||||
// ran out of pattern, still have file left.
|
||||
// this is only acceptable if we're on the very last
|
||||
// empty segment of a file with a trailing slash.
|
||||
// a/* should match a/b/
|
||||
return (fi === fl - 1) && (file[fi] === '')
|
||||
}
|
||||
|
||||
// should be unreachable.
|
||||
/* istanbul ignore next */
|
||||
throw new Error('wtf?')
|
||||
}
|
||||
|
||||
// replace stuff like \* with *
|
||||
function globUnescape (s) {
|
||||
return s.replace(/\\(.)/g, '$1')
|
||||
}
|
||||
|
||||
function regExpEscape (s) {
|
||||
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
|
||||
}
|
||||
33
backend/node_modules/nodemon/node_modules/minimatch/package.json
generated
vendored
Normal file
33
backend/node_modules/nodemon/node_modules/minimatch/package.json
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
|
||||
"name": "minimatch",
|
||||
"description": "a glob matcher in javascript",
|
||||
"version": "3.1.2",
|
||||
"publishConfig": {
|
||||
"tag": "v3-legacy"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/minimatch.git"
|
||||
},
|
||||
"main": "minimatch.js",
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"postpublish": "git push origin --all; git push origin --tags"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tap": "^15.1.6"
|
||||
},
|
||||
"license": "ISC",
|
||||
"files": [
|
||||
"minimatch.js"
|
||||
]
|
||||
}
|
||||
162
backend/node_modules/nodemon/node_modules/ms/index.js
generated
vendored
Normal file
162
backend/node_modules/nodemon/node_modules/ms/index.js
generated
vendored
Normal 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
backend/node_modules/nodemon/node_modules/ms/license.md
generated
vendored
Normal file
21
backend/node_modules/nodemon/node_modules/ms/license.md
generated
vendored
Normal 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
backend/node_modules/nodemon/node_modules/ms/package.json
generated
vendored
Normal file
38
backend/node_modules/nodemon/node_modules/ms/package.json
generated
vendored
Normal 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
backend/node_modules/nodemon/node_modules/ms/readme.md
generated
vendored
Normal file
59
backend/node_modules/nodemon/node_modules/ms/readme.md
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
# ms
|
||||
|
||||

|
||||
|
||||
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`
|
||||
75
backend/node_modules/nodemon/package.json
generated
vendored
Normal file
75
backend/node_modules/nodemon/package.json
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "nodemon",
|
||||
"homepage": "https://nodemon.io",
|
||||
"author": {
|
||||
"name": "Remy Sharp",
|
||||
"url": "https://github.com/remy"
|
||||
},
|
||||
"bin": {
|
||||
"nodemon": "./bin/nodemon.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"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",
|
||||
"types": "./index.d.ts",
|
||||
"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": "^4",
|
||||
"ignore-by-default": "^1.0.1",
|
||||
"minimatch": "^3.1.2",
|
||||
"pstree.remy": "^1.1.8",
|
||||
"semver": "^7.5.3",
|
||||
"simple-update-notifier": "^2.0.0",
|
||||
"supports-color": "^5.5.0",
|
||||
"touch": "^3.1.0",
|
||||
"undefsafe": "^2.0.5"
|
||||
},
|
||||
"version": "3.1.11",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/nodemon"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user