- *
- * Copyright (c) 2014-2018, Jon Schlinkert.
- * Released under the MIT License.
- */
-
-module.exports = function(path, stripTrailing) {
- if (typeof path !== 'string') {
- throw new TypeError('expected path to be a string');
- }
-
- if (path === '\\' || path === '/') return '/';
-
- var len = path.length;
- if (len <= 1) return path;
-
- // ensure that win32 namespaces has two leading slashes, so that the path is
- // handled properly by the win32 version of path.parse() after being normalized
- // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
- var prefix = '';
- if (len > 4 && path[3] === '\\') {
- var ch = path[2];
- if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
- path = path.slice(2);
- prefix = '//';
- }
- }
-
- var segs = path.split(/[/\\]+/);
- if (stripTrailing !== false && segs[segs.length - 1] === '') {
- segs.pop();
- }
- return prefix + segs.join('/');
-};
diff --git a/src/node_modules/normalize-path/package.json b/src/node_modules/normalize-path/package.json
deleted file mode 100644
index ad61098..0000000
--- a/src/node_modules/normalize-path/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "name": "normalize-path",
- "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.",
- "version": "3.0.0",
- "homepage": "https://github.com/jonschlinkert/normalize-path",
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
- "contributors": [
- "Blaine Bublitz (https://twitter.com/BlaineBublitz)",
- "Jon Schlinkert (http://twitter.com/jonschlinkert)"
- ],
- "repository": "jonschlinkert/normalize-path",
- "bugs": {
- "url": "https://github.com/jonschlinkert/normalize-path/issues"
- },
- "license": "MIT",
- "files": [
- "index.js"
- ],
- "main": "index.js",
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "devDependencies": {
- "gulp-format-md": "^1.0.0",
- "minimist": "^1.2.0",
- "mocha": "^3.5.3"
- },
- "keywords": [
- "absolute",
- "backslash",
- "delimiter",
- "file",
- "file-path",
- "filepath",
- "fix",
- "forward",
- "fp",
- "fs",
- "normalize",
- "path",
- "relative",
- "separator",
- "slash",
- "slashes",
- "trailing",
- "unix",
- "urix"
- ],
- "verb": {
- "toc": false,
- "layout": "default",
- "tasks": [
- "readme"
- ],
- "plugins": [
- "gulp-format-md"
- ],
- "related": {
- "description": "Other useful path-related libraries:",
- "list": [
- "contains-path",
- "is-absolute",
- "is-relative",
- "parse-filepath",
- "path-ends-with",
- "path-ends-with",
- "unixify"
- ]
- },
- "lint": {
- "reflinks": true
- }
- }
-}
diff --git a/src/node_modules/picomatch/CHANGELOG.md b/src/node_modules/picomatch/CHANGELOG.md
deleted file mode 100644
index 8ccc6c1..0000000
--- a/src/node_modules/picomatch/CHANGELOG.md
+++ /dev/null
@@ -1,136 +0,0 @@
-# Release history
-
-**All notable changes to this project will be documented in this file.**
-
-The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
-and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
-
-
- Guiding Principles
-
-- Changelogs are for humans, not machines.
-- There should be an entry for every single version.
-- The same types of changes should be grouped.
-- Versions and sections should be linkable.
-- The latest version comes first.
-- The release date of each versions is displayed.
-- Mention whether you follow Semantic Versioning.
-
-
-
-
- Types of changes
-
-Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
-
-- `Added` for new features.
-- `Changed` for changes in existing functionality.
-- `Deprecated` for soon-to-be removed features.
-- `Removed` for now removed features.
-- `Fixed` for any bug fixes.
-- `Security` in case of vulnerabilities.
-
-
-
-## 2.3.1 (2022-01-02)
-
-### Fixed
-
-* Fixes bug when a pattern containing an expression after the closing parenthesis (`/!(*.d).{ts,tsx}`) was incorrectly converted to regexp ([9f241ef](https://github.com/micromatch/picomatch/commit/9f241ef)).
-
-### Changed
-
-* Some documentation improvements ([f81d236](https://github.com/micromatch/picomatch/commit/f81d236), [421e0e7](https://github.com/micromatch/picomatch/commit/421e0e7)).
-
-## 2.3.0 (2021-05-21)
-
-### Fixed
-
-* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef))
-
-## 2.2.3 (2021-04-10)
-
-### Fixed
-
-* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)).
-* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)).
-
-## 2.2.2 (2020-03-21)
-
-### Fixed
-
-* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)).
-
-## 2.2.1 (2020-01-04)
-
-* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals.
-
-## 2.2.0 (2020-01-04)
-
-* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f))
-* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`.
-
-## 2.1.0 (2019-10-31)
-
-* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92))
-* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650))
-* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c))
-* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9))
-* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625))
-* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0))
-* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8))
-* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07))
-* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45))
-* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34))
-* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55))
-* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03))
-* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87))
-* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d))
-* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa))
-* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d))
-* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54))
-* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367))
-* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569))
-* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77))
-* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038))
-* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd))
-
-## 2.0.7 (2019-05-14)
-
-* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71))
-* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e))
-* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279))
-* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44))
-
-## 2.0.4 (2019-04-10)
-
-### Fixed
-
-- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez.
-- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza.
-
-## 2.0.0 (2019-04-10)
-
-### Added
-
-- Adds support for `options.onIgnore`. See the readme for details
-- Adds support for `options.onResult`. See the readme for details
-
-### Breaking changes
-
-- The unixify option was renamed to `windows`
-- caching and all related options and methods have been removed
-
-## 1.0.0 (2018-11-05)
-
-- adds `.onMatch` option
-- improvements to `.scan` method
-- numerous improvements and optimizations for matching and parsing
-- better windows path handling
-
-## 0.1.0 - 2017-04-13
-
-First release.
-
-
-[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog
diff --git a/src/node_modules/picomatch/LICENSE b/src/node_modules/picomatch/LICENSE
deleted file mode 100644
index 3608dca..0000000
--- a/src/node_modules/picomatch/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2017-present, Jon Schlinkert.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/src/node_modules/picomatch/README.md b/src/node_modules/picomatch/README.md
deleted file mode 100644
index b0526e2..0000000
--- a/src/node_modules/picomatch/README.md
+++ /dev/null
@@ -1,708 +0,0 @@
-Picomatch
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Blazing fast and accurate glob matcher written in JavaScript.
-No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.
-
-
-
-
-
-## Why picomatch?
-
-* **Lightweight** - No dependencies
-* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function.
-* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps)
-* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files)
-* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes.
-* **Well tested** - Thousands of unit tests
-
-See the [library comparison](#library-comparisons) to other libraries.
-
-
-
-
-## Table of Contents
-
- Click to expand
-
-- [Install](#install)
-- [Usage](#usage)
-- [API](#api)
- * [picomatch](#picomatch)
- * [.test](#test)
- * [.matchBase](#matchbase)
- * [.isMatch](#ismatch)
- * [.parse](#parse)
- * [.scan](#scan)
- * [.compileRe](#compilere)
- * [.makeRe](#makere)
- * [.toRegex](#toregex)
-- [Options](#options)
- * [Picomatch options](#picomatch-options)
- * [Scan Options](#scan-options)
- * [Options Examples](#options-examples)
-- [Globbing features](#globbing-features)
- * [Basic globbing](#basic-globbing)
- * [Advanced globbing](#advanced-globbing)
- * [Braces](#braces)
- * [Matching special characters as literals](#matching-special-characters-as-literals)
-- [Library Comparisons](#library-comparisons)
-- [Benchmarks](#benchmarks)
-- [Philosophies](#philosophies)
-- [About](#about)
- * [Author](#author)
- * [License](#license)
-
-_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
-
-
-
-
-
-
-## Install
-
-Install with [npm](https://www.npmjs.com/):
-
-```sh
-npm install --save picomatch
-```
-
-
-
-## Usage
-
-The main export is a function that takes a glob pattern and an options object and returns a function for matching strings.
-
-```js
-const pm = require('picomatch');
-const isMatch = pm('*.js');
-
-console.log(isMatch('abcd')); //=> false
-console.log(isMatch('a.js')); //=> true
-console.log(isMatch('a.md')); //=> false
-console.log(isMatch('a/b.js')); //=> false
-```
-
-
-
-## API
-
-### [picomatch](lib/picomatch.js#L32)
-
-Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information.
-
-**Params**
-
-* `globs` **{String|Array}**: One or more glob patterns.
-* `options` **{Object=}**
-* `returns` **{Function=}**: Returns a matcher function.
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch(glob[, options]);
-
-const isMatch = picomatch('*.!(*a)');
-console.log(isMatch('a.a')); //=> false
-console.log(isMatch('a.b')); //=> true
-```
-
-### [.test](lib/picomatch.js#L117)
-
-Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string.
-
-**Params**
-
-* `input` **{String}**: String to test.
-* `regex` **{RegExp}**
-* `returns` **{Object}**: Returns an object with matching info.
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.test(input, regex[, options]);
-
-console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
-// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
-```
-
-### [.matchBase](lib/picomatch.js#L161)
-
-Match the basename of a filepath.
-
-**Params**
-
-* `input` **{String}**: String to test.
-* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe).
-* `returns` **{Boolean}**
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.matchBase(input, glob[, options]);
-console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
-```
-
-### [.isMatch](lib/picomatch.js#L183)
-
-Returns true if **any** of the given glob `patterns` match the specified `string`.
-
-**Params**
-
-* **{String|Array}**: str The string to test.
-* **{String|Array}**: patterns One or more glob patterns to use for matching.
-* **{Object}**: See available [options](#options).
-* `returns` **{Boolean}**: Returns true if any patterns match `str`
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.isMatch(string, patterns[, options]);
-
-console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
-console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
-```
-
-### [.parse](lib/picomatch.js#L199)
-
-Parse a glob pattern to create the source string for a regular expression.
-
-**Params**
-
-* `pattern` **{String}**
-* `options` **{Object}**
-* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string.
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-const result = picomatch.parse(pattern[, options]);
-```
-
-### [.scan](lib/picomatch.js#L231)
-
-Scan a glob pattern to separate the pattern into segments.
-
-**Params**
-
-* `input` **{String}**: Glob pattern to scan.
-* `options` **{Object}**
-* `returns` **{Object}**: Returns an object with
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.scan(input[, options]);
-
-const result = picomatch.scan('!./foo/*.js');
-console.log(result);
-{ prefix: '!./',
- input: '!./foo/*.js',
- start: 3,
- base: 'foo',
- glob: '*.js',
- isBrace: false,
- isBracket: false,
- isGlob: true,
- isExtglob: false,
- isGlobstar: false,
- negated: true }
-```
-
-### [.compileRe](lib/picomatch.js#L245)
-
-Compile a regular expression from the `state` object returned by the
-[parse()](#parse) method.
-
-**Params**
-
-* `state` **{Object}**
-* `options` **{Object}**
-* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser.
-* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
-* `returns` **{RegExp}**
-
-### [.makeRe](lib/picomatch.js#L286)
-
-Create a regular expression from a parsed glob pattern.
-
-**Params**
-
-* `state` **{String}**: The object returned from the `.parse` method.
-* `options` **{Object}**
-* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
-* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
-* `returns` **{RegExp}**: Returns a regex created from the given pattern.
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-const state = picomatch.parse('*.js');
-// picomatch.compileRe(state[, options]);
-
-console.log(picomatch.compileRe(state));
-//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
-```
-
-### [.toRegex](lib/picomatch.js#L321)
-
-Create a regular expression from the given regex source string.
-
-**Params**
-
-* `source` **{String}**: Regular expression source string.
-* `options` **{Object}**
-* `returns` **{RegExp}**
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.toRegex(source[, options]);
-
-const { output } = picomatch.parse('*.js');
-console.log(picomatch.toRegex(output));
-//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
-```
-
-
-
-## Options
-
-### Picomatch options
-
-The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API.
-
-| **Option** | **Type** | **Default value** | **Description** |
-| --- | --- | --- | --- |
-| `basename` | `boolean` | `false` | 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`. |
-| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
-| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
-| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
-| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
-| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
-| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
-| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
-| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. |
-| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
-| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
-| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
-| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. |
-| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. |
-| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
-| `matchBase` | `boolean` | `false` | Alias for `basename` |
-| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
-| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
-| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
-| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
-| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
-| `noext` | `boolean` | `false` | Alias for `noextglob` |
-| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) |
-| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
-| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
-| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
-| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
-| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
-| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
-| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). |
-| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
-| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
-| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
-| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
-| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
-| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
-| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
-
-picomatch has automatic detection for regex positive and negative lookbehinds. If the pattern contains a negative lookbehind, you must be using Node.js >= 8.10 or else picomatch will throw an error.
-
-### Scan Options
-
-In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method.
-
-| **Option** | **Type** | **Default value** | **Description** |
-| --- | --- | --- | --- |
-| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern |
-| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true |
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-const result = picomatch.scan('!./foo/*.js', { tokens: true });
-console.log(result);
-// {
-// prefix: '!./',
-// input: '!./foo/*.js',
-// start: 3,
-// base: 'foo',
-// glob: '*.js',
-// isBrace: false,
-// isBracket: false,
-// isGlob: true,
-// isExtglob: false,
-// isGlobstar: false,
-// negated: true,
-// maxDepth: 2,
-// tokens: [
-// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true },
-// { value: 'foo', depth: 1, isGlob: false },
-// { value: '*.js', depth: 1, isGlob: true }
-// ],
-// slashes: [ 2, 6 ],
-// parts: [ 'foo', '*.js' ]
-// }
-```
-
-
-
-### Options Examples
-
-#### options.expandRange
-
-**Type**: `function`
-
-**Default**: `undefined`
-
-Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need.
-
-**Example**
-
-The following example shows how to create a glob that matches a folder
-
-```js
-const fill = require('fill-range');
-const regex = pm.makeRe('foo/{01..25}/bar', {
- expandRange(a, b) {
- return `(${fill(a, b, { toRegex: true })})`;
- }
-});
-
-console.log(regex);
-//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/
-
-console.log(regex.test('foo/00/bar')) // false
-console.log(regex.test('foo/01/bar')) // true
-console.log(regex.test('foo/10/bar')) // true
-console.log(regex.test('foo/22/bar')) // true
-console.log(regex.test('foo/25/bar')) // true
-console.log(regex.test('foo/26/bar')) // false
-```
-
-#### options.format
-
-**Type**: `function`
-
-**Default**: `undefined`
-
-Custom function for formatting strings before they're matched.
-
-**Example**
-
-```js
-// strip leading './' from strings
-const format = str => str.replace(/^\.\//, '');
-const isMatch = picomatch('foo/*.js', { format });
-console.log(isMatch('./foo/bar.js')); //=> true
-```
-
-#### options.onMatch
-
-```js
-const onMatch = ({ glob, regex, input, output }) => {
- console.log({ glob, regex, input, output });
-};
-
-const isMatch = picomatch('*', { onMatch });
-isMatch('foo');
-isMatch('bar');
-isMatch('baz');
-```
-
-#### options.onIgnore
-
-```js
-const onIgnore = ({ glob, regex, input, output }) => {
- console.log({ glob, regex, input, output });
-};
-
-const isMatch = picomatch('*', { onIgnore, ignore: 'f*' });
-isMatch('foo');
-isMatch('bar');
-isMatch('baz');
-```
-
-#### options.onResult
-
-```js
-const onResult = ({ glob, regex, input, output }) => {
- console.log({ glob, regex, input, output });
-};
-
-const isMatch = picomatch('*', { onResult, ignore: 'f*' });
-isMatch('foo');
-isMatch('bar');
-isMatch('baz');
-```
-
-
-
-
-## Globbing features
-
-* [Basic globbing](#basic-globbing) (Wildcard matching)
-* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching)
-
-### Basic globbing
-
-| **Character** | **Description** |
-| --- | --- |
-| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. |
-| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. |
-| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. |
-| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. |
-
-#### Matching behavior vs. Bash
-
-Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions:
-
-* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`.
-* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`.
-
-
-
-### Advanced globbing
-
-* [extglobs](#extglobs)
-* [POSIX brackets](#posix-brackets)
-* [Braces](#brace-expansion)
-
-#### Extglobs
-
-| **Pattern** | **Description** |
-| --- | --- |
-| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` |
-| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` |
-| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` |
-| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` |
-| `!(pattern)` | Match _anything but_ `pattern` |
-
-**Examples**
-
-```js
-const pm = require('picomatch');
-
-// *(pattern) matches ZERO or more of "pattern"
-console.log(pm.isMatch('a', 'a*(z)')); // true
-console.log(pm.isMatch('az', 'a*(z)')); // true
-console.log(pm.isMatch('azzz', 'a*(z)')); // true
-
-// +(pattern) matches ONE or more of "pattern"
-console.log(pm.isMatch('a', 'a*(z)')); // true
-console.log(pm.isMatch('az', 'a*(z)')); // true
-console.log(pm.isMatch('azzz', 'a*(z)')); // true
-
-// supports multiple extglobs
-console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false
-
-// supports nested extglobs
-console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true
-```
-
-#### POSIX brackets
-
-POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true.
-
-**Enable POSIX bracket support**
-
-```js
-console.log(pm.makeRe('[[:word:]]+', { posix: true }));
-//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/
-```
-
-**Supported POSIX classes**
-
-The following named POSIX bracket expressions are supported:
-
-* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]`
-* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`.
-* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`.
-* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`.
-* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`.
-* `[:digit:]` - Numerical digits, equivalent to `[0-9]`.
-* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`.
-* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`.
-* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`.
-* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`.
-* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`.
-* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`.
-* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`.
-* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`.
-
-See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information.
-
-### Braces
-
-Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces.
-
-### Matching special characters as literals
-
-If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes:
-
-**Special Characters**
-
-Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms.
-
-To match any of the following characters as literals: `$^*+?()[]
-
-Examples:
-
-```js
-console.log(pm.makeRe('foo/bar \\(1\\)'));
-console.log(pm.makeRe('foo/bar \\(1\\)'));
-```
-
-
-
-
-## Library Comparisons
-
-The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets).
-
-| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` |
-| --- | --- | --- | --- | --- | --- | --- | --- |
-| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - |
-| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - |
-| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - |
-| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - |
-| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - |
-| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ |
-| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ |
-| File system operations | - | - | - | - | - | - | - |
-
-
-
-
-## Benchmarks
-
-Performance comparison of picomatch and minimatch.
-
-```
-# .makeRe star
- picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled)
- minimatch x 627,206 ops/sec ±1.96% (87 runs sampled))
-
-# .makeRe star; dot=true
- picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled)
- minimatch x 525,876 ops/sec ±0.60% (88 runs sampled)
-
-# .makeRe globstar
- picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled)
- minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d)
-
-# .makeRe globstars
- picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled)
- minimatch x 477,179 ops/sec ±1.33% (91 runs sampled)
-
-# .makeRe with leading star
- picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled)
- minimatch x 453,564 ops/sec ±1.43% (94 runs sampled)
-
-# .makeRe - basic braces
- picomatch x 392,067 ops/sec ±0.70% (90 runs sampled)
- minimatch x 99,532 ops/sec ±2.03% (87 runs sampled))
-```
-
-
-
-
-## Philosophies
-
-The goal of this library is to be blazing fast, without compromising on accuracy.
-
-**Accuracy**
-
-The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`.
-
-Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements.
-
-**Performance**
-
-Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer.
-
-
-
-
-## About
-
-
-Contributing
-
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
-
-Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.
-
-
-
-
-Running Tests
-
-Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
-
-```sh
-npm install && npm test
-```
-
-
-
-
-Building docs
-
-_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
-
-To generate the readme, run the following command:
-
-```sh
-npm install -g verbose/verb#dev verb-generate-readme && verb
-```
-
-
-
-### Author
-
-**Jon Schlinkert**
-
-* [GitHub Profile](https://github.com/jonschlinkert)
-* [Twitter Profile](https://twitter.com/jonschlinkert)
-* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
-
-### License
-
-Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert).
-Released under the [MIT License](LICENSE).
diff --git a/src/node_modules/picomatch/index.js b/src/node_modules/picomatch/index.js
deleted file mode 100644
index d2f2bc5..0000000
--- a/src/node_modules/picomatch/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./lib/picomatch');
diff --git a/src/node_modules/picomatch/lib/constants.js b/src/node_modules/picomatch/lib/constants.js
deleted file mode 100644
index a62ef38..0000000
--- a/src/node_modules/picomatch/lib/constants.js
+++ /dev/null
@@ -1,179 +0,0 @@
-'use strict';
-
-const path = require('path');
-const WIN_SLASH = '\\\\/';
-const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
-
-/**
- * Posix glob regex
- */
-
-const DOT_LITERAL = '\\.';
-const PLUS_LITERAL = '\\+';
-const QMARK_LITERAL = '\\?';
-const SLASH_LITERAL = '\\/';
-const ONE_CHAR = '(?=.)';
-const QMARK = '[^/]';
-const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
-const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
-const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
-const NO_DOT = `(?!${DOT_LITERAL})`;
-const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
-const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
-const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
-const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
-const STAR = `${QMARK}*?`;
-
-const POSIX_CHARS = {
- DOT_LITERAL,
- PLUS_LITERAL,
- QMARK_LITERAL,
- SLASH_LITERAL,
- ONE_CHAR,
- QMARK,
- END_ANCHOR,
- DOTS_SLASH,
- NO_DOT,
- NO_DOTS,
- NO_DOT_SLASH,
- NO_DOTS_SLASH,
- QMARK_NO_DOT,
- STAR,
- START_ANCHOR
-};
-
-/**
- * Windows glob regex
- */
-
-const WINDOWS_CHARS = {
- ...POSIX_CHARS,
-
- SLASH_LITERAL: `[${WIN_SLASH}]`,
- QMARK: WIN_NO_SLASH,
- STAR: `${WIN_NO_SLASH}*?`,
- DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
- NO_DOT: `(?!${DOT_LITERAL})`,
- NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
- NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
- NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
- QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
- START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
- END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
-};
-
-/**
- * POSIX Bracket Regex
- */
-
-const POSIX_REGEX_SOURCE = {
- alnum: 'a-zA-Z0-9',
- alpha: 'a-zA-Z',
- ascii: '\\x00-\\x7F',
- blank: ' \\t',
- cntrl: '\\x00-\\x1F\\x7F',
- digit: '0-9',
- graph: '\\x21-\\x7E',
- lower: 'a-z',
- print: '\\x20-\\x7E ',
- punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
- space: ' \\t\\r\\n\\v\\f',
- upper: 'A-Z',
- word: 'A-Za-z0-9_',
- xdigit: 'A-Fa-f0-9'
-};
-
-module.exports = {
- MAX_LENGTH: 1024 * 64,
- POSIX_REGEX_SOURCE,
-
- // regular expressions
- REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
- REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
- REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
- REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
- REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
- REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
-
- // Replace globs with equivalent patterns to reduce parsing time.
- REPLACEMENTS: {
- '***': '*',
- '**/**': '**',
- '**/**/**': '**'
- },
-
- // Digits
- CHAR_0: 48, /* 0 */
- CHAR_9: 57, /* 9 */
-
- // Alphabet chars.
- CHAR_UPPERCASE_A: 65, /* A */
- CHAR_LOWERCASE_A: 97, /* a */
- CHAR_UPPERCASE_Z: 90, /* Z */
- CHAR_LOWERCASE_Z: 122, /* z */
-
- CHAR_LEFT_PARENTHESES: 40, /* ( */
- CHAR_RIGHT_PARENTHESES: 41, /* ) */
-
- CHAR_ASTERISK: 42, /* * */
-
- // Non-alphabetic chars.
- CHAR_AMPERSAND: 38, /* & */
- CHAR_AT: 64, /* @ */
- CHAR_BACKWARD_SLASH: 92, /* \ */
- CHAR_CARRIAGE_RETURN: 13, /* \r */
- CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
- CHAR_COLON: 58, /* : */
- CHAR_COMMA: 44, /* , */
- CHAR_DOT: 46, /* . */
- CHAR_DOUBLE_QUOTE: 34, /* " */
- CHAR_EQUAL: 61, /* = */
- CHAR_EXCLAMATION_MARK: 33, /* ! */
- CHAR_FORM_FEED: 12, /* \f */
- CHAR_FORWARD_SLASH: 47, /* / */
- CHAR_GRAVE_ACCENT: 96, /* ` */
- CHAR_HASH: 35, /* # */
- CHAR_HYPHEN_MINUS: 45, /* - */
- CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
- CHAR_LEFT_CURLY_BRACE: 123, /* { */
- CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
- CHAR_LINE_FEED: 10, /* \n */
- CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
- CHAR_PERCENT: 37, /* % */
- CHAR_PLUS: 43, /* + */
- CHAR_QUESTION_MARK: 63, /* ? */
- CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
- CHAR_RIGHT_CURLY_BRACE: 125, /* } */
- CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
- CHAR_SEMICOLON: 59, /* ; */
- CHAR_SINGLE_QUOTE: 39, /* ' */
- CHAR_SPACE: 32, /* */
- CHAR_TAB: 9, /* \t */
- CHAR_UNDERSCORE: 95, /* _ */
- CHAR_VERTICAL_LINE: 124, /* | */
- CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
-
- SEP: path.sep,
-
- /**
- * Create EXTGLOB_CHARS
- */
-
- extglobChars(chars) {
- return {
- '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
- '?': { type: 'qmark', open: '(?:', close: ')?' },
- '+': { type: 'plus', open: '(?:', close: ')+' },
- '*': { type: 'star', open: '(?:', close: ')*' },
- '@': { type: 'at', open: '(?:', close: ')' }
- };
- },
-
- /**
- * Create GLOB_CHARS
- */
-
- globChars(win32) {
- return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
- }
-};
diff --git a/src/node_modules/picomatch/lib/parse.js b/src/node_modules/picomatch/lib/parse.js
deleted file mode 100644
index 58269d0..0000000
--- a/src/node_modules/picomatch/lib/parse.js
+++ /dev/null
@@ -1,1091 +0,0 @@
-'use strict';
-
-const constants = require('./constants');
-const utils = require('./utils');
-
-/**
- * Constants
- */
-
-const {
- MAX_LENGTH,
- POSIX_REGEX_SOURCE,
- REGEX_NON_SPECIAL_CHARS,
- REGEX_SPECIAL_CHARS_BACKREF,
- REPLACEMENTS
-} = constants;
-
-/**
- * Helpers
- */
-
-const expandRange = (args, options) => {
- if (typeof options.expandRange === 'function') {
- return options.expandRange(...args, options);
- }
-
- args.sort();
- const value = `[${args.join('-')}]`;
-
- try {
- /* eslint-disable-next-line no-new */
- new RegExp(value);
- } catch (ex) {
- return args.map(v => utils.escapeRegex(v)).join('..');
- }
-
- return value;
-};
-
-/**
- * Create the message for a syntax error
- */
-
-const syntaxError = (type, char) => {
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
-};
-
-/**
- * Parse the given input string.
- * @param {String} input
- * @param {Object} options
- * @return {Object}
- */
-
-const parse = (input, options) => {
- if (typeof input !== 'string') {
- throw new TypeError('Expected a string');
- }
-
- input = REPLACEMENTS[input] || input;
-
- const opts = { ...options };
- const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
-
- let len = input.length;
- if (len > max) {
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
- }
-
- const bos = { type: 'bos', value: '', output: opts.prepend || '' };
- const tokens = [bos];
-
- const capture = opts.capture ? '' : '?:';
- const win32 = utils.isWindows(options);
-
- // create constants based on platform, for windows or posix
- const PLATFORM_CHARS = constants.globChars(win32);
- const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
-
- const {
- DOT_LITERAL,
- PLUS_LITERAL,
- SLASH_LITERAL,
- ONE_CHAR,
- DOTS_SLASH,
- NO_DOT,
- NO_DOT_SLASH,
- NO_DOTS_SLASH,
- QMARK,
- QMARK_NO_DOT,
- STAR,
- START_ANCHOR
- } = PLATFORM_CHARS;
-
- const globstar = opts => {
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
- };
-
- const nodot = opts.dot ? '' : NO_DOT;
- const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
- let star = opts.bash === true ? globstar(opts) : STAR;
-
- if (opts.capture) {
- star = `(${star})`;
- }
-
- // minimatch options support
- if (typeof opts.noext === 'boolean') {
- opts.noextglob = opts.noext;
- }
-
- const state = {
- input,
- index: -1,
- start: 0,
- dot: opts.dot === true,
- consumed: '',
- output: '',
- prefix: '',
- backtrack: false,
- negated: false,
- brackets: 0,
- braces: 0,
- parens: 0,
- quotes: 0,
- globstar: false,
- tokens
- };
-
- input = utils.removePrefix(input, state);
- len = input.length;
-
- const extglobs = [];
- const braces = [];
- const stack = [];
- let prev = bos;
- let value;
-
- /**
- * Tokenizing helpers
- */
-
- const eos = () => state.index === len - 1;
- const peek = state.peek = (n = 1) => input[state.index + n];
- const advance = state.advance = () => input[++state.index] || '';
- const remaining = () => input.slice(state.index + 1);
- const consume = (value = '', num = 0) => {
- state.consumed += value;
- state.index += num;
- };
-
- const append = token => {
- state.output += token.output != null ? token.output : token.value;
- consume(token.value);
- };
-
- const negate = () => {
- let count = 1;
-
- while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
- advance();
- state.start++;
- count++;
- }
-
- if (count % 2 === 0) {
- return false;
- }
-
- state.negated = true;
- state.start++;
- return true;
- };
-
- const increment = type => {
- state[type]++;
- stack.push(type);
- };
-
- const decrement = type => {
- state[type]--;
- stack.pop();
- };
-
- /**
- * Push tokens onto the tokens array. This helper speeds up
- * tokenizing by 1) helping us avoid backtracking as much as possible,
- * and 2) helping us avoid creating extra tokens when consecutive
- * characters are plain text. This improves performance and simplifies
- * lookbehinds.
- */
-
- const push = tok => {
- if (prev.type === 'globstar') {
- const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
- const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
-
- if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
- state.output = state.output.slice(0, -prev.output.length);
- prev.type = 'star';
- prev.value = '*';
- prev.output = star;
- state.output += prev.output;
- }
- }
-
- if (extglobs.length && tok.type !== 'paren') {
- extglobs[extglobs.length - 1].inner += tok.value;
- }
-
- if (tok.value || tok.output) append(tok);
- if (prev && prev.type === 'text' && tok.type === 'text') {
- prev.value += tok.value;
- prev.output = (prev.output || '') + tok.value;
- return;
- }
-
- tok.prev = prev;
- tokens.push(tok);
- prev = tok;
- };
-
- const extglobOpen = (type, value) => {
- const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
-
- token.prev = prev;
- token.parens = state.parens;
- token.output = state.output;
- const output = (opts.capture ? '(' : '') + token.open;
-
- increment('parens');
- push({ type, value, output: state.output ? '' : ONE_CHAR });
- push({ type: 'paren', extglob: true, value: advance(), output });
- extglobs.push(token);
- };
-
- const extglobClose = token => {
- let output = token.close + (opts.capture ? ')' : '');
- let rest;
-
- if (token.type === 'negate') {
- let extglobStar = star;
-
- if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
- extglobStar = globstar(opts);
- }
-
- if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
- output = token.close = `)$))${extglobStar}`;
- }
-
- if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
- // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
- // In this case, we need to parse the string and use it in the output of the original pattern.
- // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
- //
- // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
- const expression = parse(rest, { ...options, fastpaths: false }).output;
-
- output = token.close = `)${expression})${extglobStar})`;
- }
-
- if (token.prev.type === 'bos') {
- state.negatedExtglob = true;
- }
- }
-
- push({ type: 'paren', extglob: true, value, output });
- decrement('parens');
- };
-
- /**
- * Fast paths
- */
-
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
- let backslashes = false;
-
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
- if (first === '\\') {
- backslashes = true;
- return m;
- }
-
- if (first === '?') {
- if (esc) {
- return esc + first + (rest ? QMARK.repeat(rest.length) : '');
- }
- if (index === 0) {
- return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
- }
- return QMARK.repeat(chars.length);
- }
-
- if (first === '.') {
- return DOT_LITERAL.repeat(chars.length);
- }
-
- if (first === '*') {
- if (esc) {
- return esc + first + (rest ? star : '');
- }
- return star;
- }
- return esc ? m : `\\${m}`;
- });
-
- if (backslashes === true) {
- if (opts.unescape === true) {
- output = output.replace(/\\/g, '');
- } else {
- output = output.replace(/\\+/g, m => {
- return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
- });
- }
- }
-
- if (output === input && opts.contains === true) {
- state.output = input;
- return state;
- }
-
- state.output = utils.wrapOutput(output, state, options);
- return state;
- }
-
- /**
- * Tokenize input until we reach end-of-string
- */
-
- while (!eos()) {
- value = advance();
-
- if (value === '\u0000') {
- continue;
- }
-
- /**
- * Escaped characters
- */
-
- if (value === '\\') {
- const next = peek();
-
- if (next === '/' && opts.bash !== true) {
- continue;
- }
-
- if (next === '.' || next === ';') {
- continue;
- }
-
- if (!next) {
- value += '\\';
- push({ type: 'text', value });
- continue;
- }
-
- // collapse slashes to reduce potential for exploits
- const match = /^\\+/.exec(remaining());
- let slashes = 0;
-
- if (match && match[0].length > 2) {
- slashes = match[0].length;
- state.index += slashes;
- if (slashes % 2 !== 0) {
- value += '\\';
- }
- }
-
- if (opts.unescape === true) {
- value = advance();
- } else {
- value += advance();
- }
-
- if (state.brackets === 0) {
- push({ type: 'text', value });
- continue;
- }
- }
-
- /**
- * If we're inside a regex character class, continue
- * until we reach the closing bracket.
- */
-
- if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
- if (opts.posix !== false && value === ':') {
- const inner = prev.value.slice(1);
- if (inner.includes('[')) {
- prev.posix = true;
-
- if (inner.includes(':')) {
- const idx = prev.value.lastIndexOf('[');
- const pre = prev.value.slice(0, idx);
- const rest = prev.value.slice(idx + 2);
- const posix = POSIX_REGEX_SOURCE[rest];
- if (posix) {
- prev.value = pre + posix;
- state.backtrack = true;
- advance();
-
- if (!bos.output && tokens.indexOf(prev) === 1) {
- bos.output = ONE_CHAR;
- }
- continue;
- }
- }
- }
- }
-
- if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
- value = `\\${value}`;
- }
-
- if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
- value = `\\${value}`;
- }
-
- if (opts.posix === true && value === '!' && prev.value === '[') {
- value = '^';
- }
-
- prev.value += value;
- append({ value });
- continue;
- }
-
- /**
- * If we're inside a quoted string, continue
- * until we reach the closing double quote.
- */
-
- if (state.quotes === 1 && value !== '"') {
- value = utils.escapeRegex(value);
- prev.value += value;
- append({ value });
- continue;
- }
-
- /**
- * Double quotes
- */
-
- if (value === '"') {
- state.quotes = state.quotes === 1 ? 0 : 1;
- if (opts.keepQuotes === true) {
- push({ type: 'text', value });
- }
- continue;
- }
-
- /**
- * Parentheses
- */
-
- if (value === '(') {
- increment('parens');
- push({ type: 'paren', value });
- continue;
- }
-
- if (value === ')') {
- if (state.parens === 0 && opts.strictBrackets === true) {
- throw new SyntaxError(syntaxError('opening', '('));
- }
-
- const extglob = extglobs[extglobs.length - 1];
- if (extglob && state.parens === extglob.parens + 1) {
- extglobClose(extglobs.pop());
- continue;
- }
-
- push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
- decrement('parens');
- continue;
- }
-
- /**
- * Square brackets
- */
-
- if (value === '[') {
- if (opts.nobracket === true || !remaining().includes(']')) {
- if (opts.nobracket !== true && opts.strictBrackets === true) {
- throw new SyntaxError(syntaxError('closing', ']'));
- }
-
- value = `\\${value}`;
- } else {
- increment('brackets');
- }
-
- push({ type: 'bracket', value });
- continue;
- }
-
- if (value === ']') {
- if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
- push({ type: 'text', value, output: `\\${value}` });
- continue;
- }
-
- if (state.brackets === 0) {
- if (opts.strictBrackets === true) {
- throw new SyntaxError(syntaxError('opening', '['));
- }
-
- push({ type: 'text', value, output: `\\${value}` });
- continue;
- }
-
- decrement('brackets');
-
- const prevValue = prev.value.slice(1);
- if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
- value = `/${value}`;
- }
-
- prev.value += value;
- append({ value });
-
- // when literal brackets are explicitly disabled
- // assume we should match with a regex character class
- if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
- continue;
- }
-
- const escaped = utils.escapeRegex(prev.value);
- state.output = state.output.slice(0, -prev.value.length);
-
- // when literal brackets are explicitly enabled
- // assume we should escape the brackets to match literal characters
- if (opts.literalBrackets === true) {
- state.output += escaped;
- prev.value = escaped;
- continue;
- }
-
- // when the user specifies nothing, try to match both
- prev.value = `(${capture}${escaped}|${prev.value})`;
- state.output += prev.value;
- continue;
- }
-
- /**
- * Braces
- */
-
- if (value === '{' && opts.nobrace !== true) {
- increment('braces');
-
- const open = {
- type: 'brace',
- value,
- output: '(',
- outputIndex: state.output.length,
- tokensIndex: state.tokens.length
- };
-
- braces.push(open);
- push(open);
- continue;
- }
-
- if (value === '}') {
- const brace = braces[braces.length - 1];
-
- if (opts.nobrace === true || !brace) {
- push({ type: 'text', value, output: value });
- continue;
- }
-
- let output = ')';
-
- if (brace.dots === true) {
- const arr = tokens.slice();
- const range = [];
-
- for (let i = arr.length - 1; i >= 0; i--) {
- tokens.pop();
- if (arr[i].type === 'brace') {
- break;
- }
- if (arr[i].type !== 'dots') {
- range.unshift(arr[i].value);
- }
- }
-
- output = expandRange(range, opts);
- state.backtrack = true;
- }
-
- if (brace.comma !== true && brace.dots !== true) {
- const out = state.output.slice(0, brace.outputIndex);
- const toks = state.tokens.slice(brace.tokensIndex);
- brace.value = brace.output = '\\{';
- value = output = '\\}';
- state.output = out;
- for (const t of toks) {
- state.output += (t.output || t.value);
- }
- }
-
- push({ type: 'brace', value, output });
- decrement('braces');
- braces.pop();
- continue;
- }
-
- /**
- * Pipes
- */
-
- if (value === '|') {
- if (extglobs.length > 0) {
- extglobs[extglobs.length - 1].conditions++;
- }
- push({ type: 'text', value });
- continue;
- }
-
- /**
- * Commas
- */
-
- if (value === ',') {
- let output = value;
-
- const brace = braces[braces.length - 1];
- if (brace && stack[stack.length - 1] === 'braces') {
- brace.comma = true;
- output = '|';
- }
-
- push({ type: 'comma', value, output });
- continue;
- }
-
- /**
- * Slashes
- */
-
- if (value === '/') {
- // if the beginning of the glob is "./", advance the start
- // to the current index, and don't add the "./" characters
- // to the state. This greatly simplifies lookbehinds when
- // checking for BOS characters like "!" and "." (not "./")
- if (prev.type === 'dot' && state.index === state.start + 1) {
- state.start = state.index + 1;
- state.consumed = '';
- state.output = '';
- tokens.pop();
- prev = bos; // reset "prev" to the first token
- continue;
- }
-
- push({ type: 'slash', value, output: SLASH_LITERAL });
- continue;
- }
-
- /**
- * Dots
- */
-
- if (value === '.') {
- if (state.braces > 0 && prev.type === 'dot') {
- if (prev.value === '.') prev.output = DOT_LITERAL;
- const brace = braces[braces.length - 1];
- prev.type = 'dots';
- prev.output += value;
- prev.value += value;
- brace.dots = true;
- continue;
- }
-
- if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
- push({ type: 'text', value, output: DOT_LITERAL });
- continue;
- }
-
- push({ type: 'dot', value, output: DOT_LITERAL });
- continue;
- }
-
- /**
- * Question marks
- */
-
- if (value === '?') {
- const isGroup = prev && prev.value === '(';
- if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
- extglobOpen('qmark', value);
- continue;
- }
-
- if (prev && prev.type === 'paren') {
- const next = peek();
- let output = value;
-
- if (next === '<' && !utils.supportsLookbehinds()) {
- throw new Error('Node.js v10 or higher is required for regex lookbehinds');
- }
-
- if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
- output = `\\${value}`;
- }
-
- push({ type: 'text', value, output });
- continue;
- }
-
- if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
- push({ type: 'qmark', value, output: QMARK_NO_DOT });
- continue;
- }
-
- push({ type: 'qmark', value, output: QMARK });
- continue;
- }
-
- /**
- * Exclamation
- */
-
- if (value === '!') {
- if (opts.noextglob !== true && peek() === '(') {
- if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
- extglobOpen('negate', value);
- continue;
- }
- }
-
- if (opts.nonegate !== true && state.index === 0) {
- negate();
- continue;
- }
- }
-
- /**
- * Plus
- */
-
- if (value === '+') {
- if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
- extglobOpen('plus', value);
- continue;
- }
-
- if ((prev && prev.value === '(') || opts.regex === false) {
- push({ type: 'plus', value, output: PLUS_LITERAL });
- continue;
- }
-
- if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
- push({ type: 'plus', value });
- continue;
- }
-
- push({ type: 'plus', value: PLUS_LITERAL });
- continue;
- }
-
- /**
- * Plain text
- */
-
- if (value === '@') {
- if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
- push({ type: 'at', extglob: true, value, output: '' });
- continue;
- }
-
- push({ type: 'text', value });
- continue;
- }
-
- /**
- * Plain text
- */
-
- if (value !== '*') {
- if (value === '$' || value === '^') {
- value = `\\${value}`;
- }
-
- const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
- if (match) {
- value += match[0];
- state.index += match[0].length;
- }
-
- push({ type: 'text', value });
- continue;
- }
-
- /**
- * Stars
- */
-
- if (prev && (prev.type === 'globstar' || prev.star === true)) {
- prev.type = 'star';
- prev.star = true;
- prev.value += value;
- prev.output = star;
- state.backtrack = true;
- state.globstar = true;
- consume(value);
- continue;
- }
-
- let rest = remaining();
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
- extglobOpen('star', value);
- continue;
- }
-
- if (prev.type === 'star') {
- if (opts.noglobstar === true) {
- consume(value);
- continue;
- }
-
- const prior = prev.prev;
- const before = prior.prev;
- const isStart = prior.type === 'slash' || prior.type === 'bos';
- const afterStar = before && (before.type === 'star' || before.type === 'globstar');
-
- if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
- push({ type: 'star', value, output: '' });
- continue;
- }
-
- const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
- const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
- if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
- push({ type: 'star', value, output: '' });
- continue;
- }
-
- // strip consecutive `/**/`
- while (rest.slice(0, 3) === '/**') {
- const after = input[state.index + 4];
- if (after && after !== '/') {
- break;
- }
- rest = rest.slice(3);
- consume('/**', 3);
- }
-
- if (prior.type === 'bos' && eos()) {
- prev.type = 'globstar';
- prev.value += value;
- prev.output = globstar(opts);
- state.output = prev.output;
- state.globstar = true;
- consume(value);
- continue;
- }
-
- if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
- prior.output = `(?:${prior.output}`;
-
- prev.type = 'globstar';
- prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
- prev.value += value;
- state.globstar = true;
- state.output += prior.output + prev.output;
- consume(value);
- continue;
- }
-
- if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
- const end = rest[1] !== void 0 ? '|$' : '';
-
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
- prior.output = `(?:${prior.output}`;
-
- prev.type = 'globstar';
- prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
- prev.value += value;
-
- state.output += prior.output + prev.output;
- state.globstar = true;
-
- consume(value + advance());
-
- push({ type: 'slash', value: '/', output: '' });
- continue;
- }
-
- if (prior.type === 'bos' && rest[0] === '/') {
- prev.type = 'globstar';
- prev.value += value;
- prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
- state.output = prev.output;
- state.globstar = true;
- consume(value + advance());
- push({ type: 'slash', value: '/', output: '' });
- continue;
- }
-
- // remove single star from output
- state.output = state.output.slice(0, -prev.output.length);
-
- // reset previous token to globstar
- prev.type = 'globstar';
- prev.output = globstar(opts);
- prev.value += value;
-
- // reset output with globstar
- state.output += prev.output;
- state.globstar = true;
- consume(value);
- continue;
- }
-
- const token = { type: 'star', value, output: star };
-
- if (opts.bash === true) {
- token.output = '.*?';
- if (prev.type === 'bos' || prev.type === 'slash') {
- token.output = nodot + token.output;
- }
- push(token);
- continue;
- }
-
- if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
- token.output = value;
- push(token);
- continue;
- }
-
- if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
- if (prev.type === 'dot') {
- state.output += NO_DOT_SLASH;
- prev.output += NO_DOT_SLASH;
-
- } else if (opts.dot === true) {
- state.output += NO_DOTS_SLASH;
- prev.output += NO_DOTS_SLASH;
-
- } else {
- state.output += nodot;
- prev.output += nodot;
- }
-
- if (peek() !== '*') {
- state.output += ONE_CHAR;
- prev.output += ONE_CHAR;
- }
- }
-
- push(token);
- }
-
- while (state.brackets > 0) {
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
- state.output = utils.escapeLast(state.output, '[');
- decrement('brackets');
- }
-
- while (state.parens > 0) {
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
- state.output = utils.escapeLast(state.output, '(');
- decrement('parens');
- }
-
- while (state.braces > 0) {
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
- state.output = utils.escapeLast(state.output, '{');
- decrement('braces');
- }
-
- if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
- push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
- }
-
- // rebuild the output if we had to backtrack at any point
- if (state.backtrack === true) {
- state.output = '';
-
- for (const token of state.tokens) {
- state.output += token.output != null ? token.output : token.value;
-
- if (token.suffix) {
- state.output += token.suffix;
- }
- }
- }
-
- return state;
-};
-
-/**
- * Fast paths for creating regular expressions for common glob patterns.
- * This can significantly speed up processing and has very little downside
- * impact when none of the fast paths match.
- */
-
-parse.fastpaths = (input, options) => {
- const opts = { ...options };
- const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
- const len = input.length;
- if (len > max) {
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
- }
-
- input = REPLACEMENTS[input] || input;
- const win32 = utils.isWindows(options);
-
- // create constants based on platform, for windows or posix
- const {
- DOT_LITERAL,
- SLASH_LITERAL,
- ONE_CHAR,
- DOTS_SLASH,
- NO_DOT,
- NO_DOTS,
- NO_DOTS_SLASH,
- STAR,
- START_ANCHOR
- } = constants.globChars(win32);
-
- const nodot = opts.dot ? NO_DOTS : NO_DOT;
- const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
- const capture = opts.capture ? '' : '?:';
- const state = { negated: false, prefix: '' };
- let star = opts.bash === true ? '.*?' : STAR;
-
- if (opts.capture) {
- star = `(${star})`;
- }
-
- const globstar = opts => {
- if (opts.noglobstar === true) return star;
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
- };
-
- const create = str => {
- switch (str) {
- case '*':
- return `${nodot}${ONE_CHAR}${star}`;
-
- case '.*':
- return `${DOT_LITERAL}${ONE_CHAR}${star}`;
-
- case '*.*':
- return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
-
- case '*/*':
- return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
-
- case '**':
- return nodot + globstar(opts);
-
- case '**/*':
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
-
- case '**/*.*':
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
-
- case '**/.*':
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
-
- default: {
- const match = /^(.*?)\.(\w+)$/.exec(str);
- if (!match) return;
-
- const source = create(match[1]);
- if (!source) return;
-
- return source + DOT_LITERAL + match[2];
- }
- }
- };
-
- const output = utils.removePrefix(input, state);
- let source = create(output);
-
- if (source && opts.strictSlashes !== true) {
- source += `${SLASH_LITERAL}?`;
- }
-
- return source;
-};
-
-module.exports = parse;
diff --git a/src/node_modules/picomatch/lib/picomatch.js b/src/node_modules/picomatch/lib/picomatch.js
deleted file mode 100644
index 782d809..0000000
--- a/src/node_modules/picomatch/lib/picomatch.js
+++ /dev/null
@@ -1,342 +0,0 @@
-'use strict';
-
-const path = require('path');
-const scan = require('./scan');
-const parse = require('./parse');
-const utils = require('./utils');
-const constants = require('./constants');
-const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
-
-/**
- * Creates a matcher function from one or more glob patterns. The
- * returned function takes a string to match as its first argument,
- * and returns true if the string is a match. The returned matcher
- * function also takes a boolean as the second argument that, when true,
- * returns an object with additional information.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch(glob[, options]);
- *
- * const isMatch = picomatch('*.!(*a)');
- * console.log(isMatch('a.a')); //=> false
- * console.log(isMatch('a.b')); //=> true
- * ```
- * @name picomatch
- * @param {String|Array} `globs` One or more glob patterns.
- * @param {Object=} `options`
- * @return {Function=} Returns a matcher function.
- * @api public
- */
-
-const picomatch = (glob, options, returnState = false) => {
- if (Array.isArray(glob)) {
- const fns = glob.map(input => picomatch(input, options, returnState));
- const arrayMatcher = str => {
- for (const isMatch of fns) {
- const state = isMatch(str);
- if (state) return state;
- }
- return false;
- };
- return arrayMatcher;
- }
-
- const isState = isObject(glob) && glob.tokens && glob.input;
-
- if (glob === '' || (typeof glob !== 'string' && !isState)) {
- throw new TypeError('Expected pattern to be a non-empty string');
- }
-
- const opts = options || {};
- const posix = utils.isWindows(options);
- const regex = isState
- ? picomatch.compileRe(glob, options)
- : picomatch.makeRe(glob, options, false, true);
-
- const state = regex.state;
- delete regex.state;
-
- let isIgnored = () => false;
- if (opts.ignore) {
- const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
- isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
- }
-
- const matcher = (input, returnObject = false) => {
- const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
- const result = { glob, state, regex, posix, input, output, match, isMatch };
-
- if (typeof opts.onResult === 'function') {
- opts.onResult(result);
- }
-
- if (isMatch === false) {
- result.isMatch = false;
- return returnObject ? result : false;
- }
-
- if (isIgnored(input)) {
- if (typeof opts.onIgnore === 'function') {
- opts.onIgnore(result);
- }
- result.isMatch = false;
- return returnObject ? result : false;
- }
-
- if (typeof opts.onMatch === 'function') {
- opts.onMatch(result);
- }
- return returnObject ? result : true;
- };
-
- if (returnState) {
- matcher.state = state;
- }
-
- return matcher;
-};
-
-/**
- * Test `input` with the given `regex`. This is used by the main
- * `picomatch()` function to test the input string.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.test(input, regex[, options]);
- *
- * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
- * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
- * ```
- * @param {String} `input` String to test.
- * @param {RegExp} `regex`
- * @return {Object} Returns an object with matching info.
- * @api public
- */
-
-picomatch.test = (input, regex, options, { glob, posix } = {}) => {
- if (typeof input !== 'string') {
- throw new TypeError('Expected input to be a string');
- }
-
- if (input === '') {
- return { isMatch: false, output: '' };
- }
-
- const opts = options || {};
- const format = opts.format || (posix ? utils.toPosixSlashes : null);
- let match = input === glob;
- let output = (match && format) ? format(input) : input;
-
- if (match === false) {
- output = format ? format(input) : input;
- match = output === glob;
- }
-
- if (match === false || opts.capture === true) {
- if (opts.matchBase === true || opts.basename === true) {
- match = picomatch.matchBase(input, regex, options, posix);
- } else {
- match = regex.exec(output);
- }
- }
-
- return { isMatch: Boolean(match), match, output };
-};
-
-/**
- * Match the basename of a filepath.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.matchBase(input, glob[, options]);
- * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
- * ```
- * @param {String} `input` String to test.
- * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
- * @return {Boolean}
- * @api public
- */
-
-picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
- const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
- return regex.test(path.basename(input));
-};
-
-/**
- * Returns true if **any** of the given glob `patterns` match the specified `string`.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.isMatch(string, patterns[, options]);
- *
- * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
- * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
- * ```
- * @param {String|Array} str The string to test.
- * @param {String|Array} patterns One or more glob patterns to use for matching.
- * @param {Object} [options] See available [options](#options).
- * @return {Boolean} Returns true if any patterns match `str`
- * @api public
- */
-
-picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
-
-/**
- * Parse a glob pattern to create the source string for a regular
- * expression.
- *
- * ```js
- * const picomatch = require('picomatch');
- * const result = picomatch.parse(pattern[, options]);
- * ```
- * @param {String} `pattern`
- * @param {Object} `options`
- * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
- * @api public
- */
-
-picomatch.parse = (pattern, options) => {
- if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
- return parse(pattern, { ...options, fastpaths: false });
-};
-
-/**
- * Scan a glob pattern to separate the pattern into segments.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.scan(input[, options]);
- *
- * const result = picomatch.scan('!./foo/*.js');
- * console.log(result);
- * { prefix: '!./',
- * input: '!./foo/*.js',
- * start: 3,
- * base: 'foo',
- * glob: '*.js',
- * isBrace: false,
- * isBracket: false,
- * isGlob: true,
- * isExtglob: false,
- * isGlobstar: false,
- * negated: true }
- * ```
- * @param {String} `input` Glob pattern to scan.
- * @param {Object} `options`
- * @return {Object} Returns an object with
- * @api public
- */
-
-picomatch.scan = (input, options) => scan(input, options);
-
-/**
- * Compile a regular expression from the `state` object returned by the
- * [parse()](#parse) method.
- *
- * @param {Object} `state`
- * @param {Object} `options`
- * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
- * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
- * @return {RegExp}
- * @api public
- */
-
-picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
- if (returnOutput === true) {
- return state.output;
- }
-
- const opts = options || {};
- const prepend = opts.contains ? '' : '^';
- const append = opts.contains ? '' : '$';
-
- let source = `${prepend}(?:${state.output})${append}`;
- if (state && state.negated === true) {
- source = `^(?!${source}).*$`;
- }
-
- const regex = picomatch.toRegex(source, options);
- if (returnState === true) {
- regex.state = state;
- }
-
- return regex;
-};
-
-/**
- * Create a regular expression from a parsed glob pattern.
- *
- * ```js
- * const picomatch = require('picomatch');
- * const state = picomatch.parse('*.js');
- * // picomatch.compileRe(state[, options]);
- *
- * console.log(picomatch.compileRe(state));
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
- * ```
- * @param {String} `state` The object returned from the `.parse` method.
- * @param {Object} `options`
- * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
- * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
- * @return {RegExp} Returns a regex created from the given pattern.
- * @api public
- */
-
-picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
- if (!input || typeof input !== 'string') {
- throw new TypeError('Expected a non-empty string');
- }
-
- let parsed = { negated: false, fastpaths: true };
-
- if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
- parsed.output = parse.fastpaths(input, options);
- }
-
- if (!parsed.output) {
- parsed = parse(input, options);
- }
-
- return picomatch.compileRe(parsed, options, returnOutput, returnState);
-};
-
-/**
- * Create a regular expression from the given regex source string.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.toRegex(source[, options]);
- *
- * const { output } = picomatch.parse('*.js');
- * console.log(picomatch.toRegex(output));
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
- * ```
- * @param {String} `source` Regular expression source string.
- * @param {Object} `options`
- * @return {RegExp}
- * @api public
- */
-
-picomatch.toRegex = (source, options) => {
- try {
- const opts = options || {};
- return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
- } catch (err) {
- if (options && options.debug === true) throw err;
- return /$^/;
- }
-};
-
-/**
- * Picomatch constants.
- * @return {Object}
- */
-
-picomatch.constants = constants;
-
-/**
- * Expose "picomatch"
- */
-
-module.exports = picomatch;
diff --git a/src/node_modules/picomatch/lib/scan.js b/src/node_modules/picomatch/lib/scan.js
deleted file mode 100644
index e59cd7a..0000000
--- a/src/node_modules/picomatch/lib/scan.js
+++ /dev/null
@@ -1,391 +0,0 @@
-'use strict';
-
-const utils = require('./utils');
-const {
- CHAR_ASTERISK, /* * */
- CHAR_AT, /* @ */
- CHAR_BACKWARD_SLASH, /* \ */
- CHAR_COMMA, /* , */
- CHAR_DOT, /* . */
- CHAR_EXCLAMATION_MARK, /* ! */
- CHAR_FORWARD_SLASH, /* / */
- CHAR_LEFT_CURLY_BRACE, /* { */
- CHAR_LEFT_PARENTHESES, /* ( */
- CHAR_LEFT_SQUARE_BRACKET, /* [ */
- CHAR_PLUS, /* + */
- CHAR_QUESTION_MARK, /* ? */
- CHAR_RIGHT_CURLY_BRACE, /* } */
- CHAR_RIGHT_PARENTHESES, /* ) */
- CHAR_RIGHT_SQUARE_BRACKET /* ] */
-} = require('./constants');
-
-const isPathSeparator = code => {
- return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
-};
-
-const depth = token => {
- if (token.isPrefix !== true) {
- token.depth = token.isGlobstar ? Infinity : 1;
- }
-};
-
-/**
- * Quickly scans a glob pattern and returns an object with a handful of
- * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
- * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
- * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
- *
- * ```js
- * const pm = require('picomatch');
- * console.log(pm.scan('foo/bar/*.js'));
- * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
- * ```
- * @param {String} `str`
- * @param {Object} `options`
- * @return {Object} Returns an object with tokens and regex source string.
- * @api public
- */
-
-const scan = (input, options) => {
- const opts = options || {};
-
- const length = input.length - 1;
- const scanToEnd = opts.parts === true || opts.scanToEnd === true;
- const slashes = [];
- const tokens = [];
- const parts = [];
-
- let str = input;
- let index = -1;
- let start = 0;
- let lastIndex = 0;
- let isBrace = false;
- let isBracket = false;
- let isGlob = false;
- let isExtglob = false;
- let isGlobstar = false;
- let braceEscaped = false;
- let backslashes = false;
- let negated = false;
- let negatedExtglob = false;
- let finished = false;
- let braces = 0;
- let prev;
- let code;
- let token = { value: '', depth: 0, isGlob: false };
-
- const eos = () => index >= length;
- const peek = () => str.charCodeAt(index + 1);
- const advance = () => {
- prev = code;
- return str.charCodeAt(++index);
- };
-
- while (index < length) {
- code = advance();
- let next;
-
- if (code === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- code = advance();
-
- if (code === CHAR_LEFT_CURLY_BRACE) {
- braceEscaped = true;
- }
- continue;
- }
-
- if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
- braces++;
-
- while (eos() !== true && (code = advance())) {
- if (code === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- advance();
- continue;
- }
-
- if (code === CHAR_LEFT_CURLY_BRACE) {
- braces++;
- continue;
- }
-
- if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
- isBrace = token.isBrace = true;
- isGlob = token.isGlob = true;
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
-
- if (braceEscaped !== true && code === CHAR_COMMA) {
- isBrace = token.isBrace = true;
- isGlob = token.isGlob = true;
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
-
- if (code === CHAR_RIGHT_CURLY_BRACE) {
- braces--;
-
- if (braces === 0) {
- braceEscaped = false;
- isBrace = token.isBrace = true;
- finished = true;
- break;
- }
- }
- }
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
-
- if (code === CHAR_FORWARD_SLASH) {
- slashes.push(index);
- tokens.push(token);
- token = { value: '', depth: 0, isGlob: false };
-
- if (finished === true) continue;
- if (prev === CHAR_DOT && index === (start + 1)) {
- start += 2;
- continue;
- }
-
- lastIndex = index + 1;
- continue;
- }
-
- if (opts.noext !== true) {
- const isExtglobChar = code === CHAR_PLUS
- || code === CHAR_AT
- || code === CHAR_ASTERISK
- || code === CHAR_QUESTION_MARK
- || code === CHAR_EXCLAMATION_MARK;
-
- if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
- isGlob = token.isGlob = true;
- isExtglob = token.isExtglob = true;
- finished = true;
- if (code === CHAR_EXCLAMATION_MARK && index === start) {
- negatedExtglob = true;
- }
-
- if (scanToEnd === true) {
- while (eos() !== true && (code = advance())) {
- if (code === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- code = advance();
- continue;
- }
-
- if (code === CHAR_RIGHT_PARENTHESES) {
- isGlob = token.isGlob = true;
- finished = true;
- break;
- }
- }
- continue;
- }
- break;
- }
- }
-
- if (code === CHAR_ASTERISK) {
- if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
- isGlob = token.isGlob = true;
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
-
- if (code === CHAR_QUESTION_MARK) {
- isGlob = token.isGlob = true;
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
-
- if (code === CHAR_LEFT_SQUARE_BRACKET) {
- while (eos() !== true && (next = advance())) {
- if (next === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- advance();
- continue;
- }
-
- if (next === CHAR_RIGHT_SQUARE_BRACKET) {
- isBracket = token.isBracket = true;
- isGlob = token.isGlob = true;
- finished = true;
- break;
- }
- }
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
-
- if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
- negated = token.negated = true;
- start++;
- continue;
- }
-
- if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
- isGlob = token.isGlob = true;
-
- if (scanToEnd === true) {
- while (eos() !== true && (code = advance())) {
- if (code === CHAR_LEFT_PARENTHESES) {
- backslashes = token.backslashes = true;
- code = advance();
- continue;
- }
-
- if (code === CHAR_RIGHT_PARENTHESES) {
- finished = true;
- break;
- }
- }
- continue;
- }
- break;
- }
-
- if (isGlob === true) {
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
- }
-
- if (opts.noext === true) {
- isExtglob = false;
- isGlob = false;
- }
-
- let base = str;
- let prefix = '';
- let glob = '';
-
- if (start > 0) {
- prefix = str.slice(0, start);
- str = str.slice(start);
- lastIndex -= start;
- }
-
- if (base && isGlob === true && lastIndex > 0) {
- base = str.slice(0, lastIndex);
- glob = str.slice(lastIndex);
- } else if (isGlob === true) {
- base = '';
- glob = str;
- } else {
- base = str;
- }
-
- if (base && base !== '' && base !== '/' && base !== str) {
- if (isPathSeparator(base.charCodeAt(base.length - 1))) {
- base = base.slice(0, -1);
- }
- }
-
- if (opts.unescape === true) {
- if (glob) glob = utils.removeBackslashes(glob);
-
- if (base && backslashes === true) {
- base = utils.removeBackslashes(base);
- }
- }
-
- const state = {
- prefix,
- input,
- start,
- base,
- glob,
- isBrace,
- isBracket,
- isGlob,
- isExtglob,
- isGlobstar,
- negated,
- negatedExtglob
- };
-
- if (opts.tokens === true) {
- state.maxDepth = 0;
- if (!isPathSeparator(code)) {
- tokens.push(token);
- }
- state.tokens = tokens;
- }
-
- if (opts.parts === true || opts.tokens === true) {
- let prevIndex;
-
- for (let idx = 0; idx < slashes.length; idx++) {
- const n = prevIndex ? prevIndex + 1 : start;
- const i = slashes[idx];
- const value = input.slice(n, i);
- if (opts.tokens) {
- if (idx === 0 && start !== 0) {
- tokens[idx].isPrefix = true;
- tokens[idx].value = prefix;
- } else {
- tokens[idx].value = value;
- }
- depth(tokens[idx]);
- state.maxDepth += tokens[idx].depth;
- }
- if (idx !== 0 || value !== '') {
- parts.push(value);
- }
- prevIndex = i;
- }
-
- if (prevIndex && prevIndex + 1 < input.length) {
- const value = input.slice(prevIndex + 1);
- parts.push(value);
-
- if (opts.tokens) {
- tokens[tokens.length - 1].value = value;
- depth(tokens[tokens.length - 1]);
- state.maxDepth += tokens[tokens.length - 1].depth;
- }
- }
-
- state.slashes = slashes;
- state.parts = parts;
- }
-
- return state;
-};
-
-module.exports = scan;
diff --git a/src/node_modules/picomatch/lib/utils.js b/src/node_modules/picomatch/lib/utils.js
deleted file mode 100644
index c3ca766..0000000
--- a/src/node_modules/picomatch/lib/utils.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-const path = require('path');
-const win32 = process.platform === 'win32';
-const {
- REGEX_BACKSLASH,
- REGEX_REMOVE_BACKSLASH,
- REGEX_SPECIAL_CHARS,
- REGEX_SPECIAL_CHARS_GLOBAL
-} = require('./constants');
-
-exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
-exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
-exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
-exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
-exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
-
-exports.removeBackslashes = str => {
- return str.replace(REGEX_REMOVE_BACKSLASH, match => {
- return match === '\\' ? '' : match;
- });
-};
-
-exports.supportsLookbehinds = () => {
- const segs = process.version.slice(1).split('.').map(Number);
- if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
- return true;
- }
- return false;
-};
-
-exports.isWindows = options => {
- if (options && typeof options.windows === 'boolean') {
- return options.windows;
- }
- return win32 === true || path.sep === '\\';
-};
-
-exports.escapeLast = (input, char, lastIdx) => {
- const idx = input.lastIndexOf(char, lastIdx);
- if (idx === -1) return input;
- if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
- return `${input.slice(0, idx)}\\${input.slice(idx)}`;
-};
-
-exports.removePrefix = (input, state = {}) => {
- let output = input;
- if (output.startsWith('./')) {
- output = output.slice(2);
- state.prefix = './';
- }
- return output;
-};
-
-exports.wrapOutput = (input, state = {}, options = {}) => {
- const prepend = options.contains ? '' : '^';
- const append = options.contains ? '' : '$';
-
- let output = `${prepend}(?:${input})${append}`;
- if (state.negated === true) {
- output = `(?:^(?!${output}).*$)`;
- }
- return output;
-};
diff --git a/src/node_modules/picomatch/package.json b/src/node_modules/picomatch/package.json
deleted file mode 100644
index 3db22d4..0000000
--- a/src/node_modules/picomatch/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "name": "picomatch",
- "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
- "version": "2.3.1",
- "homepage": "https://github.com/micromatch/picomatch",
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
- "funding": "https://github.com/sponsors/jonschlinkert",
- "repository": "micromatch/picomatch",
- "bugs": {
- "url": "https://github.com/micromatch/picomatch/issues"
- },
- "license": "MIT",
- "files": [
- "index.js",
- "lib"
- ],
- "main": "index.js",
- "engines": {
- "node": ">=8.6"
- },
- "scripts": {
- "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
- "mocha": "mocha --reporter dot",
- "test": "npm run lint && npm run mocha",
- "test:ci": "npm run test:cover",
- "test:cover": "nyc npm run mocha"
- },
- "devDependencies": {
- "eslint": "^6.8.0",
- "fill-range": "^7.0.1",
- "gulp-format-md": "^2.0.0",
- "mocha": "^6.2.2",
- "nyc": "^15.0.0",
- "time-require": "github:jonschlinkert/time-require"
- },
- "keywords": [
- "glob",
- "match",
- "picomatch"
- ],
- "nyc": {
- "reporter": [
- "html",
- "lcov",
- "text-summary"
- ]
- },
- "verb": {
- "toc": {
- "render": true,
- "method": "preWrite",
- "maxdepth": 3
- },
- "layout": "empty",
- "tasks": [
- "readme"
- ],
- "plugins": [
- "gulp-format-md"
- ],
- "lint": {
- "reflinks": true
- },
- "related": {
- "list": [
- "braces",
- "micromatch"
- ]
- },
- "reflinks": [
- "braces",
- "expand-brackets",
- "extglob",
- "fill-range",
- "micromatch",
- "minimatch",
- "nanomatch",
- "picomatch"
- ]
- }
-}
diff --git a/src/node_modules/pstree.remy/.travis.yml b/src/node_modules/pstree.remy/.travis.yml
deleted file mode 100644
index 5bf093e..0000000
--- a/src/node_modules/pstree.remy/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-cache:
- directories:
- - ~/.npm
-notifications:
- email: false
-node_js:
- - '8'
diff --git a/src/node_modules/pstree.remy/LICENSE b/src/node_modules/pstree.remy/LICENSE
deleted file mode 100644
index e83bea6..0000000
--- a/src/node_modules/pstree.remy/LICENSE
+++ /dev/null
@@ -1,7 +0,0 @@
-The MIT License (MIT)
-Copyright © 2019 Remy Sharp, https://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.
diff --git a/src/node_modules/pstree.remy/README.md b/src/node_modules/pstree.remy/README.md
deleted file mode 100644
index 5f44c62..0000000
--- a/src/node_modules/pstree.remy/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# pstree.remy
-
-> Cross platform ps-tree (including unix flavours without ps)
-
-## Installation
-
-```shel
-npm install pstree.remy
-```
-
-## Usage
-
-```js
-const psTree = psTree require('pstree.remy');
-
-psTree(PID, (err, pids) => {
- if (err) {
- console.error(err);
- }
- console.log(pids)
-});
-
-console.log(psTree.hasPS
- ? "This platform has the ps shell command"
- : "This platform does not have the ps shell command");
-```
diff --git a/src/node_modules/pstree.remy/lib/index.js b/src/node_modules/pstree.remy/lib/index.js
deleted file mode 100644
index 743e997..0000000
--- a/src/node_modules/pstree.remy/lib/index.js
+++ /dev/null
@@ -1,37 +0,0 @@
-const exec = require('child_process').exec;
-const tree = require('./tree');
-const utils = require('./utils');
-var hasPS = true;
-
-// discover if the OS has `ps`, and therefore can use psTree
-exec('ps', (error) => {
- module.exports.hasPS = hasPS = !error;
-});
-
-module.exports = function main(pid, callback) {
- if (typeof pid === 'number') {
- pid = pid.toString();
- }
-
- if (hasPS && !process.env.NO_PS) {
- return tree(pid, callback);
- }
-
- utils
- .getStat()
- .then(utils.tree)
- .then((tree) => utils.pidsForTree(tree, pid))
- .then((res) =>
- callback(
- null,
- res.map((p) => p.PID)
- )
- )
- .catch((error) => callback(error));
-};
-
-if (!module.parent) {
- module.exports(process.argv[2], (e, pids) => console.log(pids));
-}
-
-module.exports.hasPS = hasPS;
diff --git a/src/node_modules/pstree.remy/lib/tree.js b/src/node_modules/pstree.remy/lib/tree.js
deleted file mode 100644
index bac7cce..0000000
--- a/src/node_modules/pstree.remy/lib/tree.js
+++ /dev/null
@@ -1,37 +0,0 @@
-const spawn = require('child_process').spawn;
-
-module.exports = function (rootPid, callback) {
- const pidsOfInterest = new Set([parseInt(rootPid, 10)]);
- var output = '';
-
- // *nix
- const ps = spawn('ps', ['-A', '-o', 'ppid,pid']);
- ps.stdout.on('data', (data) => {
- output += data.toString('ascii');
- });
-
- ps.on('close', () => {
- try {
- const res = output
- .split('\n')
- .slice(1)
- .map((_) => _.trim())
- .reduce((acc, line) => {
- const pids = line.split(/\s+/);
- const ppid = parseInt(pids[0], 10);
-
- if (pidsOfInterest.has(ppid)) {
- const pid = parseInt(pids[1], 10);
- acc.push(pid);
- pidsOfInterest.add(pid);
- }
-
- return acc;
- }, []);
-
- callback(null, res);
- } catch (e) {
- callback(e, null);
- }
- });
-};
diff --git a/src/node_modules/pstree.remy/lib/utils.js b/src/node_modules/pstree.remy/lib/utils.js
deleted file mode 100644
index 8fa5719..0000000
--- a/src/node_modules/pstree.remy/lib/utils.js
+++ /dev/null
@@ -1,53 +0,0 @@
-const spawn = require('child_process').spawn;
-
-module.exports = { tree, pidsForTree, getStat };
-
-function getStat() {
- return new Promise((resolve) => {
- const command = `ls /proc | grep -E '^[0-9]+$' | xargs -I{} cat /proc/{}/stat`;
- const spawned = spawn('sh', ['-c', command], {
- stdio: ['pipe', 'pipe', 'pipe'],
- });
-
- var res = '';
- spawned.stdout.on('data', (data) => (res += data));
- spawned.on('close', () => resolve(res));
- });
-}
-
-function template(s) {
- var stat = null;
- // 'pid', 'comm', 'state', 'ppid', 'pgrp'
- // %d (%s) %c %d %d
- s.replace(
- /(\d+) \((.*?)\)\s(.+?)\s(\d+)\s/g,
- (all, PID, COMMAND, STAT, PPID) => {
- stat = { PID, COMMAND, PPID, STAT };
- }
- );
-
- return stat;
-}
-
-function tree(stats) {
- const processes = stats.split('\n').map(template).filter(Boolean);
-
- return processes;
-}
-
-function pidsForTree(tree, pid) {
- if (typeof pid === 'number') {
- pid = pid.toString();
- }
- const parents = [pid];
- const pids = [];
-
- tree.forEach((proc) => {
- if (parents.indexOf(proc.PPID) !== -1) {
- parents.push(proc.PID);
- pids.push(proc);
- }
- });
-
- return pids;
-}
diff --git a/src/node_modules/pstree.remy/package.json b/src/node_modules/pstree.remy/package.json
deleted file mode 100644
index 35c7068..0000000
--- a/src/node_modules/pstree.remy/package.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "pstree.remy",
- "version": "1.1.8",
- "main": "lib/index.js",
- "prettier": {
- "trailingComma": "es5",
- "semi": true,
- "singleQuote": true
- },
- "scripts": {
- "test": "tap tests/*.test.js",
- "_prepublish": "npm test"
- },
- "keywords": [
- "ps",
- "pstree",
- "ps tree"
- ],
- "author": "Remy Sharp",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "https://github.com/remy/pstree.git"
- },
- "devDependencies": {
- "tap": "^11.0.0"
- },
- "directories": {
- "test": "tests"
- },
- "dependencies": {},
- "description": "Collects the full tree of processes from /proc"
-}
diff --git a/src/node_modules/pstree.remy/tests/fixtures/index.js b/src/node_modules/pstree.remy/tests/fixtures/index.js
deleted file mode 100644
index 4cdbcb1..0000000
--- a/src/node_modules/pstree.remy/tests/fixtures/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-const spawn = require('child_process').spawn;
-function run() {
- spawn(
- 'sh',
- ['-c', 'node -e "setInterval(() => console.log(`running`), 200)"'],
- {
- stdio: 'pipe',
- }
- );
-}
-
-var runCallCount = process.argv[2] || 1;
-for (var i = 0; i < runCallCount; i++) run();
diff --git a/src/node_modules/pstree.remy/tests/fixtures/out1 b/src/node_modules/pstree.remy/tests/fixtures/out1
deleted file mode 100644
index abfe581..0000000
--- a/src/node_modules/pstree.remy/tests/fixtures/out1
+++ /dev/null
@@ -1,10 +0,0 @@
-1 (npm) S 0 1 1 34816 1 4210944 11112 0 0 0 45 8 0 0 20 0 10 0 330296 1089871872 11809 18446744073709551615 4194304 29343848 140726436642896 0 0 0 0 4096 2072112895 0 0 0 17 0 0 0 0 0 0 31441000 31537208 37314560 140726436650815 140726436650847 140726436650847 140726436650986 0
-15 (sh) S 1 1 1 34816 1 4210688 115 0 0 0 0 0 0 0 20 0 1 0 330372 4399104 187 18446744073709551615 94374393548800 94374393655428 140722913272992 0 0 0 0 0 65538 0 0 0 17 0 0 0 0 0 0 94374395756424 94374395761184 94374404673536 140722913278928 140722913278959 140722913278959 140722913284080 0
-16 (node) S 15 1 1 34816 1 4210688 6930 103 0 0 32 2 0 0 20 0 10 0 330373 1068478464 8412 18446744073709551615 4194304 29343848 140727228046064 0 0 0 0 4096 134300162 0 0 0 17 1 0 0 1 0 0 31441000 31537208 52584448 140727228050313 140727228050383 140727228050383 140727228055530 0
-27 (sh) S 16 1 1 34816 1 4210688 111 0 0 0 0 0 0 0 20 0 1 0 330410 4399104 193 18446744073709551615 94848235986944 94848236093572 140727019991184 0 0 0 0 0 65538 0 0 0 17 1 0 0 0 0 0 94848238194568 94848238199328 94848261660672 140727019998122 140727019998165 140727019998165 140727020003312 0
-28 (node) S 27 1 1 34816 1 4210688 3576 268 0 0 12 2 0 0 20 0 10 0 330411 930213888 6760 18446744073709551615 4194304 29343848 140726559664992 0 0 0 0 4096 134300162 0 0 0 17 1 0 0 0 0 0 31441000 31537208 32591872 140726559669117 140726559669199 140726559669199 140726559674346 0
-39 (node) S 28 1 1 34816 1 4210688 47517 0 0 0 151 9 0 0 20 0 6 0 330427 985739264 31859 18446744073709551615 4194304 29343848 140737324503920 0 0 0 0 4096 134234626 0 0 0 17 0 0 0 0 0 0 31441000 31537208 51585024 140737324510060 140737324510159 140737324510159 140737324515306 0
-45 (bash) S 0 45 45 34817 50 4210944 752 256 0 0 2 0 0 0 20 0 1 0 331039 18628608 789 18446744073709551615 4194304 5242124 140724425887696 0 0 0 65536 3670020 1266777851 0 0 0 17 1 0 0 0 0 0 7341384 7388228 30310400 140724425891678 140724425891683 140724425891683 140724425891822 0
-cat: /proc/50/stat: No such file or directory
-cat: /proc/51/stat: No such file or directory
-52 (xargs) S 45 50 45 34817 50 4210688 179 661 0 0 0 0 0 0 20 0 1 0 331544 4608000 346 18446744073709551615 94587588550656 94587588614028 140735223856048 0 0 0 0 0 2560 0 0 0 17 1 0 0 0 0 0 94587590711464 94587590713504 94587603169280 140735223861006 140735223861035 140735223861035 140735223861225 0
diff --git a/src/node_modules/pstree.remy/tests/fixtures/out2 b/src/node_modules/pstree.remy/tests/fixtures/out2
deleted file mode 100644
index 3b31137..0000000
--- a/src/node_modules/pstree.remy/tests/fixtures/out2
+++ /dev/null
@@ -1,29 +0,0 @@
-cat: /proc/4087/stat: No such file or directory
-cat: /proc/4088/stat: No such file or directory
-1 (init) S 0 1 1 0 -1 4210944 9227 55994 29 319 7 5 68 16 20 0 1 0 1286281 33660928 855 18446744073709551615 1 1 0 0 0 0 0 4096 536962595 0 0 0 17 4 0 0 3 0 0 0 0 0 0 0 0 0 0
-1032 (ntpd) S 1 1032 1032 0 -1 4211008 178 0 1 0 0 0 0 0 20 0 1 0 1287033 25743360 1058 18446744073709551615 1 1 0 0 0 0 0 4096 27207 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
-126 (irqbalance) S 1 126 126 0 -1 1077952832 1217 0 0 0 1 6 0 0 20 0 1 0 1286749 20189184 647 18446744073709551615 1 1 0 0 0 0 0 0 3 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
-181 (mysqld) S 1 181 181 0 -1 4210944 6399 0 46 0 8 6 0 0 20 0 22 0 1286761 748453888 14476 18446744073709551615 1 1 0 0 0 0 552967 4096 26345 0 0 0 17 4 0 0 10 0 0 0 0 0 0 0 0 0 0
-194 (memcached) S 1 187 187 0 -1 4210944 252 0 4 0 0 0 0 0 20 0 6 0 1286766 333221888 648 18446744073709551615 1 1 0 0 0 0 0 4096 2 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
-243 (dbus-daemon) S 1 243 243 0 -1 4211008 67 0 0 0 0 0 0 0 20 0 1 0 1286779 40087552 598 18446744073709551615 1 1 0 0 0 0 0 0 16385 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
-254 (rsyslogd) S 1 254 254 0 -1 4211008 107 0 0 0 2 2 0 0 20 0 3 0 1286782 186601472 696 18446744073709551615 1 1 0 0 0 0 0 16781830 1133601 0 0 0 17 5 0 0 0 0 0 0 0 0 0 0 0 0 0
-265 (systemd-logind) S 1 265 265 0 -1 4210944 276 0 2 0 0 0 0 0 20 0 1 0 1286786 35880960 720 18446744073709551615 1 1 0 0 0 0 0 0 0 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
-333 (postgres) S 1 303 303 0 -1 4210688 3169 3466 15 18 0 1 1 1 20 0 1 0 1286817 156073984 5002 18446744073709551615 1 1 0 0 0 0 0 19935232 84487 0 0 0 17 5 0 0 1 0 0 0 0 0 0 0 0 0 0
-359 (postgres) S 333 359 359 0 -1 4210752 90 0 0 0 0 0 0 0 20 0 1 0 1286822 156073984 827 18446744073709551615 1 1 0 0 0 0 0 16805888 2567 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
-360 (postgres) S 333 360 360 0 -1 4210752 119 0 0 0 0 0 0 0 20 0 1 0 1286822 156073984 827 18446744073709551615 1 1 0 0 0 0 0 16791554 16901 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
-361 (postgres) S 333 361 361 0 -1 4210752 87 0 0 0 0 0 0 0 20 0 1 0 1286822 156073984 827 18446744073709551615 1 1 0 0 0 0 0 16791552 16903 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
-362 (postgres) S 333 362 362 0 -1 4210752 292 0 3 0 0 0 0 0 20 0 1 0 1286822 156930048 1373 18446744073709551615 1 1 0 0 0 0 0 19927040 27271 0 0 0 17 5 0 0 0 0 0 0 0 0 0 0 0 0 0
-363 (postgres) S 333 363 363 0 -1 4210752 82 0 0 0 0 0 0 0 20 0 1 0 1286822 115924992 887 18446744073709551615 1 1 0 0 0 0 0 16808450 5 0 0 0 17 5 0 0 0 0 0 0 0 0 0 0 0 0 0
-4050 (npm) S 50 50 50 34817 50 4210688 5109 0 0 0 36 3 0 0 20 0 10 0 1292968 738025472 10051 18446744073709551615 4194304 33165900 140723623956256 0 0 0 0 4096 134300162 0 0 0 17 4 0 0 0 0 0 35263056 35370992 48369664 140723623964237 140723623964294 140723623964294 140723623968712 0
-4060 (sh) S 4050 50 50 34817 50 4210688 121 0 0 0 0 0 0 0 20 0 1 0 1293007 4579328 174 18446744073709551615 94347643936768 94347644049516 140735136055088 0 0 0 0 0 65538 1 0 0 17 5 0 0 0 0 0 94347646148008 94347646153216 94347660038144 140735136063095 140735136063129 140735136063129 140735136071664 0
-4061 (node) S 4060 50 50 34817 50 4210688 6501 0 0 0 42 2 0 0 20 0 6 0 1293008 705769472 10211 18446744073709551615 4194304 33165900 140730532686288 0 0 0 0 4096 2072111671 0 0 0 17 5 0 0 0 0 0 35263056 35370992 45867008 140730532695579 140730532695657 140730532695657 140730532704200 0
-4067 (node) S 4061 50 50 34817 50 4210688 6746 221 0 0 38 3 0 0 20 0 10 0 1293051 738910208 10527 18446744073709551615 4194304 33165900 140724824971632 0 0 0 0 4096 2072111671 0 0 0 17 4 0 0 0 0 0 35263056 35370992 68595712 140724824980995 140724824981063 140724824981063 140724824989640 0
-4079 (sh) S 4067 50 50 34817 50 4210688 118 0 0 0 0 0 0 0 20 0 1 0 1293092 4579328 194 18446744073709551615 94573702131712 94573702244460 140724712357120 0 0 0 0 0 65538 1 0 0 17 4 0 0 0 0 0 94573704342952 94573704348160 94573718511616 140724712361487 140724712361583 140724712361583 140724712370160 0
-4080 (node) S 4079 50 50 34817 50 4210688 2428 0 0 0 8 1 0 0 20 0 6 0 1293093 693059584 7251 18446744073709551615 4194304 33165900 140726023392816 0 0 0 0 4096 134234626 0 0 0 17 5 0 0 0 0 0 35263056 35370992 55226368 140726023396847 140726023396935 140726023396935 140726023405512 0
-4086 (sh) S 4067 50 50 34817 50 4210688 131 244 0 0 0 0 0 0 20 0 1 0 1293143 4579328 200 18446744073709551615 94347550273536 94347550386284 140737219399136 0 0 0 0 0 65538 1 0 0 17 5 0 0 0 0 0 94347552484776 94347552489984 94347554299904 140737219403308 140737219403375 140737219403375 140737219411952 0
-4089 (xargs) S 4086 50 50 34817 50 4210688 333 1924 0 0 0 0 0 0 20 0 1 0 1293143 17600512 477 18446744073709551615 4194304 4232732 140721633759248 0 0 0 0 0 0 1 0 0 17 5 0 0 0 0 0 6331920 6332980 32182272 140721633762891 140721633762920 140721633762920 140721633771497 0
-50 (bash) S 0 50 50 34817 50 4210944 43914 1032463 9 705 44 21 4213 818 20 0 1 0 1286336 42266624 3599 18446744073709551615 4194304 5173404 140732749083280 0 0 0 65536 4 1132560123 1 0 0 17 4 0 0 410 0 0 7273968 7310504 21196800 140732749086490 140732749086517 140732749086517 140732749086702 0
-79 (acpid) S 1 79 79 0 -1 4210752 46 0 0 0 0 0 0 0 20 0 1 0 1286717 4493312 407 18446744073709551615 1 1 0 0 0 0 0 4096 16391 0 0 0 17 5 0 0 0 0 0 0 0 0 0 0 0 0 0
-83 (sshd) S 1 83 83 0 -1 4210944 354 0 27 0 0 0 0 0 20 0 1 0 1286718 62873600 1290 18446744073709551615 1 1 0 0 0 0 0 4096 81925 0 0 0 17 4 0 0 30 0 0 0 0 0 0 0 0 0 0
-94 (cron) S 1 94 94 0 -1 1077952576 103 449 0 1 0 0 0 0 20 0 1 0 1286743 24240128 559 18446744073709551615 1 1 0 0 0 0 0 0 65537 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
-95 (atd) S 1 95 95 0 -1 1077952576 28 0 0 0 0 0 0 0 20 0 1 0 1286743 19615744 41 18446744073709551615 1 1 0 0 0 0 0 0 81923 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0
diff --git a/src/node_modules/pstree.remy/tests/index.test.js b/src/node_modules/pstree.remy/tests/index.test.js
deleted file mode 100644
index 50096b9..0000000
--- a/src/node_modules/pstree.remy/tests/index.test.js
+++ /dev/null
@@ -1,51 +0,0 @@
-const tap = require('tap');
-const test = tap.test;
-const readFile = require('fs').readFileSync;
-const spawn = require('child_process').spawn;
-const pstree = require('../');
-const { tree, pidsForTree, getStat } = require('../lib/utils');
-
-if (process.platform !== 'darwin') {
- test('reads from /proc', async (t) => {
- const ps = await getStat();
- t.ok(ps.split('\n').length > 1);
- });
-}
-
-test('tree for live env', async (t) => {
- const pid = 4079;
- const fixture = readFile(__dirname + '/fixtures/out2', 'utf8');
- const ps = await tree(fixture);
- t.deepEqual(
- pidsForTree(ps, pid).map((_) => _.PID),
- ['4080']
- );
-});
-
-function testTree(t, runCallCount) {
- const sub = spawn('node', [`${__dirname}/fixtures/index.js`, runCallCount], {
- stdio: 'pipe',
- });
- setTimeout(() => {
- const pid = sub.pid;
-
- pstree(pid, (error, pids) => {
- pids.concat([pid]).forEach((p) => {
- spawn('kill', ['-s', 'SIGTERM', p]);
- });
-
- // the fixture launches `sh` which launches node which is why we
- // are looking for two processes.
- // Important: IDKW but MacOS seems to skip the `sh` process. no idea.
- t.equal(pids.length, runCallCount * 2);
- t.end();
- });
- }, 1000);
-}
-
-test('can read full process tree', (t) => {
- testTree(t, 1);
-});
-test('can read full process tree with multiple processes', (t) => {
- testTree(t, 2);
-});
diff --git a/src/node_modules/raw-body/HISTORY.md b/src/node_modules/raw-body/HISTORY.md
index 0b6b837..baf0e2d 100644
--- a/src/node_modules/raw-body/HISTORY.md
+++ b/src/node_modules/raw-body/HISTORY.md
@@ -1,3 +1,8 @@
+2.5.2 / 2023-02-21
+==================
+
+ * Fix error message for non-stream argument
+
2.5.1 / 2022-02-28
==================
diff --git a/src/node_modules/raw-body/README.md b/src/node_modules/raw-body/README.md
index 695c660..d9b36d6 100644
--- a/src/node_modules/raw-body/README.md
+++ b/src/node_modules/raw-body/README.md
@@ -219,5 +219,5 @@ server.listen(3000);
[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master
[downloads-image]: https://img.shields.io/npm/dm/raw-body.svg
[downloads-url]: https://npmjs.org/package/raw-body
-[github-actions-ci-image]: https://img.shields.io/github/workflow/status/stream-utils/raw-body/ci/master?label=ci
+[github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/stream-utils/raw-body/ci.yml?branch=master&label=ci
[github-actions-ci-url]: https://github.com/jshttp/stream-utils/raw-body?query=workflow%3Aci
diff --git a/src/node_modules/raw-body/index.js b/src/node_modules/raw-body/index.js
index a8f537f..9cdcd12 100644
--- a/src/node_modules/raw-body/index.js
+++ b/src/node_modules/raw-body/index.js
@@ -69,6 +69,13 @@ function getRawBody (stream, options, callback) {
var done = callback
var opts = options || {}
+ // light validation
+ if (stream === undefined) {
+ throw new TypeError('argument stream is required')
+ } else if (typeof stream !== 'object' || stream === null || typeof stream.on !== 'function') {
+ throw new TypeError('argument stream must be a stream')
+ }
+
if (options === true || typeof options === 'string') {
// short cut for encoding
opts = {
diff --git a/src/node_modules/raw-body/package.json b/src/node_modules/raw-body/package.json
index 50fc90a..aabb1c3 100644
--- a/src/node_modules/raw-body/package.json
+++ b/src/node_modules/raw-body/package.json
@@ -1,7 +1,7 @@
{
"name": "raw-body",
"description": "Get and validate the raw body of a readable stream.",
- "version": "2.5.1",
+ "version": "2.5.2",
"author": "Jonathan Ong (http://jongleberry.com)",
"contributors": [
"Douglas Christopher Wilson ",
@@ -17,14 +17,14 @@
},
"devDependencies": {
"bluebird": "3.7.2",
- "eslint": "7.32.0",
- "eslint-config-standard": "14.1.1",
- "eslint-plugin-import": "2.25.4",
- "eslint-plugin-markdown": "2.2.1",
+ "eslint": "8.34.0",
+ "eslint-config-standard": "15.0.1",
+ "eslint-plugin-import": "2.27.5",
+ "eslint-plugin-markdown": "3.0.0",
"eslint-plugin-node": "11.1.0",
- "eslint-plugin-promise": "5.2.0",
+ "eslint-plugin-promise": "6.1.1",
"eslint-plugin-standard": "4.1.0",
- "mocha": "9.2.1",
+ "mocha": "10.2.0",
"nyc": "15.1.0",
"readable-stream": "2.3.7",
"safe-buffer": "5.2.1"
diff --git a/src/node_modules/readdirp/LICENSE b/src/node_modules/readdirp/LICENSE
deleted file mode 100644
index 037cbb4..0000000
--- a/src/node_modules/readdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/src/node_modules/readdirp/README.md b/src/node_modules/readdirp/README.md
deleted file mode 100644
index 465593c..0000000
--- a/src/node_modules/readdirp/README.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# readdirp [](https://github.com/paulmillr/readdirp)
-
-Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**.
-
-
-```sh
-npm install readdirp
-```
-
-```javascript
-const readdirp = require('readdirp');
-
-// Use streams to achieve small RAM & CPU footprint.
-// 1) Streams example with for-await.
-for await (const entry of readdirp('.')) {
- const {path} = entry;
- console.log(`${JSON.stringify({path})}`);
-}
-
-// 2) Streams example, non for-await.
-// Print out all JS files along with their size within the current folder & subfolders.
-readdirp('.', {fileFilter: '*.js', alwaysStat: true})
- .on('data', (entry) => {
- const {path, stats: {size}} = entry;
- console.log(`${JSON.stringify({path, size})}`);
- })
- // Optionally call stream.destroy() in `warn()` in order to abort and cause 'close' to be emitted
- .on('warn', error => console.error('non-fatal error', error))
- .on('error', error => console.error('fatal error', error))
- .on('end', () => console.log('done'));
-
-// 3) Promise example. More RAM and CPU than streams / for-await.
-const files = await readdirp.promise('.');
-console.log(files.map(file => file.path));
-
-// Other options.
-readdirp('test', {
- fileFilter: '*.js',
- directoryFilter: ['!.git', '!*modules']
- // directoryFilter: (di) => di.basename.length === 9
- type: 'files_directories',
- depth: 1
-});
-```
-
-For more examples, check out `examples` directory.
-
-## API
-
-`const stream = readdirp(root[, options])` — **Stream API**
-
-- Reads given root recursively and returns a `stream` of [entry infos](#entryinfo)
-- Optionally can be used like `for await (const entry of stream)` with node.js 10+ (`asyncIterator`).
-- `on('data', (entry) => {})` [entry info](#entryinfo) for every file / dir.
-- `on('warn', (error) => {})` non-fatal `Error` that prevents a file / dir from being processed. Example: inaccessible to the user.
-- `on('error', (error) => {})` fatal `Error` which also ends the stream. Example: illegal options where passed.
-- `on('end')` — we are done. Called when all entries were found and no more will be emitted.
-- `on('close')` — stream is destroyed via `stream.destroy()`.
- Could be useful if you want to manually abort even on a non fatal error.
- At that point the stream is no longer `readable` and no more entries, warning or errors are emitted
-- To learn more about streams, consult the very detailed [nodejs streams documentation](https://nodejs.org/api/stream.html)
- or the [stream-handbook](https://github.com/substack/stream-handbook)
-
-`const entries = await readdirp.promise(root[, options])` — **Promise API**. Returns a list of [entry infos](#entryinfo).
-
-First argument is awalys `root`, path in which to start reading and recursing into subdirectories.
-
-### options
-
-- `fileFilter: ["*.js"]`: filter to include or exclude files. A `Function`, Glob string or Array of glob strings.
- - **Function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry
- - **Glob string**: a string (e.g., `*.js`) which is matched using [picomatch](https://github.com/micromatch/picomatch), so go there for more
- information. Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files.
- - **Array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown.
- `['*.json', '*.js']` includes all JavaScript and Json files.
- `['!.git', '!node_modules']` includes all directories except the '.git' and 'node_modules'.
- - Directories that do not pass a filter will not be recursed into.
-- `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into.
-- `depth: 5`: depth at which to stop recursing even if more subdirectories are found
-- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes.
-- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0.
-- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat`
-
-### `EntryInfo`
-
-Has the following properties:
-
-- `path: 'assets/javascripts/react.js'`: path to the file/directory (relative to given root)
-- `fullPath: '/Users/dev/projects/app/assets/javascripts/react.js'`: full path to the file/directory found
-- `basename: 'react.js'`: name of the file/directory
-- `dirent: fs.Dirent`: built-in [dir entry object](https://nodejs.org/api/fs.html#fs_class_fs_dirent) - only with `alwaysStat: false`
-- `stats: fs.Stats`: built in [stat object](https://nodejs.org/api/fs.html#fs_class_fs_stats) - only with `alwaysStat: true`
-
-## Changelog
-
-- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks.
- Before, it could have entered infinite loop.
-- 3.4 (Mar 19, 2020) adds support for directory-based symlinks.
-- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping.
-- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic.
-- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions".
-- 3.0 brings huge performance improvements and stream backpressure support.
-- Upgrading 2.x to 3.x:
- - Signature changed from `readdirp(options)` to `readdirp(root, options)`
- - Replaced callback API with promise API.
- - Renamed `entryType` option to `type`
- - Renamed `entryType: 'both'` to `'files_directories'`
- - `EntryInfo`
- - Renamed `stat` to `stats`
- - Emitted only when `alwaysStat: true`
- - `dirent` is emitted instead of `stats` by default with `alwaysStat: false`
- - Renamed `name` to `basename`
- - Removed `parentDir` and `fullParentDir` properties
-- Supported node.js versions:
- - 3.x: node 8+
- - 2.x: node 0.6+
-
-## License
-
-Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller ()
-
-MIT License, see [LICENSE](LICENSE) file.
diff --git a/src/node_modules/readdirp/index.d.ts b/src/node_modules/readdirp/index.d.ts
deleted file mode 100644
index cbbd76c..0000000
--- a/src/node_modules/readdirp/index.d.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-// TypeScript Version: 3.2
-
-///
-
-import * as fs from 'fs';
-import { Readable } from 'stream';
-
-declare namespace readdir {
- interface EntryInfo {
- path: string;
- fullPath: string;
- basename: string;
- stats?: fs.Stats;
- dirent?: fs.Dirent;
- }
-
- interface ReaddirpOptions {
- root?: string;
- fileFilter?: string | string[] | ((entry: EntryInfo) => boolean);
- directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean);
- type?: 'files' | 'directories' | 'files_directories' | 'all';
- lstat?: boolean;
- depth?: number;
- alwaysStat?: boolean;
- }
-
- interface ReaddirpStream extends Readable, AsyncIterable {
- read(): EntryInfo;
- [Symbol.asyncIterator](): AsyncIterableIterator;
- }
-
- function promise(
- root: string,
- options?: ReaddirpOptions
- ): Promise;
-}
-
-declare function readdir(
- root: string,
- options?: readdir.ReaddirpOptions
-): readdir.ReaddirpStream;
-
-export = readdir;
diff --git a/src/node_modules/readdirp/index.js b/src/node_modules/readdirp/index.js
deleted file mode 100644
index cf739b2..0000000
--- a/src/node_modules/readdirp/index.js
+++ /dev/null
@@ -1,287 +0,0 @@
-'use strict';
-
-const fs = require('fs');
-const { Readable } = require('stream');
-const sysPath = require('path');
-const { promisify } = require('util');
-const picomatch = require('picomatch');
-
-const readdir = promisify(fs.readdir);
-const stat = promisify(fs.stat);
-const lstat = promisify(fs.lstat);
-const realpath = promisify(fs.realpath);
-
-/**
- * @typedef {Object} EntryInfo
- * @property {String} path
- * @property {String} fullPath
- * @property {fs.Stats=} stats
- * @property {fs.Dirent=} dirent
- * @property {String} basename
- */
-
-const BANG = '!';
-const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
-const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
-const FILE_TYPE = 'files';
-const DIR_TYPE = 'directories';
-const FILE_DIR_TYPE = 'files_directories';
-const EVERYTHING_TYPE = 'all';
-const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];
-
-const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code);
-const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10));
-const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5));
-
-const normalizeFilter = filter => {
- if (filter === undefined) return;
- if (typeof filter === 'function') return filter;
-
- if (typeof filter === 'string') {
- const glob = picomatch(filter.trim());
- return entry => glob(entry.basename);
- }
-
- if (Array.isArray(filter)) {
- const positive = [];
- const negative = [];
- for (const item of filter) {
- const trimmed = item.trim();
- if (trimmed.charAt(0) === BANG) {
- negative.push(picomatch(trimmed.slice(1)));
- } else {
- positive.push(picomatch(trimmed));
- }
- }
-
- if (negative.length > 0) {
- if (positive.length > 0) {
- return entry =>
- positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename));
- }
- return entry => !negative.some(f => f(entry.basename));
- }
- return entry => positive.some(f => f(entry.basename));
- }
-};
-
-class ReaddirpStream extends Readable {
- static get defaultOptions() {
- return {
- root: '.',
- /* eslint-disable no-unused-vars */
- fileFilter: (path) => true,
- directoryFilter: (path) => true,
- /* eslint-enable no-unused-vars */
- type: FILE_TYPE,
- lstat: false,
- depth: 2147483648,
- alwaysStat: false
- };
- }
-
- constructor(options = {}) {
- super({
- objectMode: true,
- autoDestroy: true,
- highWaterMark: options.highWaterMark || 4096
- });
- const opts = { ...ReaddirpStream.defaultOptions, ...options };
- const { root, type } = opts;
-
- this._fileFilter = normalizeFilter(opts.fileFilter);
- this._directoryFilter = normalizeFilter(opts.directoryFilter);
-
- const statMethod = opts.lstat ? lstat : stat;
- // Use bigint stats if it's windows and stat() supports options (node 10+).
- if (wantBigintFsStats) {
- this._stat = path => statMethod(path, { bigint: true });
- } else {
- this._stat = statMethod;
- }
-
- this._maxDepth = opts.depth;
- this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);
- this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);
- this._wantsEverything = type === EVERYTHING_TYPE;
- this._root = sysPath.resolve(root);
- this._isDirent = ('Dirent' in fs) && !opts.alwaysStat;
- this._statsProp = this._isDirent ? 'dirent' : 'stats';
- this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };
-
- // Launch stream with one parent, the root dir.
- this.parents = [this._exploreDir(root, 1)];
- this.reading = false;
- this.parent = undefined;
- }
-
- async _read(batch) {
- if (this.reading) return;
- this.reading = true;
-
- try {
- while (!this.destroyed && batch > 0) {
- const { path, depth, files = [] } = this.parent || {};
-
- if (files.length > 0) {
- const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path));
- for (const entry of await Promise.all(slice)) {
- if (this.destroyed) return;
-
- const entryType = await this._getEntryType(entry);
- if (entryType === 'directory' && this._directoryFilter(entry)) {
- if (depth <= this._maxDepth) {
- this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
- }
-
- if (this._wantsDir) {
- this.push(entry);
- batch--;
- }
- } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) {
- if (this._wantsFile) {
- this.push(entry);
- batch--;
- }
- }
- }
- } else {
- const parent = this.parents.pop();
- if (!parent) {
- this.push(null);
- break;
- }
- this.parent = await parent;
- if (this.destroyed) return;
- }
- }
- } catch (error) {
- this.destroy(error);
- } finally {
- this.reading = false;
- }
- }
-
- async _exploreDir(path, depth) {
- let files;
- try {
- files = await readdir(path, this._rdOptions);
- } catch (error) {
- this._onError(error);
- }
- return { files, depth, path };
- }
-
- async _formatEntry(dirent, path) {
- let entry;
- try {
- const basename = this._isDirent ? dirent.name : dirent;
- const fullPath = sysPath.resolve(sysPath.join(path, basename));
- entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename };
- entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
- } catch (err) {
- this._onError(err);
- }
- return entry;
- }
-
- _onError(err) {
- if (isNormalFlowError(err) && !this.destroyed) {
- this.emit('warn', err);
- } else {
- this.destroy(err);
- }
- }
-
- async _getEntryType(entry) {
- // entry may be undefined, because a warning or an error were emitted
- // and the statsProp is undefined
- const stats = entry && entry[this._statsProp];
- if (!stats) {
- return;
- }
- if (stats.isFile()) {
- return 'file';
- }
- if (stats.isDirectory()) {
- return 'directory';
- }
- if (stats && stats.isSymbolicLink()) {
- const full = entry.fullPath;
- try {
- const entryRealPath = await realpath(full);
- const entryRealPathStats = await lstat(entryRealPath);
- if (entryRealPathStats.isFile()) {
- return 'file';
- }
- if (entryRealPathStats.isDirectory()) {
- const len = entryRealPath.length;
- if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) {
- const recursiveError = new Error(
- `Circular symlink detected: "${full}" points to "${entryRealPath}"`
- );
- recursiveError.code = RECURSIVE_ERROR_CODE;
- return this._onError(recursiveError);
- }
- return 'directory';
- }
- } catch (error) {
- this._onError(error);
- }
- }
- }
-
- _includeAsFile(entry) {
- const stats = entry && entry[this._statsProp];
-
- return stats && this._wantsEverything && !stats.isDirectory();
- }
-}
-
-/**
- * @typedef {Object} ReaddirpArguments
- * @property {Function=} fileFilter
- * @property {Function=} directoryFilter
- * @property {String=} type
- * @property {Number=} depth
- * @property {String=} root
- * @property {Boolean=} lstat
- * @property {Boolean=} bigint
- */
-
-/**
- * Main function which ends up calling readdirRec and reads all files and directories in given root recursively.
- * @param {String} root Root directory
- * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth
- */
-const readdirp = (root, options = {}) => {
- let type = options.entryType || options.type;
- if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility
- if (type) options.type = type;
- if (!root) {
- throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');
- } else if (typeof root !== 'string') {
- throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)');
- } else if (type && !ALL_TYPES.includes(type)) {
- throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);
- }
-
- options.root = root;
- return new ReaddirpStream(options);
-};
-
-const readdirpPromise = (root, options = {}) => {
- return new Promise((resolve, reject) => {
- const files = [];
- readdirp(root, options)
- .on('data', entry => files.push(entry))
- .on('end', () => resolve(files))
- .on('error', error => reject(error));
- });
-};
-
-readdirp.promise = readdirpPromise;
-readdirp.ReaddirpStream = ReaddirpStream;
-readdirp.default = readdirp;
-
-module.exports = readdirp;
diff --git a/src/node_modules/readdirp/package.json b/src/node_modules/readdirp/package.json
deleted file mode 100644
index dba5388..0000000
--- a/src/node_modules/readdirp/package.json
+++ /dev/null
@@ -1,122 +0,0 @@
-{
- "name": "readdirp",
- "description": "Recursive version of fs.readdir with streaming API.",
- "version": "3.6.0",
- "homepage": "https://github.com/paulmillr/readdirp",
- "repository": {
- "type": "git",
- "url": "git://github.com/paulmillr/readdirp.git"
- },
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/paulmillr/readdirp/issues"
- },
- "author": "Thorsten Lorenz (thlorenz.com)",
- "contributors": [
- "Thorsten Lorenz (thlorenz.com)",
- "Paul Miller (https://paulmillr.com)"
- ],
- "main": "index.js",
- "engines": {
- "node": ">=8.10.0"
- },
- "files": [
- "index.js",
- "index.d.ts"
- ],
- "keywords": [
- "recursive",
- "fs",
- "stream",
- "streams",
- "readdir",
- "filesystem",
- "find",
- "filter"
- ],
- "scripts": {
- "dtslint": "dtslint",
- "nyc": "nyc",
- "mocha": "mocha --exit",
- "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
- "test": "npm run lint && nyc npm run mocha"
- },
- "dependencies": {
- "picomatch": "^2.2.1"
- },
- "devDependencies": {
- "@types/node": "^14",
- "chai": "^4.2",
- "chai-subset": "^1.6",
- "dtslint": "^3.3.0",
- "eslint": "^7.0.0",
- "mocha": "^7.1.1",
- "nyc": "^15.0.0",
- "rimraf": "^3.0.0",
- "typescript": "^4.0.3"
- },
- "nyc": {
- "reporter": [
- "html",
- "text"
- ]
- },
- "eslintConfig": {
- "root": true,
- "extends": "eslint:recommended",
- "parserOptions": {
- "ecmaVersion": 9,
- "sourceType": "script"
- },
- "env": {
- "node": true,
- "es6": true
- },
- "rules": {
- "array-callback-return": "error",
- "no-empty": [
- "error",
- {
- "allowEmptyCatch": true
- }
- ],
- "no-else-return": [
- "error",
- {
- "allowElseIf": false
- }
- ],
- "no-lonely-if": "error",
- "no-var": "error",
- "object-shorthand": "error",
- "prefer-arrow-callback": [
- "error",
- {
- "allowNamedFunctions": true
- }
- ],
- "prefer-const": [
- "error",
- {
- "ignoreReadBeforeAssign": true
- }
- ],
- "prefer-destructuring": [
- "error",
- {
- "object": true,
- "array": false
- }
- ],
- "prefer-spread": "error",
- "prefer-template": "error",
- "radix": "error",
- "semi": "error",
- "strict": "error",
- "quotes": [
- "error",
- "single"
- ]
- }
- }
-}
diff --git a/src/node_modules/semver/CHANGELOG.md b/src/node_modules/semver/CHANGELOG.md
deleted file mode 100644
index 66304fd..0000000
--- a/src/node_modules/semver/CHANGELOG.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# changes log
-
-## 5.7
-
-* Add `minVersion` method
-
-## 5.6
-
-* Move boolean `loose` param to an options object, with
- backwards-compatibility protection.
-* Add ability to opt out of special prerelease version handling with
- the `includePrerelease` option flag.
-
-## 5.5
-
-* Add version coercion capabilities
-
-## 5.4
-
-* Add intersection checking
-
-## 5.3
-
-* Add `minSatisfying` method
-
-## 5.2
-
-* Add `prerelease(v)` that returns prerelease components
-
-## 5.1
-
-* Add Backus-Naur for ranges
-* Remove excessively cute inspection methods
-
-## 5.0
-
-* Remove AMD/Browserified build artifacts
-* Fix ltr and gtr when using the `*` range
-* Fix for range `*` with a prerelease identifier
diff --git a/src/node_modules/semver/LICENSE b/src/node_modules/semver/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/src/node_modules/semver/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/src/node_modules/semver/README.md b/src/node_modules/semver/README.md
deleted file mode 100644
index f8dfa5a..0000000
--- a/src/node_modules/semver/README.md
+++ /dev/null
@@ -1,412 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Install
-
-```bash
-npm install --save semver
-````
-
-## Usage
-
-As a node module:
-
-```js
-const semver = require('semver')
-
-semver.valid('1.2.3') // '1.2.3'
-semver.valid('a.b.c') // null
-semver.clean(' =v1.2.3 ') // '1.2.3'
-semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
-semver.gt('1.2.3', '9.8.7') // false
-semver.lt('1.2.3', '9.8.7') // true
-semver.minVersion('>=1.0.0') // '1.0.0'
-semver.valid(semver.coerce('v2')) // '2.0.0'
-semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
-```
-
-As a command-line utility:
-
-```
-$ semver -h
-
-A JavaScript implementation of the https://semver.org/ specification
-Copyright Isaac Z. Schlueter
-
-Usage: semver [options] [ [...]]
-Prints valid versions sorted by SemVer precedence
-
-Options:
--r --range
- Print versions that match the specified range.
-
--i --increment []
- Increment a version by the specified level. Level can
- be one of: major, minor, patch, premajor, preminor,
- prepatch, or prerelease. Default level is 'patch'.
- Only one version may be specified.
-
---preid
- Identifier to be used to prefix premajor, preminor,
- prepatch or prerelease version increments.
-
--l --loose
- Interpret versions and ranges loosely
-
--p --include-prerelease
- Always include prerelease versions in range matching
-
--c --coerce
- Coerce a string into SemVer if possible
- (does not imply --loose)
-
-Program exits successfully if any valid version satisfies
-all supplied ranges, and prints all satisfying versions.
-
-If no satisfying versions are found, then exits failure.
-
-Versions are printed in ascending order, so supplying
-multiple versions to the utility will just sort them.
-```
-
-## Versions
-
-A "version" is described by the `v2.0.0` specification found at
-.
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Ranges
-
-A `version range` is a set of `comparators` which specify versions
-that satisfy the range.
-
-A `comparator` is composed of an `operator` and a `version`. The set
-of primitive `operators` is:
-
-* `<` Less than
-* `<=` Less than or equal to
-* `>` Greater than
-* `>=` Greater than or equal to
-* `=` Equal. If no operator is specified, then equality is assumed,
- so this operator is optional, but MAY be included.
-
-For example, the comparator `>=1.2.7` would match the versions
-`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
-or `1.1.0`.
-
-Comparators can be joined by whitespace to form a `comparator set`,
-which is satisfied by the **intersection** of all of the comparators
-it includes.
-
-A range is composed of one or more comparator sets, joined by `||`. A
-version matches a range if and only if every comparator in at least
-one of the `||`-separated comparator sets is satisfied by the version.
-
-For example, the range `>=1.2.7 <1.3.0` would match the versions
-`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
-or `1.1.0`.
-
-The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
-`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
-
-### Prerelease Tags
-
-If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
-it will only be allowed to satisfy comparator sets if at least one
-comparator with the same `[major, minor, patch]` tuple also has a
-prerelease tag.
-
-For example, the range `>1.2.3-alpha.3` would be allowed to match the
-version `1.2.3-alpha.7`, but it would *not* be satisfied by
-`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
-than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
-range only accepts prerelease tags on the `1.2.3` version. The
-version `3.4.5` *would* satisfy the range, because it does not have a
-prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
-
-The purpose for this behavior is twofold. First, prerelease versions
-frequently are updated very quickly, and contain many breaking changes
-that are (by the author's design) not yet fit for public consumption.
-Therefore, by default, they are excluded from range matching
-semantics.
-
-Second, a user who has opted into using a prerelease version has
-clearly indicated the intent to use *that specific* set of
-alpha/beta/rc versions. By including a prerelease tag in the range,
-the user is indicating that they are aware of the risk. However, it
-is still not appropriate to assume that they have opted into taking a
-similar risk on the *next* set of prerelease versions.
-
-Note that this behavior can be suppressed (treating all prerelease
-versions as if they were normal versions, for the purpose of range
-matching) by setting the `includePrerelease` flag on the options
-object to any
-[functions](https://github.com/npm/node-semver#functions) that do
-range matching.
-
-#### Prerelease Identifiers
-
-The method `.inc` takes an additional `identifier` string argument that
-will append the value of the string as a prerelease identifier:
-
-```javascript
-semver.inc('1.2.3', 'prerelease', 'beta')
-// '1.2.4-beta.0'
-```
-
-command-line example:
-
-```bash
-$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-```
-
-Which then can be used to increment further:
-
-```bash
-$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-```
-
-### Advanced Range Syntax
-
-Advanced range syntax desugars to primitive comparators in
-deterministic ways.
-
-Advanced ranges may be combined in the same way as primitive
-comparators using white space or `||`.
-
-#### Hyphen Ranges `X.Y.Z - A.B.C`
-
-Specifies an inclusive set.
-
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-
-If a partial version is provided as the first version in the inclusive
-range, then the missing pieces are replaced with zeroes.
-
-* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
-
-If a partial version is provided as the second version in the
-inclusive range, then all versions that start with the supplied parts
-of the tuple are accepted, but nothing that would be greater than the
-provided tuple parts.
-
-* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
-* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
-
-#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
-
-Any of `X`, `x`, or `*` may be used to "stand in" for one of the
-numeric values in the `[major, minor, patch]` tuple.
-
-* `*` := `>=0.0.0` (Any version satisfies)
-* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
-* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
-
-A partial version range is treated as an X-Range, so the special
-character is in fact optional.
-
-* `""` (empty string) := `*` := `>=0.0.0`
-* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
-* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
-
-#### Tilde Ranges `~1.2.3` `~1.2` `~1`
-
-Allows patch-level changes if a minor version is specified on the
-comparator. Allows minor-level changes if not.
-
-* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
-* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
-* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
-* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
-* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
-* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-
-#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
-
-Allows changes that do not modify the left-most non-zero digit in the
-`[major, minor, patch]` tuple. In other words, this allows patch and
-minor updates for versions `1.0.0` and above, patch updates for
-versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
-
-Many authors treat a `0.x` version as if the `x` were the major
-"breaking-change" indicator.
-
-Caret ranges are ideal when an author may make breaking changes
-between `0.2.4` and `0.3.0` releases, which is a common practice.
-However, it presumes that there will *not* be breaking changes between
-`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
-additive (but non-breaking), according to commonly observed practices.
-
-* `^1.2.3` := `>=1.2.3 <2.0.0`
-* `^0.2.3` := `>=0.2.3 <0.3.0`
-* `^0.0.3` := `>=0.0.3 <0.0.4`
-* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
- `0.0.3` version *only* will be allowed, if they are greater than or
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
-
-When parsing caret ranges, a missing `patch` value desugars to the
-number `0`, but will allow flexibility within that value, even if the
-major and minor versions are both `0`.
-
-* `^1.2.x` := `>=1.2.0 <2.0.0`
-* `^0.0.x` := `>=0.0.0 <0.1.0`
-* `^0.0` := `>=0.0.0 <0.1.0`
-
-A missing `minor` and `patch` values will desugar to zero, but also
-allow flexibility within those values, even if the major version is
-zero.
-
-* `^1.x` := `>=1.0.0 <2.0.0`
-* `^0.x` := `>=0.0.0 <1.0.0`
-
-### Range Grammar
-
-Putting all this together, here is a Backus-Naur grammar for ranges,
-for the benefit of parser authors:
-
-```bnf
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
-```
-
-## Functions
-
-All methods and classes take a final `options` object argument. All
-options in this object are `false` by default. The options supported
-are:
-
-- `loose` Be more forgiving about not-quite-valid semver strings.
- (Any resulting output will always be 100% strict compliant, of
- course.) For backwards compatibility reasons, if the `options`
- argument is a boolean value instead of an object, it is interpreted
- to be the `loose` param.
-- `includePrerelease` Set to suppress the [default
- behavior](https://github.com/npm/node-semver#prerelease-tags) of
- excluding prerelease tagged versions from ranges unless they are
- explicitly opted into.
-
-Strict-mode Comparators and Ranges will be strict about the SemVer
-strings that they parse.
-
-* `valid(v)`: Return the parsed version, or null if it's not valid.
-* `inc(v, release)`: Return the version incremented by the release
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
- `prepatch`, or `prerelease`), or null if it's not valid
- * `premajor` in one call will bump the version up to the next major
- version and down to a prerelease of that major version.
- `preminor`, and `prepatch` work the same way.
- * If called from a non-prerelease version, the `prerelease` will work the
- same as `prepatch`. It increments the patch version, then makes a
- prerelease. If the input version is already a prerelease it simply
- increments it.
-* `prerelease(v)`: Returns an array of prerelease components, or null
- if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
-* `major(v)`: Return the major version number.
-* `minor(v)`: Return the minor version number.
-* `patch(v)`: Return the patch version number.
-* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
- or comparators intersect.
-* `parse(v)`: Attempt to parse a string as a semantic version, returning either
- a `SemVer` object or `null`.
-
-### Comparison
-
-* `gt(v1, v2)`: `v1 > v2`
-* `gte(v1, v2)`: `v1 >= v2`
-* `lt(v1, v2)`: `v1 < v2`
-* `lte(v1, v2)`: `v1 <= v2`
-* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
-* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
- in descending order when passed to `Array.sort()`.
-* `diff(v1, v2)`: Returns difference between two versions by the release type
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
- or null if the versions are the same.
-
-### Comparators
-
-* `intersects(comparator)`: Return true if the comparators intersect
-
-### Ranges
-
-* `validRange(range)`: Return the valid range or null if it's not valid
-* `satisfies(version, range)`: Return true if the version satisfies the
- range.
-* `maxSatisfying(versions, range)`: Return the highest version in the list
- that satisfies the range, or `null` if none of them do.
-* `minSatisfying(versions, range)`: Return the lowest version in the list
- that satisfies the range, or `null` if none of them do.
-* `minVersion(range)`: Return the lowest version that can possibly match
- the given range.
-* `gtr(version, range)`: Return `true` if version is greater than all the
- versions possible in the range.
-* `ltr(version, range)`: Return `true` if version is less than all the
- versions possible in the range.
-* `outside(version, range, hilo)`: Return true if the version is outside
- the bounds of the range in either the high or low direction. The
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
- the function called by `gtr` and `ltr`.)
-* `intersects(range)`: Return true if any of the ranges comparators intersect
-
-Note that, since ranges may be non-contiguous, a version might not be
-greater than a range, less than a range, *or* satisfy a range! For
-example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
-until `2.0.0`, so the version `1.2.10` would not be greater than the
-range (because `2.0.1` satisfies, which is higher), nor less than the
-range (since `1.2.8` satisfies, which is lower), and it also does not
-satisfy the range.
-
-If you want to know if a version satisfies or does not satisfy a
-range, use the `satisfies(version, range)` function.
-
-### Coercion
-
-* `coerce(version)`: Coerces a string to semver if possible
-
-This aims to provide a very forgiving translation of a non-semver string to
-semver. It looks for the first digit in a string, and consumes all
-remaining characters which satisfy at least a partial semver (e.g., `1`,
-`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
-versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
-surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
-`3.4.0`). Only text which lacks digits will fail coercion (`version one`
-is not valid). The maximum length for any semver component considered for
-coercion is 16 characters; longer components will be ignored
-(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
-semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
-components are invalid (`9999999999999999.4.7.4` is likely invalid).
diff --git a/src/node_modules/semver/bin/semver b/src/node_modules/semver/bin/semver
deleted file mode 100755
index 801e77f..0000000
--- a/src/node_modules/semver/bin/semver
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-var argv = process.argv.slice(2)
-
-var versions = []
-
-var range = []
-
-var inc = null
-
-var version = require('../package.json').version
-
-var loose = false
-
-var includePrerelease = false
-
-var coerce = false
-
-var identifier
-
-var semver = require('../semver')
-
-var reverse = false
-
-var options = {}
-
-main()
-
-function main () {
- if (!argv.length) return help()
- while (argv.length) {
- var a = argv.shift()
- var indexOfEqualSign = a.indexOf('=')
- if (indexOfEqualSign !== -1) {
- a = a.slice(0, indexOfEqualSign)
- argv.unshift(a.slice(indexOfEqualSign + 1))
- }
- switch (a) {
- case '-rv': case '-rev': case '--rev': case '--reverse':
- reverse = true
- break
- case '-l': case '--loose':
- loose = true
- break
- case '-p': case '--include-prerelease':
- includePrerelease = true
- break
- case '-v': case '--version':
- versions.push(argv.shift())
- break
- case '-i': case '--inc': case '--increment':
- switch (argv[0]) {
- case 'major': case 'minor': case 'patch': case 'prerelease':
- case 'premajor': case 'preminor': case 'prepatch':
- inc = argv.shift()
- break
- default:
- inc = 'patch'
- break
- }
- break
- case '--preid':
- identifier = argv.shift()
- break
- case '-r': case '--range':
- range.push(argv.shift())
- break
- case '-c': case '--coerce':
- coerce = true
- break
- case '-h': case '--help': case '-?':
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- var options = { loose: loose, includePrerelease: includePrerelease }
-
- versions = versions.map(function (v) {
- return coerce ? (semver.coerce(v) || { version: v }).version : v
- }).filter(function (v) {
- return semver.valid(v)
- })
- if (!versions.length) return fail()
- if (inc && (versions.length !== 1 || range.length)) { return failInc() }
-
- for (var i = 0, l = range.length; i < l; i++) {
- versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i], options)
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-function failInc () {
- console.error('--inc can only be used on a single version with no range')
- fail()
-}
-
-function fail () { process.exit(1) }
-
-function success () {
- var compare = reverse ? 'rcompare' : 'compare'
- versions.sort(function (a, b) {
- return semver[compare](a, b, options)
- }).map(function (v) {
- return semver.clean(v, options)
- }).map(function (v) {
- return inc ? semver.inc(v, inc, options, identifier) : v
- }).forEach(function (v, i, _) { console.log(v) })
-}
-
-function help () {
- console.log(['SemVer ' + version,
- '',
- 'A JavaScript implementation of the https://semver.org/ specification',
- 'Copyright Isaac Z. Schlueter',
- '',
- 'Usage: semver [options] [ [...]]',
- 'Prints valid versions sorted by SemVer precedence',
- '',
- 'Options:',
- '-r --range ',
- ' Print versions that match the specified range.',
- '',
- '-i --increment []',
- ' Increment a version by the specified level. Level can',
- ' be one of: major, minor, patch, premajor, preminor,',
- " prepatch, or prerelease. Default level is 'patch'.",
- ' Only one version may be specified.',
- '',
- '--preid ',
- ' Identifier to be used to prefix premajor, preminor,',
- ' prepatch or prerelease version increments.',
- '',
- '-l --loose',
- ' Interpret versions and ranges loosely',
- '',
- '-p --include-prerelease',
- ' Always include prerelease versions in range matching',
- '',
- '-c --coerce',
- ' Coerce a string into SemVer if possible',
- ' (does not imply --loose)',
- '',
- 'Program exits successfully if any valid version satisfies',
- 'all supplied ranges, and prints all satisfying versions.',
- '',
- 'If no satisfying versions are found, then exits failure.',
- '',
- 'Versions are printed in ascending order, so supplying',
- 'multiple versions to the utility will just sort them.'
- ].join('\n'))
-}
diff --git a/src/node_modules/semver/package.json b/src/node_modules/semver/package.json
deleted file mode 100644
index 69d2db1..0000000
--- a/src/node_modules/semver/package.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "semver",
- "version": "5.7.1",
- "description": "The semantic version parser used by npm.",
- "main": "semver.js",
- "scripts": {
- "test": "tap",
- "preversion": "npm test",
- "postversion": "npm publish",
- "postpublish": "git push origin --all; git push origin --tags"
- },
- "devDependencies": {
- "tap": "^13.0.0-rc.18"
- },
- "license": "ISC",
- "repository": "https://github.com/npm/node-semver",
- "bin": {
- "semver": "./bin/semver"
- },
- "files": [
- "bin",
- "range.bnf",
- "semver.js"
- ],
- "tap": {
- "check-coverage": true
- }
-}
diff --git a/src/node_modules/semver/range.bnf b/src/node_modules/semver/range.bnf
deleted file mode 100644
index d4c6ae0..0000000
--- a/src/node_modules/semver/range.bnf
+++ /dev/null
@@ -1,16 +0,0 @@
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | [1-9] ( [0-9] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
diff --git a/src/node_modules/semver/semver.js b/src/node_modules/semver/semver.js
deleted file mode 100644
index d315d5d..0000000
--- a/src/node_modules/semver/semver.js
+++ /dev/null
@@ -1,1483 +0,0 @@
-exports = module.exports = SemVer
-
-var debug
-/* istanbul ignore next */
-if (typeof process === 'object' &&
- process.env &&
- process.env.NODE_DEBUG &&
- /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
- debug = function () {
- var args = Array.prototype.slice.call(arguments, 0)
- args.unshift('SEMVER')
- console.log.apply(console, args)
- }
-} else {
- debug = function () {}
-}
-
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0'
-
-var MAX_LENGTH = 256
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
- /* istanbul ignore next */ 9007199254740991
-
-// Max safe segment length for coercion.
-var MAX_SAFE_COMPONENT_LENGTH = 16
-
-// The actual regexps go on exports.re
-var re = exports.re = []
-var src = exports.src = []
-var R = 0
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-var NUMERICIDENTIFIER = R++
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'
-var NUMERICIDENTIFIERLOOSE = R++
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-var NONNUMERICIDENTIFIER = R++
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-var MAINVERSION = R++
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')'
-
-var MAINVERSIONLOOSE = R++
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')'
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-var PRERELEASEIDENTIFIER = R++
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')'
-
-var PRERELEASEIDENTIFIERLOOSE = R++
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')'
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-var PRERELEASE = R++
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'
-
-var PRERELEASELOOSE = R++
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-var BUILDIDENTIFIER = R++
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-var BUILD = R++
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-var FULL = R++
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?'
-
-src[FULL] = '^' + FULLPLAIN + '$'
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?'
-
-var LOOSE = R++
-src[LOOSE] = '^' + LOOSEPLAIN + '$'
-
-var GTLT = R++
-src[GTLT] = '((?:<|>)?=?)'
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
-var XRANGEIDENTIFIER = R++
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'
-
-var XRANGEPLAIN = R++
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?'
-
-var XRANGEPLAINLOOSE = R++
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?'
-
-var XRANGE = R++
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'
-var XRANGELOOSE = R++
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'
-
-// Coercion.
-// Extract anything that could conceivably be a part of a valid semver
-var COERCE = R++
-src[COERCE] = '(?:^|[^\\d])' +
- '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
- '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
- '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
- '(?:$|[^\\d])'
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++
-src[LONETILDE] = '(?:~>?)'
-
-var TILDETRIM = R++
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')
-var tildeTrimReplace = '$1~'
-
-var TILDE = R++
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'
-var TILDELOOSE = R++
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++
-src[LONECARET] = '(?:\\^)'
-
-var CARETTRIM = R++
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')
-var caretTrimReplace = '$1^'
-
-var CARET = R++
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'
-var CARETLOOSE = R++
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'
-var COMPARATOR = R++
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'
-
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')
-var comparatorTrimReplace = '$1$2$3'
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$'
-
-var HYPHENRANGELOOSE = R++
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$'
-
-// Star ranges basically just allow anything at all.
-var STAR = R++
-src[STAR] = '(<|>)?=?\\s*\\*'
-
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- debug(i, src[i])
- if (!re[i]) {
- re[i] = new RegExp(src[i])
- }
-}
-
-exports.parse = parse
-function parse (version, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (version instanceof SemVer) {
- return version
- }
-
- if (typeof version !== 'string') {
- return null
- }
-
- if (version.length > MAX_LENGTH) {
- return null
- }
-
- var r = options.loose ? re[LOOSE] : re[FULL]
- if (!r.test(version)) {
- return null
- }
-
- try {
- return new SemVer(version, options)
- } catch (er) {
- return null
- }
-}
-
-exports.valid = valid
-function valid (version, options) {
- var v = parse(version, options)
- return v ? v.version : null
-}
-
-exports.clean = clean
-function clean (version, options) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), options)
- return s ? s.version : null
-}
-
-exports.SemVer = SemVer
-
-function SemVer (version, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
- if (version instanceof SemVer) {
- if (version.loose === options.loose) {
- return version
- } else {
- version = version.version
- }
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version)
- }
-
- if (version.length > MAX_LENGTH) {
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
- }
-
- if (!(this instanceof SemVer)) {
- return new SemVer(version, options)
- }
-
- debug('SemVer', version, options)
- this.options = options
- this.loose = !!options.loose
-
- var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL])
-
- if (!m) {
- throw new TypeError('Invalid Version: ' + version)
- }
-
- this.raw = version
-
- // these are actually numbers
- this.major = +m[1]
- this.minor = +m[2]
- this.patch = +m[3]
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
- throw new TypeError('Invalid major version')
- }
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
- throw new TypeError('Invalid minor version')
- }
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
- throw new TypeError('Invalid patch version')
- }
-
- // numberify any prerelease numeric ids
- if (!m[4]) {
- this.prerelease = []
- } else {
- this.prerelease = m[4].split('.').map(function (id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
- return num
- }
- }
- return id
- })
- }
-
- this.build = m[5] ? m[5].split('.') : []
- this.format()
-}
-
-SemVer.prototype.format = function () {
- this.version = this.major + '.' + this.minor + '.' + this.patch
- if (this.prerelease.length) {
- this.version += '-' + this.prerelease.join('.')
- }
- return this.version
-}
-
-SemVer.prototype.toString = function () {
- return this.version
-}
-
-SemVer.prototype.compare = function (other) {
- debug('SemVer.compare', this.version, this.options, other)
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options)
- }
-
- return this.compareMain(other) || this.comparePre(other)
-}
-
-SemVer.prototype.compareMain = function (other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options)
- }
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch)
-}
-
-SemVer.prototype.comparePre = function (other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options)
- }
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length) {
- return -1
- } else if (!this.prerelease.length && other.prerelease.length) {
- return 1
- } else if (!this.prerelease.length && !other.prerelease.length) {
- return 0
- }
-
- var i = 0
- do {
- var a = this.prerelease[i]
- var b = other.prerelease[i]
- debug('prerelease compare', i, a, b)
- if (a === undefined && b === undefined) {
- return 0
- } else if (b === undefined) {
- return 1
- } else if (a === undefined) {
- return -1
- } else if (a === b) {
- continue
- } else {
- return compareIdentifiers(a, b)
- }
- } while (++i)
-}
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function (release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0
- this.patch = 0
- this.minor = 0
- this.major++
- this.inc('pre', identifier)
- break
- case 'preminor':
- this.prerelease.length = 0
- this.patch = 0
- this.minor++
- this.inc('pre', identifier)
- break
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0
- this.inc('patch', identifier)
- this.inc('pre', identifier)
- break
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0) {
- this.inc('patch', identifier)
- }
- this.inc('pre', identifier)
- break
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 ||
- this.patch !== 0 ||
- this.prerelease.length === 0) {
- this.major++
- }
- this.minor = 0
- this.patch = 0
- this.prerelease = []
- break
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0) {
- this.minor++
- }
- this.patch = 0
- this.prerelease = []
- break
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0) {
- this.patch++
- }
- this.prerelease = []
- break
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0) {
- this.prerelease = [0]
- } else {
- var i = this.prerelease.length
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++
- i = -2
- }
- }
- if (i === -1) {
- // didn't increment anything
- this.prerelease.push(0)
- }
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1])) {
- this.prerelease = [identifier, 0]
- }
- } else {
- this.prerelease = [identifier, 0]
- }
- }
- break
-
- default:
- throw new Error('invalid increment argument: ' + release)
- }
- this.format()
- this.raw = this.version
- return this
-}
-
-exports.inc = inc
-function inc (version, release, loose, identifier) {
- if (typeof (loose) === 'string') {
- identifier = loose
- loose = undefined
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version
- } catch (er) {
- return null
- }
-}
-
-exports.diff = diff
-function diff (version1, version2) {
- if (eq(version1, version2)) {
- return null
- } else {
- var v1 = parse(version1)
- var v2 = parse(version2)
- var prefix = ''
- if (v1.prerelease.length || v2.prerelease.length) {
- prefix = 'pre'
- var defaultResult = 'prerelease'
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return prefix + key
- }
- }
- }
- return defaultResult // may be undefined
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers
-
-var numeric = /^[0-9]+$/
-function compareIdentifiers (a, b) {
- var anum = numeric.test(a)
- var bnum = numeric.test(b)
-
- if (anum && bnum) {
- a = +a
- b = +b
- }
-
- return a === b ? 0
- : (anum && !bnum) ? -1
- : (bnum && !anum) ? 1
- : a < b ? -1
- : 1
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers
-function rcompareIdentifiers (a, b) {
- return compareIdentifiers(b, a)
-}
-
-exports.major = major
-function major (a, loose) {
- return new SemVer(a, loose).major
-}
-
-exports.minor = minor
-function minor (a, loose) {
- return new SemVer(a, loose).minor
-}
-
-exports.patch = patch
-function patch (a, loose) {
- return new SemVer(a, loose).patch
-}
-
-exports.compare = compare
-function compare (a, b, loose) {
- return new SemVer(a, loose).compare(new SemVer(b, loose))
-}
-
-exports.compareLoose = compareLoose
-function compareLoose (a, b) {
- return compare(a, b, true)
-}
-
-exports.rcompare = rcompare
-function rcompare (a, b, loose) {
- return compare(b, a, loose)
-}
-
-exports.sort = sort
-function sort (list, loose) {
- return list.sort(function (a, b) {
- return exports.compare(a, b, loose)
- })
-}
-
-exports.rsort = rsort
-function rsort (list, loose) {
- return list.sort(function (a, b) {
- return exports.rcompare(a, b, loose)
- })
-}
-
-exports.gt = gt
-function gt (a, b, loose) {
- return compare(a, b, loose) > 0
-}
-
-exports.lt = lt
-function lt (a, b, loose) {
- return compare(a, b, loose) < 0
-}
-
-exports.eq = eq
-function eq (a, b, loose) {
- return compare(a, b, loose) === 0
-}
-
-exports.neq = neq
-function neq (a, b, loose) {
- return compare(a, b, loose) !== 0
-}
-
-exports.gte = gte
-function gte (a, b, loose) {
- return compare(a, b, loose) >= 0
-}
-
-exports.lte = lte
-function lte (a, b, loose) {
- return compare(a, b, loose) <= 0
-}
-
-exports.cmp = cmp
-function cmp (a, op, b, loose) {
- switch (op) {
- case '===':
- if (typeof a === 'object')
- a = a.version
- if (typeof b === 'object')
- b = b.version
- return a === b
-
- case '!==':
- if (typeof a === 'object')
- a = a.version
- if (typeof b === 'object')
- b = b.version
- return a !== b
-
- case '':
- case '=':
- case '==':
- return eq(a, b, loose)
-
- case '!=':
- return neq(a, b, loose)
-
- case '>':
- return gt(a, b, loose)
-
- case '>=':
- return gte(a, b, loose)
-
- case '<':
- return lt(a, b, loose)
-
- case '<=':
- return lte(a, b, loose)
-
- default:
- throw new TypeError('Invalid operator: ' + op)
- }
-}
-
-exports.Comparator = Comparator
-function Comparator (comp, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (comp instanceof Comparator) {
- if (comp.loose === !!options.loose) {
- return comp
- } else {
- comp = comp.value
- }
- }
-
- if (!(this instanceof Comparator)) {
- return new Comparator(comp, options)
- }
-
- debug('comparator', comp, options)
- this.options = options
- this.loose = !!options.loose
- this.parse(comp)
-
- if (this.semver === ANY) {
- this.value = ''
- } else {
- this.value = this.operator + this.semver.version
- }
-
- debug('comp', this)
-}
-
-var ANY = {}
-Comparator.prototype.parse = function (comp) {
- var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
- var m = comp.match(r)
-
- if (!m) {
- throw new TypeError('Invalid comparator: ' + comp)
- }
-
- this.operator = m[1]
- if (this.operator === '=') {
- this.operator = ''
- }
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2]) {
- this.semver = ANY
- } else {
- this.semver = new SemVer(m[2], this.options.loose)
- }
-}
-
-Comparator.prototype.toString = function () {
- return this.value
-}
-
-Comparator.prototype.test = function (version) {
- debug('Comparator.test', version, this.options.loose)
-
- if (this.semver === ANY) {
- return true
- }
-
- if (typeof version === 'string') {
- version = new SemVer(version, this.options)
- }
-
- return cmp(version, this.operator, this.semver, this.options)
-}
-
-Comparator.prototype.intersects = function (comp, options) {
- if (!(comp instanceof Comparator)) {
- throw new TypeError('a Comparator is required')
- }
-
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- var rangeTmp
-
- if (this.operator === '') {
- rangeTmp = new Range(comp.value, options)
- return satisfies(this.value, rangeTmp, options)
- } else if (comp.operator === '') {
- rangeTmp = new Range(this.value, options)
- return satisfies(comp.semver, rangeTmp, options)
- }
-
- var sameDirectionIncreasing =
- (this.operator === '>=' || this.operator === '>') &&
- (comp.operator === '>=' || comp.operator === '>')
- var sameDirectionDecreasing =
- (this.operator === '<=' || this.operator === '<') &&
- (comp.operator === '<=' || comp.operator === '<')
- var sameSemVer = this.semver.version === comp.semver.version
- var differentDirectionsInclusive =
- (this.operator === '>=' || this.operator === '<=') &&
- (comp.operator === '>=' || comp.operator === '<=')
- var oppositeDirectionsLessThan =
- cmp(this.semver, '<', comp.semver, options) &&
- ((this.operator === '>=' || this.operator === '>') &&
- (comp.operator === '<=' || comp.operator === '<'))
- var oppositeDirectionsGreaterThan =
- cmp(this.semver, '>', comp.semver, options) &&
- ((this.operator === '<=' || this.operator === '<') &&
- (comp.operator === '>=' || comp.operator === '>'))
-
- return sameDirectionIncreasing || sameDirectionDecreasing ||
- (sameSemVer && differentDirectionsInclusive) ||
- oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
-}
-
-exports.Range = Range
-function Range (range, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (range instanceof Range) {
- if (range.loose === !!options.loose &&
- range.includePrerelease === !!options.includePrerelease) {
- return range
- } else {
- return new Range(range.raw, options)
- }
- }
-
- if (range instanceof Comparator) {
- return new Range(range.value, options)
- }
-
- if (!(this instanceof Range)) {
- return new Range(range, options)
- }
-
- this.options = options
- this.loose = !!options.loose
- this.includePrerelease = !!options.includePrerelease
-
- // First, split based on boolean or ||
- this.raw = range
- this.set = range.split(/\s*\|\|\s*/).map(function (range) {
- return this.parseRange(range.trim())
- }, this).filter(function (c) {
- // throw out any that are not relevant for whatever reason
- return c.length
- })
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range)
- }
-
- this.format()
-}
-
-Range.prototype.format = function () {
- this.range = this.set.map(function (comps) {
- return comps.join(' ').trim()
- }).join('||').trim()
- return this.range
-}
-
-Range.prototype.toString = function () {
- return this.range
-}
-
-Range.prototype.parseRange = function (range) {
- var loose = this.options.loose
- range = range.trim()
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]
- range = range.replace(hr, hyphenReplace)
- debug('hyphen replace', range)
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace)
- debug('comparator trim', range, re[COMPARATORTRIM])
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace)
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace)
-
- // normalize spaces
- range = range.split(/\s+/).join(' ')
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
- var set = range.split(' ').map(function (comp) {
- return parseComparator(comp, this.options)
- }, this).join(' ').split(/\s+/)
- if (this.options.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function (comp) {
- return !!comp.match(compRe)
- })
- }
- set = set.map(function (comp) {
- return new Comparator(comp, this.options)
- }, this)
-
- return set
-}
-
-Range.prototype.intersects = function (range, options) {
- if (!(range instanceof Range)) {
- throw new TypeError('a Range is required')
- }
-
- return this.set.some(function (thisComparators) {
- return thisComparators.every(function (thisComparator) {
- return range.set.some(function (rangeComparators) {
- return rangeComparators.every(function (rangeComparator) {
- return thisComparator.intersects(rangeComparator, options)
- })
- })
- })
- })
-}
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators
-function toComparators (range, options) {
- return new Range(range, options).set.map(function (comp) {
- return comp.map(function (c) {
- return c.value
- }).join(' ').trim().split(' ')
- })
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator (comp, options) {
- debug('comp', comp, options)
- comp = replaceCarets(comp, options)
- debug('caret', comp)
- comp = replaceTildes(comp, options)
- debug('tildes', comp)
- comp = replaceXRanges(comp, options)
- debug('xrange', comp)
- comp = replaceStars(comp, options)
- debug('stars', comp)
- return comp
-}
-
-function isX (id) {
- return !id || id.toLowerCase() === 'x' || id === '*'
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes (comp, options) {
- return comp.trim().split(/\s+/).map(function (comp) {
- return replaceTilde(comp, options)
- }).join(' ')
-}
-
-function replaceTilde (comp, options) {
- var r = options.loose ? re[TILDELOOSE] : re[TILDE]
- return comp.replace(r, function (_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr)
- var ret
-
- if (isX(M)) {
- ret = ''
- } else if (isX(m)) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
- } else if (isX(p)) {
- // ~1.2 == >=1.2.0 <1.3.0
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
- } else if (pr) {
- debug('replaceTilde pr', pr)
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
- ' <' + M + '.' + (+m + 1) + '.0'
- } else {
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0'
- }
-
- debug('tilde return', ret)
- return ret
- })
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets (comp, options) {
- return comp.trim().split(/\s+/).map(function (comp) {
- return replaceCaret(comp, options)
- }).join(' ')
-}
-
-function replaceCaret (comp, options) {
- debug('caret', comp, options)
- var r = options.loose ? re[CARETLOOSE] : re[CARET]
- return comp.replace(r, function (_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr)
- var ret
-
- if (isX(M)) {
- ret = ''
- } else if (isX(m)) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
- } else if (isX(p)) {
- if (M === '0') {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
- } else {
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
- }
- } else if (pr) {
- debug('replaceCaret pr', pr)
- if (M === '0') {
- if (m === '0') {
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
- ' <' + M + '.' + m + '.' + (+p + 1)
- } else {
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
- ' <' + M + '.' + (+m + 1) + '.0'
- }
- } else {
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
- ' <' + (+M + 1) + '.0.0'
- }
- } else {
- debug('no pr')
- if (M === '0') {
- if (m === '0') {
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1)
- } else {
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0'
- }
- } else {
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0'
- }
- }
-
- debug('caret return', ret)
- return ret
- })
-}
-
-function replaceXRanges (comp, options) {
- debug('replaceXRanges', comp, options)
- return comp.split(/\s+/).map(function (comp) {
- return replaceXRange(comp, options)
- }).join(' ')
-}
-
-function replaceXRange (comp, options) {
- comp = comp.trim()
- var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]
- return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr)
- var xM = isX(M)
- var xm = xM || isX(m)
- var xp = xm || isX(p)
- var anyX = xp
-
- if (gtlt === '=' && anyX) {
- gtlt = ''
- }
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0'
- } else {
- // nothing is forbidden
- ret = '*'
- }
- } else if (gtlt && anyX) {
- // we know patch is an x, because we have any x at all.
- // replace X with 0
- if (xm) {
- m = 0
- }
- p = 0
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>='
- if (xm) {
- M = +M + 1
- m = 0
- p = 0
- } else {
- m = +m + 1
- p = 0
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<'
- if (xm) {
- M = +M + 1
- } else {
- m = +m + 1
- }
- }
-
- ret = gtlt + M + '.' + m + '.' + p
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
- }
-
- debug('xRange return', ret)
-
- return ret
- })
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars (comp, options) {
- debug('replaceStars', comp, options)
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '')
-}
-
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace ($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
- if (isX(fM)) {
- from = ''
- } else if (isX(fm)) {
- from = '>=' + fM + '.0.0'
- } else if (isX(fp)) {
- from = '>=' + fM + '.' + fm + '.0'
- } else {
- from = '>=' + from
- }
-
- if (isX(tM)) {
- to = ''
- } else if (isX(tm)) {
- to = '<' + (+tM + 1) + '.0.0'
- } else if (isX(tp)) {
- to = '<' + tM + '.' + (+tm + 1) + '.0'
- } else if (tpr) {
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
- } else {
- to = '<=' + to
- }
-
- return (from + ' ' + to).trim()
-}
-
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function (version) {
- if (!version) {
- return false
- }
-
- if (typeof version === 'string') {
- version = new SemVer(version, this.options)
- }
-
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version, this.options)) {
- return true
- }
- }
- return false
-}
-
-function testSet (set, version, options) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version)) {
- return false
- }
- }
-
- if (version.prerelease.length && !options.includePrerelease) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (i = 0; i < set.length; i++) {
- debug(set[i].semver)
- if (set[i].semver === ANY) {
- continue
- }
-
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch) {
- return true
- }
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false
- }
-
- return true
-}
-
-exports.satisfies = satisfies
-function satisfies (version, range, options) {
- try {
- range = new Range(range, options)
- } catch (er) {
- return false
- }
- return range.test(version)
-}
-
-exports.maxSatisfying = maxSatisfying
-function maxSatisfying (versions, range, options) {
- var max = null
- var maxSV = null
- try {
- var rangeObj = new Range(range, options)
- } catch (er) {
- return null
- }
- versions.forEach(function (v) {
- if (rangeObj.test(v)) {
- // satisfies(v, range, options)
- if (!max || maxSV.compare(v) === -1) {
- // compare(max, v, true)
- max = v
- maxSV = new SemVer(max, options)
- }
- }
- })
- return max
-}
-
-exports.minSatisfying = minSatisfying
-function minSatisfying (versions, range, options) {
- var min = null
- var minSV = null
- try {
- var rangeObj = new Range(range, options)
- } catch (er) {
- return null
- }
- versions.forEach(function (v) {
- if (rangeObj.test(v)) {
- // satisfies(v, range, options)
- if (!min || minSV.compare(v) === 1) {
- // compare(min, v, true)
- min = v
- minSV = new SemVer(min, options)
- }
- }
- })
- return min
-}
-
-exports.minVersion = minVersion
-function minVersion (range, loose) {
- range = new Range(range, loose)
-
- var minver = new SemVer('0.0.0')
- if (range.test(minver)) {
- return minver
- }
-
- minver = new SemVer('0.0.0-0')
- if (range.test(minver)) {
- return minver
- }
-
- minver = null
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i]
-
- comparators.forEach(function (comparator) {
- // Clone to avoid manipulating the comparator's semver object.
- var compver = new SemVer(comparator.semver.version)
- switch (comparator.operator) {
- case '>':
- if (compver.prerelease.length === 0) {
- compver.patch++
- } else {
- compver.prerelease.push(0)
- }
- compver.raw = compver.format()
- /* fallthrough */
- case '':
- case '>=':
- if (!minver || gt(minver, compver)) {
- minver = compver
- }
- break
- case '<':
- case '<=':
- /* Ignore maximum versions */
- break
- /* istanbul ignore next */
- default:
- throw new Error('Unexpected operation: ' + comparator.operator)
- }
- })
- }
-
- if (minver && range.test(minver)) {
- return minver
- }
-
- return null
-}
-
-exports.validRange = validRange
-function validRange (range, options) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, options).range || '*'
- } catch (er) {
- return null
- }
-}
-
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr
-function ltr (version, range, options) {
- return outside(version, range, '<', options)
-}
-
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr
-function gtr (version, range, options) {
- return outside(version, range, '>', options)
-}
-
-exports.outside = outside
-function outside (version, range, hilo, options) {
- version = new SemVer(version, options)
- range = new Range(range, options)
-
- var gtfn, ltefn, ltfn, comp, ecomp
- switch (hilo) {
- case '>':
- gtfn = gt
- ltefn = lte
- ltfn = lt
- comp = '>'
- ecomp = '>='
- break
- case '<':
- gtfn = lt
- ltefn = gte
- ltfn = gt
- comp = '<'
- ecomp = '<='
- break
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"')
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, options)) {
- return false
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i]
-
- var high = null
- var low = null
-
- comparators.forEach(function (comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator
- low = low || comparator
- if (gtfn(comparator.semver, high.semver, options)) {
- high = comparator
- } else if (ltfn(comparator.semver, low.semver, options)) {
- low = comparator
- }
- })
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false
- }
- }
- return true
-}
-
-exports.prerelease = prerelease
-function prerelease (version, options) {
- var parsed = parse(version, options)
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
-}
-
-exports.intersects = intersects
-function intersects (r1, r2, options) {
- r1 = new Range(r1, options)
- r2 = new Range(r2, options)
- return r1.intersects(r2)
-}
-
-exports.coerce = coerce
-function coerce (version) {
- if (version instanceof SemVer) {
- return version
- }
-
- if (typeof version !== 'string') {
- return null
- }
-
- var match = version.match(re[COERCE])
-
- if (match == null) {
- return null
- }
-
- return parse(match[1] +
- '.' + (match[2] || '0') +
- '.' + (match[3] || '0'))
-}
diff --git a/src/node_modules/simple-update-notifier/LICENSE b/src/node_modules/simple-update-notifier/LICENSE
deleted file mode 100644
index 1e0b0c1..0000000
--- a/src/node_modules/simple-update-notifier/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2022 Alex Brazier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/src/node_modules/simple-update-notifier/README.md b/src/node_modules/simple-update-notifier/README.md
deleted file mode 100644
index ec17794..0000000
--- a/src/node_modules/simple-update-notifier/README.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# simple-update-notifier [](https://github.com/alexbrazier/simple-update-notifier/stargazers)
-
-[](https://github.com/alexbrazier/simple-update-notifier/actions)
-[](https://www.npmjs.com/package/simple-update-notifier?activeTab=dependencies)
-[](https://www.npmjs.com/package/simple-update-notifier)
-[](https://bundlephobia.com/result?p=simple-update-notifier)
-[](https://www.npmjs.com/package/simple-update-notifier)
-[](./LICENSE)
-
-Simple update notifier to check for npm updates for cli applications.
-
-
-
-Checks for updates for an npm module and outputs to the command line if there is one available. The result is cached for the specified time so it doesn't check every time the app runs.
-
-## Install
-
-```bash
-npm install simple-update-notifier
-OR
-yarn add simple-update-notifier
-```
-
-## Usage
-
-```js
-import updateNotifier from 'simple-update-notifier';
-import packageJson from './package.json' assert { type: 'json' };
-
-updateNotifier({ pkg: packageJson });
-```
-
-### Options
-
-#### pkg
-
-Type: `object`
-
-##### name
-
-_Required_\
-Type: `string`
-
-##### version
-
-_Required_\
-Type: `string`
-
-#### updateCheckInterval
-
-Type: `number`\
-Default: `1000 * 60 * 60 * 24` _(1 day)_
-
-How often to check for updates.
-
-#### shouldNotifyInNpmScript
-
-Type: `boolean`\
-Default: `false`
-
-Allows notification to be shown when running as an npm script.
-
-#### distTag
-
-Type: `string`\
-Default: `'latest'`
-
-Which [dist-tag](https://docs.npmjs.com/adding-dist-tags-to-packages) to use to find the latest version.
-
-#### alwaysRun
-
-Type: `boolean`\
-Default: `false`
-
-When set, `updateCheckInterval` will not be respected and a check for an update will always be performed.
-
-#### debug
-
-Type: `boolean`\
-Default: `false`
-
-When set, logs explaining the decision will be output to `stderr` whenever the module opts to not print an update notification
diff --git a/src/node_modules/simple-update-notifier/build/index.d.ts b/src/node_modules/simple-update-notifier/build/index.d.ts
deleted file mode 100644
index 60f53e0..0000000
--- a/src/node_modules/simple-update-notifier/build/index.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-interface IUpdate {
- pkg: {
- name: string;
- version: string;
- };
- updateCheckInterval?: number;
- shouldNotifyInNpmScript?: boolean;
- distTag?: string;
- alwaysRun?: boolean;
- debug?: boolean;
-}
-declare const simpleUpdateNotifier: (args: IUpdate) => Promise;
-export { simpleUpdateNotifier as default };
diff --git a/src/node_modules/simple-update-notifier/build/index.js b/src/node_modules/simple-update-notifier/build/index.js
deleted file mode 100644
index 3dd2076..0000000
--- a/src/node_modules/simple-update-notifier/build/index.js
+++ /dev/null
@@ -1,217 +0,0 @@
-'use strict';
-
-var process$1 = require('process');
-var semver = require('semver');
-var os = require('os');
-var path = require('path');
-var fs = require('fs');
-var https = require('https');
-
-function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
-
-var process__default = /*#__PURE__*/_interopDefaultLegacy(process$1);
-var semver__default = /*#__PURE__*/_interopDefaultLegacy(semver);
-var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
-var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
-var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
-var https__default = /*#__PURE__*/_interopDefaultLegacy(https);
-
-/******************************************************************************
-Copyright (c) Microsoft Corporation.
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted.
-
-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.
-***************************************************************************** */
-
-function __awaiter(thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-}
-
-function __generator(thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-}
-
-var packageJson = process__default["default"].env.npm_package_json;
-var userAgent = process__default["default"].env.npm_config_user_agent;
-var isNpm6 = Boolean(userAgent && userAgent.startsWith('npm'));
-var isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json'));
-var isNpm = isNpm6 || isNpm7;
-var isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));
-var isNpmOrYarn = isNpm || isYarn;
-
-var homeDirectory = os__default["default"].homedir();
-var configDir = process.env.XDG_CONFIG_HOME ||
- path__default["default"].join(homeDirectory, '.config', 'simple-update-notifier');
-var getConfigFile = function (packageName) {
- return path__default["default"].join(configDir, "".concat(packageName.replace('@', '').replace('/', '__'), ".json"));
-};
-var createConfigDir = function () {
- if (!fs__default["default"].existsSync(configDir)) {
- fs__default["default"].mkdirSync(configDir, { recursive: true });
- }
-};
-var getLastUpdate = function (packageName) {
- var configFile = getConfigFile(packageName);
- try {
- if (!fs__default["default"].existsSync(configFile)) {
- return undefined;
- }
- var file = JSON.parse(fs__default["default"].readFileSync(configFile, 'utf8'));
- return file.lastUpdateCheck;
- }
- catch (_a) {
- return undefined;
- }
-};
-var saveLastUpdate = function (packageName) {
- var configFile = getConfigFile(packageName);
- fs__default["default"].writeFileSync(configFile, JSON.stringify({ lastUpdateCheck: new Date().getTime() }));
-};
-
-var getDistVersion = function (packageName, distTag) { return __awaiter(void 0, void 0, void 0, function () {
- var url;
- return __generator(this, function (_a) {
- url = "https://registry.npmjs.org/-/package/".concat(packageName, "/dist-tags");
- return [2 /*return*/, new Promise(function (resolve, reject) {
- https__default["default"]
- .get(url, function (res) {
- var body = '';
- res.on('data', function (chunk) { return (body += chunk); });
- res.on('end', function () {
- try {
- var json = JSON.parse(body);
- var version = json[distTag];
- if (!version) {
- reject(new Error('Error getting version'));
- }
- resolve(version);
- }
- catch (_a) {
- reject(new Error('Could not parse version response'));
- }
- });
- })
- .on('error', function (err) { return reject(err); });
- })];
- });
-}); };
-
-var hasNewVersion = function (_a) {
- var pkg = _a.pkg, _b = _a.updateCheckInterval, updateCheckInterval = _b === void 0 ? 1000 * 60 * 60 * 24 : _b, _c = _a.distTag, distTag = _c === void 0 ? 'latest' : _c, alwaysRun = _a.alwaysRun, debug = _a.debug;
- return __awaiter(void 0, void 0, void 0, function () {
- var lastUpdateCheck, latestVersion;
- return __generator(this, function (_d) {
- switch (_d.label) {
- case 0:
- createConfigDir();
- lastUpdateCheck = getLastUpdate(pkg.name);
- if (!(alwaysRun ||
- !lastUpdateCheck ||
- lastUpdateCheck < new Date().getTime() - updateCheckInterval)) return [3 /*break*/, 2];
- return [4 /*yield*/, getDistVersion(pkg.name, distTag)];
- case 1:
- latestVersion = _d.sent();
- saveLastUpdate(pkg.name);
- if (semver__default["default"].gt(latestVersion, pkg.version)) {
- return [2 /*return*/, latestVersion];
- }
- else if (debug) {
- console.error("Latest version (".concat(latestVersion, ") not newer than current version (").concat(pkg.version, ")"));
- }
- return [3 /*break*/, 3];
- case 2:
- if (debug) {
- console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(updateCheckInterval, "ms but only ").concat(new Date().getTime() - lastUpdateCheck, "ms since last check."));
- }
- _d.label = 3;
- case 3: return [2 /*return*/, false];
- }
- });
- });
-};
-
-var borderedText = function (text) {
- var lines = text.split('\n');
- var width = Math.max.apply(Math, lines.map(function (l) { return l.length; }));
- var res = ["\u250C".concat('─'.repeat(width + 2), "\u2510")];
- for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
- var line = lines_1[_i];
- res.push("\u2502 ".concat(line.padEnd(width), " \u2502"));
- }
- res.push("\u2514".concat('─'.repeat(width + 2), "\u2518"));
- return res.join('\n');
-};
-
-var simpleUpdateNotifier = function (args) { return __awaiter(void 0, void 0, void 0, function () {
- var latestVersion, err_1;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- if (!args.alwaysRun &&
- (!process.stdout.isTTY || (isNpmOrYarn && !args.shouldNotifyInNpmScript))) {
- if (args.debug) {
- console.error('Opting out of running simpleUpdateNotifier()');
- }
- return [2 /*return*/];
- }
- _a.label = 1;
- case 1:
- _a.trys.push([1, 3, , 4]);
- return [4 /*yield*/, hasNewVersion(args)];
- case 2:
- latestVersion = _a.sent();
- if (latestVersion) {
- console.error(borderedText("New version of ".concat(args.pkg.name, " available!\nCurrent Version: ").concat(args.pkg.version, "\nLatest Version: ").concat(latestVersion)));
- }
- return [3 /*break*/, 4];
- case 3:
- err_1 = _a.sent();
- // Catch any network errors or cache writing errors so module doesn't cause a crash
- if (args.debug && err_1 instanceof Error) {
- console.error('Unexpected error in simpleUpdateNotifier():', err_1);
- }
- return [3 /*break*/, 4];
- case 4: return [2 /*return*/];
- }
- });
-}); };
-
-module.exports = simpleUpdateNotifier;
diff --git a/src/node_modules/simple-update-notifier/node_modules/.bin/semver b/src/node_modules/simple-update-notifier/node_modules/.bin/semver
deleted file mode 120000
index 5aaadf4..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/.bin/semver
+++ /dev/null
@@ -1 +0,0 @@
-../semver/bin/semver.js
\ No newline at end of file
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/CHANGELOG.md b/src/node_modules/simple-update-notifier/node_modules/semver/CHANGELOG.md
deleted file mode 100644
index d366696..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/CHANGELOG.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# changes log
-
-## 6.3.0
-
-* Expose the token enum on the exports
-
-## 6.2.0
-
-* Coerce numbers to strings when passed to semver.coerce()
-* Add `rtl` option to coerce from right to left
-
-## 6.1.3
-
-* Handle X-ranges properly in includePrerelease mode
-
-## 6.1.2
-
-* Do not throw when testing invalid version strings
-
-## 6.1.1
-
-* Add options support for semver.coerce()
-* Handle undefined version passed to Range.test
-
-## 6.1.0
-
-* Add semver.compareBuild function
-* Support `*` in semver.intersects
-
-## 6.0
-
-* Fix `intersects` logic.
-
- This is technically a bug fix, but since it is also a change to behavior
- that may require users updating their code, it is marked as a major
- version increment.
-
-## 5.7
-
-* Add `minVersion` method
-
-## 5.6
-
-* Move boolean `loose` param to an options object, with
- backwards-compatibility protection.
-* Add ability to opt out of special prerelease version handling with
- the `includePrerelease` option flag.
-
-## 5.5
-
-* Add version coercion capabilities
-
-## 5.4
-
-* Add intersection checking
-
-## 5.3
-
-* Add `minSatisfying` method
-
-## 5.2
-
-* Add `prerelease(v)` that returns prerelease components
-
-## 5.1
-
-* Add Backus-Naur for ranges
-* Remove excessively cute inspection methods
-
-## 5.0
-
-* Remove AMD/Browserified build artifacts
-* Fix ltr and gtr when using the `*` range
-* Fix for range `*` with a prerelease identifier
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/LICENSE b/src/node_modules/simple-update-notifier/node_modules/semver/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/README.md b/src/node_modules/simple-update-notifier/node_modules/semver/README.md
deleted file mode 100644
index 1546458..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/README.md
+++ /dev/null
@@ -1,499 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Install
-
-```bash
-npm install semver
-````
-
-## Usage
-
-As a node module:
-
-```js
-const semver = require('semver')
-
-semver.valid('1.2.3') // '1.2.3'
-semver.valid('a.b.c') // null
-semver.clean(' =v1.2.3 ') // '1.2.3'
-semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
-semver.gt('1.2.3', '9.8.7') // false
-semver.lt('1.2.3', '9.8.7') // true
-semver.minVersion('>=1.0.0') // '1.0.0'
-semver.valid(semver.coerce('v2')) // '2.0.0'
-semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
-```
-
-As a command-line utility:
-
-```
-$ semver -h
-
-A JavaScript implementation of the https://semver.org/ specification
-Copyright Isaac Z. Schlueter
-
-Usage: semver [options] [ [...]]
-Prints valid versions sorted by SemVer precedence
-
-Options:
--r --range
- Print versions that match the specified range.
-
--i --increment []
- Increment a version by the specified level. Level can
- be one of: major, minor, patch, premajor, preminor,
- prepatch, or prerelease. Default level is 'patch'.
- Only one version may be specified.
-
---preid
- Identifier to be used to prefix premajor, preminor,
- prepatch or prerelease version increments.
-
--l --loose
- Interpret versions and ranges loosely
-
--p --include-prerelease
- Always include prerelease versions in range matching
-
--c --coerce
- Coerce a string into SemVer if possible
- (does not imply --loose)
-
---rtl
- Coerce version strings right to left
-
---ltr
- Coerce version strings left to right (default)
-
-Program exits successfully if any valid version satisfies
-all supplied ranges, and prints all satisfying versions.
-
-If no satisfying versions are found, then exits failure.
-
-Versions are printed in ascending order, so supplying
-multiple versions to the utility will just sort them.
-```
-
-## Versions
-
-A "version" is described by the `v2.0.0` specification found at
-.
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Ranges
-
-A `version range` is a set of `comparators` which specify versions
-that satisfy the range.
-
-A `comparator` is composed of an `operator` and a `version`. The set
-of primitive `operators` is:
-
-* `<` Less than
-* `<=` Less than or equal to
-* `>` Greater than
-* `>=` Greater than or equal to
-* `=` Equal. If no operator is specified, then equality is assumed,
- so this operator is optional, but MAY be included.
-
-For example, the comparator `>=1.2.7` would match the versions
-`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
-or `1.1.0`.
-
-Comparators can be joined by whitespace to form a `comparator set`,
-which is satisfied by the **intersection** of all of the comparators
-it includes.
-
-A range is composed of one or more comparator sets, joined by `||`. A
-version matches a range if and only if every comparator in at least
-one of the `||`-separated comparator sets is satisfied by the version.
-
-For example, the range `>=1.2.7 <1.3.0` would match the versions
-`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
-or `1.1.0`.
-
-The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
-`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
-
-### Prerelease Tags
-
-If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
-it will only be allowed to satisfy comparator sets if at least one
-comparator with the same `[major, minor, patch]` tuple also has a
-prerelease tag.
-
-For example, the range `>1.2.3-alpha.3` would be allowed to match the
-version `1.2.3-alpha.7`, but it would *not* be satisfied by
-`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
-than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
-range only accepts prerelease tags on the `1.2.3` version. The
-version `3.4.5` *would* satisfy the range, because it does not have a
-prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
-
-The purpose for this behavior is twofold. First, prerelease versions
-frequently are updated very quickly, and contain many breaking changes
-that are (by the author's design) not yet fit for public consumption.
-Therefore, by default, they are excluded from range matching
-semantics.
-
-Second, a user who has opted into using a prerelease version has
-clearly indicated the intent to use *that specific* set of
-alpha/beta/rc versions. By including a prerelease tag in the range,
-the user is indicating that they are aware of the risk. However, it
-is still not appropriate to assume that they have opted into taking a
-similar risk on the *next* set of prerelease versions.
-
-Note that this behavior can be suppressed (treating all prerelease
-versions as if they were normal versions, for the purpose of range
-matching) by setting the `includePrerelease` flag on the options
-object to any
-[functions](https://github.com/npm/node-semver#functions) that do
-range matching.
-
-#### Prerelease Identifiers
-
-The method `.inc` takes an additional `identifier` string argument that
-will append the value of the string as a prerelease identifier:
-
-```javascript
-semver.inc('1.2.3', 'prerelease', 'beta')
-// '1.2.4-beta.0'
-```
-
-command-line example:
-
-```bash
-$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-```
-
-Which then can be used to increment further:
-
-```bash
-$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-```
-
-### Advanced Range Syntax
-
-Advanced range syntax desugars to primitive comparators in
-deterministic ways.
-
-Advanced ranges may be combined in the same way as primitive
-comparators using white space or `||`.
-
-#### Hyphen Ranges `X.Y.Z - A.B.C`
-
-Specifies an inclusive set.
-
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-
-If a partial version is provided as the first version in the inclusive
-range, then the missing pieces are replaced with zeroes.
-
-* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
-
-If a partial version is provided as the second version in the
-inclusive range, then all versions that start with the supplied parts
-of the tuple are accepted, but nothing that would be greater than the
-provided tuple parts.
-
-* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
-* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
-
-#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
-
-Any of `X`, `x`, or `*` may be used to "stand in" for one of the
-numeric values in the `[major, minor, patch]` tuple.
-
-* `*` := `>=0.0.0` (Any version satisfies)
-* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
-* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
-
-A partial version range is treated as an X-Range, so the special
-character is in fact optional.
-
-* `""` (empty string) := `*` := `>=0.0.0`
-* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
-* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
-
-#### Tilde Ranges `~1.2.3` `~1.2` `~1`
-
-Allows patch-level changes if a minor version is specified on the
-comparator. Allows minor-level changes if not.
-
-* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
-* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
-* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
-* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
-* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
-* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-
-#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
-
-Allows changes that do not modify the left-most non-zero element in the
-`[major, minor, patch]` tuple. In other words, this allows patch and
-minor updates for versions `1.0.0` and above, patch updates for
-versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
-
-Many authors treat a `0.x` version as if the `x` were the major
-"breaking-change" indicator.
-
-Caret ranges are ideal when an author may make breaking changes
-between `0.2.4` and `0.3.0` releases, which is a common practice.
-However, it presumes that there will *not* be breaking changes between
-`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
-additive (but non-breaking), according to commonly observed practices.
-
-* `^1.2.3` := `>=1.2.3 <2.0.0`
-* `^0.2.3` := `>=0.2.3 <0.3.0`
-* `^0.0.3` := `>=0.0.3 <0.0.4`
-* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
- `0.0.3` version *only* will be allowed, if they are greater than or
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
-
-When parsing caret ranges, a missing `patch` value desugars to the
-number `0`, but will allow flexibility within that value, even if the
-major and minor versions are both `0`.
-
-* `^1.2.x` := `>=1.2.0 <2.0.0`
-* `^0.0.x` := `>=0.0.0 <0.1.0`
-* `^0.0` := `>=0.0.0 <0.1.0`
-
-A missing `minor` and `patch` values will desugar to zero, but also
-allow flexibility within those values, even if the major version is
-zero.
-
-* `^1.x` := `>=1.0.0 <2.0.0`
-* `^0.x` := `>=0.0.0 <1.0.0`
-
-### Range Grammar
-
-Putting all this together, here is a Backus-Naur grammar for ranges,
-for the benefit of parser authors:
-
-```bnf
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
-```
-
-## Functions
-
-All methods and classes take a final `options` object argument. All
-options in this object are `false` by default. The options supported
-are:
-
-- `loose` Be more forgiving about not-quite-valid semver strings.
- (Any resulting output will always be 100% strict compliant, of
- course.) For backwards compatibility reasons, if the `options`
- argument is a boolean value instead of an object, it is interpreted
- to be the `loose` param.
-- `includePrerelease` Set to suppress the [default
- behavior](https://github.com/npm/node-semver#prerelease-tags) of
- excluding prerelease tagged versions from ranges unless they are
- explicitly opted into.
-
-Strict-mode Comparators and Ranges will be strict about the SemVer
-strings that they parse.
-
-* `valid(v)`: Return the parsed version, or null if it's not valid.
-* `inc(v, release)`: Return the version incremented by the release
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
- `prepatch`, or `prerelease`), or null if it's not valid
- * `premajor` in one call will bump the version up to the next major
- version and down to a prerelease of that major version.
- `preminor`, and `prepatch` work the same way.
- * If called from a non-prerelease version, the `prerelease` will work the
- same as `prepatch`. It increments the patch version, then makes a
- prerelease. If the input version is already a prerelease it simply
- increments it.
-* `prerelease(v)`: Returns an array of prerelease components, or null
- if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
-* `major(v)`: Return the major version number.
-* `minor(v)`: Return the minor version number.
-* `patch(v)`: Return the patch version number.
-* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
- or comparators intersect.
-* `parse(v)`: Attempt to parse a string as a semantic version, returning either
- a `SemVer` object or `null`.
-
-### Comparison
-
-* `gt(v1, v2)`: `v1 > v2`
-* `gte(v1, v2)`: `v1 >= v2`
-* `lt(v1, v2)`: `v1 < v2`
-* `lte(v1, v2)`: `v1 <= v2`
-* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
-* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
- in descending order when passed to `Array.sort()`.
-* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
- are equal. Sorts in ascending order if passed to `Array.sort()`.
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `diff(v1, v2)`: Returns difference between two versions by the release type
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
- or null if the versions are the same.
-
-### Comparators
-
-* `intersects(comparator)`: Return true if the comparators intersect
-
-### Ranges
-
-* `validRange(range)`: Return the valid range or null if it's not valid
-* `satisfies(version, range)`: Return true if the version satisfies the
- range.
-* `maxSatisfying(versions, range)`: Return the highest version in the list
- that satisfies the range, or `null` if none of them do.
-* `minSatisfying(versions, range)`: Return the lowest version in the list
- that satisfies the range, or `null` if none of them do.
-* `minVersion(range)`: Return the lowest version that can possibly match
- the given range.
-* `gtr(version, range)`: Return `true` if version is greater than all the
- versions possible in the range.
-* `ltr(version, range)`: Return `true` if version is less than all the
- versions possible in the range.
-* `outside(version, range, hilo)`: Return true if the version is outside
- the bounds of the range in either the high or low direction. The
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
- the function called by `gtr` and `ltr`.)
-* `intersects(range)`: Return true if any of the ranges comparators intersect
-
-Note that, since ranges may be non-contiguous, a version might not be
-greater than a range, less than a range, *or* satisfy a range! For
-example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
-until `2.0.0`, so the version `1.2.10` would not be greater than the
-range (because `2.0.1` satisfies, which is higher), nor less than the
-range (since `1.2.8` satisfies, which is lower), and it also does not
-satisfy the range.
-
-If you want to know if a version satisfies or does not satisfy a
-range, use the `satisfies(version, range)` function.
-
-### Coercion
-
-* `coerce(version, options)`: Coerces a string to semver if possible
-
-This aims to provide a very forgiving translation of a non-semver string to
-semver. It looks for the first digit in a string, and consumes all
-remaining characters which satisfy at least a partial semver (e.g., `1`,
-`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
-versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
-surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
-`3.4.0`). Only text which lacks digits will fail coercion (`version one`
-is not valid). The maximum length for any semver component considered for
-coercion is 16 characters; longer components will be ignored
-(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
-semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
-components are invalid (`9999999999999999.4.7.4` is likely invalid).
-
-If the `options.rtl` flag is set, then `coerce` will return the right-most
-coercible tuple that does not share an ending index with a longer coercible
-tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
-`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
-any other overlapping SemVer tuple.
-
-### Clean
-
-* `clean(version)`: Clean a string to be a valid semver if possible
-
-This will return a cleaned and trimmed semver version. If the provided
-version is not valid a null will be returned. This does not work for
-ranges.
-
-ex.
-* `s.clean(' = v 2.1.5foo')`: `null`
-* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
-* `s.clean(' = v 2.1.5-foo')`: `null`
-* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
-* `s.clean('=v2.1.5')`: `'2.1.5'`
-* `s.clean(' =v2.1.5')`: `2.1.5`
-* `s.clean(' 2.1.5 ')`: `'2.1.5'`
-* `s.clean('~1.0.0')`: `null`
-
-## Exported Modules
-
-
-
-You may pull in just the part of this semver utility that you need, if you
-are sensitive to packing and tree-shaking concerns. The main
-`require('semver')` export uses getter functions to lazily load the parts
-of the API that are used.
-
-The following modules are available:
-
-* `require('semver')`
-* `require('semver/classes')`
-* `require('semver/classes/comparator')`
-* `require('semver/classes/range')`
-* `require('semver/classes/semver')`
-* `require('semver/functions/clean')`
-* `require('semver/functions/cmp')`
-* `require('semver/functions/coerce')`
-* `require('semver/functions/compare')`
-* `require('semver/functions/compare-build')`
-* `require('semver/functions/compare-loose')`
-* `require('semver/functions/diff')`
-* `require('semver/functions/eq')`
-* `require('semver/functions/gt')`
-* `require('semver/functions/gte')`
-* `require('semver/functions/inc')`
-* `require('semver/functions/lt')`
-* `require('semver/functions/lte')`
-* `require('semver/functions/major')`
-* `require('semver/functions/minor')`
-* `require('semver/functions/neq')`
-* `require('semver/functions/parse')`
-* `require('semver/functions/patch')`
-* `require('semver/functions/prerelease')`
-* `require('semver/functions/rcompare')`
-* `require('semver/functions/rsort')`
-* `require('semver/functions/satisfies')`
-* `require('semver/functions/sort')`
-* `require('semver/functions/valid')`
-* `require('semver/ranges/gtr')`
-* `require('semver/ranges/intersects')`
-* `require('semver/ranges/ltr')`
-* `require('semver/ranges/max-satisfying')`
-* `require('semver/ranges/min-satisfying')`
-* `require('semver/ranges/min-version')`
-* `require('semver/ranges/outside')`
-* `require('semver/ranges/to-comparators')`
-* `require('semver/ranges/valid')`
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/bin/semver.js b/src/node_modules/simple-update-notifier/node_modules/semver/bin/semver.js
deleted file mode 100755
index 73fe295..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/bin/semver.js
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-const argv = process.argv.slice(2)
-
-let versions = []
-
-const range = []
-
-let inc = null
-
-const version = require('../package.json').version
-
-let loose = false
-
-let includePrerelease = false
-
-let coerce = false
-
-let rtl = false
-
-let identifier
-
-const semver = require('../')
-
-let reverse = false
-
-const options = {}
-
-const main = () => {
- if (!argv.length) return help()
- while (argv.length) {
- let a = argv.shift()
- const indexOfEqualSign = a.indexOf('=')
- if (indexOfEqualSign !== -1) {
- a = a.slice(0, indexOfEqualSign)
- argv.unshift(a.slice(indexOfEqualSign + 1))
- }
- switch (a) {
- case '-rv': case '-rev': case '--rev': case '--reverse':
- reverse = true
- break
- case '-l': case '--loose':
- loose = true
- break
- case '-p': case '--include-prerelease':
- includePrerelease = true
- break
- case '-v': case '--version':
- versions.push(argv.shift())
- break
- case '-i': case '--inc': case '--increment':
- switch (argv[0]) {
- case 'major': case 'minor': case 'patch': case 'prerelease':
- case 'premajor': case 'preminor': case 'prepatch':
- inc = argv.shift()
- break
- default:
- inc = 'patch'
- break
- }
- break
- case '--preid':
- identifier = argv.shift()
- break
- case '-r': case '--range':
- range.push(argv.shift())
- break
- case '-c': case '--coerce':
- coerce = true
- break
- case '--rtl':
- rtl = true
- break
- case '--ltr':
- rtl = false
- break
- case '-h': case '--help': case '-?':
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- const options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
-
- versions = versions.map((v) => {
- return coerce ? (semver.coerce(v, options) || { version: v }).version : v
- }).filter((v) => {
- return semver.valid(v)
- })
- if (!versions.length) return fail()
- if (inc && (versions.length !== 1 || range.length)) { return failInc() }
-
- for (let i = 0, l = range.length; i < l; i++) {
- versions = versions.filter((v) => {
- return semver.satisfies(v, range[i], options)
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-
-const failInc = () => {
- console.error('--inc can only be used on a single version with no range')
- fail()
-}
-
-const fail = () => process.exit(1)
-
-const success = () => {
- const compare = reverse ? 'rcompare' : 'compare'
- versions.sort((a, b) => {
- return semver[compare](a, b, options)
- }).map((v) => {
- return semver.clean(v, options)
- }).map((v) => {
- return inc ? semver.inc(v, inc, options, identifier) : v
- }).forEach((v, i, _) => { console.log(v) })
-}
-
-const help = () => console.log(
-`SemVer ${version}
-
-A JavaScript implementation of the https://semver.org/ specification
-Copyright Isaac Z. Schlueter
-
-Usage: semver [options] [ [...]]
-Prints valid versions sorted by SemVer precedence
-
-Options:
--r --range
- Print versions that match the specified range.
-
--i --increment []
- Increment a version by the specified level. Level can
- be one of: major, minor, patch, premajor, preminor,
- prepatch, or prerelease. Default level is 'patch'.
- Only one version may be specified.
-
---preid
- Identifier to be used to prefix premajor, preminor,
- prepatch or prerelease version increments.
-
--l --loose
- Interpret versions and ranges loosely
-
--p --include-prerelease
- Always include prerelease versions in range matching
-
--c --coerce
- Coerce a string into SemVer if possible
- (does not imply --loose)
-
---rtl
- Coerce version strings right to left
-
---ltr
- Coerce version strings left to right (default)
-
-Program exits successfully if any valid version satisfies
-all supplied ranges, and prints all satisfying versions.
-
-If no satisfying versions are found, then exits failure.
-
-Versions are printed in ascending order, so supplying
-multiple versions to the utility will just sort them.`)
-
-main()
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/classes/comparator.js b/src/node_modules/simple-update-notifier/node_modules/semver/classes/comparator.js
deleted file mode 100644
index 3595792..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/classes/comparator.js
+++ /dev/null
@@ -1,139 +0,0 @@
-const ANY = Symbol('SemVer ANY')
-// hoisted class for cyclic dependency
-class Comparator {
- static get ANY () {
- return ANY
- }
- constructor (comp, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (comp instanceof Comparator) {
- if (comp.loose === !!options.loose) {
- return comp
- } else {
- comp = comp.value
- }
- }
-
- debug('comparator', comp, options)
- this.options = options
- this.loose = !!options.loose
- this.parse(comp)
-
- if (this.semver === ANY) {
- this.value = ''
- } else {
- this.value = this.operator + this.semver.version
- }
-
- debug('comp', this)
- }
-
- parse (comp) {
- const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
- const m = comp.match(r)
-
- if (!m) {
- throw new TypeError(`Invalid comparator: ${comp}`)
- }
-
- this.operator = m[1] !== undefined ? m[1] : ''
- if (this.operator === '=') {
- this.operator = ''
- }
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2]) {
- this.semver = ANY
- } else {
- this.semver = new SemVer(m[2], this.options.loose)
- }
- }
-
- toString () {
- return this.value
- }
-
- test (version) {
- debug('Comparator.test', version, this.options.loose)
-
- if (this.semver === ANY || version === ANY) {
- return true
- }
-
- if (typeof version === 'string') {
- try {
- version = new SemVer(version, this.options)
- } catch (er) {
- return false
- }
- }
-
- return cmp(version, this.operator, this.semver, this.options)
- }
-
- intersects (comp, options) {
- if (!(comp instanceof Comparator)) {
- throw new TypeError('a Comparator is required')
- }
-
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (this.operator === '') {
- if (this.value === '') {
- return true
- }
- return new Range(comp.value, options).test(this.value)
- } else if (comp.operator === '') {
- if (comp.value === '') {
- return true
- }
- return new Range(this.value, options).test(comp.semver)
- }
-
- const sameDirectionIncreasing =
- (this.operator === '>=' || this.operator === '>') &&
- (comp.operator === '>=' || comp.operator === '>')
- const sameDirectionDecreasing =
- (this.operator === '<=' || this.operator === '<') &&
- (comp.operator === '<=' || comp.operator === '<')
- const sameSemVer = this.semver.version === comp.semver.version
- const differentDirectionsInclusive =
- (this.operator === '>=' || this.operator === '<=') &&
- (comp.operator === '>=' || comp.operator === '<=')
- const oppositeDirectionsLessThan =
- cmp(this.semver, '<', comp.semver, options) &&
- (this.operator === '>=' || this.operator === '>') &&
- (comp.operator === '<=' || comp.operator === '<')
- const oppositeDirectionsGreaterThan =
- cmp(this.semver, '>', comp.semver, options) &&
- (this.operator === '<=' || this.operator === '<') &&
- (comp.operator === '>=' || comp.operator === '>')
-
- return (
- sameDirectionIncreasing ||
- sameDirectionDecreasing ||
- (sameSemVer && differentDirectionsInclusive) ||
- oppositeDirectionsLessThan ||
- oppositeDirectionsGreaterThan
- )
- }
-}
-
-module.exports = Comparator
-
-const {re, t} = require('../internal/re')
-const cmp = require('../functions/cmp')
-const debug = require('../internal/debug')
-const SemVer = require('./semver')
-const Range = require('./range')
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/classes/index.js b/src/node_modules/simple-update-notifier/node_modules/semver/classes/index.js
deleted file mode 100644
index 198b84d..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/classes/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = {
- SemVer: require('./semver.js'),
- Range: require('./range.js'),
- Comparator: require('./comparator.js')
-}
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/classes/range.js b/src/node_modules/simple-update-notifier/node_modules/semver/classes/range.js
deleted file mode 100644
index 90876c3..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/classes/range.js
+++ /dev/null
@@ -1,448 +0,0 @@
-// hoisted class for cyclic dependency
-class Range {
- constructor (range, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (range instanceof Range) {
- if (
- range.loose === !!options.loose &&
- range.includePrerelease === !!options.includePrerelease
- ) {
- return range
- } else {
- return new Range(range.raw, options)
- }
- }
-
- if (range instanceof Comparator) {
- // just put it in the set and return
- this.raw = range.value
- this.set = [[range]]
- this.format()
- return this
- }
-
- this.options = options
- this.loose = !!options.loose
- this.includePrerelease = !!options.includePrerelease
-
- // First, split based on boolean or ||
- this.raw = range
- this.set = range
- .split(/\s*\|\|\s*/)
- // map the range to a 2d array of comparators
- .map(range => this.parseRange(range.trim()))
- // throw out any comparator lists that are empty
- // this generally means that it was not a valid range, which is allowed
- // in loose mode, but will still throw if the WHOLE range is invalid.
- .filter(c => c.length)
-
- if (!this.set.length) {
- throw new TypeError(`Invalid SemVer Range: ${range}`)
- }
-
- this.format()
- }
-
- format () {
- this.range = this.set
- .map((comps) => {
- return comps.join(' ').trim()
- })
- .join('||')
- .trim()
- return this.range
- }
-
- toString () {
- return this.range
- }
-
- parseRange (range) {
- const loose = this.options.loose
- range = range.trim()
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
- range = range.replace(hr, hyphenReplace)
- debug('hyphen replace', range)
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
- debug('comparator trim', range, re[t.COMPARATORTRIM])
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[t.CARETTRIM], caretTrimReplace)
-
- // normalize spaces
- range = range.split(/\s+/).join(' ')
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
- return range
- .split(' ')
- .map(comp => parseComparator(comp, this.options))
- .join(' ')
- .split(/\s+/)
- // in loose mode, throw out any that are not valid comparators
- .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true)
- .map(comp => new Comparator(comp, this.options))
- }
-
- intersects (range, options) {
- if (!(range instanceof Range)) {
- throw new TypeError('a Range is required')
- }
-
- return this.set.some((thisComparators) => {
- return (
- isSatisfiable(thisComparators, options) &&
- range.set.some((rangeComparators) => {
- return (
- isSatisfiable(rangeComparators, options) &&
- thisComparators.every((thisComparator) => {
- return rangeComparators.every((rangeComparator) => {
- return thisComparator.intersects(rangeComparator, options)
- })
- })
- )
- })
- )
- })
- }
-
- // if ANY of the sets match ALL of its comparators, then pass
- test (version) {
- if (!version) {
- return false
- }
-
- if (typeof version === 'string') {
- try {
- version = new SemVer(version, this.options)
- } catch (er) {
- return false
- }
- }
-
- for (let i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version, this.options)) {
- return true
- }
- }
- return false
- }
-}
-module.exports = Range
-
-const Comparator = require('./comparator')
-const debug = require('../internal/debug')
-const SemVer = require('./semver')
-const {
- re,
- t,
- comparatorTrimReplace,
- tildeTrimReplace,
- caretTrimReplace
-} = require('../internal/re')
-
-// take a set of comparators and determine whether there
-// exists a version which can satisfy it
-const isSatisfiable = (comparators, options) => {
- let result = true
- const remainingComparators = comparators.slice()
- let testComparator = remainingComparators.pop()
-
- while (result && remainingComparators.length) {
- result = remainingComparators.every((otherComparator) => {
- return testComparator.intersects(otherComparator, options)
- })
-
- testComparator = remainingComparators.pop()
- }
-
- return result
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-const parseComparator = (comp, options) => {
- debug('comp', comp, options)
- comp = replaceCarets(comp, options)
- debug('caret', comp)
- comp = replaceTildes(comp, options)
- debug('tildes', comp)
- comp = replaceXRanges(comp, options)
- debug('xrange', comp)
- comp = replaceStars(comp, options)
- debug('stars', comp)
- return comp
-}
-
-const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-const replaceTildes = (comp, options) =>
- comp.trim().split(/\s+/).map((comp) => {
- return replaceTilde(comp, options)
- }).join(' ')
-
-const replaceTilde = (comp, options) => {
- const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
- return comp.replace(r, (_, M, m, p, pr) => {
- debug('tilde', comp, _, M, m, p, pr)
- let ret
-
- if (isX(M)) {
- ret = ''
- } else if (isX(m)) {
- ret = `>=${M}.0.0 <${+M + 1}.0.0`
- } else if (isX(p)) {
- // ~1.2 == >=1.2.0 <1.3.0
- ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0`
- } else if (pr) {
- debug('replaceTilde pr', pr)
- ret = `>=${M}.${m}.${p}-${pr
- } <${M}.${+m + 1}.0`
- } else {
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = `>=${M}.${m}.${p
- } <${M}.${+m + 1}.0`
- }
-
- debug('tilde return', ret)
- return ret
- })
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-const replaceCarets = (comp, options) =>
- comp.trim().split(/\s+/).map((comp) => {
- return replaceCaret(comp, options)
- }).join(' ')
-
-const replaceCaret = (comp, options) => {
- debug('caret', comp, options)
- const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
- return comp.replace(r, (_, M, m, p, pr) => {
- debug('caret', comp, _, M, m, p, pr)
- let ret
-
- if (isX(M)) {
- ret = ''
- } else if (isX(m)) {
- ret = `>=${M}.0.0 <${+M + 1}.0.0`
- } else if (isX(p)) {
- if (M === '0') {
- ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0`
- } else {
- ret = `>=${M}.${m}.0 <${+M + 1}.0.0`
- }
- } else if (pr) {
- debug('replaceCaret pr', pr)
- if (M === '0') {
- if (m === '0') {
- ret = `>=${M}.${m}.${p}-${pr
- } <${M}.${m}.${+p + 1}`
- } else {
- ret = `>=${M}.${m}.${p}-${pr
- } <${M}.${+m + 1}.0`
- }
- } else {
- ret = `>=${M}.${m}.${p}-${pr
- } <${+M + 1}.0.0`
- }
- } else {
- debug('no pr')
- if (M === '0') {
- if (m === '0') {
- ret = `>=${M}.${m}.${p
- } <${M}.${m}.${+p + 1}`
- } else {
- ret = `>=${M}.${m}.${p
- } <${M}.${+m + 1}.0`
- }
- } else {
- ret = `>=${M}.${m}.${p
- } <${+M + 1}.0.0`
- }
- }
-
- debug('caret return', ret)
- return ret
- })
-}
-
-const replaceXRanges = (comp, options) => {
- debug('replaceXRanges', comp, options)
- return comp.split(/\s+/).map((comp) => {
- return replaceXRange(comp, options)
- }).join(' ')
-}
-
-const replaceXRange = (comp, options) => {
- comp = comp.trim()
- const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
- return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
- debug('xRange', comp, ret, gtlt, M, m, p, pr)
- const xM = isX(M)
- const xm = xM || isX(m)
- const xp = xm || isX(p)
- const anyX = xp
-
- if (gtlt === '=' && anyX) {
- gtlt = ''
- }
-
- // if we're including prereleases in the match, then we need
- // to fix this to -0, the lowest possible prerelease value
- pr = options.includePrerelease ? '-0' : ''
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0-0'
- } else {
- // nothing is forbidden
- ret = '*'
- }
- } else if (gtlt && anyX) {
- // we know patch is an x, because we have any x at all.
- // replace X with 0
- if (xm) {
- m = 0
- }
- p = 0
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- gtlt = '>='
- if (xm) {
- M = +M + 1
- m = 0
- p = 0
- } else {
- m = +m + 1
- p = 0
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<'
- if (xm) {
- M = +M + 1
- } else {
- m = +m + 1
- }
- }
-
- ret = `${gtlt + M}.${m}.${p}${pr}`
- } else if (xm) {
- ret = `>=${M}.0.0${pr} <${+M + 1}.0.0${pr}`
- } else if (xp) {
- ret = `>=${M}.${m}.0${pr
- } <${M}.${+m + 1}.0${pr}`
- }
-
- debug('xRange return', ret)
-
- return ret
- })
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-const replaceStars = (comp, options) => {
- debug('replaceStars', comp, options)
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[t.STAR], '')
-}
-
-// This function is passed to string.replace(re[t.HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-const hyphenReplace = ($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) => {
- if (isX(fM)) {
- from = ''
- } else if (isX(fm)) {
- from = `>=${fM}.0.0`
- } else if (isX(fp)) {
- from = `>=${fM}.${fm}.0`
- } else {
- from = `>=${from}`
- }
-
- if (isX(tM)) {
- to = ''
- } else if (isX(tm)) {
- to = `<${+tM + 1}.0.0`
- } else if (isX(tp)) {
- to = `<${tM}.${+tm + 1}.0`
- } else if (tpr) {
- to = `<=${tM}.${tm}.${tp}-${tpr}`
- } else {
- to = `<=${to}`
- }
-
- return (`${from} ${to}`).trim()
-}
-
-const testSet = (set, version, options) => {
- for (let i = 0; i < set.length; i++) {
- if (!set[i].test(version)) {
- return false
- }
- }
-
- if (version.prerelease.length && !options.includePrerelease) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (let i = 0; i < set.length; i++) {
- debug(set[i].semver)
- if (set[i].semver === Comparator.ANY) {
- continue
- }
-
- if (set[i].semver.prerelease.length > 0) {
- const allowed = set[i].semver
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch) {
- return true
- }
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false
- }
-
- return true
-}
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/classes/semver.js b/src/node_modules/simple-update-notifier/node_modules/semver/classes/semver.js
deleted file mode 100644
index 73247ad..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/classes/semver.js
+++ /dev/null
@@ -1,290 +0,0 @@
-const debug = require('../internal/debug')
-const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
-const { re, t } = require('../internal/re')
-
-const { compareIdentifiers } = require('../internal/identifiers')
-class SemVer {
- constructor (version, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
- if (version instanceof SemVer) {
- if (version.loose === !!options.loose &&
- version.includePrerelease === !!options.includePrerelease) {
- return version
- } else {
- version = version.version
- }
- } else if (typeof version !== 'string') {
- throw new TypeError(`Invalid Version: ${version}`)
- }
-
- if (version.length > MAX_LENGTH) {
- throw new TypeError(
- `version is longer than ${MAX_LENGTH} characters`
- )
- }
-
- debug('SemVer', version, options)
- this.options = options
- this.loose = !!options.loose
- // this isn't actually relevant for versions, but keep it so that we
- // don't run into trouble passing this.options around.
- this.includePrerelease = !!options.includePrerelease
-
- const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
-
- if (!m) {
- throw new TypeError(`Invalid Version: ${version}`)
- }
-
- this.raw = version
-
- // these are actually numbers
- this.major = +m[1]
- this.minor = +m[2]
- this.patch = +m[3]
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
- throw new TypeError('Invalid major version')
- }
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
- throw new TypeError('Invalid minor version')
- }
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
- throw new TypeError('Invalid patch version')
- }
-
- // numberify any prerelease numeric ids
- if (!m[4]) {
- this.prerelease = []
- } else {
- this.prerelease = m[4].split('.').map((id) => {
- if (/^[0-9]+$/.test(id)) {
- const num = +id
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
- return num
- }
- }
- return id
- })
- }
-
- this.build = m[5] ? m[5].split('.') : []
- this.format()
- }
-
- format () {
- this.version = `${this.major}.${this.minor}.${this.patch}`
- if (this.prerelease.length) {
- this.version += `-${this.prerelease.join('.')}`
- }
- return this.version
- }
-
- toString () {
- return this.version
- }
-
- compare (other) {
- debug('SemVer.compare', this.version, this.options, other)
- if (!(other instanceof SemVer)) {
- if (typeof other === 'string' && other === this.version) {
- return 0
- }
- other = new SemVer(other, this.options)
- }
-
- if (other.version === this.version) {
- return 0
- }
-
- return this.compareMain(other) || this.comparePre(other)
- }
-
- compareMain (other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options)
- }
-
- return (
- compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch)
- )
- }
-
- comparePre (other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options)
- }
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length) {
- return -1
- } else if (!this.prerelease.length && other.prerelease.length) {
- return 1
- } else if (!this.prerelease.length && !other.prerelease.length) {
- return 0
- }
-
- let i = 0
- do {
- const a = this.prerelease[i]
- const b = other.prerelease[i]
- debug('prerelease compare', i, a, b)
- if (a === undefined && b === undefined) {
- return 0
- } else if (b === undefined) {
- return 1
- } else if (a === undefined) {
- return -1
- } else if (a === b) {
- continue
- } else {
- return compareIdentifiers(a, b)
- }
- } while (++i)
- }
-
- compareBuild (other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options)
- }
-
- let i = 0
- do {
- const a = this.build[i]
- const b = other.build[i]
- debug('prerelease compare', i, a, b)
- if (a === undefined && b === undefined) {
- return 0
- } else if (b === undefined) {
- return 1
- } else if (a === undefined) {
- return -1
- } else if (a === b) {
- continue
- } else {
- return compareIdentifiers(a, b)
- }
- } while (++i)
- }
-
- // preminor will bump the version up to the next minor release, and immediately
- // down to pre-release. premajor and prepatch work the same way.
- inc (release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0
- this.patch = 0
- this.minor = 0
- this.major++
- this.inc('pre', identifier)
- break
- case 'preminor':
- this.prerelease.length = 0
- this.patch = 0
- this.minor++
- this.inc('pre', identifier)
- break
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0
- this.inc('patch', identifier)
- this.inc('pre', identifier)
- break
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0) {
- this.inc('patch', identifier)
- }
- this.inc('pre', identifier)
- break
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (
- this.minor !== 0 ||
- this.patch !== 0 ||
- this.prerelease.length === 0
- ) {
- this.major++
- }
- this.minor = 0
- this.patch = 0
- this.prerelease = []
- break
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0) {
- this.minor++
- }
- this.patch = 0
- this.prerelease = []
- break
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0) {
- this.patch++
- }
- this.prerelease = []
- break
- // This probably shouldn't be used publicly.
- // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0) {
- this.prerelease = [0]
- } else {
- let i = this.prerelease.length
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++
- i = -2
- }
- }
- if (i === -1) {
- // didn't increment anything
- this.prerelease.push(0)
- }
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1])) {
- this.prerelease = [identifier, 0]
- }
- } else {
- this.prerelease = [identifier, 0]
- }
- }
- break
-
- default:
- throw new Error(`invalid increment argument: ${release}`)
- }
- this.format()
- this.raw = this.version
- return this
- }
-}
-
-module.exports = SemVer
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/clean.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/clean.js
deleted file mode 100644
index 811fe6b..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/clean.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const parse = require('./parse')
-const clean = (version, options) => {
- const s = parse(version.trim().replace(/^[=v]+/, ''), options)
- return s ? s.version : null
-}
-module.exports = clean
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/cmp.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/cmp.js
deleted file mode 100644
index 3b89db7..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/cmp.js
+++ /dev/null
@@ -1,48 +0,0 @@
-const eq = require('./eq')
-const neq = require('./neq')
-const gt = require('./gt')
-const gte = require('./gte')
-const lt = require('./lt')
-const lte = require('./lte')
-
-const cmp = (a, op, b, loose) => {
- switch (op) {
- case '===':
- if (typeof a === 'object')
- a = a.version
- if (typeof b === 'object')
- b = b.version
- return a === b
-
- case '!==':
- if (typeof a === 'object')
- a = a.version
- if (typeof b === 'object')
- b = b.version
- return a !== b
-
- case '':
- case '=':
- case '==':
- return eq(a, b, loose)
-
- case '!=':
- return neq(a, b, loose)
-
- case '>':
- return gt(a, b, loose)
-
- case '>=':
- return gte(a, b, loose)
-
- case '<':
- return lt(a, b, loose)
-
- case '<=':
- return lte(a, b, loose)
-
- default:
- throw new TypeError(`Invalid operator: ${op}`)
- }
-}
-module.exports = cmp
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/coerce.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/coerce.js
deleted file mode 100644
index 106ca71..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/coerce.js
+++ /dev/null
@@ -1,51 +0,0 @@
-const SemVer = require('../classes/semver')
-const parse = require('./parse')
-const {re, t} = require('../internal/re')
-
-const coerce = (version, options) => {
- if (version instanceof SemVer) {
- return version
- }
-
- if (typeof version === 'number') {
- version = String(version)
- }
-
- if (typeof version !== 'string') {
- return null
- }
-
- options = options || {}
-
- let match = null
- if (!options.rtl) {
- match = version.match(re[t.COERCE])
- } else {
- // Find the right-most coercible string that does not share
- // a terminus with a more left-ward coercible string.
- // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
- //
- // Walk through the string checking with a /g regexp
- // Manually set the index so as to pick up overlapping matches.
- // Stop when we get a match that ends at the string end, since no
- // coercible string can be more right-ward without the same terminus.
- let next
- while ((next = re[t.COERCERTL].exec(version)) &&
- (!match || match.index + match[0].length !== version.length)
- ) {
- if (!match ||
- next.index + next[0].length !== match.index + match[0].length) {
- match = next
- }
- re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
- }
- // leave it in a clean state
- re[t.COERCERTL].lastIndex = -1
- }
-
- if (match === null)
- return null
-
- return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
-}
-module.exports = coerce
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/compare-build.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/compare-build.js
deleted file mode 100644
index 9eb881b..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/compare-build.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const SemVer = require('../classes/semver')
-const compareBuild = (a, b, loose) => {
- const versionA = new SemVer(a, loose)
- const versionB = new SemVer(b, loose)
- return versionA.compare(versionB) || versionA.compareBuild(versionB)
-}
-module.exports = compareBuild
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/compare-loose.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/compare-loose.js
deleted file mode 100644
index 4881fbe..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/compare-loose.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const compareLoose = (a, b) => compare(a, b, true)
-module.exports = compareLoose
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/compare.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/compare.js
deleted file mode 100644
index 748b7af..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/compare.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const SemVer = require('../classes/semver')
-const compare = (a, b, loose) =>
- new SemVer(a, loose).compare(new SemVer(b, loose))
-
-module.exports = compare
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/diff.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/diff.js
deleted file mode 100644
index 1493666..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/diff.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const parse = require('./parse')
-const eq = require('./eq')
-
-const diff = (version1, version2) => {
- if (eq(version1, version2)) {
- return null
- } else {
- const v1 = parse(version1)
- const v2 = parse(version2)
- let prefix = ''
- if (v1.prerelease.length || v2.prerelease.length) {
- prefix = 'pre'
- var defaultResult = 'prerelease'
- }
- for (const key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return prefix + key
- }
- }
- }
- return defaultResult // may be undefined
- }
-}
-module.exports = diff
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/eq.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/eq.js
deleted file mode 100644
index 271fed9..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/eq.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const eq = (a, b, loose) => compare(a, b, loose) === 0
-module.exports = eq
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/gt.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/gt.js
deleted file mode 100644
index d9b2156..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/gt.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const gt = (a, b, loose) => compare(a, b, loose) > 0
-module.exports = gt
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/gte.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/gte.js
deleted file mode 100644
index 5aeaa63..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/gte.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const gte = (a, b, loose) => compare(a, b, loose) >= 0
-module.exports = gte
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/inc.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/inc.js
deleted file mode 100644
index aa4d83a..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/inc.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const SemVer = require('../classes/semver')
-
-const inc = (version, release, options, identifier) => {
- if (typeof (options) === 'string') {
- identifier = options
- options = undefined
- }
-
- try {
- return new SemVer(version, options).inc(release, identifier).version
- } catch (er) {
- return null
- }
-}
-module.exports = inc
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/lt.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/lt.js
deleted file mode 100644
index b440ab7..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/lt.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const lt = (a, b, loose) => compare(a, b, loose) < 0
-module.exports = lt
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/lte.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/lte.js
deleted file mode 100644
index 6dcc956..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/lte.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const lte = (a, b, loose) => compare(a, b, loose) <= 0
-module.exports = lte
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/major.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/major.js
deleted file mode 100644
index 4283165..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/major.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const SemVer = require('../classes/semver')
-const major = (a, loose) => new SemVer(a, loose).major
-module.exports = major
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/minor.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/minor.js
deleted file mode 100644
index 57b3455..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/minor.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const SemVer = require('../classes/semver')
-const minor = (a, loose) => new SemVer(a, loose).minor
-module.exports = minor
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/neq.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/neq.js
deleted file mode 100644
index f944c01..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/neq.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const neq = (a, b, loose) => compare(a, b, loose) !== 0
-module.exports = neq
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/parse.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/parse.js
deleted file mode 100644
index 457fee0..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/parse.js
+++ /dev/null
@@ -1,37 +0,0 @@
-const {MAX_LENGTH} = require('../internal/constants')
-const { re, t } = require('../internal/re')
-const SemVer = require('../classes/semver')
-
-const parse = (version, options) => {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (version instanceof SemVer) {
- return version
- }
-
- if (typeof version !== 'string') {
- return null
- }
-
- if (version.length > MAX_LENGTH) {
- return null
- }
-
- const r = options.loose ? re[t.LOOSE] : re[t.FULL]
- if (!r.test(version)) {
- return null
- }
-
- try {
- return new SemVer(version, options)
- } catch (er) {
- return null
- }
-}
-
-module.exports = parse
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/patch.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/patch.js
deleted file mode 100644
index 63afca2..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/patch.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const SemVer = require('../classes/semver')
-const patch = (a, loose) => new SemVer(a, loose).patch
-module.exports = patch
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/prerelease.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/prerelease.js
deleted file mode 100644
index 06aa132..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/prerelease.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const parse = require('./parse')
-const prerelease = (version, options) => {
- const parsed = parse(version, options)
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
-}
-module.exports = prerelease
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/rcompare.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/rcompare.js
deleted file mode 100644
index 0ac509e..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/rcompare.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const rcompare = (a, b, loose) => compare(b, a, loose)
-module.exports = rcompare
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/rsort.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/rsort.js
deleted file mode 100644
index 82404c5..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/rsort.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compareBuild = require('./compare-build')
-const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
-module.exports = rsort
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/satisfies.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/satisfies.js
deleted file mode 100644
index 50af1c1..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/satisfies.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const Range = require('../classes/range')
-const satisfies = (version, range, options) => {
- try {
- range = new Range(range, options)
- } catch (er) {
- return false
- }
- return range.test(version)
-}
-module.exports = satisfies
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/sort.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/sort.js
deleted file mode 100644
index 4d10917..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/sort.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compareBuild = require('./compare-build')
-const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
-module.exports = sort
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/functions/valid.js b/src/node_modules/simple-update-notifier/node_modules/semver/functions/valid.js
deleted file mode 100644
index f27bae1..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/functions/valid.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const parse = require('./parse')
-const valid = (version, options) => {
- const v = parse(version, options)
- return v ? v.version : null
-}
-module.exports = valid
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/index.js b/src/node_modules/simple-update-notifier/node_modules/semver/index.js
deleted file mode 100644
index 068f8b4..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/index.js
+++ /dev/null
@@ -1,64 +0,0 @@
-const lrCache = {}
-const lazyRequire = (path, subkey) => {
- const module = lrCache[path] || (lrCache[path] = require(path))
- return subkey ? module[subkey] : module
-}
-
-const lazyExport = (key, path, subkey) => {
- Object.defineProperty(exports, key, {
- get: () => {
- const res = lazyRequire(path, subkey)
- Object.defineProperty(exports, key, {
- value: res,
- enumerable: true,
- configurable: true
- })
- return res
- },
- configurable: true,
- enumerable: true
- })
-}
-
-lazyExport('re', './internal/re', 're')
-lazyExport('src', './internal/re', 'src')
-lazyExport('tokens', './internal/re', 't')
-lazyExport('SEMVER_SPEC_VERSION', './internal/constants', 'SEMVER_SPEC_VERSION')
-lazyExport('SemVer', './classes/semver')
-lazyExport('compareIdentifiers', './internal/identifiers', 'compareIdentifiers')
-lazyExport('rcompareIdentifiers', './internal/identifiers', 'rcompareIdentifiers')
-lazyExport('parse', './functions/parse')
-lazyExport('valid', './functions/valid')
-lazyExport('clean', './functions/clean')
-lazyExport('inc', './functions/inc')
-lazyExport('diff', './functions/diff')
-lazyExport('major', './functions/major')
-lazyExport('minor', './functions/minor')
-lazyExport('patch', './functions/patch')
-lazyExport('prerelease', './functions/prerelease')
-lazyExport('compare', './functions/compare')
-lazyExport('rcompare', './functions/rcompare')
-lazyExport('compareLoose', './functions/compare-loose')
-lazyExport('compareBuild', './functions/compare-build')
-lazyExport('sort', './functions/sort')
-lazyExport('rsort', './functions/rsort')
-lazyExport('gt', './functions/gt')
-lazyExport('lt', './functions/lt')
-lazyExport('eq', './functions/eq')
-lazyExport('neq', './functions/neq')
-lazyExport('gte', './functions/gte')
-lazyExport('lte', './functions/lte')
-lazyExport('cmp', './functions/cmp')
-lazyExport('coerce', './functions/coerce')
-lazyExport('Comparator', './classes/comparator')
-lazyExport('Range', './classes/range')
-lazyExport('satisfies', './functions/satisfies')
-lazyExport('toComparators', './ranges/to-comparators')
-lazyExport('maxSatisfying', './ranges/max-satisfying')
-lazyExport('minSatisfying', './ranges/min-satisfying')
-lazyExport('minVersion', './ranges/min-version')
-lazyExport('validRange', './ranges/valid')
-lazyExport('outside', './ranges/outside')
-lazyExport('gtr', './ranges/gtr')
-lazyExport('ltr', './ranges/ltr')
-lazyExport('intersects', './ranges/intersects')
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/internal/constants.js b/src/node_modules/simple-update-notifier/node_modules/semver/internal/constants.js
deleted file mode 100644
index 49df215..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/internal/constants.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-const SEMVER_SPEC_VERSION = '2.0.0'
-
-const MAX_LENGTH = 256
-const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
- /* istanbul ignore next */ 9007199254740991
-
-// Max safe segment length for coercion.
-const MAX_SAFE_COMPONENT_LENGTH = 16
-
-module.exports = {
- SEMVER_SPEC_VERSION,
- MAX_LENGTH,
- MAX_SAFE_INTEGER,
- MAX_SAFE_COMPONENT_LENGTH
-}
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/internal/debug.js b/src/node_modules/simple-update-notifier/node_modules/semver/internal/debug.js
deleted file mode 100644
index 1c00e13..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/internal/debug.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const debug = (
- typeof process === 'object' &&
- process.env &&
- process.env.NODE_DEBUG &&
- /\bsemver\b/i.test(process.env.NODE_DEBUG)
-) ? (...args) => console.error('SEMVER', ...args)
- : () => {}
-
-module.exports = debug
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/internal/identifiers.js b/src/node_modules/simple-update-notifier/node_modules/semver/internal/identifiers.js
deleted file mode 100644
index ed13094..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/internal/identifiers.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const numeric = /^[0-9]+$/
-const compareIdentifiers = (a, b) => {
- const anum = numeric.test(a)
- const bnum = numeric.test(b)
-
- if (anum && bnum) {
- a = +a
- b = +b
- }
-
- return a === b ? 0
- : (anum && !bnum) ? -1
- : (bnum && !anum) ? 1
- : a < b ? -1
- : 1
-}
-
-const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
-
-module.exports = {
- compareIdentifiers,
- rcompareIdentifiers
-}
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/internal/re.js b/src/node_modules/simple-update-notifier/node_modules/semver/internal/re.js
deleted file mode 100644
index 0e8fb52..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/internal/re.js
+++ /dev/null
@@ -1,179 +0,0 @@
-const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')
-const debug = require('./debug')
-exports = module.exports = {}
-
-// The actual regexps go on exports.re
-const re = exports.re = []
-const src = exports.src = []
-const t = exports.t = {}
-let R = 0
-
-const createToken = (name, value, isGlobal) => {
- const index = R++
- debug(index, value)
- t[name] = index
- src[index] = value
- re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
-}
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
-createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*')
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
- `(${src[t.NUMERICIDENTIFIER]})\\.` +
- `(${src[t.NUMERICIDENTIFIER]})`)
-
-createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
- `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
- `(${src[t.NUMERICIDENTIFIERLOOSE]})`)
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
-}|${src[t.NONNUMERICIDENTIFIER]})`)
-
-createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
-}|${src[t.NONNUMERICIDENTIFIER]})`)
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
-}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
-
-createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
-}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
-}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
-}${src[t.PRERELEASE]}?${
- src[t.BUILD]}?`)
-
-createToken('FULL', `^${src[t.FULLPLAIN]}$`)
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
-}${src[t.PRERELEASELOOSE]}?${
- src[t.BUILD]}?`)
-
-createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
-
-createToken('GTLT', '((?:<|>)?=?)')
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
-createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
-
-createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
- `(?:${src[t.PRERELEASE]})?${
- src[t.BUILD]}?` +
- `)?)?`)
-
-createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
- `(?:${src[t.PRERELEASELOOSE]})?${
- src[t.BUILD]}?` +
- `)?)?`)
-
-createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
-createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
-
-// Coercion.
-// Extract anything that could conceivably be a part of a valid semver
-createToken('COERCE', `${'(^|[^\\d])' +
- '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
- `(?:$|[^\\d])`)
-createToken('COERCERTL', src[t.COERCE], true)
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-createToken('LONETILDE', '(?:~>?)')
-
-createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
-exports.tildeTrimReplace = '$1~'
-
-createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
-createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-createToken('LONECARET', '(?:\\^)')
-
-createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
-exports.caretTrimReplace = '$1^'
-
-createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
-createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
-createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
-}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
-exports.comparatorTrimReplace = '$1$2$3'
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
- `\\s+-\\s+` +
- `(${src[t.XRANGEPLAIN]})` +
- `\\s*$`)
-
-createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
- `\\s+-\\s+` +
- `(${src[t.XRANGEPLAINLOOSE]})` +
- `\\s*$`)
-
-// Star ranges basically just allow anything at all.
-createToken('STAR', '(<|>)?=?\\s*\\*')
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/package.json b/src/node_modules/simple-update-notifier/node_modules/semver/package.json
deleted file mode 100644
index 88574c0..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/package.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "semver",
- "version": "7.0.0",
- "description": "The semantic version parser used by npm.",
- "main": "index.js",
- "scripts": {
- "test": "tap",
- "snap": "tap",
- "preversion": "npm test",
- "postversion": "npm publish",
- "postpublish": "git push origin --follow-tags"
- },
- "devDependencies": {
- "tap": "^14.10.1"
- },
- "license": "ISC",
- "repository": "https://github.com/npm/node-semver",
- "bin": {
- "semver": "./bin/semver.js"
- },
- "files": [
- "bin",
- "range.bnf",
- "classes",
- "functions",
- "internal",
- "ranges",
- "index.js"
- ],
- "tap": {
- "check-coverage": true,
- "coverage-map": "map.js"
- }
-}
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/range.bnf b/src/node_modules/simple-update-notifier/node_modules/semver/range.bnf
deleted file mode 100644
index d4c6ae0..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/range.bnf
+++ /dev/null
@@ -1,16 +0,0 @@
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | [1-9] ( [0-9] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/gtr.js b/src/node_modules/simple-update-notifier/node_modules/semver/ranges/gtr.js
deleted file mode 100644
index db7e355..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/gtr.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Determine if version is greater than all the versions possible in the range.
-const outside = require('./outside')
-const gtr = (version, range, options) => outside(version, range, '>', options)
-module.exports = gtr
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/intersects.js b/src/node_modules/simple-update-notifier/node_modules/semver/ranges/intersects.js
deleted file mode 100644
index 3d1a6f3..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/intersects.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const Range = require('../classes/range')
-const intersects = (r1, r2, options) => {
- r1 = new Range(r1, options)
- r2 = new Range(r2, options)
- return r1.intersects(r2)
-}
-module.exports = intersects
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/ltr.js b/src/node_modules/simple-update-notifier/node_modules/semver/ranges/ltr.js
deleted file mode 100644
index 528a885..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/ltr.js
+++ /dev/null
@@ -1,4 +0,0 @@
-const outside = require('./outside')
-// Determine if version is less than all the versions possible in the range
-const ltr = (version, range, options) => outside(version, range, '<', options)
-module.exports = ltr
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/max-satisfying.js b/src/node_modules/simple-update-notifier/node_modules/semver/ranges/max-satisfying.js
deleted file mode 100644
index 6e3d993..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/max-satisfying.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const SemVer = require('../classes/semver')
-const Range = require('../classes/range')
-
-const maxSatisfying = (versions, range, options) => {
- let max = null
- let maxSV = null
- let rangeObj = null
- try {
- rangeObj = new Range(range, options)
- } catch (er) {
- return null
- }
- versions.forEach((v) => {
- if (rangeObj.test(v)) {
- // satisfies(v, range, options)
- if (!max || maxSV.compare(v) === -1) {
- // compare(max, v, true)
- max = v
- maxSV = new SemVer(max, options)
- }
- }
- })
- return max
-}
-module.exports = maxSatisfying
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/min-satisfying.js b/src/node_modules/simple-update-notifier/node_modules/semver/ranges/min-satisfying.js
deleted file mode 100644
index 9b60974..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/min-satisfying.js
+++ /dev/null
@@ -1,24 +0,0 @@
-const SemVer = require('../classes/semver')
-const Range = require('../classes/range')
-const minSatisfying = (versions, range, options) => {
- let min = null
- let minSV = null
- let rangeObj = null
- try {
- rangeObj = new Range(range, options)
- } catch (er) {
- return null
- }
- versions.forEach((v) => {
- if (rangeObj.test(v)) {
- // satisfies(v, range, options)
- if (!min || minSV.compare(v) === 1) {
- // compare(min, v, true)
- min = v
- minSV = new SemVer(min, options)
- }
- }
- })
- return min
-}
-module.exports = minSatisfying
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/min-version.js b/src/node_modules/simple-update-notifier/node_modules/semver/ranges/min-version.js
deleted file mode 100644
index 7118d23..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/min-version.js
+++ /dev/null
@@ -1,57 +0,0 @@
-const SemVer = require('../classes/semver')
-const Range = require('../classes/range')
-const gt = require('../functions/gt')
-
-const minVersion = (range, loose) => {
- range = new Range(range, loose)
-
- let minver = new SemVer('0.0.0')
- if (range.test(minver)) {
- return minver
- }
-
- minver = new SemVer('0.0.0-0')
- if (range.test(minver)) {
- return minver
- }
-
- minver = null
- for (let i = 0; i < range.set.length; ++i) {
- const comparators = range.set[i]
-
- comparators.forEach((comparator) => {
- // Clone to avoid manipulating the comparator's semver object.
- const compver = new SemVer(comparator.semver.version)
- switch (comparator.operator) {
- case '>':
- if (compver.prerelease.length === 0) {
- compver.patch++
- } else {
- compver.prerelease.push(0)
- }
- compver.raw = compver.format()
- /* fallthrough */
- case '':
- case '>=':
- if (!minver || gt(minver, compver)) {
- minver = compver
- }
- break
- case '<':
- case '<=':
- /* Ignore maximum versions */
- break
- /* istanbul ignore next */
- default:
- throw new Error(`Unexpected operation: ${comparator.operator}`)
- }
- })
- }
-
- if (minver && range.test(minver)) {
- return minver
- }
-
- return null
-}
-module.exports = minVersion
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/outside.js b/src/node_modules/simple-update-notifier/node_modules/semver/ranges/outside.js
deleted file mode 100644
index e35ed11..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/outside.js
+++ /dev/null
@@ -1,80 +0,0 @@
-const SemVer = require('../classes/semver')
-const Comparator = require('../classes/comparator')
-const {ANY} = Comparator
-const Range = require('../classes/range')
-const satisfies = require('../functions/satisfies')
-const gt = require('../functions/gt')
-const lt = require('../functions/lt')
-const lte = require('../functions/lte')
-const gte = require('../functions/gte')
-
-const outside = (version, range, hilo, options) => {
- version = new SemVer(version, options)
- range = new Range(range, options)
-
- let gtfn, ltefn, ltfn, comp, ecomp
- switch (hilo) {
- case '>':
- gtfn = gt
- ltefn = lte
- ltfn = lt
- comp = '>'
- ecomp = '>='
- break
- case '<':
- gtfn = lt
- ltefn = gte
- ltfn = gt
- comp = '<'
- ecomp = '<='
- break
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"')
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, options)) {
- return false
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (let i = 0; i < range.set.length; ++i) {
- const comparators = range.set[i]
-
- let high = null
- let low = null
-
- comparators.forEach((comparator) => {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator
- low = low || comparator
- if (gtfn(comparator.semver, high.semver, options)) {
- high = comparator
- } else if (ltfn(comparator.semver, low.semver, options)) {
- low = comparator
- }
- })
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false
- }
- }
- return true
-}
-
-module.exports = outside
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/to-comparators.js b/src/node_modules/simple-update-notifier/node_modules/semver/ranges/to-comparators.js
deleted file mode 100644
index 6c8bc7e..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/to-comparators.js
+++ /dev/null
@@ -1,8 +0,0 @@
-const Range = require('../classes/range')
-
-// Mostly just for testing and legacy API reasons
-const toComparators = (range, options) =>
- new Range(range, options).set
- .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
-
-module.exports = toComparators
diff --git a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/valid.js b/src/node_modules/simple-update-notifier/node_modules/semver/ranges/valid.js
deleted file mode 100644
index 365f356..0000000
--- a/src/node_modules/simple-update-notifier/node_modules/semver/ranges/valid.js
+++ /dev/null
@@ -1,11 +0,0 @@
-const Range = require('../classes/range')
-const validRange = (range, options) => {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, options).range || '*'
- } catch (er) {
- return null
- }
-}
-module.exports = validRange
diff --git a/src/node_modules/simple-update-notifier/package.json b/src/node_modules/simple-update-notifier/package.json
deleted file mode 100644
index 62f1da5..0000000
--- a/src/node_modules/simple-update-notifier/package.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "name": "simple-update-notifier",
- "version": "1.1.0",
- "description": "Simple update notifier to check for npm updates for cli applications",
- "main": "build/index.js",
- "types": "build/index.d.ts",
- "repository": {
- "type": "git",
- "url": "https://github.com/alexbrazier/simple-update-notifier.git"
- },
- "homepage": "https://github.com/alexbrazier/simple-update-notifier.git",
- "author": "alexbrazier",
- "license": "MIT",
- "engines": {
- "node": ">=8.10.0"
- },
- "scripts": {
- "test": "jest src --noStackTrace",
- "build": "rollup -c rollup.config.js",
- "prettier:check": "prettier --check src/**/*.ts",
- "prettier": "prettier --write src/**/*.ts",
- "eslint": "eslint src/**/*.ts",
- "lint": "yarn prettier:check && yarn eslint",
- "prepare": "yarn lint && yarn build",
- "release": "release-it"
- },
- "dependencies": {
- "semver": "~7.0.0"
- },
- "devDependencies": {
- "@babel/preset-env": "^7.19.1",
- "@babel/preset-typescript": "^7.17.12",
- "@release-it/conventional-changelog": "^5.1.0",
- "@types/jest": "^29.0.3",
- "@types/node": "^18.7.18",
- "@typescript-eslint/eslint-plugin": "^5.37.0",
- "@typescript-eslint/parser": "^5.37.0",
- "eslint": "^8.23.1",
- "eslint-config-prettier": "^8.5.0",
- "eslint-plugin-prettier": "^4.0.0",
- "jest": "^29.0.3",
- "prettier": "^2.7.1",
- "release-it": "^15.4.2",
- "rollup": "^2.79.0",
- "rollup-plugin-ts": "^3.0.2",
- "typescript": "^4.8.3"
- },
- "publishConfig": {
- "registry": "https://registry.npmjs.org/"
- },
- "files": [
- "build",
- "src"
- ],
- "release-it": {
- "git": {
- "commitMessage": "chore: release ${version}",
- "tagName": "v${version}"
- },
- "npm": {
- "publish": true
- },
- "github": {
- "release": true
- },
- "plugins": {
- "@release-it/conventional-changelog": {
- "preset": "angular",
- "infile": "CHANGELOG.md"
- }
- }
- },
- "eslintConfig": {
- "plugins": [
- "@typescript-eslint",
- "prettier"
- ],
- "extends": [
- "prettier",
- "eslint:recommended",
- "plugin:@typescript-eslint/recommended"
- ],
- "parser": "@typescript-eslint/parser",
- "rules": {
- "prettier/prettier": [
- "error",
- {
- "quoteProps": "consistent",
- "singleQuote": true,
- "tabWidth": 2,
- "trailingComma": "es5",
- "useTabs": false
- }
- ]
- }
- }
-}
diff --git a/src/node_modules/simple-update-notifier/src/borderedText.ts b/src/node_modules/simple-update-notifier/src/borderedText.ts
deleted file mode 100644
index 7145ac2..0000000
--- a/src/node_modules/simple-update-notifier/src/borderedText.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-const borderedText = (text: string) => {
- const lines = text.split('\n');
- const width = Math.max(...lines.map((l) => l.length));
- const res = [`┌${'─'.repeat(width + 2)}┐`];
- for (const line of lines) {
- res.push(`│ ${line.padEnd(width)} │`);
- }
- res.push(`└${'─'.repeat(width + 2)}┘`);
- return res.join('\n');
-};
-
-export default borderedText;
diff --git a/src/node_modules/simple-update-notifier/src/cache.spec.ts b/src/node_modules/simple-update-notifier/src/cache.spec.ts
deleted file mode 100644
index 49e1cb2..0000000
--- a/src/node_modules/simple-update-notifier/src/cache.spec.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { createConfigDir, getLastUpdate, saveLastUpdate } from './cache';
-
-createConfigDir();
-
-jest.useFakeTimers().setSystemTime(new Date('2022-01-01'));
-
-const fakeTime = new Date('2022-01-01').getTime();
-
-test('can save update then get the update details', () => {
- saveLastUpdate('test');
- expect(getLastUpdate('test')).toBe(fakeTime);
-});
-
-test('prefixed module can save update then get the update details', () => {
- saveLastUpdate('@alexbrazier/test');
- expect(getLastUpdate('@alexbrazier/test')).toBe(fakeTime);
-});
diff --git a/src/node_modules/simple-update-notifier/src/cache.ts b/src/node_modules/simple-update-notifier/src/cache.ts
deleted file mode 100644
index e11deba..0000000
--- a/src/node_modules/simple-update-notifier/src/cache.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import os from 'os';
-import path from 'path';
-import fs from 'fs';
-
-const homeDirectory = os.homedir();
-const configDir =
- process.env.XDG_CONFIG_HOME ||
- path.join(homeDirectory, '.config', 'simple-update-notifier');
-
-const getConfigFile = (packageName: string) => {
- return path.join(
- configDir,
- `${packageName.replace('@', '').replace('/', '__')}.json`
- );
-};
-
-export const createConfigDir = () => {
- if (!fs.existsSync(configDir)) {
- fs.mkdirSync(configDir, { recursive: true });
- }
-};
-
-export const getLastUpdate = (packageName: string) => {
- const configFile = getConfigFile(packageName);
-
- try {
- if (!fs.existsSync(configFile)) {
- return undefined;
- }
- const file = JSON.parse(fs.readFileSync(configFile, 'utf8'));
- return file.lastUpdateCheck as number;
- } catch {
- return undefined;
- }
-};
-
-export const saveLastUpdate = (packageName: string) => {
- const configFile = getConfigFile(packageName);
-
- fs.writeFileSync(
- configFile,
- JSON.stringify({ lastUpdateCheck: new Date().getTime() })
- );
-};
diff --git a/src/node_modules/simple-update-notifier/src/getDistVersion.spec.ts b/src/node_modules/simple-update-notifier/src/getDistVersion.spec.ts
deleted file mode 100644
index b78a42e..0000000
--- a/src/node_modules/simple-update-notifier/src/getDistVersion.spec.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import Stream from 'stream';
-import https from 'https';
-import getDistVersion from './getDistVersion';
-
-jest.mock('https', () => ({
- get: jest.fn(),
-}));
-
-test('Valid response returns version', async () => {
- const st = new Stream();
- (https.get as jest.Mock).mockImplementation((url, cb) => {
- cb(st);
-
- st.emit('data', '{"latest":"1.0.0"}');
- st.emit('end');
- });
-
- const version = await getDistVersion('test', 'latest');
-
- expect(version).toEqual('1.0.0');
-});
-
-test('Invalid response throws error', async () => {
- const st = new Stream();
- (https.get as jest.Mock).mockImplementation((url, cb) => {
- cb(st);
-
- st.emit('data', 'some invalid json');
- st.emit('end');
- });
-
- expect(getDistVersion('test', 'latest')).rejects.toThrow(
- 'Could not parse version response'
- );
-});
diff --git a/src/node_modules/simple-update-notifier/src/getDistVersion.ts b/src/node_modules/simple-update-notifier/src/getDistVersion.ts
deleted file mode 100644
index d474e1f..0000000
--- a/src/node_modules/simple-update-notifier/src/getDistVersion.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import https from 'https';
-
-const getDistVersion = async (packageName: string, distTag: string) => {
- const url = `https://registry.npmjs.org/-/package/${packageName}/dist-tags`;
-
- return new Promise((resolve, reject) => {
- https
- .get(url, (res) => {
- let body = '';
-
- res.on('data', (chunk) => (body += chunk));
- res.on('end', () => {
- try {
- const json = JSON.parse(body);
- const version = json[distTag];
- if (!version) {
- reject(new Error('Error getting version'));
- }
- resolve(version);
- } catch {
- reject(new Error('Could not parse version response'));
- }
- });
- })
- .on('error', (err) => reject(err));
- });
-};
-
-export default getDistVersion;
diff --git a/src/node_modules/simple-update-notifier/src/hasNewVersion.spec.ts b/src/node_modules/simple-update-notifier/src/hasNewVersion.spec.ts
deleted file mode 100644
index af7ab22..0000000
--- a/src/node_modules/simple-update-notifier/src/hasNewVersion.spec.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import hasNewVersion from './hasNewVersion';
-import { getLastUpdate } from './cache';
-import getDistVersion from './getDistVersion';
-
-jest.mock('./getDistVersion', () => jest.fn().mockReturnValue('1.0.0'));
-jest.mock('./cache', () => ({
- getLastUpdate: jest.fn().mockReturnValue(undefined),
- createConfigDir: jest.fn(),
- saveLastUpdate: jest.fn(),
-}));
-
-const pkg = { name: 'test', version: '1.0.0' };
-
-afterEach(() => jest.clearAllMocks());
-
-const defaultArgs = {
- pkg,
- shouldNotifyInNpmScript: true,
- alwaysRun: true,
-};
-
-test('it should not trigger update for same version', async () => {
- const newVersion = await hasNewVersion(defaultArgs);
-
- expect(newVersion).toBe(false);
-});
-
-test('it should trigger update for patch version bump', async () => {
- (getDistVersion as jest.Mock).mockReturnValue('1.0.1');
-
- const newVersion = await hasNewVersion(defaultArgs);
-
- expect(newVersion).toBe('1.0.1');
-});
-
-test('it should trigger update for minor version bump', async () => {
- (getDistVersion as jest.Mock).mockReturnValue('1.1.0');
-
- const newVersion = await hasNewVersion(defaultArgs);
-
- expect(newVersion).toBe('1.1.0');
-});
-
-test('it should trigger update for major version bump', async () => {
- (getDistVersion as jest.Mock).mockReturnValue('2.0.0');
-
- const newVersion = await hasNewVersion(defaultArgs);
-
- expect(newVersion).toBe('2.0.0');
-});
-
-test('it should not trigger update if version is lower', async () => {
- (getDistVersion as jest.Mock).mockReturnValue('0.0.9');
-
- const newVersion = await hasNewVersion(defaultArgs);
-
- expect(newVersion).toBe(false);
-});
-
-it('should trigger update check if last update older than config', async () => {
- const TWO_WEEKS = new Date().getTime() - 1000 * 60 * 60 * 24 * 14;
- (getLastUpdate as jest.Mock).mockReturnValue(TWO_WEEKS);
- const newVersion = await hasNewVersion({
- pkg,
- shouldNotifyInNpmScript: true,
- });
-
- expect(newVersion).toBe(false);
- expect(getDistVersion).toHaveBeenCalled();
-});
-
-it('should not trigger update check if last update is too recent', async () => {
- const TWELVE_HOURS = new Date().getTime() - 1000 * 60 * 60 * 12;
- (getLastUpdate as jest.Mock).mockReturnValue(TWELVE_HOURS);
- const newVersion = await hasNewVersion({
- pkg,
- shouldNotifyInNpmScript: true,
- });
-
- expect(newVersion).toBe(false);
- expect(getDistVersion).not.toHaveBeenCalled();
-});
diff --git a/src/node_modules/simple-update-notifier/src/hasNewVersion.ts b/src/node_modules/simple-update-notifier/src/hasNewVersion.ts
deleted file mode 100644
index 31d5069..0000000
--- a/src/node_modules/simple-update-notifier/src/hasNewVersion.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import semver from 'semver';
-import { createConfigDir, getLastUpdate, saveLastUpdate } from './cache';
-import getDistVersion from './getDistVersion';
-import { IUpdate } from './types';
-
-const hasNewVersion = async ({
- pkg,
- updateCheckInterval = 1000 * 60 * 60 * 24,
- distTag = 'latest',
- alwaysRun,
- debug,
-}: IUpdate) => {
- createConfigDir();
- const lastUpdateCheck = getLastUpdate(pkg.name);
- if (
- alwaysRun ||
- !lastUpdateCheck ||
- lastUpdateCheck < new Date().getTime() - updateCheckInterval
- ) {
- const latestVersion = await getDistVersion(pkg.name, distTag);
- saveLastUpdate(pkg.name);
- if (semver.gt(latestVersion, pkg.version)) {
- return latestVersion;
- } else if (debug) {
- console.error(
- `Latest version (${latestVersion}) not newer than current version (${pkg.version})`
- );
- }
- } else if (debug) {
- console.error(
- `Too recent to check for a new update. simpleUpdateNotifier() interval set to ${updateCheckInterval}ms but only ${
- new Date().getTime() - lastUpdateCheck
- }ms since last check.`
- );
- }
-
- return false;
-};
-
-export default hasNewVersion;
diff --git a/src/node_modules/simple-update-notifier/src/index.spec.ts b/src/node_modules/simple-update-notifier/src/index.spec.ts
deleted file mode 100644
index 98ffb5a..0000000
--- a/src/node_modules/simple-update-notifier/src/index.spec.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import simpleUpdateNotifier from '.';
-import hasNewVersion from './hasNewVersion';
-
-const consoleSpy = jest.spyOn(console, 'error');
-
-jest.mock('./hasNewVersion', () => jest.fn().mockResolvedValue('2.0.0'));
-
-beforeEach(jest.clearAllMocks);
-
-test('it logs message if update is available', async () => {
- await simpleUpdateNotifier({
- pkg: { name: 'test', version: '1.0.0' },
- alwaysRun: true,
- });
-
- expect(consoleSpy).toHaveBeenCalledTimes(1);
-});
-
-test('it does not log message if update is not available', async () => {
- (hasNewVersion as jest.Mock).mockResolvedValue(false);
- await simpleUpdateNotifier({
- pkg: { name: 'test', version: '2.0.0' },
- alwaysRun: true,
- });
-
- expect(consoleSpy).toHaveBeenCalledTimes(0);
-});
diff --git a/src/node_modules/simple-update-notifier/src/index.ts b/src/node_modules/simple-update-notifier/src/index.ts
deleted file mode 100644
index 2b0d2cf..0000000
--- a/src/node_modules/simple-update-notifier/src/index.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import isNpmOrYarn from './isNpmOrYarn';
-import hasNewVersion from './hasNewVersion';
-import { IUpdate } from './types';
-import borderedText from './borderedText';
-
-const simpleUpdateNotifier = async (args: IUpdate) => {
- if (
- !args.alwaysRun &&
- (!process.stdout.isTTY || (isNpmOrYarn && !args.shouldNotifyInNpmScript))
- ) {
- if (args.debug) {
- console.error('Opting out of running simpleUpdateNotifier()');
- }
- return;
- }
-
- try {
- const latestVersion = await hasNewVersion(args);
- if (latestVersion) {
- console.error(
- borderedText(`New version of ${args.pkg.name} available!
-Current Version: ${args.pkg.version}
-Latest Version: ${latestVersion}`)
- );
- }
- } catch (err) {
- // Catch any network errors or cache writing errors so module doesn't cause a crash
- if (args.debug && err instanceof Error) {
- console.error('Unexpected error in simpleUpdateNotifier():', err);
- }
- }
-};
-
-export default simpleUpdateNotifier;
diff --git a/src/node_modules/simple-update-notifier/src/isNpmOrYarn.ts b/src/node_modules/simple-update-notifier/src/isNpmOrYarn.ts
deleted file mode 100644
index ee4c837..0000000
--- a/src/node_modules/simple-update-notifier/src/isNpmOrYarn.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import process from 'process';
-
-const packageJson = process.env.npm_package_json;
-const userAgent = process.env.npm_config_user_agent;
-const isNpm6 = Boolean(userAgent && userAgent.startsWith('npm'));
-const isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json'));
-
-const isNpm = isNpm6 || isNpm7;
-const isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));
-const isNpmOrYarn = isNpm || isYarn;
-
-export default isNpmOrYarn;
diff --git a/src/node_modules/simple-update-notifier/src/types.ts b/src/node_modules/simple-update-notifier/src/types.ts
deleted file mode 100644
index c395eb0..0000000
--- a/src/node_modules/simple-update-notifier/src/types.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface IUpdate {
- pkg: { name: string; version: string };
- updateCheckInterval?: number;
- shouldNotifyInNpmScript?: boolean;
- distTag?: string;
- alwaysRun?: boolean;
- debug?: boolean;
-}
diff --git a/src/node_modules/supports-color/browser.js b/src/node_modules/supports-color/browser.js
deleted file mode 100644
index 62afa3a..0000000
--- a/src/node_modules/supports-color/browser.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-module.exports = {
- stdout: false,
- stderr: false
-};
diff --git a/src/node_modules/supports-color/index.js b/src/node_modules/supports-color/index.js
deleted file mode 100644
index 1704131..0000000
--- a/src/node_modules/supports-color/index.js
+++ /dev/null
@@ -1,131 +0,0 @@
-'use strict';
-const os = require('os');
-const hasFlag = require('has-flag');
-
-const env = process.env;
-
-let forceColor;
-if (hasFlag('no-color') ||
- hasFlag('no-colors') ||
- hasFlag('color=false')) {
- forceColor = false;
-} else if (hasFlag('color') ||
- hasFlag('colors') ||
- hasFlag('color=true') ||
- hasFlag('color=always')) {
- forceColor = true;
-}
-if ('FORCE_COLOR' in env) {
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
-}
-
-function translateLevel(level) {
- if (level === 0) {
- return false;
- }
-
- return {
- level,
- hasBasic: true,
- has256: level >= 2,
- has16m: level >= 3
- };
-}
-
-function supportsColor(stream) {
- if (forceColor === false) {
- return 0;
- }
-
- if (hasFlag('color=16m') ||
- hasFlag('color=full') ||
- hasFlag('color=truecolor')) {
- return 3;
- }
-
- if (hasFlag('color=256')) {
- return 2;
- }
-
- if (stream && !stream.isTTY && forceColor !== true) {
- return 0;
- }
-
- const min = forceColor ? 1 : 0;
-
- if (process.platform === 'win32') {
- // Node.js 7.5.0 is the first version of Node.js to include a patch to
- // libuv that enables 256 color output on Windows. Anything earlier and it
- // won't work. However, here we target Node.js 8 at minimum as it is an LTS
- // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
- // release that supports 256 colors. Windows 10 build 14931 is the first release
- // that supports 16m/TrueColor.
- const osRelease = os.release().split('.');
- if (
- Number(process.versions.node.split('.')[0]) >= 8 &&
- Number(osRelease[0]) >= 10 &&
- Number(osRelease[2]) >= 10586
- ) {
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
- }
-
- return 1;
- }
-
- if ('CI' in env) {
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
- return 1;
- }
-
- return min;
- }
-
- if ('TEAMCITY_VERSION' in env) {
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
- }
-
- if (env.COLORTERM === 'truecolor') {
- return 3;
- }
-
- if ('TERM_PROGRAM' in env) {
- const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
-
- switch (env.TERM_PROGRAM) {
- case 'iTerm.app':
- return version >= 3 ? 3 : 2;
- case 'Apple_Terminal':
- return 2;
- // No default
- }
- }
-
- if (/-256(color)?$/i.test(env.TERM)) {
- return 2;
- }
-
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
- return 1;
- }
-
- if ('COLORTERM' in env) {
- return 1;
- }
-
- if (env.TERM === 'dumb') {
- return min;
- }
-
- return min;
-}
-
-function getSupportLevel(stream) {
- const level = supportsColor(stream);
- return translateLevel(level);
-}
-
-module.exports = {
- supportsColor: getSupportLevel,
- stdout: getSupportLevel(process.stdout),
- stderr: getSupportLevel(process.stderr)
-};
diff --git a/src/node_modules/supports-color/license b/src/node_modules/supports-color/license
deleted file mode 100644
index e7af2f7..0000000
--- a/src/node_modules/supports-color/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/src/node_modules/supports-color/package.json b/src/node_modules/supports-color/package.json
deleted file mode 100644
index ad199f5..0000000
--- a/src/node_modules/supports-color/package.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "name": "supports-color",
- "version": "5.5.0",
- "description": "Detect whether a terminal supports color",
- "license": "MIT",
- "repository": "chalk/supports-color",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js",
- "browser.js"
- ],
- "keywords": [
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "ansi",
- "styles",
- "tty",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "support",
- "supports",
- "capability",
- "detect",
- "truecolor",
- "16m"
- ],
- "dependencies": {
- "has-flag": "^3.0.0"
- },
- "devDependencies": {
- "ava": "^0.25.0",
- "import-fresh": "^2.0.0",
- "xo": "^0.20.0"
- },
- "browser": "browser.js"
-}
diff --git a/src/node_modules/supports-color/readme.md b/src/node_modules/supports-color/readme.md
deleted file mode 100644
index f6e4019..0000000
--- a/src/node_modules/supports-color/readme.md
+++ /dev/null
@@ -1,66 +0,0 @@
-# supports-color [](https://travis-ci.org/chalk/supports-color)
-
-> Detect whether a terminal supports color
-
-
-## Install
-
-```
-$ npm install supports-color
-```
-
-
-## Usage
-
-```js
-const supportsColor = require('supports-color');
-
-if (supportsColor.stdout) {
- console.log('Terminal stdout supports color');
-}
-
-if (supportsColor.stdout.has256) {
- console.log('Terminal stdout supports 256 colors');
-}
-
-if (supportsColor.stderr.has16m) {
- console.log('Terminal stderr supports 16 million colors (truecolor)');
-}
-```
-
-
-## API
-
-Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported.
-
-The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag:
-
-- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
-- `.level = 2` and `.has256 = true`: 256 color support
-- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors)
-
-
-## Info
-
-It obeys the `--color` and `--no-color` CLI flags.
-
-Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
-
-Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
-
-
-## Related
-
-- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
-- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
-
-
-## Maintainers
-
-- [Sindre Sorhus](https://github.com/sindresorhus)
-- [Josh Junon](https://github.com/qix-)
-
-
-## License
-
-MIT
diff --git a/src/node_modules/to-regex-range/LICENSE b/src/node_modules/to-regex-range/LICENSE
deleted file mode 100644
index 7cccaf9..0000000
--- a/src/node_modules/to-regex-range/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015-present, Jon Schlinkert.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/src/node_modules/to-regex-range/README.md b/src/node_modules/to-regex-range/README.md
deleted file mode 100644
index 38887da..0000000
--- a/src/node_modules/to-regex-range/README.md
+++ /dev/null
@@ -1,305 +0,0 @@
-# to-regex-range [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [](https://www.npmjs.com/package/to-regex-range) [](https://npmjs.org/package/to-regex-range) [](https://npmjs.org/package/to-regex-range) [](https://travis-ci.org/micromatch/to-regex-range)
-
-> Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.
-
-Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
-
-## Install
-
-Install with [npm](https://www.npmjs.com/):
-
-```sh
-$ npm install --save to-regex-range
-```
-
-
-What does this do?
-
-
-
-This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers.
-
-**Example**
-
-```js
-const toRegexRange = require('to-regex-range');
-const regex = new RegExp(toRegexRange('15', '95'));
-```
-
-A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string).
-
-
-
-
-
-
-Why use this library?
-
-
-
-### Convenience
-
-Creating regular expressions for matching numbers gets deceptively complicated pretty fast.
-
-For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc:
-
-* regex for matching `1` => `/1/` (easy enough)
-* regex for matching `1` through `5` => `/[1-5]/` (not bad...)
-* regex for matching `1` or `5` => `/(1|5)/` (still easy...)
-* regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...)
-* regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...)
-* regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...)
-* regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!)
-
-The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation.
-
-**Learn more**
-
-If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful.
-
-### Heavily tested
-
-As of April 07, 2019, this library runs [>1m test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are correct.
-
-Tests run in ~280ms on my MacBook Pro, 2.5 GHz Intel Core i7.
-
-### Optimized
-
-Generated regular expressions are optimized:
-
-* duplicate sequences and character classes are reduced using quantifiers
-* smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative
-* uses fragment caching to avoid processing the same exact string more than once
-
-
-
-
-
-## Usage
-
-Add this library to your javascript application with the following line of code
-
-```js
-const toRegexRange = require('to-regex-range');
-```
-
-The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers).
-
-```js
-const source = toRegexRange('15', '95');
-//=> 1[5-9]|[2-8][0-9]|9[0-5]
-
-const regex = new RegExp(`^${source}$`);
-console.log(regex.test('14')); //=> false
-console.log(regex.test('50')); //=> true
-console.log(regex.test('94')); //=> true
-console.log(regex.test('96')); //=> false
-```
-
-## Options
-
-### options.capture
-
-**Type**: `boolean`
-
-**Deafault**: `undefined`
-
-Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges.
-
-```js
-console.log(toRegexRange('-10', '10'));
-//=> -[1-9]|-?10|[0-9]
-
-console.log(toRegexRange('-10', '10', { capture: true }));
-//=> (-[1-9]|-?10|[0-9])
-```
-
-### options.shorthand
-
-**Type**: `boolean`
-
-**Deafault**: `undefined`
-
-Use the regex shorthand for `[0-9]`:
-
-```js
-console.log(toRegexRange('0', '999999'));
-//=> [0-9]|[1-9][0-9]{1,5}
-
-console.log(toRegexRange('0', '999999', { shorthand: true }));
-//=> \d|[1-9]\d{1,5}
-```
-
-### options.relaxZeros
-
-**Type**: `boolean`
-
-**Default**: `true`
-
-This option relaxes matching for leading zeros when when ranges are zero-padded.
-
-```js
-const source = toRegexRange('-0010', '0010');
-const regex = new RegExp(`^${source}$`);
-console.log(regex.test('-10')); //=> true
-console.log(regex.test('-010')); //=> true
-console.log(regex.test('-0010')); //=> true
-console.log(regex.test('10')); //=> true
-console.log(regex.test('010')); //=> true
-console.log(regex.test('0010')); //=> true
-```
-
-When `relaxZeros` is false, matching is strict:
-
-```js
-const source = toRegexRange('-0010', '0010', { relaxZeros: false });
-const regex = new RegExp(`^${source}$`);
-console.log(regex.test('-10')); //=> false
-console.log(regex.test('-010')); //=> false
-console.log(regex.test('-0010')); //=> true
-console.log(regex.test('10')); //=> false
-console.log(regex.test('010')); //=> false
-console.log(regex.test('0010')); //=> true
-```
-
-## Examples
-
-| **Range** | **Result** | **Compile time** |
-| --- | --- | --- |
-| `toRegexRange(-10, 10)` | `-[1-9]\|-?10\|[0-9]` | _132μs_ |
-| `toRegexRange(-100, -10)` | `-1[0-9]\|-[2-9][0-9]\|-100` | _50μs_ |
-| `toRegexRange(-100, 100)` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _42μs_ |
-| `toRegexRange(001, 100)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|100` | _109μs_ |
-| `toRegexRange(001, 555)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _51μs_ |
-| `toRegexRange(0010, 1000)` | `0{0,2}1[0-9]\|0{0,2}[2-9][0-9]\|0?[1-9][0-9]{2}\|1000` | _31μs_ |
-| `toRegexRange(1, 50)` | `[1-9]\|[1-4][0-9]\|50` | _24μs_ |
-| `toRegexRange(1, 55)` | `[1-9]\|[1-4][0-9]\|5[0-5]` | _23μs_ |
-| `toRegexRange(1, 555)` | `[1-9]\|[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _30μs_ |
-| `toRegexRange(1, 5555)` | `[1-9]\|[1-9][0-9]{1,2}\|[1-4][0-9]{3}\|5[0-4][0-9]{2}\|55[0-4][0-9]\|555[0-5]` | _43μs_ |
-| `toRegexRange(111, 555)` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _38μs_ |
-| `toRegexRange(29, 51)` | `29\|[34][0-9]\|5[01]` | _24μs_ |
-| `toRegexRange(31, 877)` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _32μs_ |
-| `toRegexRange(5, 5)` | `5` | _8μs_ |
-| `toRegexRange(5, 6)` | `5\|6` | _11μs_ |
-| `toRegexRange(1, 2)` | `1\|2` | _6μs_ |
-| `toRegexRange(1, 5)` | `[1-5]` | _15μs_ |
-| `toRegexRange(1, 10)` | `[1-9]\|10` | _22μs_ |
-| `toRegexRange(1, 100)` | `[1-9]\|[1-9][0-9]\|100` | _25μs_ |
-| `toRegexRange(1, 1000)` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _31μs_ |
-| `toRegexRange(1, 10000)` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _34μs_ |
-| `toRegexRange(1, 100000)` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _36μs_ |
-| `toRegexRange(1, 1000000)` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _42μs_ |
-| `toRegexRange(1, 10000000)` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _42μs_ |
-
-## Heads up!
-
-**Order of arguments**
-
-When the `min` is larger than the `max`, values will be flipped to create a valid range:
-
-```js
-toRegexRange('51', '29');
-```
-
-Is effectively flipped to:
-
-```js
-toRegexRange('29', '51');
-//=> 29|[3-4][0-9]|5[0-1]
-```
-
-**Steps / increments**
-
-This library does not support steps (increments). A pr to add support would be welcome.
-
-## History
-
-### v2.0.0 - 2017-04-21
-
-**New features**
-
-Adds support for zero-padding!
-
-### v1.0.0
-
-**Optimizations**
-
-Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching.
-
-## Attribution
-
-Inspired by the python library [range-regex](https://github.com/dimka665/range-regex).
-
-## About
-
-
-Contributing
-
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
-
-
-
-
-Running Tests
-
-Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
-
-```sh
-$ npm install && npm test
-```
-
-
-
-
-Building docs
-
-_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
-
-To generate the readme, run the following command:
-
-```sh
-$ npm install -g verbose/verb#dev verb-generate-readme && verb
-```
-
-
-
-### Related projects
-
-You might also be interested in these projects:
-
-* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by micromatch.")
-* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`")
-* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
-* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.")
-* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.")
-
-### Contributors
-
-| **Commits** | **Contributor** |
-| --- | --- |
-| 63 | [jonschlinkert](https://github.com/jonschlinkert) |
-| 3 | [doowb](https://github.com/doowb) |
-| 2 | [realityking](https://github.com/realityking) |
-
-### Author
-
-**Jon Schlinkert**
-
-* [GitHub Profile](https://github.com/jonschlinkert)
-* [Twitter Profile](https://twitter.com/jonschlinkert)
-* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
-
-Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)!
-
-
-
-
-
-### License
-
-Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
-Released under the [MIT License](LICENSE).
-
-***
-
-_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 07, 2019._
\ No newline at end of file
diff --git a/src/node_modules/to-regex-range/index.js b/src/node_modules/to-regex-range/index.js
deleted file mode 100644
index 77fbace..0000000
--- a/src/node_modules/to-regex-range/index.js
+++ /dev/null
@@ -1,288 +0,0 @@
-/*!
- * to-regex-range
- *
- * Copyright (c) 2015-present, Jon Schlinkert.
- * Released under the MIT License.
- */
-
-'use strict';
-
-const isNumber = require('is-number');
-
-const toRegexRange = (min, max, options) => {
- if (isNumber(min) === false) {
- throw new TypeError('toRegexRange: expected the first argument to be a number');
- }
-
- if (max === void 0 || min === max) {
- return String(min);
- }
-
- if (isNumber(max) === false) {
- throw new TypeError('toRegexRange: expected the second argument to be a number.');
- }
-
- let opts = { relaxZeros: true, ...options };
- if (typeof opts.strictZeros === 'boolean') {
- opts.relaxZeros = opts.strictZeros === false;
- }
-
- let relax = String(opts.relaxZeros);
- let shorthand = String(opts.shorthand);
- let capture = String(opts.capture);
- let wrap = String(opts.wrap);
- let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
-
- if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
- return toRegexRange.cache[cacheKey].result;
- }
-
- let a = Math.min(min, max);
- let b = Math.max(min, max);
-
- if (Math.abs(a - b) === 1) {
- let result = min + '|' + max;
- if (opts.capture) {
- return `(${result})`;
- }
- if (opts.wrap === false) {
- return result;
- }
- return `(?:${result})`;
- }
-
- let isPadded = hasPadding(min) || hasPadding(max);
- let state = { min, max, a, b };
- let positives = [];
- let negatives = [];
-
- if (isPadded) {
- state.isPadded = isPadded;
- state.maxLen = String(state.max).length;
- }
-
- if (a < 0) {
- let newMin = b < 0 ? Math.abs(b) : 1;
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
- a = state.a = 0;
- }
-
- if (b >= 0) {
- positives = splitToPatterns(a, b, state, opts);
- }
-
- state.negatives = negatives;
- state.positives = positives;
- state.result = collatePatterns(negatives, positives, opts);
-
- if (opts.capture === true) {
- state.result = `(${state.result})`;
- } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
- state.result = `(?:${state.result})`;
- }
-
- toRegexRange.cache[cacheKey] = state;
- return state.result;
-};
-
-function collatePatterns(neg, pos, options) {
- let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
- let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
- let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
- let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
- return subpatterns.join('|');
-}
-
-function splitToRanges(min, max) {
- let nines = 1;
- let zeros = 1;
-
- let stop = countNines(min, nines);
- let stops = new Set([max]);
-
- while (min <= stop && stop <= max) {
- stops.add(stop);
- nines += 1;
- stop = countNines(min, nines);
- }
-
- stop = countZeros(max + 1, zeros) - 1;
-
- while (min < stop && stop <= max) {
- stops.add(stop);
- zeros += 1;
- stop = countZeros(max + 1, zeros) - 1;
- }
-
- stops = [...stops];
- stops.sort(compare);
- return stops;
-}
-
-/**
- * Convert a range to a regex pattern
- * @param {Number} `start`
- * @param {Number} `stop`
- * @return {String}
- */
-
-function rangeToPattern(start, stop, options) {
- if (start === stop) {
- return { pattern: start, count: [], digits: 0 };
- }
-
- let zipped = zip(start, stop);
- let digits = zipped.length;
- let pattern = '';
- let count = 0;
-
- for (let i = 0; i < digits; i++) {
- let [startDigit, stopDigit] = zipped[i];
-
- if (startDigit === stopDigit) {
- pattern += startDigit;
-
- } else if (startDigit !== '0' || stopDigit !== '9') {
- pattern += toCharacterClass(startDigit, stopDigit, options);
-
- } else {
- count++;
- }
- }
-
- if (count) {
- pattern += options.shorthand === true ? '\\d' : '[0-9]';
- }
-
- return { pattern, count: [count], digits };
-}
-
-function splitToPatterns(min, max, tok, options) {
- let ranges = splitToRanges(min, max);
- let tokens = [];
- let start = min;
- let prev;
-
- for (let i = 0; i < ranges.length; i++) {
- let max = ranges[i];
- let obj = rangeToPattern(String(start), String(max), options);
- let zeros = '';
-
- if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
- if (prev.count.length > 1) {
- prev.count.pop();
- }
-
- prev.count.push(obj.count[0]);
- prev.string = prev.pattern + toQuantifier(prev.count);
- start = max + 1;
- continue;
- }
-
- if (tok.isPadded) {
- zeros = padZeros(max, tok, options);
- }
-
- obj.string = zeros + obj.pattern + toQuantifier(obj.count);
- tokens.push(obj);
- start = max + 1;
- prev = obj;
- }
-
- return tokens;
-}
-
-function filterPatterns(arr, comparison, prefix, intersection, options) {
- let result = [];
-
- for (let ele of arr) {
- let { string } = ele;
-
- // only push if _both_ are negative...
- if (!intersection && !contains(comparison, 'string', string)) {
- result.push(prefix + string);
- }
-
- // or _both_ are positive
- if (intersection && contains(comparison, 'string', string)) {
- result.push(prefix + string);
- }
- }
- return result;
-}
-
-/**
- * Zip strings
- */
-
-function zip(a, b) {
- let arr = [];
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
- return arr;
-}
-
-function compare(a, b) {
- return a > b ? 1 : b > a ? -1 : 0;
-}
-
-function contains(arr, key, val) {
- return arr.some(ele => ele[key] === val);
-}
-
-function countNines(min, len) {
- return Number(String(min).slice(0, -len) + '9'.repeat(len));
-}
-
-function countZeros(integer, zeros) {
- return integer - (integer % Math.pow(10, zeros));
-}
-
-function toQuantifier(digits) {
- let [start = 0, stop = ''] = digits;
- if (stop || start > 1) {
- return `{${start + (stop ? ',' + stop : '')}}`;
- }
- return '';
-}
-
-function toCharacterClass(a, b, options) {
- return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
-}
-
-function hasPadding(str) {
- return /^-?(0+)\d/.test(str);
-}
-
-function padZeros(value, tok, options) {
- if (!tok.isPadded) {
- return value;
- }
-
- let diff = Math.abs(tok.maxLen - String(value).length);
- let relax = options.relaxZeros !== false;
-
- switch (diff) {
- case 0:
- return '';
- case 1:
- return relax ? '0?' : '0';
- case 2:
- return relax ? '0{0,2}' : '00';
- default: {
- return relax ? `0{0,${diff}}` : `0{${diff}}`;
- }
- }
-}
-
-/**
- * Cache
- */
-
-toRegexRange.cache = {};
-toRegexRange.clearCache = () => (toRegexRange.cache = {});
-
-/**
- * Expose `toRegexRange`
- */
-
-module.exports = toRegexRange;
diff --git a/src/node_modules/to-regex-range/package.json b/src/node_modules/to-regex-range/package.json
deleted file mode 100644
index 4ef194f..0000000
--- a/src/node_modules/to-regex-range/package.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "name": "to-regex-range",
- "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.",
- "version": "5.0.1",
- "homepage": "https://github.com/micromatch/to-regex-range",
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
- "contributors": [
- "Jon Schlinkert (http://twitter.com/jonschlinkert)",
- "Rouven Weßling (www.rouvenwessling.de)"
- ],
- "repository": "micromatch/to-regex-range",
- "bugs": {
- "url": "https://github.com/micromatch/to-regex-range/issues"
- },
- "license": "MIT",
- "files": [
- "index.js"
- ],
- "main": "index.js",
- "engines": {
- "node": ">=8.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "devDependencies": {
- "fill-range": "^6.0.0",
- "gulp-format-md": "^2.0.0",
- "mocha": "^6.0.2",
- "text-table": "^0.2.0",
- "time-diff": "^0.3.1"
- },
- "keywords": [
- "bash",
- "date",
- "expand",
- "expansion",
- "expression",
- "glob",
- "match",
- "match date",
- "match number",
- "match numbers",
- "match year",
- "matches",
- "matching",
- "number",
- "numbers",
- "numerical",
- "range",
- "ranges",
- "regex",
- "regexp",
- "regular",
- "regular expression",
- "sequence"
- ],
- "verb": {
- "layout": "default",
- "toc": false,
- "tasks": [
- "readme"
- ],
- "plugins": [
- "gulp-format-md"
- ],
- "lint": {
- "reflinks": true
- },
- "helpers": {
- "examples": {
- "displayName": "examples"
- }
- },
- "related": {
- "list": [
- "expand-range",
- "fill-range",
- "micromatch",
- "repeat-element",
- "repeat-string"
- ]
- }
- }
-}
diff --git a/src/node_modules/touch/LICENSE b/src/node_modules/touch/LICENSE
deleted file mode 100644
index 05eeeb8..0000000
--- a/src/node_modules/touch/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/src/node_modules/touch/README.md b/src/node_modules/touch/README.md
deleted file mode 100644
index b5a361e..0000000
--- a/src/node_modules/touch/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# node-touch
-
-For all your node touching needs.
-
-## Installing
-
-```bash
-npm install touch
-```
-
-## CLI Usage:
-
-See `man touch`
-
-This package exports a binary called `nodetouch` that works mostly
-like the unix builtin `touch(1)`.
-
-## API Usage:
-
-```javascript
-var touch = require("touch")
-```
-
-Gives you the following functions:
-
-* `touch(filename, options, cb)`
-* `touch.sync(filename, options)`
-* `touch.ftouch(fd, options, cb)`
-* `touch.ftouchSync(fd, options)`
-
-All the `options` objects are optional.
-
-All the async functions return a Promise. If a callback function is
-provided, then it's attached to the Promise.
-
-## Options
-
-* `force` like `touch -f` Boolean
-* `time` like `touch -t ` Can be a Date object, or any parseable
- Date string, or epoch ms number.
-* `atime` like `touch -a` Can be either a Boolean, or a Date.
-* `mtime` like `touch -m` Can be either a Boolean, or a Date.
-* `ref` like `touch -r ` Must be path to a file.
-* `nocreate` like `touch -c` Boolean
-
-If neither `atime` nor `mtime` are set, then both values are set. If
-one of them is set, then the other is not.
-
-## cli
-
-This package creates a `nodetouch` command line executable that works
-very much like the unix builtin `touch(1)`
diff --git a/src/node_modules/touch/bin/nodetouch.js b/src/node_modules/touch/bin/nodetouch.js
deleted file mode 100755
index f78f082..0000000
--- a/src/node_modules/touch/bin/nodetouch.js
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/usr/bin/env node
-const touch = require("../index.js")
-
-const usage = code => {
- console[code ? 'error' : 'log'](
- 'usage:\n' +
- 'touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...'
- )
- process.exit(code)
-}
-
-const singleFlags = {
- a: 'atime',
- m: 'mtime',
- c: 'nocreate',
- f: 'force'
-}
-
-const singleOpts = {
- r: 'ref',
- t: 'time'
-}
-
-const files = []
-const args = process.argv.slice(2)
-const options = {}
-for (let i = 0; i < args.length; i++) {
- const arg = args[i]
- if (!arg.match(/^-/)) {
- files.push(arg)
- continue
- }
-
- // expand shorthands
- if (arg.charAt(1) !== '-') {
- const expand = []
- for (let f = 1; f < arg.length; f++) {
- const fc = arg.charAt(f)
- const sf = singleFlags[fc]
- const so = singleOpts[fc]
- if (sf)
- expand.push('--' + sf)
- else if (so) {
- const soslice = arg.slice(f + 1)
- const soval = soslice.charAt(0) === '=' ? soslice : '=' + soslice
- expand.push('--' + so + soval)
- f = arg.length
- } else if (arg !== '-' + fc)
- expand.push('-' + fc)
- }
- if (expand.length) {
- args.splice.apply(args, [i, 1].concat(expand))
- i--
- continue
- }
- }
-
- const argsplit = arg.split('=')
- const key = argsplit.shift().replace(/^\-\-/, '')
- const val = argsplit.length ? argsplit.join('=') : null
-
- switch (key) {
- case 'time':
- const timestr = val || args[++i]
- // [-t [[CC]YY]MMDDhhmm[.SS]]
- const parsedtime = timestr.match(
- /^(([0-9]{2})?([0-9]{2}))?([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})(\.([0-9]{2}))?$/
- )
- if (!parsedtime) {
- console.error('touch: out of range or illegal ' +
- 'time specification: ' +
- '[[CC]YY]MMDDhhmm[.SS]')
- process.exit(1)
- } else {
- const y = +parsedtime[1]
- const year = parsedtime[2] ? y
- : y <= 68 ? 2000 + y
- : 1900 + y
-
- const MM = +parsedtime[4] - 1
- const dd = +parsedtime[5]
- const hh = +parsedtime[6]
- const mm = +parsedtime[7]
- const ss = +parsedtime[8]
-
- options.time = new Date(Date.UTC(year, MM, dd, hh, mm, ss))
- }
- continue
-
- case 'ref':
- options.ref = val || args[++i]
- continue
-
- case 'mtime':
- case 'nocreate':
- case 'atime':
- case 'force':
- options[key] = true
- continue
-
- default:
- console.error('touch: illegal option -- ' + arg)
- usage(1)
- }
-}
-
-if (!files.length)
- usage()
-
-process.exitCode = 0
-Promise.all(files.map(f => touch(f, options)))
- .catch(er => process.exitCode = 1)
diff --git a/src/node_modules/touch/index.js b/src/node_modules/touch/index.js
deleted file mode 100644
index f942e42..0000000
--- a/src/node_modules/touch/index.js
+++ /dev/null
@@ -1,224 +0,0 @@
-'use strict'
-
-const EE = require('events').EventEmitter
-const cons = require('constants')
-const fs = require('fs')
-
-module.exports = (f, options, cb) => {
- if (typeof options === 'function')
- cb = options, options = {}
-
- const p = new Promise((res, rej) => {
- new Touch(validOpts(options, f, null))
- .on('done', res).on('error', rej)
- })
-
- return cb ? p.then(res => cb(null, res), cb) : p
-}
-
-module.exports.sync = module.exports.touchSync = (f, options) =>
- (new TouchSync(validOpts(options, f, null)), undefined)
-
-module.exports.ftouch = (fd, options, cb) => {
- if (typeof options === 'function')
- cb = options, options = {}
-
- const p = new Promise((res, rej) => {
- new Touch(validOpts(options, null, fd))
- .on('done', res).on('error', rej)
- })
-
- return cb ? p.then(res => cb(null, res), cb) : p
-}
-
-module.exports.ftouchSync = (fd, opt) =>
- (new TouchSync(validOpts(opt, null, fd)), undefined)
-
-const validOpts = (options, path, fd) => {
- options = Object.create(options || {})
- options.fd = fd
- options.path = path
-
- // {mtime: true}, {ctime: true}
- // If set to something else, then treat as epoch ms value
- const now = parseInt(new Date(options.time || Date.now()).getTime() / 1000)
- if (!options.atime && !options.mtime)
- options.atime = options.mtime = now
- else {
- if (true === options.atime)
- options.atime = now
-
- if (true === options.mtime)
- options.mtime = now
- }
-
- let oflags = 0
- if (!options.force)
- oflags = oflags | cons.O_RDWR
-
- if (!options.nocreate)
- oflags = oflags | cons.O_CREAT
-
- options.oflags = oflags
- return options
-}
-
-class Touch extends EE {
- constructor (options) {
- super(options)
- this.fd = options.fd
- this.path = options.path
- this.atime = options.atime
- this.mtime = options.mtime
- this.ref = options.ref
- this.nocreate = !!options.nocreate
- this.force = !!options.force
- this.closeAfter = options.closeAfter
- this.oflags = options.oflags
- this.options = options
-
- if (typeof this.fd !== 'number') {
- this.closeAfter = true
- this.open()
- } else
- this.onopen(null, this.fd)
- }
-
- emit (ev, data) {
- // we only emit when either done or erroring
- // in both cases, need to close
- this.close()
- return super.emit(ev, data)
- }
-
- close () {
- if (typeof this.fd === 'number' && this.closeAfter)
- fs.close(this.fd, () => {})
- }
-
- open () {
- fs.open(this.path, this.oflags, (er, fd) => this.onopen(er, fd))
- }
-
- onopen (er, fd) {
- if (er) {
- if (er.code === 'EISDIR')
- this.onopen(null, null)
- else if (er.code === 'ENOENT' && this.nocreate)
- this.emit('done')
- else
- this.emit('error', er)
- } else {
- this.fd = fd
- if (this.ref)
- this.statref()
- else if (!this.atime || !this.mtime)
- this.fstat()
- else
- this.futimes()
- }
- }
-
- statref () {
- fs.stat(this.ref, (er, st) => {
- if (er)
- this.emit('error', er)
- else
- this.onstatref(st)
- })
- }
-
- onstatref (st) {
- this.atime = this.atime && parseInt(st.atime.getTime()/1000, 10)
- this.mtime = this.mtime && parseInt(st.mtime.getTime()/1000, 10)
- if (!this.atime || !this.mtime)
- this.fstat()
- else
- this.futimes()
- }
-
- fstat () {
- const stat = this.fd ? 'fstat' : 'stat'
- const target = this.fd || this.path
- fs[stat](target, (er, st) => {
- if (er)
- this.emit('error', er)
- else
- this.onfstat(st)
- })
- }
-
- onfstat (st) {
- if (typeof this.atime !== 'number')
- this.atime = parseInt(st.atime.getTime()/1000, 10)
-
- if (typeof this.mtime !== 'number')
- this.mtime = parseInt(st.mtime.getTime()/1000, 10)
-
- this.futimes()
- }
-
- futimes () {
- const utimes = this.fd ? 'futimes' : 'utimes'
- const target = this.fd || this.path
- fs[utimes](target, ''+this.atime, ''+this.mtime, er => {
- if (er)
- this.emit('error', er)
- else
- this.emit('done')
- })
- }
-}
-
-class TouchSync extends Touch {
- open () {
- try {
- this.onopen(null, fs.openSync(this.path, this.oflags))
- } catch (er) {
- this.onopen(er)
- }
- }
-
- statref () {
- let threw = true
- try {
- this.onstatref(fs.statSync(this.ref))
- threw = false
- } finally {
- if (threw)
- this.close()
- }
- }
-
- fstat () {
- let threw = true
- const stat = this.fd ? 'fstatSync' : 'statSync'
- const target = this.fd || this.path
- try {
- this.onfstat(fs[stat](target))
- threw = false
- } finally {
- if (threw)
- this.close()
- }
- }
-
- futimes () {
- let threw = true
- const utimes = this.fd ? 'futimesSync' : 'utimesSync'
- const target = this.fd || this.path
- try {
- fs[utimes](target, this.atime, this.mtime)
- threw = false
- } finally {
- if (threw)
- this.close()
- }
- this.emit('done')
- }
-
- close () {
- if (typeof this.fd === 'number' && this.closeAfter)
- try { fs.closeSync(this.fd) } catch (er) {}
- }
-}
diff --git a/src/node_modules/touch/package.json b/src/node_modules/touch/package.json
deleted file mode 100644
index 05608de..0000000
--- a/src/node_modules/touch/package.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "author": "Isaac Z. Schlueter (http://blog.izs.me/)",
- "name": "touch",
- "description": "like touch(1) in node",
- "version": "3.1.0",
- "repository": "git://github.com/isaacs/node-touch.git",
- "bin": {
- "nodetouch": "./bin/nodetouch.js"
- },
- "dependencies": {
- "nopt": "~1.0.10"
- },
- "license": "ISC",
- "scripts": {
- "test": "tap test/*.js --100 -J",
- "preversion": "npm test",
- "postversion": "npm publish",
- "postpublish": "git push origin --all; git push origin --tags"
- },
- "devDependencies": {
- "mutate-fs": "^1.1.0",
- "tap": "^10.7.0"
- },
- "files": [
- "index.js",
- "bin/nodetouch.js"
- ]
-}
diff --git a/src/node_modules/undefsafe/.github/workflows/release.yml b/src/node_modules/undefsafe/.github/workflows/release.yml
deleted file mode 100644
index e6ee886..0000000
--- a/src/node_modules/undefsafe/.github/workflows/release.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: Release
-on:
- push:
- branches:
- - master
-jobs:
- release:
- name: Release
- runs-on: ubuntu-18.04
- steps:
- - name: Checkout
- uses: actions/checkout@v1
- - name: Setup Node.js
- uses: actions/setup-node@v1
- with:
- node-version: 16
- - name: Install dependencies
- run: npm ci
- - name: Test
- run: npm run test
- - name: Release
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npx semantic-release
diff --git a/src/node_modules/undefsafe/.jscsrc b/src/node_modules/undefsafe/.jscsrc
deleted file mode 100644
index 9e01c9b..0000000
--- a/src/node_modules/undefsafe/.jscsrc
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "preset": "node-style-guide",
- "requireCapitalizedComments": null,
- "requireSpacesInAnonymousFunctionExpression": {
- "beforeOpeningCurlyBrace": true,
- "beforeOpeningRoundBrace": true
- },
- "disallowSpacesInNamedFunctionExpression": {
- "beforeOpeningRoundBrace": true
- },
- "excludeFiles": ["node_modules/**"],
- "disallowSpacesInFunction": null
-}
diff --git a/src/node_modules/undefsafe/.jshintrc b/src/node_modules/undefsafe/.jshintrc
deleted file mode 100644
index b47f672..0000000
--- a/src/node_modules/undefsafe/.jshintrc
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "browser": false,
- "camelcase": true,
- "curly": true,
- "devel": true,
- "eqeqeq": true,
- "forin": true,
- "indent": 2,
- "noarg": true,
- "node": true,
- "quotmark": "single",
- "undef": true,
- "strict": false,
- "unused": true
-}
-
diff --git a/src/node_modules/undefsafe/.travis.yml b/src/node_modules/undefsafe/.travis.yml
deleted file mode 100644
index a1ace24..0000000
--- a/src/node_modules/undefsafe/.travis.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-sudo: false
-language: node_js
-cache:
- directories:
- - node_modules
-notifications:
- email: false
-node_js:
- - '4'
-before_install:
- - npm i -g npm@^2.0.0
-before_script:
- - npm prune
-after_success:
- - npm run semantic-release
-branches:
- except:
- - "/^v\\d+\\.\\d+\\.\\d+$/"
diff --git a/src/node_modules/undefsafe/LICENSE b/src/node_modules/undefsafe/LICENSE
deleted file mode 100644
index caaf03a..0000000
--- a/src/node_modules/undefsafe/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright © 2016 Remy Sharp, http://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.
diff --git a/src/node_modules/undefsafe/README.md b/src/node_modules/undefsafe/README.md
deleted file mode 100644
index 46a706b..0000000
--- a/src/node_modules/undefsafe/README.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# undefsafe
-
-Simple *function* for retrieving deep object properties without getting "Cannot read property 'X' of undefined"
-
-Can also be used to safely set deep values.
-
-## Usage
-
-```js
-var object = {
- a: {
- b: {
- c: 1,
- d: [1,2,3],
- e: 'remy'
- }
- }
-};
-
-console.log(undefsafe(object, 'a.b.e')); // "remy"
-console.log(undefsafe(object, 'a.b.not.found')); // undefined
-```
-
-Demo: [https://jsbin.com/eroqame/3/edit?js,console](https://jsbin.com/eroqame/3/edit?js,console)
-
-## Setting
-
-```js
-var object = {
- a: {
- b: [1,2,3]
- }
-};
-
-// modified object
-var res = undefsafe(object, 'a.b.0', 10);
-
-console.log(object); // { a: { b: [10, 2, 3] } }
-console.log(res); // 1 - previous value
-```
-
-## Star rules in paths
-
-As of 1.2.0, `undefsafe` supports a `*` in the path if you want to search all of the properties (or array elements) for a particular element.
-
-The function will only return a single result, either the 3rd argument validation value, or the first positive match. For example, the following github data:
-
-```js
-const githubData = {
- commits: [{
- modified: [
- "one",
- "two"
- ]
- }, /* ... */ ]
- };
-
-// first modified file found in the first commit
-console.log(undefsafe(githubData, 'commits.*.modified.0'));
-
-// returns `two` or undefined if not found
-console.log(undefsafe(githubData, 'commits.*.modified.*', 'two'));
-```
diff --git a/src/node_modules/undefsafe/example.js b/src/node_modules/undefsafe/example.js
deleted file mode 100644
index ed93c23..0000000
--- a/src/node_modules/undefsafe/example.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var undefsafe = require('undefsafe');
-
-var object = {
- a: {
- b: {
- c: 1,
- d: [1, 2, 3],
- e: 'remy'
- }
- }
-};
-
-console.log(undefsafe(object, 'a.b.e')); // "remy"
-console.log(undefsafe(object, 'a.b.not.found')); // undefined
diff --git a/src/node_modules/undefsafe/lib/undefsafe.js b/src/node_modules/undefsafe/lib/undefsafe.js
deleted file mode 100644
index 7446878..0000000
--- a/src/node_modules/undefsafe/lib/undefsafe.js
+++ /dev/null
@@ -1,125 +0,0 @@
-'use strict';
-
-function undefsafe(obj, path, value, __res) {
- // I'm not super keen on this private function, but it's because
- // it'll also be use in the browser and I wont *one* function exposed
- function split(path) {
- var res = [];
- var level = 0;
- var key = '';
-
- for (var i = 0; i < path.length; i++) {
- var c = path.substr(i, 1);
-
- if (level === 0 && (c === '.' || c === '[')) {
- if (c === '[') {
- level++;
- i++;
- c = path.substr(i, 1);
- }
-
- if (key) {
- // the first value could be a string
- res.push(key);
- }
- key = '';
- continue;
- }
-
- if (c === ']') {
- level--;
- key = key.slice(0, -1);
- continue;
- }
-
- key += c;
- }
-
- res.push(key);
-
- return res;
- }
-
- // bail if there's nothing
- if (obj === undefined || obj === null) {
- return undefined;
- }
-
- var parts = split(path);
- var key = null;
- var type = typeof obj;
- var root = obj;
- var parent = obj;
-
- var star =
- parts.filter(function(_) {
- return _ === '*';
- }).length > 0;
-
- // we're dealing with a primitive
- if (type !== 'object' && type !== 'function') {
- return obj;
- } else if (path.trim() === '') {
- return obj;
- }
-
- key = parts[0];
- var i = 0;
- for (; i < parts.length; i++) {
- key = parts[i];
- parent = obj;
-
- if (key === '*') {
- // loop through each property
- var prop = '';
- var res = __res || [];
-
- for (prop in parent) {
- var shallowObj = undefsafe(
- obj[prop],
- parts.slice(i + 1).join('.'),
- value,
- res
- );
- if (shallowObj && shallowObj !== res) {
- if ((value && shallowObj === value) || value === undefined) {
- if (value !== undefined) {
- return shallowObj;
- }
-
- res.push(shallowObj);
- }
- }
- }
-
- if (res.length === 0) {
- return undefined;
- }
-
- return res;
- }
-
- if (Object.getOwnPropertyNames(obj).indexOf(key) == -1) {
- return undefined;
- }
-
- obj = obj[key];
- if (obj === undefined || obj === null) {
- break;
- }
- }
-
- // if we have a null object, make sure it's the one the user was after,
- // if it's not (i.e. parts has a length) then give undefined back.
- if (obj === null && i !== parts.length - 1) {
- obj = undefined;
- } else if (!star && value) {
- key = path.split('.').pop();
- parent[key] = value;
- }
- return obj;
-}
-
-if (typeof module !== 'undefined') {
- module.exports = undefsafe;
-}
diff --git a/src/node_modules/undefsafe/package.json b/src/node_modules/undefsafe/package.json
deleted file mode 100644
index a454233..0000000
--- a/src/node_modules/undefsafe/package.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "undefsafe",
- "description": "Undefined safe way of extracting object properties",
- "main": "lib/undefsafe.js",
- "tonicExampleFilename": "example.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "test": "tap test/**/*.test.js -R spec",
- "cover": "tap test/*.test.js --cov --coverage-report=lcov",
- "semantic-release": "semantic-release"
- },
- "prettier": {
- "trailingComma": "none",
- "singleQuote": true
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/remy/undefsafe.git"
- },
- "keywords": [
- "undefined"
- ],
- "author": "Remy Sharp",
- "license": "MIT",
- "devDependencies": {
- "semantic-release": "^18.0.0",
- "tap": "^5.7.1",
- "tap-only": "0.0.5"
- },
- "dependencies": {},
- "version": "2.0.5"
-}
diff --git a/src/package-lock.json b/src/package-lock.json
index e7da73a..61d53d6 100644
--- a/src/package-lock.json
+++ b/src/package-lock.json
@@ -1,24 +1,16 @@
{
- "name": "wstest",
+ "name": "src",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "wstest",
- "version": "1.0.0",
- "license": "ISC",
"dependencies": {
+ "body-parser": "^1.20.2",
"express": "^4.18.2",
- "nodemon": "^2.0.22",
"ws": "^8.13.0"
}
},
- "node_modules/abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
- },
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -31,43 +23,18 @@
"node": ">= 0.6"
}
},
- "node_modules/anymatch": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
- "dependencies": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- },
- "engines": {
- "node": ">= 8"
- }
- },
"node_modules/array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
},
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
- },
- "node_modules/binary-extensions": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
- "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/body-parser": {
- "version": "1.20.1",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
- "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
+ "version": "1.20.2",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
+ "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
"dependencies": {
"bytes": "3.1.2",
- "content-type": "~1.0.4",
+ "content-type": "~1.0.5",
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
@@ -75,7 +42,7 @@
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
"qs": "6.11.0",
- "raw-body": "2.5.1",
+ "raw-body": "2.5.2",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
},
@@ -84,26 +51,6 @@
"npm": "1.2.8000 || >= 1.4.16"
}
},
- "node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
- "dependencies": {
- "fill-range": "^7.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -124,37 +71,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/chokidar": {
- "version": "3.5.3",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
- "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "dependencies": {
- "anymatch": "~3.1.2",
- "braces": "~3.0.2",
- "glob-parent": "~5.1.2",
- "is-binary-path": "~2.1.0",
- "is-glob": "~4.0.1",
- "normalize-path": "~3.0.0",
- "readdirp": "~3.6.0"
- },
- "engines": {
- "node": ">= 8.10.0"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
- },
"node_modules/content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@@ -279,15 +195,41 @@
"node": ">= 0.10.0"
}
},
- "node_modules/fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "node_modules/express/node_modules/body-parser": {
+ "version": "1.20.1",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
+ "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
"dependencies": {
- "to-regex-range": "^5.0.1"
+ "bytes": "3.1.2",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.11.0",
+ "raw-body": "2.5.1",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/express/node_modules/raw-body": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
+ "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
}
},
"node_modules/finalhandler": {
@@ -323,19 +265,6 @@
"node": ">= 0.6"
}
},
- "node_modules/fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "hasInstallScript": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -355,17 +284,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dependencies": {
- "is-glob": "^4.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -377,14 +295,6 @@
"node": ">= 0.4.0"
}
},
- "node_modules/has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/has-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
@@ -433,11 +343,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/ignore-by-default": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
- "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA=="
- },
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
@@ -451,44 +356,6 @@
"node": ">= 0.10"
}
},
- "node_modules/is-binary-path": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
- "dependencies": {
- "binary-extensions": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "engines": {
- "node": ">=0.12.0"
- }
- },
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
@@ -540,17 +407,6 @@
"node": ">= 0.6"
}
},
- "node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@@ -564,68 +420,6 @@
"node": ">= 0.6"
}
},
- "node_modules/nodemon": {
- "version": "2.0.22",
- "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz",
- "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==",
- "dependencies": {
- "chokidar": "^3.5.2",
- "debug": "^3.2.7",
- "ignore-by-default": "^1.0.1",
- "minimatch": "^3.1.2",
- "pstree.remy": "^1.1.8",
- "semver": "^5.7.1",
- "simple-update-notifier": "^1.0.7",
- "supports-color": "^5.5.0",
- "touch": "^3.1.0",
- "undefsafe": "^2.0.5"
- },
- "bin": {
- "nodemon": "bin/nodemon.js"
- },
- "engines": {
- "node": ">=8.10.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/nodemon"
- }
- },
- "node_modules/nodemon/node_modules/debug": {
- "version": "3.2.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
- "dependencies": {
- "ms": "^2.1.1"
- }
- },
- "node_modules/nodemon/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
- },
- "node_modules/nopt": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
- "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
- "dependencies": {
- "abbrev": "1"
- },
- "bin": {
- "nopt": "bin/nopt.js"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/normalize-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/object-inspect": {
"version": "1.12.3",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
@@ -658,17 +452,6 @@
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
},
- "node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "engines": {
- "node": ">=8.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
@@ -681,11 +464,6 @@
"node": ">= 0.10"
}
},
- "node_modules/pstree.remy": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
- "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
- },
"node_modules/qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
@@ -709,9 +487,9 @@
}
},
"node_modules/raw-body": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
- "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
"dependencies": {
"bytes": "3.1.2",
"http-errors": "2.0.0",
@@ -722,17 +500,6 @@
"node": ">= 0.8"
}
},
- "node_modules/readdirp": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
- "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
- "dependencies": {
- "picomatch": "^2.2.1"
- },
- "engines": {
- "node": ">=8.10.0"
- }
- },
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -757,14 +524,6 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
- "node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "bin": {
- "semver": "bin/semver"
- }
- },
"node_modules/send": {
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
@@ -825,25 +584,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/simple-update-notifier": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz",
- "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==",
- "dependencies": {
- "semver": "~7.0.0"
- },
- "engines": {
- "node": ">=8.10.0"
- }
- },
- "node_modules/simple-update-notifier/node_modules/semver": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
- "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
"node_modules/statuses": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
@@ -852,28 +592,6 @@
"node": ">= 0.8"
}
},
- "node_modules/supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dependencies": {
- "has-flag": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
- }
- },
"node_modules/toidentifier": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
@@ -882,17 +600,6 @@
"node": ">=0.6"
}
},
- "node_modules/touch": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
- "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
- "dependencies": {
- "nopt": "~1.0.10"
- },
- "bin": {
- "nodetouch": "bin/nodetouch.js"
- }
- },
"node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@@ -905,11 +612,6 @@
"node": ">= 0.6"
}
},
- "node_modules/undefsafe": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
- "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA=="
- },
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
diff --git a/src/package.json b/src/package.json
new file mode 100644
index 0000000..020b21e
--- /dev/null
+++ b/src/package.json
@@ -0,0 +1,7 @@
+{
+ "dependencies": {
+ "body-parser": "^1.20.2",
+ "express": "^4.18.2",
+ "ws": "^8.13.0"
+ }
+}