NUEVA BUSQUEDA DE DATOS SRI

This commit is contained in:
2023-04-11 10:50:28 -05:00
parent d9d7eb83cb
commit 6b4b3e263c
612 changed files with 11604 additions and 36692 deletions

View File

@@ -12,6 +12,7 @@ express-fileupload
npm install -s //-s para guardar npm install -s //-s para guardar
npm install -s mysql express-myconnection express morgan telegraf nodemon ejs express-fileupload axios npm install -s mysql express-myconnection express morgan telegraf nodemon ejs express-fileupload axios
npm i cors --save //control de origenes = para validar cedula o ruc.
use https://fontawesome.com/search buscar iconos use https://fontawesome.com/search buscar iconos

1
node_modules/.bin/is-ci generated vendored
View File

@@ -1 +0,0 @@
../is-ci/bin.js

1
node_modules/.bin/rc generated vendored
View File

@@ -1 +0,0 @@
../rc/cli.js

1
node_modules/.bin/which generated vendored
View File

@@ -1 +0,0 @@
../which/bin/which

7
node_modules/accepts/HISTORY.md generated vendored
View File

@@ -1,3 +1,10 @@
1.3.8 / 2022-02-02
==================
* deps: mime-types@~2.1.34
- deps: mime-db@~1.51.0
* deps: negotiator@0.6.3
1.3.7 / 2019-04-29 1.3.7 / 2019-04-29
================== ==================

8
node_modules/accepts/README.md generated vendored
View File

@@ -3,7 +3,7 @@
[![NPM Version][npm-version-image]][npm-url] [![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url] [![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url] [![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url] [![Test Coverage][coveralls-image]][coveralls-url]
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
@@ -29,8 +29,6 @@ $ npm install accepts
## API ## API
<!-- eslint-disable no-unused-vars -->
```js ```js
var accepts = require('accepts') var accepts = require('accepts')
``` ```
@@ -133,10 +131,10 @@ curl -I -H'Accept: text/html' http://localhost:3000/
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master [coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master [coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
[node-version-image]: https://badgen.net/npm/node/accepts [node-version-image]: https://badgen.net/npm/node/accepts
[node-version-url]: https://nodejs.org/en/download [node-version-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/accepts [npm-downloads-image]: https://badgen.net/npm/dm/accepts
[npm-url]: https://npmjs.org/package/accepts [npm-url]: https://npmjs.org/package/accepts
[npm-version-image]: https://badgen.net/npm/v/accepts [npm-version-image]: https://badgen.net/npm/v/accepts
[travis-image]: https://badgen.net/travis/jshttp/accepts/master
[travis-url]: https://travis-ci.org/jshttp/accepts

101
node_modules/accepts/package.json generated vendored
View File

@@ -1,86 +1,47 @@
{ {
"_from": "accepts@~1.3.7", "name": "accepts",
"_id": "accepts@1.3.7",
"_inBundle": false,
"_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"_location": "/accepts",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "accepts@~1.3.7",
"name": "accepts",
"escapedName": "accepts",
"rawSpec": "~1.3.7",
"saveSpec": null,
"fetchSpec": "~1.3.7"
},
"_requiredBy": [
"/express"
],
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd",
"_spec": "accepts@~1.3.7",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/express",
"bugs": {
"url": "https://github.com/jshttp/accepts/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
}
],
"dependencies": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
},
"deprecated": false,
"description": "Higher-level content negotiation", "description": "Higher-level content negotiation",
"version": "1.3.8",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
],
"license": "MIT",
"repository": "jshttp/accepts",
"dependencies": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
},
"devDependencies": { "devDependencies": {
"deep-equal": "1.0.1", "deep-equal": "1.0.1",
"eslint": "5.16.0", "eslint": "7.32.0",
"eslint-config-standard": "12.0.0", "eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.17.2", "eslint-plugin-import": "2.25.4",
"eslint-plugin-markdown": "1.0.0", "eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "8.0.1", "eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.1.1", "eslint-plugin-promise": "4.3.1",
"eslint-plugin-standard": "4.0.0", "eslint-plugin-standard": "4.1.0",
"mocha": "6.1.4", "mocha": "9.2.0",
"nyc": "14.0.0" "nyc": "15.1.0"
},
"engines": {
"node": ">= 0.6"
}, },
"files": [ "files": [
"LICENSE", "LICENSE",
"HISTORY.md", "HISTORY.md",
"index.js" "index.js"
], ],
"homepage": "https://github.com/jshttp/accepts#readme", "engines": {
"node": ">= 0.6"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
},
"keywords": [ "keywords": [
"content", "content",
"negotiation", "negotiation",
"accept", "accept",
"accepts" "accepts"
], ]
"license": "MIT",
"name": "accepts",
"repository": {
"type": "git",
"url": "git+https://github.com/jshttp/accepts.git"
},
"scripts": {
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"test-travis": "nyc --reporter=text npm test"
},
"version": "1.3.7"
} }

36
node_modules/ansi-align/CHANGELOG.md generated vendored
View File

@@ -1,36 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
<a name="2.0.0"></a>
# [2.0.0](https://github.com/nexdrew/ansi-align/compare/v1.1.0...v2.0.0) (2017-05-01)
### Features
* ES2015ify, dropping support for Node <4 ([#30](https://github.com/nexdrew/ansi-align/issues/30)) ([7b43f48](https://github.com/nexdrew/ansi-align/commit/7b43f48))
### BREAKING CHANGES
* Node 0.10 or 0.12 no longer supported, please update to Node 4+ or use ansi-align@1.1.0
<a name="1.1.0"></a>
# [1.1.0](https://github.com/nexdrew/ansi-align/compare/v1.0.0...v1.1.0) (2016-06-06)
### Features
* support left-alignment as no-op ([#3](https://github.com/nexdrew/ansi-align/issues/3)) ([e581db6](https://github.com/nexdrew/ansi-align/commit/e581db6))
<a name="1.0.0"></a>
# 1.0.0 (2016-04-30)
### Features
* initial commit ([1914d90](https://github.com/nexdrew/ansi-align/commit/1914d90))

13
node_modules/ansi-align/LICENSE generated vendored
View File

@@ -1,13 +0,0 @@
Copyright (c) 2016, 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.

79
node_modules/ansi-align/README.md generated vendored
View File

@@ -1,79 +0,0 @@
# ansi-align
> align-text with ANSI support for CLIs
[![Build Status](https://travis-ci.org/nexdrew/ansi-align.svg?branch=master)](https://travis-ci.org/nexdrew/ansi-align)
[![Coverage Status](https://coveralls.io/repos/github/nexdrew/ansi-align/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/ansi-align?branch=master)
[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)
Easily center- or right- align a block of text, carefully ignoring ANSI escape codes.
E.g. turn this:
<img width="281" alt="ansi text block no alignment :(" src="https://cloud.githubusercontent.com/assets/1929625/14937509/7c3076dc-0ed7-11e6-8c16-4f6a4ccc8346.png">
Into this:
<img width="278" alt="ansi text block center aligned!" src="https://cloud.githubusercontent.com/assets/1929625/14937510/7c3ca0b0-0ed7-11e6-8f0a-541ca39b6e0a.png">
## Install
```sh
npm install --save ansi-align
```
```js
var ansiAlign = require('ansi-align')
```
## API
### `ansiAlign(text, [opts])`
Align the given text per the line with the greatest [`string-width`](https://github.com/sindresorhus/string-width), returning a new string (or array).
#### Arguments
- `text`: required, string or array
The text to align. If a string is given, it will be split using either the `opts.split` value or `'\n'` by default. If an array is given, a different array of modified strings will be returned.
- `opts`: optional, object
Options to change behavior, see below.
#### Options
- `opts.align`: string, default `'center'`
The alignment mode. Use `'center'` for center-alignment, `'right'` for right-alignment, or `'left'` for left-alignment. Note that the given `text` is assumed to be left-aligned already, so specifying `align: 'left'` just returns the `text` as is (no-op).
- `opts.split`: string or RegExp, default `'\n'`
The separator to use when splitting the text. Only used if text is given as a string.
- `opts.pad`: string, default `' '`
The value used to left-pad (prepend to) lines of lesser width. Will be repeated as necessary to adjust alignment to the line with the greatest width.
### `ansiAlign.center(text)`
Alias for `ansiAlign(text, { align: 'center' })`.
### `ansiAlign.right(text)`
Alias for `ansiAlign(text, { align: 'right' })`.
### `ansiAlign.left(text)`
Alias for `ansiAlign(text, { align: 'left' })`, which is a no-op.
## Similar Packages
- [`center-align`](https://github.com/jonschlinkert/center-align): Very close to this package, except it doesn't support ANSI codes.
- [`left-pad`](https://github.com/camwest/left-pad): Great for left-padding but does not support center alignment or ANSI codes.
- Pretty much anything by the [chalk](https://github.com/chalk) team
## License
ISC © Contributors

61
node_modules/ansi-align/index.js generated vendored
View File

@@ -1,61 +0,0 @@
'use strict'
const stringWidth = require('string-width')
function ansiAlign (text, opts) {
if (!text) return text
opts = opts || {}
const align = opts.align || 'center'
// short-circuit `align: 'left'` as no-op
if (align === 'left') return text
const split = opts.split || '\n'
const pad = opts.pad || ' '
const widthDiffFn = align !== 'right' ? halfDiff : fullDiff
let returnString = false
if (!Array.isArray(text)) {
returnString = true
text = String(text).split(split)
}
let width
let maxWidth = 0
text = text.map(function (str) {
str = String(str)
width = stringWidth(str)
maxWidth = Math.max(width, maxWidth)
return {
str,
width
}
}).map(function (obj) {
return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str
})
return returnString ? text.join(split) : text
}
ansiAlign.left = function left (text) {
return ansiAlign(text, { align: 'left' })
}
ansiAlign.center = function center (text) {
return ansiAlign(text, { align: 'center' })
}
ansiAlign.right = function right (text) {
return ansiAlign(text, { align: 'right' })
}
module.exports = ansiAlign
function halfDiff (maxWidth, curWidth) {
return Math.floor((maxWidth - curWidth) / 2)
}
function fullDiff (maxWidth, curWidth) {
return maxWidth - curWidth
}

97
node_modules/ansi-align/package.json generated vendored
View File

@@ -1,97 +0,0 @@
{
"_args": [
[
"ansi-align@^2.0.0",
"/home/pablinux/Projects/Node/app_sigma/node_modules/boxen"
]
],
"_from": "ansi-align@>=2.0.0 <3.0.0",
"_id": "ansi-align@2.0.0",
"_inCache": true,
"_installable": true,
"_location": "/ansi-align",
"_nodeVersion": "7.9.0",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/ansi-align-2.0.0.tgz_1493673296356_0.4257998722605407"
},
"_npmUser": {
"email": "andrew@npmjs.com",
"name": "nexdrew"
},
"_npmVersion": "4.2.0",
"_phantomChildren": {},
"_requested": {
"name": "ansi-align",
"raw": "ansi-align@^2.0.0",
"rawSpec": "^2.0.0",
"scope": null,
"spec": ">=2.0.0 <3.0.0",
"type": "range"
},
"_requiredBy": [
"/boxen"
],
"_resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz",
"_shasum": "c36aeccba563b89ceb556f3690f0b1d9e3547f7f",
"_shrinkwrap": null,
"_spec": "ansi-align@^2.0.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/boxen",
"author": {
"name": "nexdrew"
},
"bugs": {
"url": "https://github.com/nexdrew/ansi-align/issues"
},
"dependencies": {
"string-width": "^2.0.0"
},
"description": "align-text with ANSI support for CLIs",
"devDependencies": {
"ava": "^0.19.1",
"chalk": "^1.1.3",
"coveralls": "^2.13.1",
"nyc": "^10.3.0",
"standard": "^10.0.2",
"standard-version": "^4.0.0"
},
"directories": {},
"dist": {
"shasum": "c36aeccba563b89ceb556f3690f0b1d9e3547f7f",
"tarball": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz"
},
"files": [
"index.js"
],
"gitHead": "b27d6251ee7b22c7350e4c39219283e3e0fa735e",
"homepage": "https://github.com/nexdrew/ansi-align#readme",
"keywords": [
"align",
"ansi",
"center",
"cli",
"pad"
],
"license": "ISC",
"main": "index.js",
"maintainers": [
{
"name": "nexdrew",
"email": "andrew@npmjs.com"
}
],
"name": "ansi-align",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/nexdrew/ansi-align.git"
},
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"pretest": "standard",
"release": "standard-version",
"test": "nyc ava"
},
"version": "2.0.0"
}

10
node_modules/ansi-regex/index.js generated vendored
View File

@@ -1,10 +0,0 @@
'use strict';
module.exports = () => {
const pattern = [
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
].join('|');
return new RegExp(pattern, 'g');
};

9
node_modules/ansi-regex/license generated vendored
View File

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

121
node_modules/ansi-regex/package.json generated vendored
View File

@@ -1,121 +0,0 @@
{
"_args": [
[
"ansi-regex@^3.0.0",
"/home/pablinux/Projects/Node/app_sigma/node_modules/strip-ansi"
]
],
"_from": "ansi-regex@>=3.0.0 <4.0.0",
"_id": "ansi-regex@3.0.0",
"_inCache": true,
"_installable": true,
"_location": "/ansi-regex",
"_nodeVersion": "4.8.3",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/ansi-regex-3.0.0.tgz_1497985412590_0.5700640194118023"
},
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "2.15.11",
"_phantomChildren": {},
"_requested": {
"name": "ansi-regex",
"raw": "ansi-regex@^3.0.0",
"rawSpec": "^3.0.0",
"scope": null,
"spec": ">=3.0.0 <4.0.0",
"type": "range"
},
"_requiredBy": [
"/strip-ansi"
],
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"_shasum": "ed0317c322064f79466c02966bddb605ab37d998",
"_shrinkwrap": null,
"_spec": "ansi-regex@^3.0.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/strip-ansi",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/chalk/ansi-regex/issues"
},
"dependencies": {},
"description": "Regular expression for matching ANSI escape codes",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"directories": {},
"dist": {
"shasum": "ed0317c322064f79466c02966bddb605ab37d998",
"tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"gitHead": "0a8cc19946c03c38520fe8c086b8adb66f9cce0b",
"homepage": "https://github.com/chalk/ansi-regex#readme",
"keywords": [
"256",
"ansi",
"cli",
"color",
"colors",
"colour",
"command-line",
"console",
"escape",
"find",
"formatting",
"match",
"pattern",
"re",
"regex",
"regexp",
"rgb",
"shell",
"string",
"styles",
"terminal",
"test",
"text",
"tty",
"xterm"
],
"license": "MIT",
"maintainers": [
{
"name": "dthree",
"email": "threedeecee@gmail.com"
},
{
"name": "qix",
"email": "i.am.qix@gmail.com"
},
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "ansi-regex",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/ansi-regex.git"
},
"scripts": {
"test": "xo && ava",
"view-supported": "node fixtures/view-codes.js"
},
"version": "3.0.0"
}

46
node_modules/ansi-regex/readme.md generated vendored
View File

@@ -1,46 +0,0 @@
# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
$ npm install ansi-regex
```
## Usage
```js
const ansiRegex = require('ansi-regex');
ansiRegex().test('\u001B[4mcake\u001B[0m');
//=> true
ansiRegex().test('cake');
//=> false
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
//=> ['\u001B[4m', '\u001B[0m']
```
## FAQ
### Why do you test for codes not in the ECMA 48 standard?
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
## License
MIT

136
node_modules/ansi-styles/index.js generated vendored
View File

@@ -1,21 +1,63 @@
'use strict'; 'use strict';
const colorConvert = require('color-convert');
const wrapAnsi16 = (fn, offset) => function () { const wrapAnsi16 = (fn, offset) => (...args) => {
const code = fn.apply(colorConvert, arguments); const code = fn(...args);
return `\u001B[${code + offset}m`; return `\u001B[${code + offset}m`;
}; };
const wrapAnsi256 = (fn, offset) => function () { const wrapAnsi256 = (fn, offset) => (...args) => {
const code = fn.apply(colorConvert, arguments); const code = fn(...args);
return `\u001B[${38 + offset};5;${code}m`; return `\u001B[${38 + offset};5;${code}m`;
}; };
const wrapAnsi16m = (fn, offset) => function () { const wrapAnsi16m = (fn, offset) => (...args) => {
const rgb = fn.apply(colorConvert, arguments); const rgb = fn(...args);
return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
}; };
const ansi2ansi = n => n;
const rgb2rgb = (r, g, b) => [r, g, b];
const setLazyProperty = (object, property, get) => {
Object.defineProperty(object, property, {
get: () => {
const value = get();
Object.defineProperty(object, property, {
value,
enumerable: true,
configurable: true
});
return value;
},
enumerable: true,
configurable: true
});
};
/** @type {typeof import('color-convert')} */
let colorConvert;
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
if (colorConvert === undefined) {
colorConvert = require('color-convert');
}
const offset = isBackground ? 10 : 0;
const styles = {};
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;
if (sourceSpace === targetSpace) {
styles[name] = wrap(identity, offset);
} else if (typeof suite === 'object') {
styles[name] = wrap(suite[targetSpace], offset);
}
}
return styles;
};
function assembleStyles() { function assembleStyles() {
const codes = new Map(); const codes = new Map();
const styles = { const styles = {
@@ -39,9 +81,9 @@ function assembleStyles() {
magenta: [35, 39], magenta: [35, 39],
cyan: [36, 39], cyan: [36, 39],
white: [37, 39], white: [37, 39],
gray: [90, 39],
// Bright color // Bright color
blackBright: [90, 39],
redBright: [91, 39], redBright: [91, 39],
greenBright: [92, 39], greenBright: [92, 39],
yellowBright: [93, 39], yellowBright: [93, 39],
@@ -72,15 +114,14 @@ function assembleStyles() {
} }
}; };
// Fix humans // Alias bright black as gray (and grey)
styles.color.grey = styles.color.gray; styles.color.gray = styles.color.blackBright;
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
for (const groupName of Object.keys(styles)) { styles.color.grey = styles.color.blackBright;
const group = styles[groupName]; styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
for (const styleName of Object.keys(group)) {
const style = group[styleName];
for (const [groupName, group] of Object.entries(styles)) {
for (const [styleName, style] of Object.entries(group)) {
styles[styleName] = { styles[styleName] = {
open: `\u001B[${style[0]}m`, open: `\u001B[${style[0]}m`,
close: `\u001B[${style[1]}m` close: `\u001B[${style[1]}m`
@@ -95,65 +136,22 @@ function assembleStyles() {
value: group, value: group,
enumerable: false enumerable: false
}); });
Object.defineProperty(styles, 'codes', {
value: codes,
enumerable: false
});
} }
const ansi2ansi = n => n; Object.defineProperty(styles, 'codes', {
const rgb2rgb = (r, g, b) => [r, g, b]; value: codes,
enumerable: false
});
styles.color.close = '\u001B[39m'; styles.color.close = '\u001B[39m';
styles.bgColor.close = '\u001B[49m'; styles.bgColor.close = '\u001B[49m';
styles.color.ansi = { setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));
ansi: wrapAnsi16(ansi2ansi, 0) setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));
}; setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));
styles.color.ansi256 = { setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));
ansi256: wrapAnsi256(ansi2ansi, 0) setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));
}; setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));
styles.color.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 0)
};
styles.bgColor.ansi = {
ansi: wrapAnsi16(ansi2ansi, 10)
};
styles.bgColor.ansi256 = {
ansi256: wrapAnsi256(ansi2ansi, 10)
};
styles.bgColor.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 10)
};
for (let key of Object.keys(colorConvert)) {
if (typeof colorConvert[key] !== 'object') {
continue;
}
const suite = colorConvert[key];
if (key === 'ansi16') {
key = 'ansi';
}
if ('ansi16' in suite) {
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
}
if ('ansi256' in suite) {
styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
}
if ('rgb' in suite) {
styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
}
}
return styles; return styles;
} }

175
node_modules/ansi-styles/package.json generated vendored
View File

@@ -1,123 +1,56 @@
{ {
"_args": [ "name": "ansi-styles",
[ "version": "4.3.0",
"ansi-styles@^3.2.1", "description": "ANSI escape codes for styling strings in the terminal",
"/home/pablinux/Projects/Node/app_sigma/node_modules/chalk" "license": "MIT",
] "repository": "chalk/ansi-styles",
], "funding": "https://github.com/chalk/ansi-styles?sponsor=1",
"_from": "ansi-styles@>=3.2.1 <4.0.0", "author": {
"_hasShrinkwrap": false, "name": "Sindre Sorhus",
"_id": "ansi-styles@3.2.1", "email": "sindresorhus@gmail.com",
"_inCache": true, "url": "sindresorhus.com"
"_installable": true, },
"_location": "/ansi-styles", "engines": {
"_nodeVersion": "8.9.4", "node": ">=8"
"_npmOperationalInternal": { },
"host": "s3://npm-registry-packages", "scripts": {
"tmp": "tmp/ansi-styles_3.2.1_1519983600652_0.7656433427334486" "test": "xo && ava && tsd",
}, "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor"
"_npmUser": { },
"email": "sindresorhus@gmail.com", "files": [
"name": "sindresorhus" "index.js",
}, "index.d.ts"
"_npmVersion": "5.6.0", ],
"_phantomChildren": {}, "keywords": [
"_requested": { "ansi",
"name": "ansi-styles", "styles",
"raw": "ansi-styles@^3.2.1", "color",
"rawSpec": "^3.2.1", "colour",
"scope": null, "colors",
"spec": ">=3.2.1 <4.0.0", "terminal",
"type": "range" "console",
}, "cli",
"_requiredBy": [ "string",
"/chalk" "tty",
], "escape",
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "formatting",
"_shasum": "41fbb20243e50b12be0f04b8dedbf07520ce841d", "rgb",
"_shrinkwrap": null, "256",
"_spec": "ansi-styles@^3.2.1", "shell",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/chalk", "xterm",
"author": { "log",
"email": "sindresorhus@gmail.com", "logging",
"name": "Sindre Sorhus", "command-line",
"url": "sindresorhus.com" "text"
}, ],
"ava": { "dependencies": {
"require": "babel-polyfill" "color-convert": "^2.0.1"
}, },
"bugs": { "devDependencies": {
"url": "https://github.com/chalk/ansi-styles/issues" "@types/color-convert": "^1.9.0",
}, "ava": "^2.3.0",
"dependencies": { "svg-term-cli": "^2.1.1",
"color-convert": "^1.9.0" "tsd": "^0.11.0",
}, "xo": "^0.25.3"
"description": "ANSI escape codes for styling strings in the terminal", }
"devDependencies": {
"ava": "*",
"babel-polyfill": "^6.23.0",
"svg-term-cli": "^2.1.1",
"xo": "*"
},
"directories": {},
"dist": {
"fileCount": 4,
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"shasum": "41fbb20243e50b12be0f04b8dedbf07520ce841d",
"tarball": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"unpackedSize": 9371
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"gitHead": "de7527a86c1cf49906b0eb32a0de1402d849ccc2",
"homepage": "https://github.com/chalk/ansi-styles#readme",
"keywords": [
"256",
"ansi",
"cli",
"color",
"colors",
"colour",
"command-line",
"console",
"escape",
"formatting",
"log",
"logging",
"rgb",
"shell",
"string",
"styles",
"terminal",
"text",
"tty",
"xterm"
],
"license": "MIT",
"maintainers": [
{
"name": "qix",
"email": "i.am.qix@gmail.com"
},
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "ansi-styles",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/ansi-styles.git"
},
"scripts": {
"screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor",
"test": "xo && ava"
},
"version": "3.2.1"
} }

33
node_modules/ansi-styles/readme.md generated vendored
View File

@@ -1,11 +1,10 @@
# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) # ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal > [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900"> <img src="screenshot.svg" width="900">
## Install ## Install
@@ -13,7 +12,6 @@ You probably want the higher-level [chalk](https://github.com/chalk/chalk) modul
$ npm install ansi-styles $ npm install ansi-styles
``` ```
## Usage ## Usage
```js ```js
@@ -29,14 +27,13 @@ console.log(`${style.green.open}Hello world!${style.green.close}`);
// original color. // original color.
console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close);
``` ```
## API ## API
Each style has an `open` and `close` property. Each style has an `open` and `close` property.
## Styles ## Styles
### Modifiers ### Modifiers
@@ -60,7 +57,7 @@ Each style has an `open` and `close` property.
- `magenta` - `magenta`
- `cyan` - `cyan`
- `white` - `white`
- `gray` ("bright black") - `blackBright` (alias: `gray`, `grey`)
- `redBright` - `redBright`
- `greenBright` - `greenBright`
- `yellowBright` - `yellowBright`
@@ -79,7 +76,7 @@ Each style has an `open` and `close` property.
- `bgMagenta` - `bgMagenta`
- `bgCyan` - `bgCyan`
- `bgWhite` - `bgWhite`
- `bgBlackBright` - `bgBlackBright` (alias: `bgGray`, `bgGrey`)
- `bgRedBright` - `bgRedBright`
- `bgGreenBright` - `bgGreenBright`
- `bgYellowBright` - `bgYellowBright`
@@ -88,7 +85,6 @@ Each style has an `open` and `close` property.
- `bgCyanBright` - `bgCyanBright`
- `bgWhiteBright` - `bgWhiteBright`
## Advanced usage ## Advanced usage
By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
@@ -112,11 +108,21 @@ console.log(style.codes.get(36));
//=> 39 //=> 39
``` ```
## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) ## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. `ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
The following color spaces from `color-convert` are supported:
- `rgb`
- `hex`
- `keyword`
- `hsl`
- `hsv`
- `hwb`
- `ansi`
- `ansi256`
To use these, call the associated conversion function with the intended output, for example: To use these, call the associated conversion function with the intended output, for example:
```js ```js
@@ -130,18 +136,17 @@ style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground
style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
``` ```
## Related ## Related
- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
## Maintainers ## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus) - [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-) - [Josh Junon](https://github.com/qix-)
## For enterprise
## License Available as part of the Tidelift Subscription.
MIT The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

1
node_modules/anymatch/index.d.ts generated vendored
View File

@@ -10,6 +10,7 @@ type PicomatchOptions = {dot: boolean};
declare const anymatch: { declare const anymatch: {
(matchers: AnymatchMatcher): AnymatchTester; (matchers: AnymatchMatcher): AnymatchTester;
(matchers: AnymatchMatcher, testString: null, returnIndex: true | PicomatchOptions): AnymatchTester;
(matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number; (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number;
(matchers: AnymatchMatcher, testString: string|any[]): boolean; (matchers: AnymatchMatcher, testString: string|any[]): boolean;
} }

6
node_modules/anymatch/index.js generated vendored
View File

@@ -47,7 +47,7 @@ const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
throw new TypeError('anymatch: second argument must be a string: got ' + throw new TypeError('anymatch: second argument must be a string: got ' +
Object.prototype.toString.call(_path)) Object.prototype.toString.call(_path))
} }
const path = normalizePath(_path); const path = normalizePath(_path, false);
for (let index = 0; index < negPatterns.length; index++) { for (let index = 0; index < negPatterns.length; index++) {
const nglob = negPatterns[index]; const nglob = negPatterns[index];
@@ -86,7 +86,9 @@ const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
.filter(item => typeof item === 'string' && item.charAt(0) === BANG) .filter(item => typeof item === 'string' && item.charAt(0) === BANG)
.map(item => item.slice(1)) .map(item => item.slice(1))
.map(item => picomatch(item, opts)); .map(item => picomatch(item, opts));
const patterns = mtchers.map(matcher => createPattern(matcher, opts)); const patterns = mtchers
.filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG))
.map(matcher => createPattern(matcher, opts));
if (testString == null) { if (testString == null) {
return (testString, ri = false) => { return (testString, ri = false) => {

142
node_modules/anymatch/package.json generated vendored
View File

@@ -1,120 +1,48 @@
{ {
"_args": [ "name": "anymatch",
[ "version": "3.1.3",
"anymatch@~3.1.1", "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions",
"/home/pablinux/Projects/Node/app_sigma/node_modules/chokidar" "files": [
] "index.js",
"index.d.ts"
], ],
"_from": "anymatch@>=3.1.1 <3.2.0",
"_hasShrinkwrap": false,
"_id": "anymatch@3.1.1",
"_inCache": true,
"_installable": true,
"_location": "/anymatch",
"_nodeVersion": "12.10.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/anymatch_3.1.1_1569897288417_0.7130945968950306"
},
"_npmUser": {
"email": "paul@paulmillr.com",
"name": "paulmillr"
},
"_npmVersion": "6.11.3",
"_phantomChildren": {},
"_requested": {
"name": "anymatch",
"raw": "anymatch@~3.1.1",
"rawSpec": "~3.1.1",
"scope": null,
"spec": ">=3.1.1 <3.2.0",
"type": "range"
},
"_requiredBy": [
"/chokidar"
],
"_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
"_shasum": "c55ecf02185e2469259399310c173ce31233b142",
"_shrinkwrap": null,
"_spec": "anymatch@~3.1.1",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/chokidar",
"author": {
"name": "Elan Shanker",
"url": "https://github.com/es128"
},
"bugs": {
"url": "https://github.com/micromatch/anymatch/issues"
},
"dependencies": { "dependencies": {
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",
"picomatch": "^2.0.4" "picomatch": "^2.0.4"
}, },
"description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", "author": {
"name": "Elan Shanker",
"url": "https://github.com/es128"
},
"license": "ISC",
"homepage": "https://github.com/micromatch/anymatch",
"repository": {
"type": "git",
"url": "https://github.com/micromatch/anymatch"
},
"keywords": [
"match",
"any",
"string",
"file",
"fs",
"list",
"glob",
"regex",
"regexp",
"regular",
"expression",
"function"
],
"scripts": {
"test": "nyc mocha",
"mocha": "mocha"
},
"devDependencies": { "devDependencies": {
"mocha": "^6.1.3", "mocha": "^6.1.3",
"nyc": "^14.0.0" "nyc": "^14.0.0"
}, },
"directories": {},
"dist": {
"fileCount": 5,
"integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkrtJCRA9TVsSAnZWagAAAswQAKAWXsp9Lm/3tcBXanuz\nodcqg9m39/XiG6yc1/WD/7bF4YLcWMO6Ra5Sq7ouGtbsvdBAifOX4rsMBfy0\n69UJrWKb8hC/x6w/uMK38rC4nUB3nSmcjTcEQ2+7EITi9oHusQNd6trQ5Y34\nH0K06RcjsrQPwnir2MfeGhsydXqQWgY3NR67DZdosK6hN6jxBq05BMwlQm0c\nwaRJoTA2wFPCi0vy8nqcGoK3qU1/bGId6kpeXOW8TBH5gNJktS0isCl0J9iW\nt9q5Ebg5sj7P8BM+w78684bJfITFKyGk5KyFa8MjV6U5UsUHSNbU4OI6TLMF\nbUqvDd19mt3r+yfWECgmlmZDuwT5q5hDc7Kv96q+uvApXDYIHdZVdihQmQt7\ngPmIdvg8BEM6DoU2Hrft/ijqv74ZQPFZXRFKgtbKCK3IYPJZyqhEm0vYkYdn\nTRpBp2SqYDyXPg/hrC61cyKqB3aEoqxcIw5sITX9voB+FQUXBHOZafOtfx1/\nIB1bveWkdT4AcMaerbJqcjyrSMOoGlX9SiFxjjwsV8euF/GUwH3FL2zS2raJ\nXEY0ftOY07mPSHJLhCKK8LYWsy9V9GQ0D1318EZZWHdZfp+5b/o7Jp6opJaH\noFfksudPT3fXSuZBbjJHxF0WmAzHVnw/W+LJg8RMISGg9utObWZlJpztEDtZ\n3kim\r\n=DCgJ\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "c55ecf02185e2469259399310c173ce31233b142",
"tarball": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
"unpackedSize": 9436
},
"engines": { "engines": {
"node": ">= 8" "node": ">= 8"
}, }
"gitHead": "e0ec3c077d6fd64753b0c9f149614f78c9d54285",
"homepage": "https://github.com/micromatch/anymatch",
"keywords": [
"any",
"expression",
"file",
"fs",
"function",
"glob",
"list",
"match",
"regex",
"regexp",
"regular",
"string"
],
"license": "ISC",
"maintainers": [
{
"name": "doowb",
"email": "brian.woodward@gmail.com"
},
{
"name": "es128",
"email": "elan.shanker+npm@gmail.com"
},
{
"name": "jonschlinkert",
"email": "github@sellside.com"
},
{
"name": "paulmillr",
"email": "paul@paulmillr.com"
},
{
"name": "phated",
"email": "blaine.bublitz@gmail.com"
}
],
"name": "anymatch",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/micromatch/anymatch.git"
},
"scripts": {
"mocha": "mocha",
"test": "nyc mocha"
},
"version": "3.1.1"
} }

View File

@@ -1,5 +0,0 @@
test
.gitignore
.travis.yml
Makefile
example.js

View File

@@ -66,6 +66,12 @@ With [npm](https://npmjs.org) do:
npm install balanced-match npm install balanced-match
``` ```
## Security contact information
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.
## License ## License
(MIT) (MIT)

View File

@@ -28,6 +28,9 @@ function range(a, b, str) {
var i = ai; var i = ai;
if (ai >= 0 && bi > 0) { if (ai >= 0 && bi > 0) {
if(a===b) {
return [ai, bi];
}
begs = []; begs = [];
left = str.length; left = str.length;

View File

@@ -1,104 +1,48 @@
{ {
"_args": [
[
"balanced-match@^1.0.0",
"/home/pablinux/Projects/Node/app_sigma/node_modules/brace-expansion"
]
],
"_from": "balanced-match@>=1.0.0 <2.0.0",
"_id": "balanced-match@1.0.0",
"_inCache": true,
"_installable": true,
"_location": "/balanced-match",
"_nodeVersion": "7.8.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/balanced-match-1.0.0.tgz_1497251909645_0.8755026108119637"
},
"_npmUser": {
"email": "julian@juliangruber.com",
"name": "juliangruber"
},
"_npmVersion": "4.2.0",
"_phantomChildren": {},
"_requested": {
"name": "balanced-match",
"raw": "balanced-match@^1.0.0",
"rawSpec": "^1.0.0",
"scope": null,
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/brace-expansion"
],
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
"_shrinkwrap": null,
"_spec": "balanced-match@^1.0.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/brace-expansion",
"author": {
"email": "mail@juliangruber.com",
"name": "Julian Gruber",
"url": "http://juliangruber.com"
},
"bugs": {
"url": "https://github.com/juliangruber/balanced-match/issues"
},
"dependencies": {},
"description": "Match balanced character pairs, like \"{\" and \"}\"",
"devDependencies": {
"matcha": "^0.7.0",
"tape": "^4.6.0"
},
"directories": {},
"dist": {
"shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
"tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz"
},
"gitHead": "d701a549a7653a874eebce7eca25d3577dc868ac",
"homepage": "https://github.com/juliangruber/balanced-match",
"keywords": [
"balanced",
"match",
"parse",
"regexp",
"test"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "juliangruber",
"email": "julian@juliangruber.com"
}
],
"name": "balanced-match", "name": "balanced-match",
"optionalDependencies": {}, "description": "Match balanced character pairs, like \"{\" and \"}\"",
"readme": "ERROR: No README data found!", "version": "1.0.2",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/juliangruber/balanced-match.git" "url": "git://github.com/juliangruber/balanced-match.git"
}, },
"homepage": "https://github.com/juliangruber/balanced-match",
"main": "index.js",
"scripts": { "scripts": {
"bench": "make bench", "test": "tape test/test.js",
"test": "make test" "bench": "matcha test/bench.js"
}, },
"devDependencies": {
"matcha": "^0.7.0",
"tape": "^4.6.0"
},
"keywords": [
"match",
"regexp",
"test",
"balanced",
"parse"
],
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
"url": "http://juliangruber.com"
},
"license": "MIT",
"testling": { "testling": {
"files": "test/*.js",
"browsers": [ "browsers": [
"android-browser/4.2..latest", "ie/8..latest",
"chrome/25..latest",
"chrome/canary",
"firefox/20..latest", "firefox/20..latest",
"firefox/nightly", "firefox/nightly",
"ie/8..latest", "chrome/25..latest",
"ipad/6.0..latest", "chrome/canary",
"iphone/6.0..latest",
"opera/12..latest", "opera/12..latest",
"opera/next", "opera/next",
"safari/5.1..latest" "safari/5.1..latest",
], "ipad/6.0..latest",
"files": "test/*.js" "iphone/6.0..latest",
}, "android-browser/4.2..latest"
"version": "1.0.0" ]
}
} }

View File

@@ -13,6 +13,7 @@
"alz", "alz",
"ape", "ape",
"apk", "apk",
"appimage",
"ar", "ar",
"arj", "arj",
"asf", "asf",
@@ -69,6 +70,7 @@
"fh", "fh",
"fla", "fla",
"flac", "flac",
"flatpak",
"fli", "fli",
"flv", "flv",
"fpx", "fpx",
@@ -132,10 +134,14 @@
"numbers", "numbers",
"nupkg", "nupkg",
"o", "o",
"odp",
"ods",
"odt",
"oga", "oga",
"ogg", "ogg",
"ogv", "ogv",
"otf", "otf",
"ott",
"pages", "pages",
"pbm", "pbm",
"pcx", "pcx",
@@ -173,6 +179,7 @@
"rlc", "rlc",
"rmf", "rmf",
"rmvb", "rmvb",
"rpm",
"rtf", "rtf",
"rz", "rz",
"s3m", "s3m",
@@ -180,6 +187,7 @@
"scpt", "scpt",
"sgi", "sgi",
"shar", "shar",
"snap",
"sil", "sil",
"sketch", "sketch",
"slk", "slk",

View File

@@ -1,97 +1,38 @@
{ {
"_args": [ "name": "binary-extensions",
[ "version": "2.2.0",
"binary-extensions@^2.0.0", "description": "List of binary file extensions",
"/home/pablinux/Projects/Node/app_sigma/node_modules/is-binary-path" "license": "MIT",
] "repository": "sindresorhus/binary-extensions",
], "author": {
"_from": "binary-extensions@>=2.0.0 <3.0.0", "name": "Sindre Sorhus",
"_hasShrinkwrap": false, "email": "sindresorhus@gmail.com",
"_id": "binary-extensions@2.0.0", "url": "sindresorhus.com"
"_inCache": true, },
"_installable": true, "engines": {
"_location": "/binary-extensions", "node": ">=8"
"_nodeVersion": "8.15.0", },
"_npmOperationalInternal": { "scripts": {
"host": "s3://npm-registry-packages", "test": "xo && ava && tsd"
"tmp": "tmp/binary-extensions_2.0.0_1555613412740_0.3072676738149025" },
}, "files": [
"_npmUser": { "index.js",
"email": "sindresorhus@gmail.com", "index.d.ts",
"name": "sindresorhus" "binary-extensions.json",
}, "binary-extensions.json.d.ts"
"_npmVersion": "6.9.0", ],
"_phantomChildren": {}, "keywords": [
"_requested": { "binary",
"name": "binary-extensions", "extensions",
"raw": "binary-extensions@^2.0.0", "extension",
"rawSpec": "^2.0.0", "file",
"scope": null, "json",
"spec": ">=2.0.0 <3.0.0", "list",
"type": "range" "array"
}, ],
"_requiredBy": [ "devDependencies": {
"/is-binary-path" "ava": "^1.4.1",
], "tsd": "^0.7.2",
"_resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", "xo": "^0.24.0"
"_shasum": "23c0df14f6a88077f5f986c0d167ec03c3d5537c", }
"_shrinkwrap": null,
"_spec": "binary-extensions@^2.0.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/is-binary-path",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/binary-extensions/issues"
},
"dependencies": {},
"description": "List of binary file extensions",
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
},
"directories": {},
"dist": {
"fileCount": 7,
"integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuMblCRA9TVsSAnZWagAATlQP+wSYvlsF5PR2hiifHDau\nX+dQx4OBD1pKyMfsyOA6LnED4W7jqbaECQPfaCi/cxESzaF/5Y4bLycxgRko\nJYa7oKokxjdoUdTMuSzPbi+HJFQeTh91K+SHE06o36VZ8qRG9zdF4TjYHuoV\nI3HcqayEWkSovL5APwMYZlFX6Ix9RmxYNcoWfcxFbygjPVuM5vTLDQ98WrD5\nf9WUfkxN6fHplWvTddROV0IBJV6L8dYfp727T2mAOYpWmuFBzSvL0ijOGcgh\n/5k+Aj8+yLBnLLoxBbAh2ymhYI7/L/KZSrqp1yrQzgZPwvdYeMkYd1ctlIbC\nh1A42DxCb21DvM4QQcIbK5+1LtzM2zdPWIUb6bn+bGXOTzXP+BCayWzvCWcx\nhsfwqHhttqI9ltbnxPtwvOCN07RZWdMtkCP+NpTRcbFJHVekiaCP5j9CHeK3\nef+RIGjm9AYpnapoCnn0isAm9pLh4IVKF4+6D+6wjOIZXKNYkJj7gL3PgMHv\nA0+JUv9/Fq6C4QIy47dIpNhum+LKK0T2oxoUnDuib1Pwvv20EsVlpXr4rtJT\nZ0+/HS5FWrAO0d4bWWM2Xfr71hZOn0/HpGBCOBFYmYQf0dQUCEvN9mk1ihsY\nz/oNZWvzmVrsZlt1NfcFUFDA4pBahTI7Mj/K4pQ/K5+UVG/3k7Yo+g2aR0Vj\n0Wu3\r\n=7h+9\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "23c0df14f6a88077f5f986c0d167ec03c3d5537c",
"tarball": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
"unpackedSize": 5074
},
"engines": {
"node": ">=8"
},
"gitHead": "11e076d96c41369015cc3c338428f7f456d3a92f",
"homepage": "https://github.com/sindresorhus/binary-extensions#readme",
"keywords": [
"array",
"binary",
"extension",
"extensions",
"file",
"json",
"list"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "binary-extensions",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/binary-extensions.git"
},
"scripts": {
"test": "xo && ava && tsd"
},
"version": "2.0.0"
} }

View File

@@ -1,4 +1,4 @@
# binary-extensions [![Build Status](https://travis-ci.org/sindresorhus/binary-extensions.svg?branch=master)](https://travis-ci.org/sindresorhus/binary-extensions) # binary-extensions
> List of binary file extensions > List of binary file extensions
@@ -28,6 +28,14 @@ console.log(binaryExtensions);
- [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions - [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions
## License ---
MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com) <div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-binary-extensions?utm_source=npm-binary-extensions&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

48
node_modules/body-parser/HISTORY.md generated vendored
View File

@@ -1,3 +1,51 @@
1.20.1 / 2022-10-06
===================
* deps: qs@6.11.0
* perf: remove unnecessary object clone
1.20.0 / 2022-04-02
===================
* Fix error message for json parse whitespace in `strict`
* Fix internal error when inflated body exceeds limit
* Prevent loss of async hooks context
* Prevent hanging when request already read
* deps: depd@2.0.0
- Replace internal `eval` usage with `Function` constructor
- Use instance methods on `process` to check for listeners
* deps: http-errors@2.0.0
- deps: depd@2.0.0
- deps: statuses@2.0.1
* deps: on-finished@2.4.1
* deps: qs@6.10.3
* deps: raw-body@2.5.1
- deps: http-errors@2.0.0
1.19.2 / 2022-02-15
===================
* deps: bytes@3.1.2
* deps: qs@6.9.7
* Fix handling of `__proto__` keys
* deps: raw-body@2.4.3
- deps: bytes@3.1.2
1.19.1 / 2021-12-10
===================
* deps: bytes@3.1.1
* deps: http-errors@1.8.1
- deps: inherits@2.0.4
- deps: toidentifier@1.0.1
- deps: setprototypeof@1.2.0
* deps: qs@6.9.6
* deps: raw-body@2.4.2
- deps: bytes@3.1.1
- deps: http-errors@1.8.1
* deps: safe-buffer@5.2.1
* deps: type-is@~1.6.18
1.19.0 / 2019-04-25 1.19.0 / 2019-04-25
=================== ===================

45
node_modules/body-parser/README.md generated vendored
View File

@@ -2,7 +2,7 @@
[![NPM Version][npm-image]][npm-url] [![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url] [![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url] [![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url] [![Test Coverage][coveralls-image]][coveralls-url]
Node.js body parsing middleware. Node.js body parsing middleware.
@@ -49,8 +49,6 @@ $ npm install body-parser
## API ## API
<!-- eslint-disable no-unused-vars -->
```js ```js
var bodyParser = require('body-parser') var bodyParser = require('body-parser')
``` ```
@@ -281,14 +279,15 @@ encoding of the request. The parsing can be aborted by throwing an error.
## Errors ## Errors
The middlewares provided by this module create errors depending on the error The middlewares provided by this module create errors using the
condition during parsing. The errors will typically have a `status`/`statusCode` [`http-errors` module](https://www.npmjs.com/package/http-errors). The errors
property that contains the suggested HTTP response code, an `expose` property will typically have a `status`/`statusCode` property that contains the suggested
to determine if the `message` property should be displayed to the client, a HTTP response code, an `expose` property to determine if the `message` property
`type` property to determine the type of error without matching against the should be displayed to the client, a `type` property to determine the type of
`message`, and a `body` property containing the read body, if available. error without matching against the `message`, and a `body` property containing
the read body, if available.
The following are the common errors emitted, though any error can come through The following are the common errors created, though any error can come through
for various reasons. for various reasons.
### content encoding unsupported ### content encoding unsupported
@@ -299,6 +298,20 @@ contained an encoding but the "inflation" option was set to `false`. The
`'encoding.unsupported'`, and the `charset` property will be set to the `'encoding.unsupported'`, and the `charset` property will be set to the
encoding that is unsupported. encoding that is unsupported.
### entity parse failed
This error will occur when the request contained an entity that could not be
parsed by the middleware. The `status` property is set to `400`, the `type`
property is set to `'entity.parse.failed'`, and the `body` property is set to
the entity value that failed parsing.
### entity verify failed
This error will occur when the request contained an entity that could not be
failed verification by the defined `verify` option. The `status` property is
set to `403`, the `type` property is set to `'entity.verify.failed'`, and the
`body` property is set to the entity value that failed verification.
### request aborted ### request aborted
This error will occur when the request is aborted by the client before reading This error will occur when the request is aborted by the client before reading
@@ -329,6 +342,14 @@ to this middleware. This module operates directly on bytes only and you cannot
call `req.setEncoding` when using this module. The `status` property is set to call `req.setEncoding` when using this module. The `status` property is set to
`500` and the `type` property is set to `'stream.encoding.set'`. `500` and the `type` property is set to `'stream.encoding.set'`.
### stream is not readable
This error will occur when the request is no longer readable when this middleware
attempts to read it. This typically means something other than a middleware from
this module read the request body already and the middleware was also configured to
read the same request. The `status` property is set to `500` and the `type`
property is set to `'stream.not.readable'`.
### too many parameters ### too many parameters
This error will occur when the content of the request exceeds the configured This error will occur when the content of the request exceeds the configured
@@ -435,9 +456,9 @@ app.use(bodyParser.text({ type: 'text/html' }))
[npm-image]: https://img.shields.io/npm/v/body-parser.svg [npm-image]: https://img.shields.io/npm/v/body-parser.svg
[npm-url]: https://npmjs.org/package/body-parser [npm-url]: https://npmjs.org/package/body-parser
[travis-image]: https://img.shields.io/travis/expressjs/body-parser/master.svg
[travis-url]: https://travis-ci.org/expressjs/body-parser
[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg [coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg
[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master [coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg [downloads-image]: https://img.shields.io/npm/dm/body-parser.svg
[downloads-url]: https://npmjs.org/package/body-parser [downloads-url]: https://npmjs.org/package/body-parser
[github-actions-ci-image]: https://img.shields.io/github/workflow/status/expressjs/body-parser/ci/master?label=ci
[github-actions-ci-url]: https://github.com/expressjs/body-parser/actions/workflows/ci.yml

17
node_modules/body-parser/index.js generated vendored
View File

@@ -91,16 +91,15 @@ Object.defineProperty(exports, 'urlencoded', {
*/ */
function bodyParser (options) { function bodyParser (options) {
var opts = {} // use default type for parsers
var opts = Object.create(options || null, {
// exclude type option type: {
if (options) { configurable: true,
for (var prop in options) { enumerable: true,
if (prop !== 'type') { value: undefined,
opts[prop] = options[prop] writable: true
}
} }
} })
var _urlencoded = exports.urlencoded(opts) var _urlencoded = exports.urlencoded(opts)
var _json = exports.json(opts) var _json = exports.json(opts)

28
node_modules/body-parser/lib/read.js generated vendored
View File

@@ -12,9 +12,11 @@
*/ */
var createError = require('http-errors') var createError = require('http-errors')
var destroy = require('destroy')
var getBody = require('raw-body') var getBody = require('raw-body')
var iconv = require('iconv-lite') var iconv = require('iconv-lite')
var onFinished = require('on-finished') var onFinished = require('on-finished')
var unpipe = require('unpipe')
var zlib = require('zlib') var zlib = require('zlib')
/** /**
@@ -89,9 +91,14 @@ function read (req, res, next, parse, debug, options) {
_error = createError(400, error) _error = createError(400, error)
} }
// unpipe from stream and destroy
if (stream !== req) {
unpipe(req)
destroy(stream, true)
}
// read off entire request // read off entire request
stream.resume() dump(req, function onfinished () {
onFinished(req, function onfinished () {
next(createError(400, _error)) next(createError(400, _error))
}) })
return return
@@ -179,3 +186,20 @@ function contentstream (req, debug, inflate) {
return stream return stream
} }
/**
* Dump the contents of a request.
*
* @param {object} req
* @param {function} callback
* @api private
*/
function dump (req, callback) {
if (onFinished.isFinished(req)) {
callback(null)
} else {
onFinished(req, callback)
req.resume()
}
}

View File

@@ -37,7 +37,7 @@ module.exports = json
* %x0D ) ; Carriage return * %x0D ) ; Carriage return
*/ */
var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*(.)/ // eslint-disable-line no-control-regex var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/ // eslint-disable-line no-control-regex
/** /**
* Create a middleware to parse JSON bodies. * Create a middleware to parse JSON bodies.
@@ -122,7 +122,7 @@ function json (options) {
// assert charset per RFC 7159 sec 8.1 // assert charset per RFC 7159 sec 8.1
var charset = getCharset(req) || 'utf-8' var charset = getCharset(req) || 'utf-8'
if (charset.substr(0, 4) !== 'utf-') { if (charset.slice(0, 4) !== 'utf-') {
debug('invalid charset') debug('invalid charset')
next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
charset: charset, charset: charset,
@@ -152,7 +152,9 @@ function json (options) {
function createStrictSyntaxError (str, char) { function createStrictSyntaxError (str, char) {
var index = str.indexOf(char) var index = str.indexOf(char)
var partial = str.substring(0, index) + '#' var partial = index !== -1
? str.substring(0, index) + '#'
: ''
try { try {
JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation') JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation')
@@ -173,7 +175,11 @@ function createStrictSyntaxError (str, char) {
*/ */
function firstchar (str) { function firstchar (str) {
return FIRST_CHAR_REGEXP.exec(str)[1] var match = FIRST_CHAR_REGEXP.exec(str)
return match
? match[1]
: undefined
} }
/** /**

105
node_modules/body-parser/package.json generated vendored
View File

@@ -1,91 +1,56 @@
{ {
"_from": "body-parser@1.19.0", "name": "body-parser",
"_id": "body-parser@1.19.0", "description": "Node.js body parsing middleware",
"_inBundle": false, "version": "1.20.1",
"_integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
"_location": "/body-parser",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "body-parser@1.19.0",
"name": "body-parser",
"escapedName": "body-parser",
"rawSpec": "1.19.0",
"saveSpec": null,
"fetchSpec": "1.19.0"
},
"_requiredBy": [
"/express"
],
"_resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
"_shasum": "96b2709e57c9c4e09a6fd66a8fd979844f69f08a",
"_spec": "body-parser@1.19.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/express",
"bugs": {
"url": "https://github.com/expressjs/body-parser/issues"
},
"bundleDependencies": false,
"contributors": [ "contributors": [
{ "Douglas Christopher Wilson <doug@somethingdoug.com>",
"name": "Douglas Christopher Wilson", "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
"email": "doug@somethingdoug.com"
},
{
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
}
], ],
"license": "MIT",
"repository": "expressjs/body-parser",
"dependencies": { "dependencies": {
"bytes": "3.1.0", "bytes": "3.1.2",
"content-type": "~1.0.4", "content-type": "~1.0.4",
"debug": "2.6.9", "debug": "2.6.9",
"depd": "~1.1.2", "depd": "2.0.0",
"http-errors": "1.7.2", "destroy": "1.2.0",
"http-errors": "2.0.0",
"iconv-lite": "0.4.24", "iconv-lite": "0.4.24",
"on-finished": "~2.3.0", "on-finished": "2.4.1",
"qs": "6.7.0", "qs": "6.11.0",
"raw-body": "2.4.0", "raw-body": "2.5.1",
"type-is": "~1.6.17" "type-is": "~1.6.18",
"unpipe": "1.0.0"
}, },
"deprecated": false,
"description": "Node.js body parsing middleware",
"devDependencies": { "devDependencies": {
"eslint": "5.16.0", "eslint": "8.24.0",
"eslint-config-standard": "12.0.0", "eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.17.2", "eslint-plugin-import": "2.26.0",
"eslint-plugin-markdown": "1.0.0", "eslint-plugin-markdown": "3.0.0",
"eslint-plugin-node": "8.0.1", "eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.1.1", "eslint-plugin-promise": "6.0.1",
"eslint-plugin-standard": "4.0.0", "eslint-plugin-standard": "4.1.0",
"istanbul": "0.4.5",
"methods": "1.1.2", "methods": "1.1.2",
"mocha": "6.1.4", "mocha": "10.0.0",
"safe-buffer": "5.1.2", "nyc": "15.1.0",
"supertest": "4.0.2" "safe-buffer": "5.2.1",
}, "supertest": "6.3.0"
"engines": {
"node": ">= 0.8"
}, },
"files": [ "files": [
"lib/", "lib/",
"LICENSE", "LICENSE",
"HISTORY.md", "HISTORY.md",
"SECURITY.md",
"index.js" "index.js"
], ],
"homepage": "https://github.com/expressjs/body-parser#readme", "engines": {
"license": "MIT", "node": ">= 0.8",
"name": "body-parser", "npm": "1.2.8000 || >= 1.4.16"
"repository": {
"type": "git",
"url": "git+https://github.com/expressjs/body-parser.git"
}, },
"scripts": { "scripts": {
"lint": "eslint --plugin markdown --ext js,md .", "lint": "eslint .",
"test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/", "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/", "test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/" "test-cov": "nyc --reporter=html --reporter=text npm test"
}, }
"version": "1.19.0"
} }

138
node_modules/boxen/index.js generated vendored
View File

@@ -1,138 +0,0 @@
'use strict';
const stringWidth = require('string-width');
const chalk = require('chalk');
const widestLine = require('widest-line');
const cliBoxes = require('cli-boxes');
const camelCase = require('camelcase');
const ansiAlign = require('ansi-align');
const termSize = require('term-size');
const getObject = detail => {
let obj;
if (typeof detail === 'number') {
obj = {
top: detail,
right: detail * 3,
bottom: detail,
left: detail * 3
};
} else {
obj = Object.assign({
top: 0,
right: 0,
bottom: 0,
left: 0
}, detail);
}
return obj;
};
const getBorderChars = borderStyle => {
const sides = [
'topLeft',
'topRight',
'bottomRight',
'bottomLeft',
'vertical',
'horizontal'
];
let chars;
if (typeof borderStyle === 'string') {
chars = cliBoxes[borderStyle];
if (!chars) {
throw new TypeError(`Invalid border style: ${borderStyle}`);
}
} else {
sides.forEach(key => {
if (!borderStyle[key] || typeof borderStyle[key] !== 'string') {
throw new TypeError(`Invalid border style: ${key}`);
}
});
chars = borderStyle;
}
return chars;
};
const getBackgroundColorName = x => camelCase('bg', x);
module.exports = (text, opts) => {
opts = Object.assign({
padding: 0,
borderStyle: 'single',
dimBorder: false,
align: 'left',
float: 'left'
}, opts);
if (opts.backgroundColor) {
opts.backgroundColor = getBackgroundColorName(opts.backgroundColor);
}
if (opts.borderColor && !chalk[opts.borderColor]) {
throw new Error(`${opts.borderColor} is not a valid borderColor`);
}
if (opts.backgroundColor && !chalk[opts.backgroundColor]) {
throw new Error(`${opts.backgroundColor} is not a valid backgroundColor`);
}
const chars = getBorderChars(opts.borderStyle);
const padding = getObject(opts.padding);
const margin = getObject(opts.margin);
const colorizeBorder = x => {
const ret = opts.borderColor ? chalk[opts.borderColor](x) : x;
return opts.dimBorder ? chalk.dim(ret) : ret;
};
const colorizeContent = x => opts.backgroundColor ? chalk[opts.backgroundColor](x) : x;
text = ansiAlign(text, {align: opts.align});
const NL = '\n';
const PAD = ' ';
let lines = text.split(NL);
if (padding.top > 0) {
lines = Array(padding.top).fill('').concat(lines);
}
if (padding.bottom > 0) {
lines = lines.concat(Array(padding.bottom).fill(''));
}
const contentWidth = widestLine(text) + padding.left + padding.right;
const paddingLeft = PAD.repeat(padding.left);
const columns = termSize().columns;
let marginLeft = PAD.repeat(margin.left);
if (opts.float === 'center') {
const padWidth = Math.max((columns - contentWidth) / 2, 0);
marginLeft = PAD.repeat(padWidth);
} else if (opts.float === 'right') {
const padWidth = Math.max(columns - contentWidth - margin.right - 2, 0);
marginLeft = PAD.repeat(padWidth);
}
const horizontal = chars.horizontal.repeat(contentWidth);
const top = colorizeBorder(NL.repeat(margin.top) + marginLeft + chars.topLeft + horizontal + chars.topRight);
const bottom = colorizeBorder(marginLeft + chars.bottomLeft + horizontal + chars.bottomRight + NL.repeat(margin.bottom));
const side = colorizeBorder(chars.vertical);
const middle = lines.map(line => {
const paddingRight = PAD.repeat(contentWidth - stringWidth(line) - padding.left);
return marginLeft + side + colorizeContent(paddingLeft + line + paddingRight) + side;
}).join(NL);
return top + NL + middle + NL + bottom;
};
module.exports._borderStyles = cliBoxes;

9
node_modules/boxen/license generated vendored
View File

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

107
node_modules/boxen/package.json generated vendored
View File

@@ -1,107 +0,0 @@
{
"_args": [
[
"boxen@^1.2.1",
"/home/pablinux/Projects/Node/app_sigma/node_modules/update-notifier"
]
],
"_from": "boxen@>=1.2.1 <2.0.0",
"_id": "boxen@1.3.0",
"_inCache": true,
"_installable": true,
"_location": "/boxen",
"_nodeVersion": "8.9.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/boxen-1.3.0.tgz_1512091816286_0.3364733885973692"
},
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "5.5.1",
"_phantomChildren": {},
"_requested": {
"name": "boxen",
"raw": "boxen@^1.2.1",
"rawSpec": "^1.2.1",
"scope": null,
"spec": ">=1.2.1 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/update-notifier"
],
"_resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz",
"_shasum": "55c6c39a8ba58d9c61ad22cd877532deb665a20b",
"_shrinkwrap": null,
"_spec": "boxen@^1.2.1",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/update-notifier",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/boxen/issues"
},
"dependencies": {
"ansi-align": "^2.0.0",
"camelcase": "^4.0.0",
"chalk": "^2.0.1",
"cli-boxes": "^1.0.0",
"string-width": "^2.0.0",
"term-size": "^1.2.0",
"widest-line": "^2.0.0"
},
"description": "Create boxes in the terminal",
"devDependencies": {
"ava": "*",
"nyc": "^11.0.3",
"xo": "*"
},
"directories": {},
"dist": {
"integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==",
"shasum": "55c6c39a8ba58d9c61ad22cd877532deb665a20b",
"tarball": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"gitHead": "f968a18b60af6aa05ca1ab572f7b50cb4310d013",
"homepage": "https://github.com/sindresorhus/boxen#readme",
"keywords": [
"ascii",
"border",
"box",
"boxes",
"cli",
"console",
"term",
"terminal",
"text",
"unicode"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "boxen",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/boxen.git"
},
"scripts": {
"test": "xo && nyc ava"
},
"version": "1.3.0"
}

175
node_modules/boxen/readme.md generated vendored
View File

@@ -1,175 +0,0 @@
# <img src="screenshot.png" width="400" alt="boxen">
> Create boxes in the terminal
[![Build Status](https://travis-ci.org/sindresorhus/boxen.svg?branch=master)](https://travis-ci.org/sindresorhus/boxen)
## Install
```
$ npm install boxen
```
## Usage
```js
const boxen = require('boxen');
console.log(boxen('unicorn', {padding: 1}));
/*
┌─────────────┐
│ │
│ unicorn │
│ │
└─────────────┘
*/
console.log(boxen('unicorn', {padding: 1, margin: 1, borderStyle: 'double'}));
/*
╔═════════════╗
║ ║
║ unicorn ║
║ ║
╚═════════════╝
*/
```
## API
### boxen(input, [options])
#### input
Type: `string`
Text inside the box.
#### options
##### borderColor
Type: `string`<br>
Values: `black` `red` `green` `yellow` `blue` `magenta` `cyan` `white` `gray`
Color of the box border.
##### borderStyle
Type: `string` `object`<br>
Default: `single`<br>
Values:
- `single`
```
┌───┐
│foo│
└───┘
```
- `double`
```
╔═══╗
║foo║
╚═══╝
```
- `round` (`single` sides with round corners)
```
╭───╮
│foo│
╰───╯
```
- `single-double` (`single` on top and bottom, `double` on right and left)
```
╓───╖
║foo║
╙───╜
```
- `double-single` (`double` on top and bottom, `single` on right and left)
```
╒═══╕
│foo│
╘═══╛
```
- `classic`
```
+---+
|foo|
+---+
```
Style of the box border.
Can be any of the above predefined styles or an object with the following keys:
```js
{
topLeft: '+',
topRight: '+',
bottomLeft: '+',
bottomRight: '+',
horizontal: '-',
vertical: '|'
}
```
##### dimBorder
Type: `boolean`<br>
Default: `false`
Reduce opacity of the border.
##### padding
Type: `number` `Object`<br>
Default: `0`
Space between the text and box border.
Accepts a number or an object with any of the `top`, `right`, `bottom`, `left` properties. When a number is specified, the left/right padding is 3 times the top/bottom to make it look nice.
##### margin
Type: `number` `Object`<br>
Default: `0`
Space around the box.
Accepts a number or an object with any of the `top`, `right`, `bottom`, `left` properties. When a number is specified, the left/right margin is 3 times the top/bottom to make it look nice.
##### float
Type: `string`<br>
Values: `right` `center` `left`<br>
Default: `left`
Float the box on the available terminal screen space.
##### backgroundColor
Type: `string`<br>
Values: `black` `red` `green` `yellow` `blue` `magenta` `cyan` `white`
Color of the background.
##### align
Type: `string`<br>
Default: `left`<br>
Values: `left` `center` `right`
Align the text in the box based on the widest line.
## Related
- [boxen-cli](https://github.com/sindresorhus/boxen-cli) - CLI for this module
- [cli-boxes](https://github.com/sindresorhus/cli-boxes) - Boxes for use in the terminal
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

View File

@@ -1,109 +1,47 @@
{ {
"_args": [ "name": "brace-expansion",
[ "description": "Brace expansion as known from sh/bash",
"brace-expansion@^1.1.7", "version": "1.1.11",
"/home/pablinux/Projects/Node/app_sigma/node_modules/minimatch" "repository": {
] "type": "git",
], "url": "git://github.com/juliangruber/brace-expansion.git"
"_from": "brace-expansion@>=1.1.7 <2.0.0",
"_id": "brace-expansion@1.1.11",
"_inCache": true,
"_installable": true,
"_location": "/brace-expansion",
"_nodeVersion": "9.0.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/brace-expansion_1.1.11_1518248541320_0.33962849281003904"
}, },
"_npmUser": { "homepage": "https://github.com/juliangruber/brace-expansion",
"email": "julian@juliangruber.com", "main": "index.js",
"name": "juliangruber" "scripts": {
}, "test": "tape test/*.js",
"_npmVersion": "5.5.1", "gentest": "bash test/generate.sh",
"_phantomChildren": {}, "bench": "matcha test/perf/bench.js"
"_requested": {
"name": "brace-expansion",
"raw": "brace-expansion@^1.1.7",
"rawSpec": "^1.1.7",
"scope": null,
"spec": ">=1.1.7 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/minimatch"
],
"_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
"_shrinkwrap": null,
"_spec": "brace-expansion@^1.1.7",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/minimatch",
"author": {
"email": "mail@juliangruber.com",
"name": "Julian Gruber",
"url": "http://juliangruber.com"
},
"bugs": {
"url": "https://github.com/juliangruber/brace-expansion/issues"
}, },
"dependencies": { "dependencies": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
}, },
"description": "Brace expansion as known from sh/bash",
"devDependencies": { "devDependencies": {
"matcha": "^0.7.0", "matcha": "^0.7.0",
"tape": "^4.6.0" "tape": "^4.6.0"
}, },
"directories": {},
"dist": {
"fileCount": 4,
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
"tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"unpackedSize": 11059
},
"gitHead": "01a21de7441549d26ac0c0a9ff91385d16e5c21c",
"homepage": "https://github.com/juliangruber/brace-expansion",
"keywords": [], "keywords": [],
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
"url": "http://juliangruber.com"
},
"license": "MIT", "license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "isaacs",
"email": "isaacs@npmjs.com"
},
{
"name": "juliangruber",
"email": "julian@juliangruber.com"
}
],
"name": "brace-expansion",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/juliangruber/brace-expansion.git"
},
"scripts": {
"bench": "matcha test/perf/bench.js",
"gentest": "bash test/generate.sh",
"test": "tape test/*.js"
},
"testling": { "testling": {
"files": "test/*.js",
"browsers": [ "browsers": [
"android-browser/4.2..latest", "ie/8..latest",
"chrome/25..latest",
"chrome/canary",
"firefox/20..latest", "firefox/20..latest",
"firefox/nightly", "firefox/nightly",
"ie/8..latest", "chrome/25..latest",
"ipad/6.0..latest", "chrome/canary",
"iphone/6.0..latest",
"opera/12..latest", "opera/12..latest",
"opera/next", "opera/next",
"safari/5.1..latest" "safari/5.1..latest",
], "ipad/6.0..latest",
"files": "test/*.js" "iphone/6.0..latest",
}, "android-browser/4.2..latest"
"version": "1.1.11" ]
}
} }

142
node_modules/braces/package.json generated vendored
View File

@@ -1,96 +1,42 @@
{ {
"_args": [ "name": "braces",
[ "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.",
"braces@~3.0.2", "version": "3.0.2",
"/home/pablinux/Projects/Node/app_sigma/node_modules/chokidar" "homepage": "https://github.com/micromatch/braces",
] "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Brian Woodward (https://twitter.com/doowb)",
"Elan Shanker (https://github.com/es128)",
"Eugene Sharygin (https://github.com/eush77)",
"hemanth.hm (http://h3manth.com)",
"Jon Schlinkert (http://twitter.com/jonschlinkert)"
], ],
"_from": "braces@>=3.0.2 <3.1.0", "repository": "micromatch/braces",
"_hasShrinkwrap": false,
"_id": "braces@3.0.2",
"_inCache": true,
"_installable": true,
"_location": "/braces",
"_nodeVersion": "10.15.2",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/braces_3.0.2_1555444272661_0.9578113107001449"
},
"_npmUser": {
"email": "brian.woodward@gmail.com",
"name": "doowb"
},
"_npmVersion": "6.4.1",
"_phantomChildren": {},
"_requested": {
"name": "braces",
"raw": "braces@~3.0.2",
"rawSpec": "~3.0.2",
"scope": null,
"spec": ">=3.0.2 <3.1.0",
"type": "range"
},
"_requiredBy": [
"/chokidar"
],
"_resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"_shasum": "3454e1a462ee8d599e236df336cd9ea4f8afe107",
"_shrinkwrap": null,
"_spec": "braces@~3.0.2",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/chokidar",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": { "bugs": {
"url": "https://github.com/micromatch/braces/issues" "url": "https://github.com/micromatch/braces/issues"
}, },
"contributors": [ "license": "MIT",
{ "files": [
"name": "Brian Woodward", "index.js",
"url": "https://twitter.com/doowb" "lib"
},
{
"name": "Elan Shanker",
"url": "https://github.com/es128"
},
{
"name": "Eugene Sharygin",
"url": "https://github.com/eush77"
},
{
"name": "hemanth.hm",
"url": "http://h3manth.com"
},
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
}
], ],
"main": "index.js",
"engines": {
"node": ">=8"
},
"scripts": {
"test": "mocha",
"benchmark": "node benchmark"
},
"dependencies": { "dependencies": {
"fill-range": "^7.0.1" "fill-range": "^7.0.1"
}, },
"description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.",
"devDependencies": { "devDependencies": {
"ansi-colors": "^3.2.4", "ansi-colors": "^3.2.4",
"bash-path": "^2.0.1", "bash-path": "^2.0.1",
"gulp-format-md": "^2.0.0", "gulp-format-md": "^2.0.0",
"mocha": "^6.1.1" "mocha": "^6.1.1"
}, },
"directories": {},
"dist": {
"fileCount": 11,
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctjIxCRA9TVsSAnZWagAAwA4P/i6j6DyxGZfojgDNzaNX\n6GlgCFb4mF64au4BAi+9q2gJTJOVbr2P/0iEl9tjdM5LU+tqEv1eLKkHenBi\ndc+ktaVD/c+XaTMubGNhtBfDxQUiU/QqI6dLMCEOb5EOlSclHsTiLV3frQxI\nEUzh9+LL3V6okecvADaWgt17xTWXSDRktZJoFeAK5q0017ras8yWLqp+5uDO\nRpapuec1wK4RRUDUS9/I+K9R7Kxv9aTyfdGQ5sueLj1QdAmNKDAVH77OG9Rl\nACDijw5L1KpzRkGxGkrwUHyjh0V7EMDwj74XgddEEE3eUgn5UN5n+Dmyj0/H\nP5tcGxOqNEpj9UueU8m6A18URJatSzDwqhAEKbJ1jyYs3LyElDUdiOxYedib\nHz8Ny9+5TJqEeEhU0de/8bsafjV4QsC/JZLI8nc9W65HVQ8M1fAgvxQ6O7Uj\naoZiqhME6OaE43tR4ldNnnYVujQInyOnTocL3GkbxNWvuQQieLNvBsV0p1H4\n6A9Q4y0fzsfdH+NoEJ3ghgSMn2P5Bb9EuExg0McW//H1Gj5+V2nfXEFGXoQE\n874CBL5gIxyAGSGiWB57y6bGCMWvo6gKhFdeEF+msvMSiv18hw4CcgogVzy/\n1pWI+R9hSWbaWD6q/Em9HmIJDqNS633NWy+KMMrEQLGZjfrEa3VsRjiXGCaH\nUQTq\r\n=kTks\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "3454e1a462ee8d599e236df336cd9ea4f8afe107",
"tarball": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"unpackedSize": 49239
},
"engines": {
"node": ">=8"
},
"gitHead": "25791512d219b284bd62bb068cae85d8e68bd05b",
"homepage": "https://github.com/micromatch/braces",
"keywords": [ "keywords": [
"alpha", "alpha",
"alphabetical", "alphabetical",
@@ -115,45 +61,17 @@
"ranges", "ranges",
"sh" "sh"
], ],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "doowb",
"email": "brian.woodward@gmail.com"
},
{
"name": "es128",
"email": "elan.shanker+npm@gmail.com"
},
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "braces",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/micromatch/braces.git"
},
"scripts": {
"benchmark": "node benchmark",
"test": "mocha"
},
"verb": { "verb": {
"toc": false,
"layout": "default", "layout": "default",
"tasks": [
"readme"
],
"lint": { "lint": {
"reflinks": true "reflinks": true
}, },
"plugins": [ "plugins": [
"gulp-format-md" "gulp-format-md"
], ]
"tasks": [ }
"readme"
],
"toc": false
},
"version": "3.0.2"
} }

10
node_modules/bytes/History.md generated vendored
View File

@@ -1,3 +1,13 @@
3.1.2 / 2022-01-27
==================
* Fix return value for un-parsable strings
3.1.1 / 2021-11-15
==================
* Fix "thousandsSeparator" incorrecting formatting fractional part
3.1.0 / 2019-01-22 3.1.0 / 2019-01-22
================== ==================

56
node_modules/bytes/Readme.md generated vendored
View File

@@ -2,7 +2,7 @@
[![NPM Version][npm-image]][npm-url] [![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url] [![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url] [![Build Status][ci-image]][ci-url]
[![Test Coverage][coveralls-image]][coveralls-url] [![Test Coverage][coveralls-image]][coveralls-url]
Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa. Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.
@@ -23,6 +23,33 @@ $ npm install bytes
var bytes = require('bytes'); var bytes = require('bytes');
``` ```
#### bytes(numberstring value, [options]): numberstringnull
Default export function. Delegates to either `bytes.format` or `bytes.parse` based on the type of `value`.
**Arguments**
| Name | Type | Description |
|---------|----------|--------------------|
| value | `number``string` | Number value to format or string value to parse |
| options | `Object` | Conversion options for `format` |
**Returns**
| Name | Type | Description |
|---------|------------------|-------------------------------------------------|
| results | `string``number``null` | Return null upon error. Numeric value in bytes, or string value otherwise. |
**Example**
```js
bytes(1024);
// output: '1KB'
bytes('1KB');
// output: 1024
```
#### bytes.format(number value, [options]): stringnull #### bytes.format(number value, [options]): stringnull
Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is
@@ -41,7 +68,7 @@ Format the given value in bytes into a string. If the value is negative, it is k
|-------------------|--------|-----------------------------------------------------------------------------------------| |-------------------|--------|-----------------------------------------------------------------------------------------|
| decimalPlaces | `number``null` | Maximum number of decimal places to include in output. Default value to `2`. | | decimalPlaces | `number``null` | Maximum number of decimal places to include in output. Default value to `2`. |
| fixedDecimals | `boolean``null` | Whether to always display the maximum number of decimal places. Default value to `false` | | fixedDecimals | `boolean``null` | Whether to always display the maximum number of decimal places. Default value to `false` |
| thousandsSeparator | `string``null` | Example of values: `' '`, `','` and `.`... Default value to `''`. | | thousandsSeparator | `string``null` | Example of values: `' '`, `','` and `'.'`... Default value to `''`. |
| unit | `string``null` | The unit in which the result will be returned (B/KB/MB/GB/TB). Default value to `''` (which means auto detect). | | unit | `string``null` | The unit in which the result will be returned (B/KB/MB/GB/TB). Default value to `''` (which means auto detect). |
| unitSeparator | `string``null` | Separator to use between number and unit. Default value to `''`. | | unitSeparator | `string``null` | Separator to use between number and unit. Default value to `''`. |
@@ -54,21 +81,20 @@ Format the given value in bytes into a string. If the value is negative, it is k
**Example** **Example**
```js ```js
bytes(1024); bytes.format(1024);
// output: '1KB' // output: '1KB'
bytes(1000); bytes.format(1000);
// output: '1000B' // output: '1000B'
bytes(1000, {thousandsSeparator: ' '}); bytes.format(1000, {thousandsSeparator: ' '});
// output: '1 000B' // output: '1 000B'
bytes(1024 * 1.7, {decimalPlaces: 0}); bytes.format(1024 * 1.7, {decimalPlaces: 0});
// output: '2KB' // output: '2KB'
bytes(1024, {unitSeparator: ' '}); bytes.format(1024, {unitSeparator: ' '});
// output: '1 KB' // output: '1 KB'
``` ```
#### bytes.parse(stringnumber value): numbernull #### bytes.parse(stringnumber value): numbernull
@@ -102,25 +128,25 @@ The units are in powers of two, not ten. This means 1kb = 1024b according to thi
**Example** **Example**
```js ```js
bytes('1KB'); bytes.parse('1KB');
// output: 1024 // output: 1024
bytes('1024'); bytes.parse('1024');
// output: 1024 // output: 1024
bytes(1024); bytes.parse(1024);
// output: 1KB // output: 1024
``` ```
## License ## License
[MIT](LICENSE) [MIT](LICENSE)
[ci-image]: https://badgen.net/github/checks/visionmedia/bytes.js/master?label=ci
[ci-url]: https://github.com/visionmedia/bytes.js/actions?query=workflow%3Aci
[coveralls-image]: https://badgen.net/coveralls/c/github/visionmedia/bytes.js/master [coveralls-image]: https://badgen.net/coveralls/c/github/visionmedia/bytes.js/master
[coveralls-url]: https://coveralls.io/r/visionmedia/bytes.js?branch=master [coveralls-url]: https://coveralls.io/r/visionmedia/bytes.js?branch=master
[downloads-image]: https://badgen.net/npm/dm/bytes [downloads-image]: https://badgen.net/npm/dm/bytes
[downloads-url]: https://npmjs.org/package/bytes [downloads-url]: https://npmjs.org/package/bytes
[npm-image]: https://badgen.net/npm/node/bytes [npm-image]: https://badgen.net/npm/v/bytes
[npm-url]: https://npmjs.org/package/bytes [npm-url]: https://npmjs.org/package/bytes
[travis-image]: https://badgen.net/travis/visionmedia/bytes.js/master
[travis-url]: https://travis-ci.org/visionmedia/bytes.js

10
node_modules/bytes/index.js generated vendored
View File

@@ -117,7 +117,11 @@ function format(value, options) {
} }
if (thousandsSeparator) { if (thousandsSeparator) {
str = str.replace(formatThousandsRegExp, thousandsSeparator); str = str.split('.').map(function (s, i) {
return i === 0
? s.replace(formatThousandsRegExp, thousandsSeparator)
: s
}).join('.');
} }
return str + unitSeparator + unit; return str + unitSeparator + unit;
@@ -158,5 +162,9 @@ function parse(val) {
unit = results[4].toLowerCase(); unit = results[4].toLowerCase();
} }
if (isNaN(floatValue)) {
return null;
}
return Math.floor(map[unit] * floatValue); return Math.floor(map[unit] * floatValue);
} }

90
node_modules/bytes/package.json generated vendored
View File

@@ -1,64 +1,13 @@
{ {
"_from": "bytes@3.1.0", "name": "bytes",
"_id": "bytes@3.1.0",
"_inBundle": false,
"_integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==",
"_location": "/bytes",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "bytes@3.1.0",
"name": "bytes",
"escapedName": "bytes",
"rawSpec": "3.1.0",
"saveSpec": null,
"fetchSpec": "3.1.0"
},
"_requiredBy": [
"/body-parser",
"/raw-body"
],
"_resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
"_shasum": "f6cf7933a360e0588fa9fde85651cdc7f805d1f6",
"_spec": "bytes@3.1.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/body-parser",
"author": {
"name": "TJ Holowaychuk",
"email": "tj@vision-media.ca",
"url": "http://tjholowaychuk.com"
},
"bugs": {
"url": "https://github.com/visionmedia/bytes.js/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Jed Watson",
"email": "jed.watson@me.com"
},
{
"name": "Théo FIDRY",
"email": "theo.fidry@gmail.com"
}
],
"deprecated": false,
"description": "Utility to parse a string bytes to bytes and vice-versa", "description": "Utility to parse a string bytes to bytes and vice-versa",
"devDependencies": { "version": "3.1.2",
"eslint": "5.12.1", "author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
"mocha": "5.2.0", "contributors": [
"nyc": "13.1.0" "Jed Watson <jed.watson@me.com>",
}, "Théo FIDRY <theo.fidry@gmail.com>"
"engines": {
"node": ">= 0.8"
},
"files": [
"History.md",
"LICENSE",
"Readme.md",
"index.js"
], ],
"homepage": "https://github.com/visionmedia/bytes.js#readme", "license": "MIT",
"keywords": [ "keywords": [
"byte", "byte",
"bytes", "bytes",
@@ -68,17 +17,26 @@
"convert", "convert",
"converter" "converter"
], ],
"license": "MIT", "repository": "visionmedia/bytes.js",
"name": "bytes", "devDependencies": {
"repository": { "eslint": "7.32.0",
"type": "git", "eslint-plugin-markdown": "2.2.1",
"url": "git+https://github.com/visionmedia/bytes.js.git" "mocha": "9.2.0",
"nyc": "15.1.0"
},
"files": [
"History.md",
"LICENSE",
"Readme.md",
"index.js"
],
"engines": {
"node": ">= 0.8"
}, },
"scripts": { "scripts": {
"lint": "eslint .", "lint": "eslint .",
"test": "mocha --check-leaks --reporter spec", "test": "mocha --check-leaks --reporter spec",
"test-ci": "nyc --reporter=text npm test", "test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test" "test-cov": "nyc --reporter=html --reporter=text npm test"
}, }
"version": "3.1.0"
} }

64
node_modules/camelcase/index.js generated vendored
View File

@@ -1,64 +0,0 @@
'use strict';
function preserveCamelCase(str) {
let isLastCharLower = false;
let isLastCharUpper = false;
let isLastLastCharUpper = false;
for (let i = 0; i < str.length; i++) {
const c = str[i];
if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) {
str = str.substr(0, i) + '-' + str.substr(i);
isLastCharLower = false;
isLastLastCharUpper = isLastCharUpper;
isLastCharUpper = true;
i++;
} else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) {
str = str.substr(0, i - 1) + '-' + str.substr(i - 1);
isLastLastCharUpper = isLastCharUpper;
isLastCharUpper = false;
isLastCharLower = true;
} else {
isLastCharLower = c.toLowerCase() === c;
isLastLastCharUpper = isLastCharUpper;
isLastCharUpper = c.toUpperCase() === c;
}
}
return str;
}
module.exports = function (str) {
if (arguments.length > 1) {
str = Array.from(arguments)
.map(x => x.trim())
.filter(x => x.length)
.join('-');
} else {
str = str.trim();
}
if (str.length === 0) {
return '';
}
if (str.length === 1) {
return str.toLowerCase();
}
if (/^[a-z0-9]+$/.test(str)) {
return str;
}
const hasUpperCase = str !== str.toLowerCase();
if (hasUpperCase) {
str = preserveCamelCase(str);
}
return str
.replace(/^[_.\- ]+/, '')
.toLowerCase()
.replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase());
};

21
node_modules/camelcase/license generated vendored
View File

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

102
node_modules/camelcase/package.json generated vendored
View File

@@ -1,102 +0,0 @@
{
"_args": [
[
"camelcase@^4.0.0",
"/home/pablinux/Projects/Node/app_sigma/node_modules/boxen"
]
],
"_from": "camelcase@>=4.0.0 <5.0.0",
"_id": "camelcase@4.1.0",
"_inCache": true,
"_installable": true,
"_location": "/camelcase",
"_nodeVersion": "7.8.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/camelcase-4.1.0.tgz_1490865362489_0.433825216954574"
},
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "4.2.0",
"_phantomChildren": {},
"_requested": {
"name": "camelcase",
"raw": "camelcase@^4.0.0",
"rawSpec": "^4.0.0",
"scope": null,
"spec": ">=4.0.0 <5.0.0",
"type": "range"
},
"_requiredBy": [
"/boxen"
],
"_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
"_shasum": "d545635be1e33c542649c69173e5de6acfae34dd",
"_shrinkwrap": null,
"_spec": "camelcase@^4.0.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/boxen",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/camelcase/issues"
},
"dependencies": {},
"description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"directories": {},
"dist": {
"shasum": "d545635be1e33c542649c69173e5de6acfae34dd",
"tarball": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"gitHead": "0e6e4a2752aa013b8e9477145c7b8132c95a82ef",
"homepage": "https://github.com/sindresorhus/camelcase#readme",
"keywords": [
"camel",
"camel-case",
"camelcase",
"case",
"convert",
"dash",
"dot",
"hyphen",
"separator",
"string",
"text",
"underscore"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "camelcase",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/camelcase.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "4.1.0",
"xo": {
"esnext": true
}
}

57
node_modules/camelcase/readme.md generated vendored
View File

@@ -1,57 +0,0 @@
# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase)
> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar`
## Install
```
$ npm install --save camelcase
```
## Usage
```js
const camelCase = require('camelcase');
camelCase('foo-bar');
//=> 'fooBar'
camelCase('foo_bar');
//=> 'fooBar'
camelCase('Foo-Bar');
//=> 'fooBar'
camelCase('--foo.bar');
//=> 'fooBar'
camelCase('__foo__bar__');
//=> 'fooBar'
camelCase('foo bar');
//=> 'fooBar'
console.log(process.argv[3]);
//=> '--foo-bar'
camelCase(process.argv[3]);
//=> 'fooBar'
camelCase('foo', 'bar');
//=> 'fooBar'
camelCase('__foo__', '--bar');
//=> 'fooBar'
```
## Related
- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module
- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

View File

@@ -1,18 +0,0 @@
'use strict';
module.exports = Error.captureStackTrace || function (error) {
var container = new Error();
Object.defineProperty(error, 'stack', {
configurable: true,
get: function getStack() {
var stack = container.stack;
Object.defineProperty(this, 'stack', {
value: stack
});
return stack;
}
});
};

View File

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

View File

@@ -1,90 +0,0 @@
{
"_args": [
[
"capture-stack-trace@^1.0.0",
"/home/pablinux/Projects/Node/app_sigma/node_modules/create-error-class"
]
],
"_from": "capture-stack-trace@>=1.0.0 <2.0.0",
"_hasShrinkwrap": false,
"_id": "capture-stack-trace@1.0.1",
"_inCache": true,
"_installable": true,
"_location": "/capture-stack-trace",
"_nodeVersion": "10.9.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/capture-stack-trace_1.0.1_1535730672335_0.8263389664020613"
},
"_npmUser": {
"email": "floatdrop@gmail.com",
"name": "floatdrop"
},
"_npmVersion": "6.2.0",
"_phantomChildren": {},
"_requested": {
"name": "capture-stack-trace",
"raw": "capture-stack-trace@^1.0.0",
"rawSpec": "^1.0.0",
"scope": null,
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/create-error-class"
],
"_resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz",
"_shasum": "a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d",
"_shrinkwrap": null,
"_spec": "capture-stack-trace@^1.0.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/create-error-class",
"author": {
"email": "floatdrop@gmail.com",
"name": "Vsevolod Strukchinsky",
"url": "github.com/floatdrop"
},
"bugs": {
"url": "https://github.com/floatdrop/capture-stack-trace/issues"
},
"dependencies": {},
"description": "Error.captureStackTrace ponyfill",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"fileCount": 4,
"integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiWPxCRA9TVsSAnZWagAAgncQAI+FQtwx3ALIX8XjuNd3\nKez9948haGCYjKFRP0Emks6FKFGbRYNVtZnV6jTGkEuvOhf/boIU769LL4jL\n2PzSMcxe1geScKSj2Tc6K04ceuuvbNbx5aMn8sgF77Lq6TaKtFakDq0SXpbm\nrYijHBvxEXqayFSsjAZ3EwCKHfKSyqiF0FIFu24nR/9w0+IhykdypChlLYGp\nmwQVZXzE+UaQHcOrl84nsyxPPZrkO9mWiTD0cSAG/YY1kvqfB5UoarFyPwZD\nBM9UwG7EvRF8qHvpNkMutxwdx+tzKOmySXaPmPQ4INc6zdbuEGDl+49l1CwN\nbwyNEfg6hPPPcWnM1SyS4sUz2WJPHgi0cZJfK2idtpSGC1UJAQWbI+Ht3jio\ncQ7CkFTjiqOaIEXYmX76mLa+DWUEIXRczFpbi+0gRPuFoePN/b4JjC8dcvNq\nZFj16hOPZyZ5bx7lhExmMoayMPNBvkrU1CTSZyz+OWQfMfgHmj3h9kRTSDgs\nBqkHyS5VMQvG+9JFRRX/pdfc+oIHDXy7HMNe9zXw3MQ07yhIejQ3RWWIskNw\ntmfblX0eu16WTuTYJ/Mb1LgI5YfpVNjM9qbJgd+2egqXjdag/orUQpwZ75ef\nT/Oczqan2eEy5lF+ApZf5KmnJxviiWnobVE4tTjDpGc69IyZgPpsmC0CL3sX\n9Lju\r\n=PCvg\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d",
"tarball": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz",
"unpackedSize": 2596
},
"engines": {
"node": ">=0.10.0"
},
"gitHead": "dfec994c80358ded25885bd3de7a138549964984",
"homepage": "https://github.com/floatdrop/capture-stack-trace#readme",
"keywords": [
"Error",
"captureStackTrace"
],
"license": "MIT",
"maintainers": [
{
"name": "floatdrop",
"email": "floatdrop@gmail.com"
}
],
"name": "capture-stack-trace",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/floatdrop/capture-stack-trace.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.1"
}

View File

@@ -1,36 +0,0 @@
# capture-stack-trace [![Build Status](https://travis-ci.org/floatdrop/capture-stack-trace.svg?branch=master)](https://travis-ci.org/floatdrop/capture-stack-trace)
> Ponyfill for Error.captureStackTrace
## Install
```
$ npm install --save capture-stack-trace
```
## Usage
```js
var captureStackTrace = require('capture-stack-trace');
captureStackTrace({});
// => {stack: ...}
```
## API
### captureStackTrace(error)
#### error
*Required*
Type: `Object`
Target Object, that will recieve stack property.
## License
MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)

228
node_modules/chalk/index.js generated vendored
View File

@@ -1,228 +0,0 @@
'use strict';
const escapeStringRegexp = require('escape-string-regexp');
const ansiStyles = require('ansi-styles');
const stdoutColor = require('supports-color').stdout;
const template = require('./templates.js');
const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
// `supportsColor.level` → `ansiStyles.color[name]` mapping
const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
// `color-convert` models to exclude from the Chalk API due to conflicts and such
const skipModels = new Set(['gray']);
const styles = Object.create(null);
function applyOptions(obj, options) {
options = options || {};
// Detect level if not set manually
const scLevel = stdoutColor ? stdoutColor.level : 0;
obj.level = options.level === undefined ? scLevel : options.level;
obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
}
function Chalk(options) {
// We check for this.template here since calling `chalk.constructor()`
// by itself will have a `this` of a previously constructed chalk object
if (!this || !(this instanceof Chalk) || this.template) {
const chalk = {};
applyOptions(chalk, options);
chalk.template = function () {
const args = [].slice.call(arguments);
return chalkTag.apply(null, [chalk.template].concat(args));
};
Object.setPrototypeOf(chalk, Chalk.prototype);
Object.setPrototypeOf(chalk.template, chalk);
chalk.template.constructor = Chalk;
return chalk.template;
}
applyOptions(this, options);
}
// Use bright blue on Windows as the normal blue color is illegible
if (isSimpleWindowsTerm) {
ansiStyles.blue.open = '\u001B[94m';
}
for (const key of Object.keys(ansiStyles)) {
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
styles[key] = {
get() {
const codes = ansiStyles[key];
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
}
};
}
styles.visible = {
get() {
return build.call(this, this._styles || [], true, 'visible');
}
};
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
for (const model of Object.keys(ansiStyles.color.ansi)) {
if (skipModels.has(model)) {
continue;
}
styles[model] = {
get() {
const level = this.level;
return function () {
const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
const codes = {
open,
close: ansiStyles.color.close,
closeRe: ansiStyles.color.closeRe
};
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
};
}
};
}
ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
if (skipModels.has(model)) {
continue;
}
const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
styles[bgModel] = {
get() {
const level = this.level;
return function () {
const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
const codes = {
open,
close: ansiStyles.bgColor.close,
closeRe: ansiStyles.bgColor.closeRe
};
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
};
}
};
}
const proto = Object.defineProperties(() => {}, styles);
function build(_styles, _empty, key) {
const builder = function () {
return applyStyle.apply(builder, arguments);
};
builder._styles = _styles;
builder._empty = _empty;
const self = this;
Object.defineProperty(builder, 'level', {
enumerable: true,
get() {
return self.level;
},
set(level) {
self.level = level;
}
});
Object.defineProperty(builder, 'enabled', {
enumerable: true,
get() {
return self.enabled;
},
set(enabled) {
self.enabled = enabled;
}
});
// See below for fix regarding invisible grey/dim combination on Windows
builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';
// `__proto__` is used because we must return a function, but there is
// no way to create a function with a different prototype
builder.__proto__ = proto; // eslint-disable-line no-proto
return builder;
}
function applyStyle() {
// Support varags, but simply cast to string in case there's only one arg
const args = arguments;
const argsLen = args.length;
let str = String(arguments[0]);
if (argsLen === 0) {
return '';
}
if (argsLen > 1) {
// Don't slice `arguments`, it prevents V8 optimizations
for (let a = 1; a < argsLen; a++) {
str += ' ' + args[a];
}
}
if (!this.enabled || this.level <= 0 || !str) {
return this._empty ? '' : str;
}
// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
// see https://github.com/chalk/chalk/issues/58
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
const originalDim = ansiStyles.dim.open;
if (isSimpleWindowsTerm && this.hasGrey) {
ansiStyles.dim.open = '';
}
for (const code of this._styles.slice().reverse()) {
// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
str = code.open + str.replace(code.closeRe, code.open) + code.close;
// Close the styling before a linebreak and reopen
// after next line to fix a bleed issue on macOS
// https://github.com/chalk/chalk/pull/92
str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
}
// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
ansiStyles.dim.open = originalDim;
return str;
}
function chalkTag(chalk, strings) {
if (!Array.isArray(strings)) {
// If chalk() was called by itself or with a string,
// return the string itself as a string.
return [].slice.call(arguments, 1).join(' ');
}
const args = [].slice.call(arguments, 2);
const parts = [strings.raw[0]];
for (let i = 1; i < strings.length; i++) {
parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
parts.push(String(strings.raw[i]));
}
return template(chalk, parts.join(''));
}
Object.defineProperties(Chalk.prototype, styles);
module.exports = Chalk(); // eslint-disable-line new-cap
module.exports.supportsColor = stdoutColor;
module.exports.default = module.exports; // For TypeScript

93
node_modules/chalk/index.js.flow generated vendored
View File

@@ -1,93 +0,0 @@
// @flow strict
type TemplateStringsArray = $ReadOnlyArray<string>;
export type Level = $Values<{
None: 0,
Basic: 1,
Ansi256: 2,
TrueColor: 3
}>;
export type ChalkOptions = {|
enabled?: boolean,
level?: Level
|};
export type ColorSupport = {|
level: Level,
hasBasic: boolean,
has256: boolean,
has16m: boolean
|};
export interface Chalk {
(...text: string[]): string,
(text: TemplateStringsArray, ...placeholders: string[]): string,
constructor(options?: ChalkOptions): Chalk,
enabled: boolean,
level: Level,
rgb(r: number, g: number, b: number): Chalk,
hsl(h: number, s: number, l: number): Chalk,
hsv(h: number, s: number, v: number): Chalk,
hwb(h: number, w: number, b: number): Chalk,
bgHex(color: string): Chalk,
bgKeyword(color: string): Chalk,
bgRgb(r: number, g: number, b: number): Chalk,
bgHsl(h: number, s: number, l: number): Chalk,
bgHsv(h: number, s: number, v: number): Chalk,
bgHwb(h: number, w: number, b: number): Chalk,
hex(color: string): Chalk,
keyword(color: string): Chalk,
+reset: Chalk,
+bold: Chalk,
+dim: Chalk,
+italic: Chalk,
+underline: Chalk,
+inverse: Chalk,
+hidden: Chalk,
+strikethrough: Chalk,
+visible: Chalk,
+black: Chalk,
+red: Chalk,
+green: Chalk,
+yellow: Chalk,
+blue: Chalk,
+magenta: Chalk,
+cyan: Chalk,
+white: Chalk,
+gray: Chalk,
+grey: Chalk,
+blackBright: Chalk,
+redBright: Chalk,
+greenBright: Chalk,
+yellowBright: Chalk,
+blueBright: Chalk,
+magentaBright: Chalk,
+cyanBright: Chalk,
+whiteBright: Chalk,
+bgBlack: Chalk,
+bgRed: Chalk,
+bgGreen: Chalk,
+bgYellow: Chalk,
+bgBlue: Chalk,
+bgMagenta: Chalk,
+bgCyan: Chalk,
+bgWhite: Chalk,
+bgBlackBright: Chalk,
+bgRedBright: Chalk,
+bgGreenBright: Chalk,
+bgYellowBright: Chalk,
+bgBlueBright: Chalk,
+bgMagentaBright: Chalk,
+bgCyanBright: Chalk,
+bgWhiteBrigh: Chalk,
supportsColor: ColorSupport
};
declare module.exports: Chalk;

198
node_modules/chalk/package.json generated vendored
View File

@@ -1,134 +1,68 @@
{ {
"_args": [ "name": "chalk",
[ "version": "4.1.2",
"chalk@^2.0.1", "description": "Terminal string styling done right",
"/home/pablinux/Projects/Node/app_sigma/node_modules/update-notifier" "license": "MIT",
] "repository": "chalk/chalk",
], "funding": "https://github.com/chalk/chalk?sponsor=1",
"_from": "chalk@>=2.0.1 <3.0.0", "main": "source",
"_hasShrinkwrap": false, "engines": {
"_id": "chalk@2.4.2", "node": ">=10"
"_inCache": true, },
"_installable": true, "scripts": {
"_location": "/chalk", "test": "xo && nyc ava && tsd",
"_nodeVersion": "10.13.0", "bench": "matcha benchmark.js"
"_npmOperationalInternal": { },
"host": "s3://npm-registry-packages", "files": [
"tmp": "tmp/chalk_2.4.2_1546703152138_0.5501232329596948" "source",
}, "index.d.ts"
"_npmUser": { ],
"email": "sindresorhus@gmail.com", "keywords": [
"name": "sindresorhus" "color",
}, "colour",
"_npmVersion": "6.5.0", "colors",
"_phantomChildren": {}, "terminal",
"_requested": { "console",
"name": "chalk", "cli",
"raw": "chalk@^2.0.1", "string",
"rawSpec": "^2.0.1", "str",
"scope": null, "ansi",
"spec": ">=2.0.1 <3.0.0", "style",
"type": "range" "styles",
}, "tty",
"_requiredBy": [ "formatting",
"/boxen", "rgb",
"/update-notifier" "256",
], "shell",
"_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "xterm",
"_shasum": "cd42541677a54333cf541a49108c1432b44c9424", "log",
"_shrinkwrap": null, "logging",
"_spec": "chalk@^2.0.1", "command-line",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/update-notifier", "text"
"bugs": { ],
"url": "https://github.com/chalk/chalk/issues" "dependencies": {
}, "ansi-styles": "^4.1.0",
"dependencies": { "supports-color": "^7.1.0"
"ansi-styles": "^3.2.1", },
"escape-string-regexp": "^1.0.5", "devDependencies": {
"supports-color": "^5.3.0" "ava": "^2.4.0",
}, "coveralls": "^3.0.7",
"description": "Terminal string styling done right", "execa": "^4.0.0",
"devDependencies": { "import-fresh": "^3.1.0",
"ava": "*", "matcha": "^0.7.0",
"coveralls": "^3.0.0", "nyc": "^15.0.0",
"execa": "^0.9.0", "resolve-from": "^5.0.0",
"flow-bin": "^0.68.0", "tsd": "^0.7.4",
"import-fresh": "^2.0.0", "xo": "^0.28.2"
"matcha": "^0.7.0", },
"nyc": "^11.0.2", "xo": {
"resolve-from": "^4.0.0", "rules": {
"typescript": "^2.5.3", "unicorn/prefer-string-slice": "off",
"xo": "*" "unicorn/prefer-includes": "off",
}, "@typescript-eslint/member-ordering": "off",
"directories": {}, "no-redeclare": "off",
"dist": { "unicorn/string-content": "off",
"fileCount": 7, "unicorn/better-regex": "off"
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", }
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMNEwCRA9TVsSAnZWagAAmpUQAJgCZygaBX9qniyJ7YVF\nOXq9BNycBSnHyRd5YnaoO6HB7ejh/M4CYYGPqdSQ0OXEk1teNm7iPhGhocbW\n0eEcg0gsnVTgkUKx5p3o841VKydwy72FDgO9WJjKm2QC/mwuYHB9kI7zkq3h\nkakWBNGlKxbKNYX+7x04BXx1H8Fn1CSE//133uQnUWzM6NSXrUwpiZTzwtXi\nOybESujfKq6x6DxlYsTTScThCUodQQTslxIrdeS8PZxQL1RqCwnJSMHi81nI\nPR5BNVbAEYOsZuw88mNEtc6sHellN3ZFVlZwFDu4ZDskgoMiXZVv7Qp6AXbN\nCdsz1ej/OBFdwUfjS17igoHY3sO3+7o3IuFFaCXM4lkSE2zu79M2A7H0GL0R\nUcyfM1OC/nRcLgeEytIDBSOAgeN4tstswdyagFQ36jymeKUyz+q50ziBchey\nZnxPMGYDMKTx+me3TGpf3SbjiSstyZm8GLWPhRLbkjIDajFcFnq2HZXUu/LR\npdFJIWqnJihr9dxxiPSxddqZspb/Jo2mD2+ILNxROZB5+nzmlLnV/PsnnbxM\nPRN0iYDQt6NtXce/GOFMasLwtwidfHx8B4ybmObU3btbmg7V7Og++xpVg+h1\nQfACtop8sZyVN3l65vhonCmioqpSLQPeEkMvwGN6/7wi01BRi5VI4DdEtIet\nHcNL\r\n=DerQ\r\n-----END PGP SIGNATURE-----\r\n", }
"shasum": "cd42541677a54333cf541a49108c1432b44c9424",
"tarball": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"unpackedSize": 26924
},
"engines": {
"node": ">=4"
},
"gitHead": "9776a2ae5b5b1712ccf16416b55f47e575a81fb9",
"homepage": "https://github.com/chalk/chalk#readme",
"keywords": [
"256",
"ansi",
"cli",
"color",
"colors",
"colour",
"command-line",
"console",
"formatting",
"log",
"logging",
"rgb",
"shell",
"str",
"string",
"style",
"styles",
"terminal",
"text",
"tty",
"xterm"
],
"license": "MIT",
"maintainers": [
{
"name": "qix",
"email": "i.am.qix@gmail.com"
},
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "chalk",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/chalk.git"
},
"scripts": {
"bench": "matcha benchmark.js",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava"
},
"types": "types/index.d.ts",
"version": "2.4.2",
"xo": {
"envs": [
"mocha",
"node"
],
"ignores": [
"test/_flow.js"
]
}
} }

149
node_modules/chalk/readme.md generated vendored
View File

@@ -9,12 +9,57 @@
> Terminal string styling done right > Terminal string styling done right
[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) [![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents) [![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) ![TypeScript-ready](https://img.shields.io/npm/types/chalk.svg) [![run on repl.it](https://repl.it/badge/github/chalk/chalk)](https://repl.it/github/chalk/chalk)
### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) <img src="https://cdn.jsdelivr.net/gh/chalk/ansi-styles@8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" alt="" width="900"> <br>
---
<div align="center">
<p>
<p>
<sup>
Sindre Sorhus' open source work is supported by the community on <a href="https://github.com/sponsors/sindresorhus">GitHub Sponsors</a> and <a href="https://stakes.social/0x44d871aebF0126Bf646753E2C976Aa7e68A66c15">Dev</a>
</sup>
</p>
<sup>Special thanks to:</sup>
<br>
<br>
<a href="https://standardresume.co/tech">
<img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="160"/>
</a>
<br>
<br>
<a href="https://retool.com/?utm_campaign=sindresorhus">
<img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="230"/>
</a>
<br>
<br>
<a href="https://doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=chalk&utm_source=github">
<div>
<img src="https://dashboard.doppler.com/imgs/logo-long.svg" width="240" alt="Doppler">
</div>
<b>All your environment variables, in one place</b>
<div>
<span>Stop struggling with scattered API keys, hacking together home-brewed tools,</span>
<br>
<span>and avoiding access controls. Keep your team and servers in sync with Doppler.</span>
</div>
</a>
<br>
<a href="https://uibakery.io/?utm_source=chalk&utm_medium=sponsor&utm_campaign=github">
<div>
<img src="https://sindresorhus.com/assets/thanks/uibakery-logo.jpg" width="270" alt="UI Bakery">
</div>
</a>
</p>
</div>
---
<br>
## Highlights ## Highlights
@@ -26,8 +71,7 @@
- Doesn't extend `String.prototype` - Doesn't extend `String.prototype`
- Clean and focused - Clean and focused
- Actively maintained - Actively maintained
- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 - [Used by ~50,000 packages](https://www.npmjs.com/browse/depended/chalk) as of January 1, 2020
## Install ## Install
@@ -35,11 +79,6 @@
$ npm install chalk $ npm install chalk
``` ```
<a href="https://www.patreon.com/sindresorhus">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>
## Usage ## Usage
```js ```js
@@ -113,7 +152,6 @@ console.log(chalk.green('Hello %s'), name);
//=> 'Hello Sindre' //=> 'Hello Sindre'
``` ```
## API ## API
### chalk.`<style>[.<style>...](string, [string...])` ### chalk.`<style>[.<style>...](string, [string...])`
@@ -124,57 +162,50 @@ Chain [styles](#styles) and call the last one as a method with a string argument
Multiple arguments will be separated by space. Multiple arguments will be separated by space.
### chalk.enabled
Color support is automatically detected, as is the level (see `chalk.level`). However, if you'd like to simply enable/disable Chalk, you can do so via the `.enabled` property.
Chalk is enabled by default unless explicitly disabled via the constructor or `chalk.level` is `0`.
If you need to change this in a reusable module, create a new instance:
```js
const ctx = new chalk.constructor({enabled: false});
```
### chalk.level ### chalk.level
Specifies the level of color support.
Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers. Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
If you need to change this in a reusable module, create a new instance: If you need to change this in a reusable module, create a new instance:
```js ```js
const ctx = new chalk.constructor({level: 0}); const ctx = new chalk.Instance({level: 0});
``` ```
Levels are as follows: | Level | Description |
| :---: | :--- |
0. All colors disabled | `0` | All colors disabled |
1. Basic color support (16 colors) | `1` | Basic color support (16 colors) |
2. 256 color support | `2` | 256 color support |
3. Truecolor support (16 million colors) | `3` | Truecolor support (16 million colors) |
### chalk.supportsColor ### chalk.supportsColor
Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience. Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) 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. Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
### chalk.stderr and chalk.stderr.supportsColor
`chalk.stderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `chalk.supportsColor` apply to this too. `chalk.stderr.supportsColor` is exposed for convenience.
## Styles ## Styles
### Modifiers ### Modifiers
- `reset` - `reset` - Resets the current color chain.
- `bold` - `bold` - Make text bold.
- `dim` - `dim` - Emitting only a small amount of light.
- `italic` *(Not widely supported)* - `italic` - Make text italic. *(Not widely supported)*
- `underline` - `underline` - Make text underline. *(Not widely supported)*
- `inverse` - `inverse`- Inverse background and foreground colors.
- `hidden` - `hidden` - Prints the text, but makes it invisible.
- `strikethrough` *(Not widely supported)* - `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
- `visible` (Text is emitted only if enabled) - `visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic.
### Colors ### Colors
@@ -182,11 +213,11 @@ Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=
- `red` - `red`
- `green` - `green`
- `yellow` - `yellow`
- `blue` *(On Windows the bright version is used since normal blue is illegible)* - `blue`
- `magenta` - `magenta`
- `cyan` - `cyan`
- `white` - `white`
- `gray` ("bright black") - `blackBright` (alias: `gray`, `grey`)
- `redBright` - `redBright`
- `greenBright` - `greenBright`
- `yellowBright` - `yellowBright`
@@ -205,7 +236,7 @@ Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=
- `bgMagenta` - `bgMagenta`
- `bgCyan` - `bgCyan`
- `bgWhite` - `bgWhite`
- `bgBlackBright` - `bgBlackBright` (alias: `bgGray`, `bgGrey`)
- `bgRedBright` - `bgRedBright`
- `bgGreenBright` - `bgGreenBright`
- `bgYellowBright` - `bgYellowBright`
@@ -214,10 +245,9 @@ Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=
- `bgCyanBright` - `bgCyanBright`
- `bgWhiteBright` - `bgWhiteBright`
## Tagged template literal ## Tagged template literal
Chalk can be used as a [tagged template literal](http://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals). Chalk can be used as a [tagged template literal](https://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals).
```js ```js
const chalk = require('chalk'); const chalk = require('chalk');
@@ -226,17 +256,18 @@ const miles = 18;
const calculateFeet = miles => miles * 5280; const calculateFeet = miles => miles * 5280;
console.log(chalk` console.log(chalk`
There are {bold 5280 feet} in a mile. There are {bold 5280 feet} in a mile.
In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}. In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.
`); `);
``` ```
Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`). Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`).
Template styles are chained exactly like normal Chalk styles. The following two statements are equivalent: Template styles are chained exactly like normal Chalk styles. The following three statements are equivalent:
```js ```js
console.log(chalk.bold.rgb(10, 100, 200)('Hello!')); console.log(chalk.bold.rgb(10, 100, 200)('Hello!'));
console.log(chalk.bold.rgb(10, 100, 200)`Hello!`);
console.log(chalk`{bold.rgb(10,100,200) Hello!}`); console.log(chalk`{bold.rgb(10,100,200) Hello!}`);
``` ```
@@ -244,7 +275,6 @@ Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain
All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped. All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped.
## 256 and Truecolor color support ## 256 and Truecolor color support
Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps. Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps.
@@ -270,20 +300,23 @@ The following color models can be used:
- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')` - [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')` - [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')` - [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')`
- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')` - [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')`
- `ansi16` - [`ansi`](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) - Example: `chalk.ansi(31).bgAnsi(93)('red on yellowBright')`
- `ansi256` - [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')`
## Windows ## Windows
If you're on Windows, do yourself a favor and use [`cmder`](http://cmder.net/) instead of `cmd.exe`. If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`.
## Origin story ## Origin story
[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative. [colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
## chalk for enterprise
Available as part of the Tidelift Subscription.
The maintainers of chalk and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-chalk?utm_source=npm-chalk&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## Related ## Related
@@ -302,13 +335,7 @@ If you're on Windows, do yourself a favor and use [`cmder`](http://cmder.net/) i
- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings - [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal - [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
## Maintainers ## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus) - [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-) - [Josh Junon](https://github.com/qix-)
## License
MIT

128
node_modules/chalk/templates.js generated vendored
View File

@@ -1,128 +0,0 @@
'use strict';
const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
const ESCAPES = new Map([
['n', '\n'],
['r', '\r'],
['t', '\t'],
['b', '\b'],
['f', '\f'],
['v', '\v'],
['0', '\0'],
['\\', '\\'],
['e', '\u001B'],
['a', '\u0007']
]);
function unescape(c) {
if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
return String.fromCharCode(parseInt(c.slice(1), 16));
}
return ESCAPES.get(c) || c;
}
function parseArguments(name, args) {
const results = [];
const chunks = args.trim().split(/\s*,\s*/g);
let matches;
for (const chunk of chunks) {
if (!isNaN(chunk)) {
results.push(Number(chunk));
} else if ((matches = chunk.match(STRING_REGEX))) {
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
} else {
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
}
}
return results;
}
function parseStyle(style) {
STYLE_REGEX.lastIndex = 0;
const results = [];
let matches;
while ((matches = STYLE_REGEX.exec(style)) !== null) {
const name = matches[1];
if (matches[2]) {
const args = parseArguments(name, matches[2]);
results.push([name].concat(args));
} else {
results.push([name]);
}
}
return results;
}
function buildStyle(chalk, styles) {
const enabled = {};
for (const layer of styles) {
for (const style of layer.styles) {
enabled[style[0]] = layer.inverse ? null : style.slice(1);
}
}
let current = chalk;
for (const styleName of Object.keys(enabled)) {
if (Array.isArray(enabled[styleName])) {
if (!(styleName in current)) {
throw new Error(`Unknown Chalk style: ${styleName}`);
}
if (enabled[styleName].length > 0) {
current = current[styleName].apply(current, enabled[styleName]);
} else {
current = current[styleName];
}
}
}
return current;
}
module.exports = (chalk, tmp) => {
const styles = [];
const chunks = [];
let chunk = [];
// eslint-disable-next-line max-params
tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
if (escapeChar) {
chunk.push(unescape(escapeChar));
} else if (style) {
const str = chunk.join('');
chunk = [];
chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
styles.push({inverse, styles: parseStyle(style)});
} else if (close) {
if (styles.length === 0) {
throw new Error('Found extraneous } in Chalk template literal');
}
chunks.push(buildStyle(chalk, styles)(chunk.join('')));
chunk = [];
styles.pop();
} else {
chunk.push(chr);
}
});
chunks.push(chunk.join(''));
if (styles.length > 0) {
const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
throw new Error(errMsg);
}
return chunks.join('');
};

97
node_modules/chalk/types/index.d.ts generated vendored
View File

@@ -1,97 +0,0 @@
// Type definitions for Chalk
// Definitions by: Thomas Sauer <https://github.com/t-sauer>
export const enum Level {
None = 0,
Basic = 1,
Ansi256 = 2,
TrueColor = 3
}
export interface ChalkOptions {
enabled?: boolean;
level?: Level;
}
export interface ChalkConstructor {
new (options?: ChalkOptions): Chalk;
(options?: ChalkOptions): Chalk;
}
export interface ColorSupport {
level: Level;
hasBasic: boolean;
has256: boolean;
has16m: boolean;
}
export interface Chalk {
(...text: string[]): string;
(text: TemplateStringsArray, ...placeholders: string[]): string;
constructor: ChalkConstructor;
enabled: boolean;
level: Level;
rgb(r: number, g: number, b: number): this;
hsl(h: number, s: number, l: number): this;
hsv(h: number, s: number, v: number): this;
hwb(h: number, w: number, b: number): this;
bgHex(color: string): this;
bgKeyword(color: string): this;
bgRgb(r: number, g: number, b: number): this;
bgHsl(h: number, s: number, l: number): this;
bgHsv(h: number, s: number, v: number): this;
bgHwb(h: number, w: number, b: number): this;
hex(color: string): this;
keyword(color: string): this;
readonly reset: this;
readonly bold: this;
readonly dim: this;
readonly italic: this;
readonly underline: this;
readonly inverse: this;
readonly hidden: this;
readonly strikethrough: this;
readonly visible: this;
readonly black: this;
readonly red: this;
readonly green: this;
readonly yellow: this;
readonly blue: this;
readonly magenta: this;
readonly cyan: this;
readonly white: this;
readonly gray: this;
readonly grey: this;
readonly blackBright: this;
readonly redBright: this;
readonly greenBright: this;
readonly yellowBright: this;
readonly blueBright: this;
readonly magentaBright: this;
readonly cyanBright: this;
readonly whiteBright: this;
readonly bgBlack: this;
readonly bgRed: this;
readonly bgGreen: this;
readonly bgYellow: this;
readonly bgBlue: this;
readonly bgMagenta: this;
readonly bgCyan: this;
readonly bgWhite: this;
readonly bgBlackBright: this;
readonly bgRedBright: this;
readonly bgGreenBright: this;
readonly bgYellowBright: this;
readonly bgBlueBright: this;
readonly bgMagentaBright: this;
readonly bgCyanBright: this;
readonly bgWhiteBright: this;
}
declare const chalk: Chalk & { supportsColor: ColorSupport };
export default chalk

28
node_modules/chokidar/README.md generated vendored
View File

@@ -1,11 +1,9 @@
# Chokidar [![Weekly downloads](https://img.shields.io/npm/dw/chokidar.svg)](https://github.com/paulmillr/chokidar) [![Yearly downloads](https://img.shields.io/npm/dy/chokidar.svg)](https://github.com/paulmillr/chokidar) # Chokidar [![Weekly downloads](https://img.shields.io/npm/dw/chokidar.svg)](https://github.com/paulmillr/chokidar) [![Yearly downloads](https://img.shields.io/npm/dy/chokidar.svg)](https://github.com/paulmillr/chokidar)
> A neat wrapper around Node.js fs.watch / fs.watchFile / FSEvents. > Minimal and efficient cross-platform file watching library
[![NPM](https://nodei.co/npm/chokidar.png)](https://www.npmjs.com/package/chokidar) [![NPM](https://nodei.co/npm/chokidar.png)](https://www.npmjs.com/package/chokidar)
Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/)
## Why? ## Why?
Node.js `fs.watch`: Node.js `fs.watch`:
@@ -15,6 +13,7 @@ Node.js `fs.watch`:
* Often reports events twice. * Often reports events twice.
* Emits most changes as `rename`. * Emits most changes as `rename`.
* Does not provide an easy way to recursively watch file trees. * Does not provide an easy way to recursively watch file trees.
* Does not support recursive watching on Linux.
Node.js `fs.watchFile`: Node.js `fs.watchFile`:
@@ -35,6 +34,8 @@ Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app buil
and [many others](https://www.npmjs.com/browse/depended/chokidar). and [many others](https://www.npmjs.com/browse/depended/chokidar).
It has proven itself in production environments. It has proven itself in production environments.
Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/)
## How? ## How?
Chokidar does still rely on the Node.js core `fs` module, but when using Chokidar does still rely on the Node.js core `fs` module, but when using
@@ -46,7 +47,7 @@ On MacOS, chokidar by default uses a native extension exposing the Darwin
implementations like `kqueue` available on most \*nix platforms. Chokidar still implementations like `kqueue` available on most \*nix platforms. Chokidar still
does have to do some work to normalize the events received that way as well. does have to do some work to normalize the events received that way as well.
On other platforms, the `fs.watch`-based implementation is the default, which On most other platforms, the `fs.watch`-based implementation is the default, which
avoids polling and keeps CPU usage down. Be advised that chokidar will initiate avoids polling and keeps CPU usage down. Be advised that chokidar will initiate
watchers recursively for everything within scope of the paths that have been watchers recursively for everything within scope of the paths that have been
specified, so be judicious about not wasting system resources by watching much specified, so be judicious about not wasting system resources by watching much
@@ -74,7 +75,7 @@ chokidar.watch('.').on('all', (event, path) => {
## API ## API
```javascript ```javascript
// Example of a more typical implementation structure: // Example of a more typical implementation structure
// Initialize watcher. // Initialize watcher.
const watcher = chokidar.watch('file, dir, glob, or array', { const watcher = chokidar.watch('file, dir, glob, or array', {
@@ -114,7 +115,7 @@ watcher.add(['new-file-2', 'new-file-3', '**/other-file*']);
var watchedPaths = watcher.getWatched(); var watchedPaths = watcher.getWatched();
// Un-watch some files. // Un-watch some files.
watcher.unwatch('new-file*'); await watcher.unwatch('new-file*');
// Stop watching. // Stop watching.
// The method is async! // The method is async!
@@ -255,7 +256,7 @@ Additionally `all` is available which gets emitted with the underlying event
name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully. name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully.
* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns. * `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns.
Takes an array of strings or just one string. Takes an array of strings or just one string.
* `.close()`: Removes all listeners from watched files. Asynchronous, returns Promise. * `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen.
* `.getWatched()`: Returns an object representing all the paths on the file * `.getWatched()`: Returns an object representing all the paths on the file
system being watched by this `FSWatcher` instance. The object's keys are all the system being watched by this `FSWatcher` instance. The object's keys are all the
directories (using absolute paths unless the `cwd` option was used), and the directories (using absolute paths unless the `cwd` option was used), and the
@@ -264,7 +265,7 @@ values are arrays of the names of the items contained in each directory.
## CLI ## CLI
If you need a CLI interface for your file watching, check out If you need a CLI interface for your file watching, check out
[chokidar-cli](https://github.com/kimmobrunfeldt/chokidar-cli), allowing you to [chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to
execute a command on each change, or get a stdio stream of change events. execute a command on each change, or get a stdio stream of change events.
## Install Troubleshooting ## Install Troubleshooting
@@ -286,8 +287,9 @@ execute a command on each change, or get a stdio stream of change events.
## Changelog ## Changelog
For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md). For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md).
- **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks.
- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. - **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement.
- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method.
- **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions. - **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions.
- **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%. - **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%.
- **v3 (Apr 30, 2019):** massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8.16 and higher. - **v3 (Apr 30, 2019):** massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8.16 and higher.
@@ -295,6 +297,12 @@ For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md
- **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported - **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported
- **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66) - **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66)
## Also
Why was chokidar named this way? What's the meaning behind it?
>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four).
## License ## License
MIT (c) Paul Miller (<https://paulmillr.com>), see [LICENSE](LICENSE) file. MIT (c) Paul Miller (<https://paulmillr.com>), see [LICENSE](LICENSE) file.

77
node_modules/chokidar/index.js generated vendored
View File

@@ -34,6 +34,7 @@ const {
REPLACER_RE, REPLACER_RE,
SLASH, SLASH,
SLASH_SLASH,
BRACE_START, BRACE_START,
BANG, BANG,
ONE_DOT, ONE_DOT,
@@ -47,7 +48,8 @@ const {
EMPTY_FN, EMPTY_FN,
isWindows, isWindows,
isMacos isMacos,
isIBMi
} = require('./lib/constants'); } = require('./lib/constants');
const stat = promisify(fs.stat); const stat = promisify(fs.stat);
@@ -96,11 +98,20 @@ const unifyPaths = (paths_) => {
return paths.map(normalizePathToUnix); return paths.map(normalizePathToUnix);
}; };
// If SLASH_SLASH occurs at the beginning of path, it is not replaced
// because "//StoragePC/DrivePool/Movies" is a valid network path
const toUnix = (string) => { const toUnix = (string) => {
let str = string.replace(BACK_SLASH_RE, SLASH); let str = string.replace(BACK_SLASH_RE, SLASH);
let prepend = false;
if (str.startsWith(SLASH_SLASH)) {
prepend = true;
}
while (str.match(DOUBLE_SLASH_RE)) { while (str.match(DOUBLE_SLASH_RE)) {
str = str.replace(DOUBLE_SLASH_RE, SLASH); str = str.replace(DOUBLE_SLASH_RE, SLASH);
} }
if (prepend) {
str = SLASH + str;
}
return str; return str;
}; };
@@ -152,12 +163,13 @@ class DirEntry {
const {items} = this; const {items} = this;
if (!items) return; if (!items) return;
items.delete(item); items.delete(item);
if (items.size > 0) return;
if (!items.size) { const dir = this.path;
const dir = this.path; try {
try { await readdir(dir);
await readdir(dir); } catch (err) {
} catch (err) { if (this._removeWatcher) {
this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir)); this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
} }
} }
@@ -319,6 +331,11 @@ constructor(_opts) {
opts.usePolling = isMacos; opts.usePolling = isMacos;
} }
// Always default to polling on IBM i because fs.watch() is not available on IBM i.
if(isIBMi) {
opts.usePolling = true;
}
// Global override (useful for end-developers that need to force polling for all // Global override (useful for end-developers that need to force polling for all
// instances of chokidar, regardless of usage/dependency depth) // instances of chokidar, regardless of usage/dependency depth)
const envPoll = process.env.CHOKIDAR_USEPOLLING; const envPoll = process.env.CHOKIDAR_USEPOLLING;
@@ -483,7 +500,7 @@ unwatch(paths_) {
* @returns {Promise<void>}. * @returns {Promise<void>}.
*/ */
close() { close() {
if (this.closed) return this; if (this.closed) return this._closePromise;
this.closed = true; this.closed = true;
// Memory management. // Memory management.
@@ -501,7 +518,9 @@ close() {
['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => { ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => {
this[`_${key}`].clear(); this[`_${key}`].clear();
}); });
return closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve();
this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve();
return this._closePromise;
} }
/** /**
@@ -602,16 +621,15 @@ async _emit(event, path, val1, val2, val3) {
(event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE) (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)
) { ) {
const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path; const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
let stats;
try { try {
const stats = await stat(fullPath); stats = await stat(fullPath);
// Suppress event when fs_stat fails, to avoid sending undefined 'stat'
if (!stats) return;
args.push(stats);
this.emitWithAll(event, args);
} catch (err) {} } catch (err) {}
} else { // Suppress event when fs_stat fails, to avoid sending undefined 'stat'
this.emitWithAll(event, args); if (!stats || this.closed) return;
args.push(stats);
} }
this.emitWithAll(event, args);
return this; return this;
} }
@@ -820,13 +838,15 @@ _hasReadPermissions(stats) {
* @param {String} item base path of item/directory * @param {String} item base path of item/directory
* @returns {void} * @returns {void}
*/ */
_remove(directory, item) { _remove(directory, item, isDirectory) {
// if what is being deleted is a directory, get that directory's paths // if what is being deleted is a directory, get that directory's paths
// for recursive deleting and cleaning of watched object // for recursive deleting and cleaning of watched object
// if it is not a directory, nestedDirectoryChildren will be empty array // if it is not a directory, nestedDirectoryChildren will be empty array
const path = sysPath.join(directory, item); const path = sysPath.join(directory, item);
const fullPath = sysPath.resolve(path); const fullPath = sysPath.resolve(path);
const isDirectory = this._watched.has(path) || this._watched.has(fullPath); isDirectory = isDirectory != null
? isDirectory
: this._watched.has(path) || this._watched.has(fullPath);
// prevent duplicate handling in case of arriving here nearly simultaneously // prevent duplicate handling in case of arriving here nearly simultaneously
// via multiple paths (such as _handleFile and _handleDir) // via multiple paths (such as _handleFile and _handleDir)
@@ -850,6 +870,15 @@ _remove(directory, item) {
const wasTracked = parent.has(item); const wasTracked = parent.has(item);
parent.remove(item); parent.remove(item);
// Fixes issue #1042 -> Relative paths were detected and added as symlinks
// (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612),
// but never removed from the map in case the path was deleted.
// This leads to an incorrect state if the path was recreated:
// https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553
if (this._symlinkPaths.has(fullPath)) {
this._symlinkPaths.delete(fullPath);
}
// If we wait for this file to be fully written, cancel the wait. // If we wait for this file to be fully written, cancel the wait.
let relPath = path; let relPath = path;
if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path); if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
@@ -872,16 +901,24 @@ _remove(directory, item) {
} }
/** /**
* * Closes all watchers for a path
* @param {Path} path * @param {Path} path
*/ */
_closePath(path) { _closePath(path) {
this._closeFile(path)
const dir = sysPath.dirname(path);
this._getWatchedDir(dir).remove(sysPath.basename(path));
}
/**
* Closes only file-specific watchers
* @param {Path} path
*/
_closeFile(path) {
const closers = this._closers.get(path); const closers = this._closers.get(path);
if (!closers) return; if (!closers) return;
closers.forEach(closer => closer()); closers.forEach(closer => closer());
this._closers.delete(path); this._closers.delete(path);
const dir = sysPath.dirname(path);
this._getWatchedDir(dir).remove(sysPath.basename(path));
} }
/** /**

View File

@@ -2,6 +2,7 @@
const {sep} = require('path'); const {sep} = require('path');
const {platform} = process; const {platform} = process;
const os = require('os');
exports.EV_ALL = 'all'; exports.EV_ALL = 'all';
exports.EV_READY = 'ready'; exports.EV_READY = 'ready';
@@ -23,6 +24,7 @@ exports.FSEVENT_DELETED = 'deleted';
exports.FSEVENT_MOVED = 'moved'; exports.FSEVENT_MOVED = 'moved';
exports.FSEVENT_CLONED = 'cloned'; exports.FSEVENT_CLONED = 'cloned';
exports.FSEVENT_UNKNOWN = 'unknown'; exports.FSEVENT_UNKNOWN = 'unknown';
exports.FSEVENT_TYPE_FILE = 'file';
exports.FSEVENT_TYPE_DIRECTORY = 'directory'; exports.FSEVENT_TYPE_DIRECTORY = 'directory';
exports.FSEVENT_TYPE_SYMLINK = 'symlink'; exports.FSEVENT_TYPE_SYMLINK = 'symlink';
@@ -40,6 +42,7 @@ exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
exports.REPLACER_RE = /^\.[/\\]/; exports.REPLACER_RE = /^\.[/\\]/;
exports.SLASH = '/'; exports.SLASH = '/';
exports.SLASH_SLASH = '//';
exports.BRACE_START = '{'; exports.BRACE_START = '{';
exports.BANG = '!'; exports.BANG = '!';
exports.ONE_DOT = '.'; exports.ONE_DOT = '.';
@@ -58,3 +61,5 @@ exports.IDENTITY_FN = val => val;
exports.isWindows = platform === 'win32'; exports.isWindows = platform === 'win32';
exports.isMacos = platform === 'darwin'; exports.isMacos = platform === 'darwin';
exports.isLinux = platform === 'linux';
exports.isIBMi = os.type() === 'OS400';

View File

@@ -37,6 +37,7 @@ const {
FSEVENT_MOVED, FSEVENT_MOVED,
// FSEVENT_CLONED, // FSEVENT_CLONED,
FSEVENT_UNKNOWN, FSEVENT_UNKNOWN,
FSEVENT_TYPE_FILE,
FSEVENT_TYPE_DIRECTORY, FSEVENT_TYPE_DIRECTORY,
FSEVENT_TYPE_SYMLINK, FSEVENT_TYPE_SYMLINK,
@@ -47,13 +48,10 @@ const {
EMPTY_FN, EMPTY_FN,
IDENTITY_FN IDENTITY_FN
} = require('./constants'); } = require('./constants');
const FS_MODE_READ = 'r';
const Depth = (value) => isNaN(value) ? {} : {depth: value}; const Depth = (value) => isNaN(value) ? {} : {depth: value};
const stat = promisify(fs.stat); const stat = promisify(fs.stat);
const open = promisify(fs.open);
const close = promisify(fs.close);
const lstat = promisify(fs.lstat); const lstat = promisify(fs.lstat);
const realpath = promisify(fs.realpath); const realpath = promisify(fs.realpath);
@@ -105,8 +103,9 @@ const createFSEventsInstance = (path, callback) => {
* @param {Function} rawEmitter - passes data to listeners of the 'raw' event * @param {Function} rawEmitter - passes data to listeners of the 'raw' event
* @returns {Function} closer * @returns {Function} closer
*/ */
function setFSEventsListener(path, realPath, listener, rawEmitter, fsw) { function setFSEventsListener(path, realPath, listener, rawEmitter) {
let watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path; let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
const parentPath = sysPath.dirname(watchPath); const parentPath = sysPath.dirname(watchPath);
let cont = FSEventsWatchers.get(watchPath); let cont = FSEventsWatchers.get(watchPath);
@@ -148,7 +147,7 @@ function setFSEventsListener(path, realPath, listener, rawEmitter, fsw) {
listeners: new Set([filteredListener]), listeners: new Set([filteredListener]),
rawEmitter, rawEmitter,
watcher: createFSEventsInstance(watchPath, (fullPath, flags) => { watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
if (fsw.closed) return; if (!cont.listeners.size) return;
const info = fsevents.getInfo(fullPath, flags); const info = fsevents.getInfo(fullPath, flags);
cont.listeners.forEach(list => { cont.listeners.forEach(list => {
list(fullPath, flags, info); list(fullPath, flags, info);
@@ -202,6 +201,14 @@ const calcDepth = (path, root) => {
return i; return i;
}; };
// returns boolean indicating whether the fsevents' event info has the same type
// as the one returned by fs.stat
const sameTypes = (info, stats) => (
info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||
info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||
info.type === FSEVENT_TYPE_FILE && stats.isFile()
)
/** /**
* @mixin * @mixin
*/ */
@@ -232,13 +239,15 @@ addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts); this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);
} }
async checkFd(path, fullPath, realPath, parent, watchedDir, item, info, opts) { async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
try { try {
const fd = await open(path, FS_MODE_READ); const stats = await stat(path)
if (this.fsw.closed) return; if (this.fsw.closed) return;
await close(fd); if (sameTypes(info, stats)) {
if (this.fsw.closed) return; this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); } else {
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
} catch (error) { } catch (error) {
if (error.code === 'EACCES') { if (error.code === 'EACCES') {
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
@@ -252,9 +261,10 @@ handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opt
if (this.fsw.closed || this.checkIgnored(path)) return; if (this.fsw.closed || this.checkIgnored(path)) return;
if (event === EV_UNLINK) { if (event === EV_UNLINK) {
const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY
// suppress unlink events on never before seen files // suppress unlink events on never before seen files
if (info.type === FSEVENT_TYPE_DIRECTORY || watchedDir.has(item)) { if (isDirectory || watchedDir.has(item)) {
this.fsw._remove(parent, item); this.fsw._remove(parent, item, isDirectory);
} }
} else { } else {
if (event === EV_ADD) { if (event === EV_ADD) {
@@ -290,8 +300,7 @@ handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opt
* @returns {Function} closer for the watcher instance * @returns {Function} closer for the watcher instance
*/ */
_watchWithFsEvents(watchPath, realPath, transform, globFilter) { _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
if (this.fsw.closed) return; if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
if (this.fsw._isIgnored(watchPath)) return;
const opts = this.fsw.options; const opts = this.fsw.options;
const watchCallback = async (fullPath, flags, info) => { const watchCallback = async (fullPath, flags, info) => {
if (this.fsw.closed) return; if (this.fsw.closed) return;
@@ -319,13 +328,13 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
} catch (error) {} } catch (error) {}
if (this.fsw.closed) return; if (this.fsw.closed) return;
if (this.checkIgnored(path, stats)) return; if (this.checkIgnored(path, stats)) return;
if (stats) { if (sameTypes(info, stats)) {
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
} else { } else {
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
} }
} else { } else {
this.checkFd(path, fullPath, realPath, parent, watchedDir, item, info, opts); this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
} }
} else { } else {
switch (info.event) { switch (info.event) {
@@ -334,7 +343,7 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
case FSEVENT_DELETED: case FSEVENT_DELETED:
case FSEVENT_MOVED: case FSEVENT_MOVED:
return this.checkFd(path, fullPath, realPath, parent, watchedDir, item, info, opts); return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
} }
} }
}; };
@@ -343,8 +352,7 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
watchPath, watchPath,
realPath, realPath,
watchCallback, watchCallback,
this.fsw._emitRaw, this.fsw._emitRaw
this.fsw
); );
this.fsw._emitReady(); this.fsw._emitReady();

View File

@@ -6,6 +6,7 @@ const { promisify } = require('util');
const isBinaryPath = require('is-binary-path'); const isBinaryPath = require('is-binary-path');
const { const {
isWindows, isWindows,
isLinux,
EMPTY_FN, EMPTY_FN,
EMPTY_STR, EMPTY_STR,
KEY_LISTENERS, KEY_LISTENERS,
@@ -356,8 +357,7 @@ _handleFile(file, stats, initialAdd) {
// if the file is already being watched, do nothing // if the file is already being watched, do nothing
if (parent.has(basename)) return; if (parent.has(basename)) return;
// kick off the watcher const listener = async (path, newStats) => {
const closer = this._watchWithNodeFs(file, async (path, newStats) => {
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return; if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
if (!newStats || newStats.mtimeMs === 0) { if (!newStats || newStats.mtimeMs === 0) {
try { try {
@@ -369,12 +369,18 @@ _handleFile(file, stats, initialAdd) {
if (!at || at <= mt || mt !== prevStats.mtimeMs) { if (!at || at <= mt || mt !== prevStats.mtimeMs) {
this.fsw._emit(EV_CHANGE, file, newStats); this.fsw._emit(EV_CHANGE, file, newStats);
} }
prevStats = newStats; if (isLinux && prevStats.ino !== newStats.ino) {
this.fsw._closeFile(path)
prevStats = newStats;
this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener));
} else {
prevStats = newStats;
}
} catch (error) { } catch (error) {
// Fix issues where mtime is null but file is still present // Fix issues where mtime is null but file is still present
this.fsw._remove(dirname, basename); this.fsw._remove(dirname, basename);
} }
// add is about to be emitted if file not already tracked in parent // add is about to be emitted if file not already tracked in parent
} else if (parent.has(basename)) { } else if (parent.has(basename)) {
// Check that change event was not fired because of changed only accessTime. // Check that change event was not fired because of changed only accessTime.
const at = newStats.atimeMs; const at = newStats.atimeMs;
@@ -384,7 +390,9 @@ _handleFile(file, stats, initialAdd) {
} }
prevStats = newStats; prevStats = newStats;
} }
}); }
// kick off the watcher
const closer = this._watchWithNodeFs(file, listener);
// emit an add event if we're supposed to // emit an add event if we're supposed to
if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) { if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
@@ -413,7 +421,15 @@ async _handleSymlink(entry, directory, path, item) {
if (!this.fsw.options.followSymlinks) { if (!this.fsw.options.followSymlinks) {
// watch symlink directly (don't follow) and detect changes // watch symlink directly (don't follow) and detect changes
this.fsw._incrReadyCount(); this.fsw._incrReadyCount();
const linkPath = await fsrealpath(path);
let linkPath;
try {
linkPath = await fsrealpath(path);
} catch (e) {
this.fsw._emitReady();
return true;
}
if (this.fsw.closed) return; if (this.fsw.closed) return;
if (dir.has(item)) { if (dir.has(item)) {
if (this.fsw._symlinkPaths.get(full) !== linkPath) { if (this.fsw._symlinkPaths.get(full) !== linkPath) {
@@ -595,13 +611,14 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START); const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START);
let closer; let closer;
if (stats.isDirectory()) { if (stats.isDirectory()) {
const absPath = sysPath.resolve(path);
const targetPath = follow ? await fsrealpath(path) : path; const targetPath = follow ? await fsrealpath(path) : path;
if (this.fsw.closed) return; if (this.fsw.closed) return;
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath); closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
if (this.fsw.closed) return; if (this.fsw.closed) return;
// preserve this symlink's target path // preserve this symlink's target path
if (path !== targetPath && targetPath !== undefined) { if (absPath !== targetPath && targetPath !== undefined) {
this.fsw._symlinkPaths.set(targetPath, true); this.fsw._symlinkPaths.set(absPath, targetPath);
} }
} else if (stats.isSymbolicLink()) { } else if (stats.isSymbolicLink()) {
const targetPath = follow ? await fsrealpath(path) : path; const targetPath = follow ? await fsrealpath(path) : path;

221
node_modules/chokidar/package.json generated vendored
View File

@@ -1,168 +1,71 @@
{ {
"_args": [ "name": "chokidar",
[ "description": "Minimal and efficient cross-platform file watching library",
"chokidar@^3.2.2", "version": "3.5.3",
"/home/pablinux/Projects/Node/app_sigma/node_modules/nodemon" "homepage": "https://github.com/paulmillr/chokidar",
] "author": "Paul Miller (https://paulmillr.com)",
"contributors": [
"Paul Miller (https://paulmillr.com)",
"Elan Shanker"
], ],
"_from": "chokidar@>=3.2.2 <4.0.0", "engines": {
"_hasShrinkwrap": false, "node": ">= 8.10.0"
"_id": "chokidar@3.3.1",
"_inCache": true,
"_installable": true,
"_location": "/chokidar",
"_nodeVersion": "13.2.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/chokidar_3.3.1_1576434724275_0.9223256192495166"
}, },
"_npmUser": { "main": "index.js",
"email": "paul@paulmillr.com", "dependencies": {
"name": "paulmillr" "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"
}, },
"_npmVersion": "6.13.4", "optionalDependencies": {
"_phantomChildren": {}, "fsevents": "~2.3.2"
"_requested": {
"name": "chokidar",
"raw": "chokidar@^3.2.2",
"rawSpec": "^3.2.2",
"scope": null,
"spec": ">=3.2.2 <4.0.0",
"type": "range"
}, },
"_requiredBy": [ "devDependencies": {
"/nodemon" "@types/node": "^14",
"chai": "^4.3",
"dtslint": "^3.3.0",
"eslint": "^7.0.0",
"mocha": "^7.0.0",
"nyc": "^15.0.0",
"rimraf": "^3.0.0",
"sinon": "^9.0.1",
"sinon-chai": "^3.3.0",
"typescript": "~4.4.3",
"upath": "^1.2.0"
},
"files": [
"index.js",
"lib/*.js",
"types/index.d.ts"
], ],
"_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", "repository": {
"_shasum": "c84e5b3d18d9a4d77558fef466b1bf16bbeb3450", "type": "git",
"_shrinkwrap": null, "url": "git+https://github.com/paulmillr/chokidar.git"
"_spec": "chokidar@^3.2.2",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/nodemon",
"author": {
"name": "Paul Miller",
"url": "https://paulmillr.com"
}, },
"bugs": { "bugs": {
"url": "https://github.com/paulmillr/chokidar/issues" "url": "https://github.com/paulmillr/chokidar/issues"
}, },
"contributors": [ "license": "MIT",
{ "scripts": {
"name": "Paul Miller", "dtslint": "dtslint types",
"url": "https://paulmillr.com" "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
}, "mocha": "mocha --exit --timeout 90000",
{ "test": "npm run lint && npm run mocha"
"name": "Elan Shanker"
}
],
"dependencies": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"fsevents": "~2.1.2",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.3.0"
}, },
"description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.",
"devDependencies": {
"@types/node": "^12",
"chai": "^4.2",
"dtslint": "^2.0.0",
"eslint": "^6.6.0",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"rimraf": "^3.0.0",
"sinon": "^7.5.0",
"sinon-chai": "^3.3.0",
"upath": "^1.2.0"
},
"directories": {},
"dist": {
"fileCount": 8,
"integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9nwkCRA9TVsSAnZWagAAWecQAJTV/2rFLSfg7hu6hPAJ\n05dq/71D1/SiO/auUV1NUK/txOj3cCEZ+7j5oj9/Qa+GjUPPRbpmY53GGp9G\nFQ1tXPHPganu3XLM8PX+DpsJOJAOHgE/EH5ODLZuOISidHvLJ9DQu/EJsrjo\nTlmC+pIABvJfGDdNFntwq+tES37vsWo9+fnYiJr8GqNeaWHEn4rpqU76MTeB\noYFxzhSRES1pqgqYU9dN9KMoOSFwVVOPTgY4hTgjWYAZfioDfiWHhpK5dpnI\nq4NFoUjTSeQU1smhklpqFqsd9P4M1tvWq+abBCrcb9mSOozjpF/EJmnPSjiH\necFyXBy17nDtZ1zUsJE+4Rubatv+6Xp//45xt0ATjGsJ91mGU+f15pPrztQv\ntQKX+dQ7/FYjzQCmQuO1rgcboCQ2Tzes8Gigr52UTsInggDjZ7sst30jybby\nu51TatZ7eip3MgkGROJuMQj4swJy1xQ+PmLVZ4b+gn3rNuxqSd+qCjR/HC8g\nBRhbNrZk7wLPHQcqlqnWxP/X8zVSykpgkwVbtVulTUV8Nxtcf2TW6ZGe62zr\nV5ifkXvVTW5d1lfjmrY4Pa2N2Gtdkn1IeYFfBWOivjUNPT0uOf5CTFGED80H\nICYQVZK6FtMB65K1r+pcoHjnfeaP1SGEevK4ddRRt6wkyeBgvenwYBWn05tW\nd93I\r\n=pIg2\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "c84e5b3d18d9a4d77558fef466b1bf16bbeb3450",
"tarball": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz",
"unpackedSize": 88037
},
"engines": {
"node": ">= 8.10.0"
},
"eslintConfig": {
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "script"
},
"rules": {
"array-callback-return": "error",
"no-empty": [
{
"allowEmptyCatch": true
},
"error"
],
"no-lonely-if": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-arrow-callback": [
{
"allowNamedFunctions": true
},
"error"
],
"prefer-const": [
{
"ignoreReadBeforeAssign": true
},
"error"
],
"prefer-destructuring": [
{
"object": true,
"array": false
},
"error"
],
"prefer-spread": "error",
"prefer-template": "error",
"quotes": [
"error",
"single"
],
"radix": "error",
"strict": "error"
}
},
"gitHead": "1cbbef6bf8d382433011ef295ccfaf52da6038ed",
"homepage": "https://github.com/paulmillr/chokidar",
"keywords": [ "keywords": [
"file",
"fs", "fs",
"fsevents",
"watch", "watch",
"watchFile", "watchFile",
"watcher", "watcher",
"watching" "watching",
"file",
"fsevents"
], ],
"license": "MIT", "types": "./types/index.d.ts",
"main": "index.js",
"maintainers": [
{
"name": "es128",
"email": "elan.shanker+npm@gmail.com"
},
{
"name": "paulmillr",
"email": "paul@paulmillr.com"
}
],
"name": "chokidar",
"nyc": { "nyc": {
"include": [ "include": [
"index.js", "index.js",
@@ -173,20 +76,10 @@
"text" "text"
] ]
}, },
"optionalDependencies": { "funding": [
"fsevents": "~2.1.2" {
}, "type": "individual",
"readme": "ERROR: No README data found!", "url": "https://paulmillr.com/funding/"
"repository": { }
"type": "git", ]
"url": "git+https://github.com/paulmillr/chokidar.git"
},
"scripts": {
"dtslint": "dtslint types",
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
"mocha": "mocha --exit --timeout 60000",
"test": "npm run lint && npm run mocha"
},
"types": "./types/index.d.ts",
"version": "3.3.1"
} }

View File

@@ -4,6 +4,7 @@
import * as fs from "fs"; import * as fs from "fs";
import { EventEmitter } from "events"; import { EventEmitter } from "events";
import { Matcher } from 'anymatch';
export class FSWatcher extends EventEmitter implements fs.FSWatcher { export class FSWatcher extends EventEmitter implements fs.FSWatcher {
options: WatchOptions; options: WatchOptions;
@@ -17,13 +18,13 @@ export class FSWatcher extends EventEmitter implements fs.FSWatcher {
* Add files, directories, or glob patterns for tracking. Takes an array of strings or just one * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
* string. * string.
*/ */
add(paths: string | ReadonlyArray<string>): void; add(paths: string | ReadonlyArray<string>): this;
/** /**
* Stop watching files, directories, or glob patterns. Takes an array of strings or just one * Stop watching files, directories, or glob patterns. Takes an array of strings or just one
* string. * string.
*/ */
unwatch(paths: string | ReadonlyArray<string>): void; unwatch(paths: string | ReadonlyArray<string>): this;
/** /**
* Returns an object representing all the paths on the file system being watched by this * Returns an object representing all the paths on the file system being watched by this
@@ -79,7 +80,7 @@ export interface WatchOptions {
* (the path), second time with two arguments (the path and the * (the path), second time with two arguments (the path and the
* [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). * [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path).
*/ */
ignored?: any; ignored?: Matcher;
/** /**
* If set to `false` then `add`/`addDir` events are also emitted for matching paths while * If set to `false` then `add`/`addDir` events are also emitted for matching paths while

62
node_modules/ci-info/CHANGELOG.md generated vendored
View File

@@ -1,62 +0,0 @@
# Changelog
## v1.6.0
* feat: add Sail CI support
* feat: add Buddy support
* feat: add Bitrise support
* feat: detect Jenkins PRs
* feat: detect Drone PRs
## v1.5.1
* fix: use full path to vendors.json
## v1.5.0
* feat: add dsari detection ([#15](https://github.com/watson/ci-info/pull/15))
* feat: add ci.isPR ([#16](https://github.com/watson/ci-info/pull/16))
## v1.4.0
* feat: add Cirrus CI detection ([#13](https://github.com/watson/ci-info/pull/13))
* feat: add Shippable CI detection ([#14](https://github.com/watson/ci-info/pull/14))
## v1.3.1
* chore: reduce npm package size by not including `.github` folder content ([#11](https://github.com/watson/ci-info/pull/11))
## v1.3.0
* feat: add support for Strider CD
* chore: deprecate vendor constant `TDDIUM` in favor of `SOLANO`
* docs: add missing vendor constant to docs
## v1.2.0
* feat: detect solano-ci ([#9](https://github.com/watson/ci-info/pull/9))
## v1.1.3
* fix: fix spelling of Hunson in `ci.name`
## v1.1.2
* fix: no more false positive matches for Jenkins
## v1.1.1
* docs: sort lists of CI servers in README.md
* docs: add missing AWS CodeBuild to the docs
## v1.1.0
* feat: add AWS CodeBuild to CI detection ([#2](https://github.com/watson/ci-info/pull/2))
## v1.0.1
* chore: reduce npm package size by using an `.npmignore` file ([#3](https://github.com/watson/ci-info/pull/3))
## v1.0.0
* Initial release

21
node_modules/ci-info/LICENSE generated vendored
View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016-2018 Thomas Watson Steen
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.

107
node_modules/ci-info/README.md generated vendored
View File

@@ -1,107 +0,0 @@
# ci-info
Get details about the current Continuous Integration environment.
Please [open an
issue](https://github.com/watson/ci-info/issues/new?template=ci-server-not-detected.md)
if your CI server isn't properly detected :)
[![npm](https://img.shields.io/npm/v/ci-info.svg)](https://www.npmjs.com/package/ci-info)
[![Build status](https://travis-ci.org/watson/ci-info.svg?branch=master)](https://travis-ci.org/watson/ci-info)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
## Installation
```bash
npm install ci-info --save
```
## Usage
```js
var ci = require('ci-info')
if (ci.isCI) {
console.log('The name of the CI server is:', ci.name)
} else {
console.log('This program is not running on a CI server')
}
```
## Supported CI tools
Officially supported CI servers:
| Name | Constant |
|------|----------|
| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` |
| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` |
| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` |
| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` |
| [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` |
| [Buddy](https://buddy.works/) | `ci.BUDDY` |
| [Buildkite](https://buildkite.com) | `ci.BUILDKITE` |
| [CircleCI](http://circleci.com) | `ci.CIRCLE` |
| [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` |
| [Codeship](https://codeship.com) | `ci.CODESHIP` |
| [Drone](https://drone.io) | `ci.DRONE` |
| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` |
| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` |
| [GoCD](https://www.go.cd/) | `ci.GOCD` |
| [Hudson](http://hudson-ci.org) | `ci.HUDSON` |
| [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` |
| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` |
| [Sail CI](https://sail.ci/) | `ci.SAIL` |
| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` |
| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` |
| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` |
| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` |
| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` |
| [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) by Microsoft | `ci.TFS` |
| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` |
| [Travis CI](http://travis-ci.org) | `ci.TRAVIS` |
## API
### `ci.name`
A string. Will contain the name of the CI server the code is running on.
If not CI server is detected, it will be `null`.
Don't depend on the value of this string not to change for a specific
vendor. If you find your self writing `ci.name === 'Travis CI'`, you
most likely want to use `ci.TRAVIS` instead.
### `ci.isCI`
A boolean. Will be `true` if the code is running on a CI server.
Otherwise `false`.
Some CI servers not listed here might still trigger the `ci.isCI`
boolean to be set to `true` if they use certain vendor neutral
environment variables. In those cases `ci.name` will be `null` and no
vendor specific boolean will be set to `true`.
### `ci.isPR`
A boolean if PR detection is supported for the current CI server. Will
be `true` if a PR is being tested. Otherwise `false`. If PR detection is
not supported for the current CI server, the value will be `null`.
### `ci.<VENDOR-CONSTANT>`
A vendor specific boolean constants is exposed for each support CI
vendor. A constant will be `true` if the code is determined to run on
the given CI server. Otherwise `false`.
Examples of vendor constants are `ci.TRAVIS` or `ci.APPVEYOR`. For a
complete list, see the support table above.
Deprecated vendor constants that will be removed in the next major
release:
- `ci.TDDIUM` (Solano CI) This have been renamed `ci.SOLANO`
## License
[MIT](LICENSE)

66
node_modules/ci-info/index.js generated vendored
View File

@@ -1,66 +0,0 @@
'use strict'
var vendors = require('./vendors.json')
var env = process.env
// Used for testinging only
Object.defineProperty(exports, '_vendors', {
value: vendors.map(function (v) { return v.constant })
})
exports.name = null
exports.isPR = null
vendors.forEach(function (vendor) {
var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]
var isCI = envs.every(function (obj) {
return checkEnv(obj)
})
exports[vendor.constant] = isCI
if (isCI) {
exports.name = vendor.name
switch (typeof vendor.pr) {
case 'string':
// "pr": "CIRRUS_PR"
exports.isPR = !!env[vendor.pr]
break
case 'object':
if ('env' in vendor.pr) {
// "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne
} else if ('any' in vendor.pr) {
// "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
exports.isPR = vendor.pr.any.some(function (key) {
return !!env[key]
})
} else {
// "pr": { "DRONE_BUILD_EVENT": "pull_request" }
exports.isPR = checkEnv(vendor.pr)
}
break
default:
// PR detection not supported for this vendor
exports.isPR = null
}
}
})
exports.isCI = !!(
env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
env.BUILD_NUMBER || // Jenkins, TeamCity
env.RUN_ID || // TaskCluster, dsari
exports.name ||
false
)
function checkEnv (obj) {
if (typeof obj === 'string') return !!env[obj]
return Object.keys(obj).every(function (k) {
return env[k] === obj[k]
})
}

97
node_modules/ci-info/package.json generated vendored
View File

@@ -1,97 +0,0 @@
{
"_args": [
[
"ci-info@^1.5.0",
"/home/pablinux/Projects/Node/app_sigma/node_modules/is-ci"
]
],
"_from": "ci-info@>=1.5.0 <2.0.0",
"_hasShrinkwrap": false,
"_id": "ci-info@1.6.0",
"_inCache": true,
"_installable": true,
"_location": "/ci-info",
"_nodeVersion": "10.10.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/ci-info_1.6.0_1537432620983_0.7446311114890938"
},
"_npmUser": {
"email": "w@tson.dk",
"name": "watson"
},
"_npmVersion": "6.4.1",
"_phantomChildren": {},
"_requested": {
"name": "ci-info",
"raw": "ci-info@^1.5.0",
"rawSpec": "^1.5.0",
"scope": null,
"spec": ">=1.5.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/is-ci"
],
"_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
"_shasum": "2ca20dbb9ceb32d4524a683303313f0304b1e497",
"_shrinkwrap": null,
"_spec": "ci-info@^1.5.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/is-ci",
"author": {
"email": "w@tson.dk",
"name": "Thomas Watson Steen",
"url": "https://twitter.com/wa7son"
},
"bugs": {
"url": "https://github.com/watson/ci-info/issues"
},
"coordinates": [
12.593091,
55.778271
],
"dependencies": {},
"description": "Get details about the current Continuous Integration environment",
"devDependencies": {
"clear-require": "^1.0.1",
"standard": "^12.0.1",
"tape": "^4.9.1"
},
"directories": {},
"dist": {
"fileCount": 6,
"integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo1wtCRA9TVsSAnZWagAANfwP/ROk4A97KwBmsJw5o/ev\nlaftMiVwnI/966mQ6Ak1GfTWx28SjLWKnE+IGKK+1dXDOoXrb6td8TCl/FUQ\n2e7khqDoPswsPtUJfJWY4dYCtS8UfvfJk6BlsMR7ebHxDc9dVpIhZ+V0MpVk\n7HdW3ay5sGoLUXenULN/8WoaRkpujVPJ9sltX25ZkEj1fvGuF33VszNAC7b5\nYXRKCPVFsMZF7APoJiMs9120tlIdw+uiT812ZY6QiwX0HlcHnYswE33h70NA\nZ7Od1js8nAWpdZi1FPiJtCQtl99iAIZboBijRhpkDILdeGR8S/f25HDTvjHW\n3oXk5/Im6hzFnPYezUs3EKf4GT92Bs4fDuCF8Sp1EoChtE+r35L09WFNRKzE\npp7L4+ZHPsszHz44z7Q84TZKtmBPX51fwoTSL//2ix1g31ZrMfYuvCA/s1Yf\n7+3IVlNMW0sUnzGepgF8+jevtOE238XcLHBrTl4LhTsSwmEyR9sRKs6xD1Lx\nQbmyBRWpsluaHnmxaQVoVxzJCz0J7RReE6/UUfGzzmeF6vrKtd6eCv2ZUECk\nSQwVW90PUjr1IgPaVa8stjq9kFxQtG0mwTS2eEO+gxM3hb0RT2t3ecdG3Zq9\n0INHULVlKDtKMXpoQ2QEV3XaZM0X2j2sqnQxuYsQHt6Al45Q43rcz/yGgjWT\nICTT\r\n=iAOM\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "2ca20dbb9ceb32d4524a683303313f0304b1e497",
"tarball": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
"unpackedSize": 11845
},
"gitHead": "3d07175c39b07090ab939471c47ef363ea74ab97",
"homepage": "https://github.com/watson/ci-info",
"keywords": [
"ci",
"continuous",
"detect",
"integration",
"test"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "watson",
"email": "w@tson.dk"
}
],
"name": "ci-info",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/watson/ci-info.git"
},
"scripts": {
"test": "standard && node test.js"
},
"version": "1.6.0"
}

152
node_modules/ci-info/vendors.json generated vendored
View File

@@ -1,152 +0,0 @@
[
{
"name": "AppVeyor",
"constant": "APPVEYOR",
"env": "APPVEYOR",
"pr": "APPVEYOR_PULL_REQUEST_NUMBER"
},
{
"name": "Bamboo",
"constant": "BAMBOO",
"env": "bamboo_planKey"
},
{
"name": "Bitbucket Pipelines",
"constant": "BITBUCKET",
"env": "BITBUCKET_COMMIT"
},
{
"name": "Bitrise",
"constant": "BITRISE",
"env": "BITRISE_IO",
"pr": "BITRISE_PULL_REQUEST"
},
{
"name": "Buddy",
"constant": "BUDDY",
"env": "BUDDY_WORKSPACE_ID",
"pr": "BUDDY_EXECUTION_PULL_REQUEST_ID"
},
{
"name": "Buildkite",
"constant": "BUILDKITE",
"env": "BUILDKITE",
"pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
},
{
"name": "CircleCI",
"constant": "CIRCLE",
"env": "CIRCLECI",
"pr": "CIRCLE_PULL_REQUEST"
},
{
"name": "Cirrus CI",
"constant": "CIRRUS",
"env": "CIRRUS_CI",
"pr": "CIRRUS_PR"
},
{
"name": "AWS CodeBuild",
"constant": "CODEBUILD",
"env": "CODEBUILD_BUILD_ARN"
},
{
"name": "Codeship",
"constant": "CODESHIP",
"env": { "CI_NAME": "codeship" }
},
{
"name": "Drone",
"constant": "DRONE",
"env": "DRONE",
"pr": { "DRONE_BUILD_EVENT": "pull_request" }
},
{
"name": "dsari",
"constant": "DSARI",
"env": "DSARI"
},
{
"name": "GitLab CI",
"constant": "GITLAB",
"env": "GITLAB_CI"
},
{
"name": "GoCD",
"constant": "GOCD",
"env": "GO_PIPELINE_LABEL"
},
{
"name": "Hudson",
"constant": "HUDSON",
"env": "HUDSON_URL"
},
{
"name": "Jenkins",
"constant": "JENKINS",
"env": ["JENKINS_URL", "BUILD_ID"],
"pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
},
{
"name": "Magnum CI",
"constant": "MAGNUM",
"env": "MAGNUM"
},
{
"name": "Sail CI",
"constant": "SAIL",
"env": "SAILCI",
"pr": "SAIL_PULL_REQUEST_NUMBER"
},
{
"name": "Semaphore",
"constant": "SEMAPHORE",
"env": "SEMAPHORE",
"pr": "PULL_REQUEST_NUMBER"
},
{
"name": "Shippable",
"constant": "SHIPPABLE",
"env": "SHIPPABLE",
"pr": { "IS_PULL_REQUEST": "true" }
},
{
"name": "Solano CI",
"constant": "SOLANO",
"env": "TDDIUM",
"pr": "TDDIUM_PR_ID"
},
{
"name": "Strider CD",
"constant": "STRIDER",
"env": "STRIDER"
},
{
"name": "TaskCluster",
"constant": "TASKCLUSTER",
"env": ["TASK_ID", "RUN_ID"]
},
{
"name": "Solano CI",
"constant": "TDDIUM",
"env": "TDDIUM",
"pr": "TDDIUM_PR_ID",
"deprecated": true
},
{
"name": "TeamCity",
"constant": "TEAMCITY",
"env": "TEAMCITY_VERSION"
},
{
"name": "Team Foundation Server",
"constant": "TFS",
"env": "TF_BUILD"
},
{
"name": "Travis CI",
"constant": "TRAVIS",
"env": "TRAVIS",
"pr": { "env": "TRAVIS_PULL_REQUEST", "ne": "false" }
}
]

50
node_modules/cli-boxes/boxes.json generated vendored
View File

@@ -1,50 +0,0 @@
{
"single": {
"topLeft": "┌",
"topRight": "┐",
"bottomRight": "┘",
"bottomLeft": "└",
"vertical": "│",
"horizontal": "─"
},
"double": {
"topLeft": "╔",
"topRight": "╗",
"bottomRight": "╝",
"bottomLeft": "╚",
"vertical": "║",
"horizontal": "═"
},
"round": {
"topLeft": "╭",
"topRight": "╮",
"bottomRight": "╯",
"bottomLeft": "╰",
"vertical": "│",
"horizontal": "─"
},
"single-double": {
"topLeft": "╓",
"topRight": "╖",
"bottomRight": "╜",
"bottomLeft": "╙",
"vertical": "║",
"horizontal": "─"
},
"double-single": {
"topLeft": "╒",
"topRight": "╕",
"bottomRight": "╛",
"bottomLeft": "╘",
"vertical": "│",
"horizontal": "═"
},
"classic": {
"topLeft": "+",
"topRight": "+",
"bottomRight": "+",
"bottomLeft": "+",
"vertical": "|",
"horizontal": "-"
}
}

2
node_modules/cli-boxes/index.js generated vendored
View File

@@ -1,2 +0,0 @@
'use strict';
module.exports = require('./boxes.json');

21
node_modules/cli-boxes/license generated vendored
View File

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

99
node_modules/cli-boxes/package.json generated vendored
View File

@@ -1,99 +0,0 @@
{
"_args": [
[
"cli-boxes@^1.0.0",
"/home/pablinux/Projects/Node/app_sigma/node_modules/boxen"
]
],
"_from": "cli-boxes@>=1.0.0 <2.0.0",
"_id": "cli-boxes@1.0.0",
"_inCache": true,
"_installable": true,
"_location": "/cli-boxes",
"_nodeVersion": "4.3.0",
"_npmOperationalInternal": {
"host": "packages-9-west.internal.npmjs.com",
"tmp": "tmp/cli-boxes-1.0.0.tgz_1456820449966_0.9008902586065233"
},
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "2.14.12",
"_phantomChildren": {},
"_requested": {
"name": "cli-boxes",
"raw": "cli-boxes@^1.0.0",
"rawSpec": "^1.0.0",
"scope": null,
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/boxen"
],
"_resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz",
"_shasum": "4fa917c3e59c94a004cd61f8ee509da651687143",
"_shrinkwrap": null,
"_spec": "cli-boxes@^1.0.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/boxen",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/cli-boxes/issues"
},
"dependencies": {},
"description": "Boxes for use in the terminal",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"directories": {},
"dist": {
"shasum": "4fa917c3e59c94a004cd61f8ee509da651687143",
"tarball": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"boxes.json",
"index.js"
],
"gitHead": "30c6977f9c053c2e2de7bed9395512f90cd6e5ae",
"homepage": "https://github.com/sindresorhus/cli-boxes",
"keywords": [
"ascii",
"border",
"box",
"boxes",
"cli",
"console",
"json",
"term",
"terminal",
"text",
"unicode"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "cli-boxes",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/cli-boxes.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "1.0.0"
}

94
node_modules/cli-boxes/readme.md generated vendored
View File

@@ -1,94 +0,0 @@
# cli-boxes [![Build Status](https://travis-ci.org/sindresorhus/cli-boxes.svg?branch=master)](https://travis-ci.org/sindresorhus/cli-boxes)
> Boxes for use in the terminal
The list of boxes is just a [JSON file](boxes.json) and can be used wherever.
## Install
```
$ npm install --save cli-boxes
```
## Usage
```js
const cliBoxes = require('cli-boxes');
console.log(cliBoxes.single);
/*
{
"topLeft": "┌",
"topRight": "┐",
"bottomRight": "┘",
"bottomLeft": "└",
"vertical": "│",
"horizontal": "─"
}
*/
```
## API
### cliBoxes
#### `single`
```
┌────┐
│ │
└────┘
```
#### `double`
```
╔════╗
║ ║
╚════╝
```
#### `round`
```
╭────╮
│ │
╰────╯
```
#### `single-double`
```
╓────╖
║ ║
╙────╜
```
#### `double-single`
```
╒════╕
│ │
╘════╛
```
#### `classic`
```
+----+
| |
+----+
```
## Related
- [boxen](https://github.com/sindresorhus/boxen) - Create boxes in the terminal
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)

View File

@@ -1,18 +1,17 @@
/* MIT license */ /* MIT license */
var cssKeywords = require('color-name'); /* eslint-disable no-mixed-operators */
const cssKeywords = require('color-name');
// NOTE: conversions should only return primitive values (i.e. arrays, or // NOTE: conversions should only return primitive values (i.e. arrays, or
// values that give correct `typeof` results). // values that give correct `typeof` results).
// do not use box values types (i.e. Number(), String(), etc.) // do not use box values types (i.e. Number(), String(), etc.)
var reverseKeywords = {}; const reverseKeywords = {};
for (var key in cssKeywords) { for (const key of Object.keys(cssKeywords)) {
if (cssKeywords.hasOwnProperty(key)) { reverseKeywords[cssKeywords[key]] = key;
reverseKeywords[cssKeywords[key]] = key;
}
} }
var convert = module.exports = { const convert = {
rgb: {channels: 3, labels: 'rgb'}, rgb: {channels: 3, labels: 'rgb'},
hsl: {channels: 3, labels: 'hsl'}, hsl: {channels: 3, labels: 'hsl'},
hsv: {channels: 3, labels: 'hsv'}, hsv: {channels: 3, labels: 'hsv'},
@@ -30,40 +29,38 @@ var convert = module.exports = {
gray: {channels: 1, labels: ['gray']} gray: {channels: 1, labels: ['gray']}
}; };
// hide .channels and .labels properties module.exports = convert;
for (var model in convert) {
if (convert.hasOwnProperty(model)) {
if (!('channels' in convert[model])) {
throw new Error('missing channels property: ' + model);
}
if (!('labels' in convert[model])) { // Hide .channels and .labels properties
throw new Error('missing channel labels property: ' + model); for (const model of Object.keys(convert)) {
} if (!('channels' in convert[model])) {
throw new Error('missing channels property: ' + model);
if (convert[model].labels.length !== convert[model].channels) {
throw new Error('channel and label counts mismatch: ' + model);
}
var channels = convert[model].channels;
var labels = convert[model].labels;
delete convert[model].channels;
delete convert[model].labels;
Object.defineProperty(convert[model], 'channels', {value: channels});
Object.defineProperty(convert[model], 'labels', {value: labels});
} }
if (!('labels' in convert[model])) {
throw new Error('missing channel labels property: ' + model);
}
if (convert[model].labels.length !== convert[model].channels) {
throw new Error('channel and label counts mismatch: ' + model);
}
const {channels, labels} = convert[model];
delete convert[model].channels;
delete convert[model].labels;
Object.defineProperty(convert[model], 'channels', {value: channels});
Object.defineProperty(convert[model], 'labels', {value: labels});
} }
convert.rgb.hsl = function (rgb) { convert.rgb.hsl = function (rgb) {
var r = rgb[0] / 255; const r = rgb[0] / 255;
var g = rgb[1] / 255; const g = rgb[1] / 255;
var b = rgb[2] / 255; const b = rgb[2] / 255;
var min = Math.min(r, g, b); const min = Math.min(r, g, b);
var max = Math.max(r, g, b); const max = Math.max(r, g, b);
var delta = max - min; const delta = max - min;
var h; let h;
var s; let s;
var l;
if (max === min) { if (max === min) {
h = 0; h = 0;
@@ -81,7 +78,7 @@ convert.rgb.hsl = function (rgb) {
h += 360; h += 360;
} }
l = (min + max) / 2; const l = (min + max) / 2;
if (max === min) { if (max === min) {
s = 0; s = 0;
@@ -95,23 +92,24 @@ convert.rgb.hsl = function (rgb) {
}; };
convert.rgb.hsv = function (rgb) { convert.rgb.hsv = function (rgb) {
var rdif; let rdif;
var gdif; let gdif;
var bdif; let bdif;
var h; let h;
var s; let s;
var r = rgb[0] / 255; const r = rgb[0] / 255;
var g = rgb[1] / 255; const g = rgb[1] / 255;
var b = rgb[2] / 255; const b = rgb[2] / 255;
var v = Math.max(r, g, b); const v = Math.max(r, g, b);
var diff = v - Math.min(r, g, b); const diff = v - Math.min(r, g, b);
var diffc = function (c) { const diffc = function (c) {
return (v - c) / 6 / diff + 1 / 2; return (v - c) / 6 / diff + 1 / 2;
}; };
if (diff === 0) { if (diff === 0) {
h = s = 0; h = 0;
s = 0;
} else { } else {
s = diff / v; s = diff / v;
rdif = diffc(r); rdif = diffc(r);
@@ -125,6 +123,7 @@ convert.rgb.hsv = function (rgb) {
} else if (b === v) { } else if (b === v) {
h = (2 / 3) + gdif - rdif; h = (2 / 3) + gdif - rdif;
} }
if (h < 0) { if (h < 0) {
h += 1; h += 1;
} else if (h > 1) { } else if (h > 1) {
@@ -140,11 +139,11 @@ convert.rgb.hsv = function (rgb) {
}; };
convert.rgb.hwb = function (rgb) { convert.rgb.hwb = function (rgb) {
var r = rgb[0]; const r = rgb[0];
var g = rgb[1]; const g = rgb[1];
var b = rgb[2]; let b = rgb[2];
var h = convert.rgb.hsl(rgb)[0]; const h = convert.rgb.hsl(rgb)[0];
var w = 1 / 255 * Math.min(r, Math.min(g, b)); const w = 1 / 255 * Math.min(r, Math.min(g, b));
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
@@ -152,54 +151,48 @@ convert.rgb.hwb = function (rgb) {
}; };
convert.rgb.cmyk = function (rgb) { convert.rgb.cmyk = function (rgb) {
var r = rgb[0] / 255; const r = rgb[0] / 255;
var g = rgb[1] / 255; const g = rgb[1] / 255;
var b = rgb[2] / 255; const b = rgb[2] / 255;
var c;
var m;
var y;
var k;
k = Math.min(1 - r, 1 - g, 1 - b); const k = Math.min(1 - r, 1 - g, 1 - b);
c = (1 - r - k) / (1 - k) || 0; const c = (1 - r - k) / (1 - k) || 0;
m = (1 - g - k) / (1 - k) || 0; const m = (1 - g - k) / (1 - k) || 0;
y = (1 - b - k) / (1 - k) || 0; const y = (1 - b - k) / (1 - k) || 0;
return [c * 100, m * 100, y * 100, k * 100]; return [c * 100, m * 100, y * 100, k * 100];
}; };
/**
* See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
* */
function comparativeDistance(x, y) { function comparativeDistance(x, y) {
/*
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
*/
return ( return (
Math.pow(x[0] - y[0], 2) + ((x[0] - y[0]) ** 2) +
Math.pow(x[1] - y[1], 2) + ((x[1] - y[1]) ** 2) +
Math.pow(x[2] - y[2], 2) ((x[2] - y[2]) ** 2)
); );
} }
convert.rgb.keyword = function (rgb) { convert.rgb.keyword = function (rgb) {
var reversed = reverseKeywords[rgb]; const reversed = reverseKeywords[rgb];
if (reversed) { if (reversed) {
return reversed; return reversed;
} }
var currentClosestDistance = Infinity; let currentClosestDistance = Infinity;
var currentClosestKeyword; let currentClosestKeyword;
for (var keyword in cssKeywords) { for (const keyword of Object.keys(cssKeywords)) {
if (cssKeywords.hasOwnProperty(keyword)) { const value = cssKeywords[keyword];
var value = cssKeywords[keyword];
// Compute comparative distance // Compute comparative distance
var distance = comparativeDistance(rgb, value); const distance = comparativeDistance(rgb, value);
// Check if its less, if so set as closest // Check if its less, if so set as closest
if (distance < currentClosestDistance) { if (distance < currentClosestDistance) {
currentClosestDistance = distance; currentClosestDistance = distance;
currentClosestKeyword = keyword; currentClosestKeyword = keyword;
}
} }
} }
@@ -211,55 +204,50 @@ convert.keyword.rgb = function (keyword) {
}; };
convert.rgb.xyz = function (rgb) { convert.rgb.xyz = function (rgb) {
var r = rgb[0] / 255; let r = rgb[0] / 255;
var g = rgb[1] / 255; let g = rgb[1] / 255;
var b = rgb[2] / 255; let b = rgb[2] / 255;
// assume sRGB // Assume sRGB
r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);
g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);
b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);
var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
return [x * 100, y * 100, z * 100]; return [x * 100, y * 100, z * 100];
}; };
convert.rgb.lab = function (rgb) { convert.rgb.lab = function (rgb) {
var xyz = convert.rgb.xyz(rgb); const xyz = convert.rgb.xyz(rgb);
var x = xyz[0]; let x = xyz[0];
var y = xyz[1]; let y = xyz[1];
var z = xyz[2]; let z = xyz[2];
var l;
var a;
var b;
x /= 95.047; x /= 95.047;
y /= 100; y /= 100;
z /= 108.883; z /= 108.883;
x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
l = (116 * y) - 16; const l = (116 * y) - 16;
a = 500 * (x - y); const a = 500 * (x - y);
b = 200 * (y - z); const b = 200 * (y - z);
return [l, a, b]; return [l, a, b];
}; };
convert.hsl.rgb = function (hsl) { convert.hsl.rgb = function (hsl) {
var h = hsl[0] / 360; const h = hsl[0] / 360;
var s = hsl[1] / 100; const s = hsl[1] / 100;
var l = hsl[2] / 100; const l = hsl[2] / 100;
var t1; let t2;
var t2; let t3;
var t3; let val;
var rgb;
var val;
if (s === 0) { if (s === 0) {
val = l * 255; val = l * 255;
@@ -272,14 +260,15 @@ convert.hsl.rgb = function (hsl) {
t2 = l + s - l * s; t2 = l + s - l * s;
} }
t1 = 2 * l - t2; const t1 = 2 * l - t2;
rgb = [0, 0, 0]; const rgb = [0, 0, 0];
for (var i = 0; i < 3; i++) { for (let i = 0; i < 3; i++) {
t3 = h + 1 / 3 * -(i - 1); t3 = h + 1 / 3 * -(i - 1);
if (t3 < 0) { if (t3 < 0) {
t3++; t3++;
} }
if (t3 > 1) { if (t3 > 1) {
t3--; t3--;
} }
@@ -301,33 +290,31 @@ convert.hsl.rgb = function (hsl) {
}; };
convert.hsl.hsv = function (hsl) { convert.hsl.hsv = function (hsl) {
var h = hsl[0]; const h = hsl[0];
var s = hsl[1] / 100; let s = hsl[1] / 100;
var l = hsl[2] / 100; let l = hsl[2] / 100;
var smin = s; let smin = s;
var lmin = Math.max(l, 0.01); const lmin = Math.max(l, 0.01);
var sv;
var v;
l *= 2; l *= 2;
s *= (l <= 1) ? l : 2 - l; s *= (l <= 1) ? l : 2 - l;
smin *= lmin <= 1 ? lmin : 2 - lmin; smin *= lmin <= 1 ? lmin : 2 - lmin;
v = (l + s) / 2; const v = (l + s) / 2;
sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
return [h, sv * 100, v * 100]; return [h, sv * 100, v * 100];
}; };
convert.hsv.rgb = function (hsv) { convert.hsv.rgb = function (hsv) {
var h = hsv[0] / 60; const h = hsv[0] / 60;
var s = hsv[1] / 100; const s = hsv[1] / 100;
var v = hsv[2] / 100; let v = hsv[2] / 100;
var hi = Math.floor(h) % 6; const hi = Math.floor(h) % 6;
var f = h - Math.floor(h); const f = h - Math.floor(h);
var p = 255 * v * (1 - s); const p = 255 * v * (1 - s);
var q = 255 * v * (1 - (s * f)); const q = 255 * v * (1 - (s * f));
var t = 255 * v * (1 - (s * (1 - f))); const t = 255 * v * (1 - (s * (1 - f)));
v *= 255; v *= 255;
switch (hi) { switch (hi) {
@@ -347,16 +334,15 @@ convert.hsv.rgb = function (hsv) {
}; };
convert.hsv.hsl = function (hsv) { convert.hsv.hsl = function (hsv) {
var h = hsv[0]; const h = hsv[0];
var s = hsv[1] / 100; const s = hsv[1] / 100;
var v = hsv[2] / 100; const v = hsv[2] / 100;
var vmin = Math.max(v, 0.01); const vmin = Math.max(v, 0.01);
var lmin; let sl;
var sl; let l;
var l;
l = (2 - s) * v; l = (2 - s) * v;
lmin = (2 - s) * vmin; const lmin = (2 - s) * vmin;
sl = s * vmin; sl = s * vmin;
sl /= (lmin <= 1) ? lmin : 2 - lmin; sl /= (lmin <= 1) ? lmin : 2 - lmin;
sl = sl || 0; sl = sl || 0;
@@ -367,87 +353,83 @@ convert.hsv.hsl = function (hsv) {
// http://dev.w3.org/csswg/css-color/#hwb-to-rgb // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
convert.hwb.rgb = function (hwb) { convert.hwb.rgb = function (hwb) {
var h = hwb[0] / 360; const h = hwb[0] / 360;
var wh = hwb[1] / 100; let wh = hwb[1] / 100;
var bl = hwb[2] / 100; let bl = hwb[2] / 100;
var ratio = wh + bl; const ratio = wh + bl;
var i; let f;
var v;
var f;
var n;
// wh + bl cant be > 1 // Wh + bl cant be > 1
if (ratio > 1) { if (ratio > 1) {
wh /= ratio; wh /= ratio;
bl /= ratio; bl /= ratio;
} }
i = Math.floor(6 * h); const i = Math.floor(6 * h);
v = 1 - bl; const v = 1 - bl;
f = 6 * h - i; f = 6 * h - i;
if ((i & 0x01) !== 0) { if ((i & 0x01) !== 0) {
f = 1 - f; f = 1 - f;
} }
n = wh + f * (v - wh); // linear interpolation const n = wh + f * (v - wh); // Linear interpolation
var r; let r;
var g; let g;
var b; let b;
/* eslint-disable max-statements-per-line,no-multi-spaces */
switch (i) { switch (i) {
default: default:
case 6: case 6:
case 0: r = v; g = n; b = wh; break; case 0: r = v; g = n; b = wh; break;
case 1: r = n; g = v; b = wh; break; case 1: r = n; g = v; b = wh; break;
case 2: r = wh; g = v; b = n; break; case 2: r = wh; g = v; b = n; break;
case 3: r = wh; g = n; b = v; break; case 3: r = wh; g = n; b = v; break;
case 4: r = n; g = wh; b = v; break; case 4: r = n; g = wh; b = v; break;
case 5: r = v; g = wh; b = n; break; case 5: r = v; g = wh; b = n; break;
} }
/* eslint-enable max-statements-per-line,no-multi-spaces */
return [r * 255, g * 255, b * 255]; return [r * 255, g * 255, b * 255];
}; };
convert.cmyk.rgb = function (cmyk) { convert.cmyk.rgb = function (cmyk) {
var c = cmyk[0] / 100; const c = cmyk[0] / 100;
var m = cmyk[1] / 100; const m = cmyk[1] / 100;
var y = cmyk[2] / 100; const y = cmyk[2] / 100;
var k = cmyk[3] / 100; const k = cmyk[3] / 100;
var r;
var g;
var b;
r = 1 - Math.min(1, c * (1 - k) + k); const r = 1 - Math.min(1, c * (1 - k) + k);
g = 1 - Math.min(1, m * (1 - k) + k); const g = 1 - Math.min(1, m * (1 - k) + k);
b = 1 - Math.min(1, y * (1 - k) + k); const b = 1 - Math.min(1, y * (1 - k) + k);
return [r * 255, g * 255, b * 255]; return [r * 255, g * 255, b * 255];
}; };
convert.xyz.rgb = function (xyz) { convert.xyz.rgb = function (xyz) {
var x = xyz[0] / 100; const x = xyz[0] / 100;
var y = xyz[1] / 100; const y = xyz[1] / 100;
var z = xyz[2] / 100; const z = xyz[2] / 100;
var r; let r;
var g; let g;
var b; let b;
r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
// assume sRGB // Assume sRGB
r = r > 0.0031308 r = r > 0.0031308
? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)
: r * 12.92; : r * 12.92;
g = g > 0.0031308 g = g > 0.0031308
? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)
: g * 12.92; : g * 12.92;
b = b > 0.0031308 b = b > 0.0031308
? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)
: b * 12.92; : b * 12.92;
r = Math.min(Math.max(0, r), 1); r = Math.min(Math.max(0, r), 1);
@@ -458,43 +440,40 @@ convert.xyz.rgb = function (xyz) {
}; };
convert.xyz.lab = function (xyz) { convert.xyz.lab = function (xyz) {
var x = xyz[0]; let x = xyz[0];
var y = xyz[1]; let y = xyz[1];
var z = xyz[2]; let z = xyz[2];
var l;
var a;
var b;
x /= 95.047; x /= 95.047;
y /= 100; y /= 100;
z /= 108.883; z /= 108.883;
x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
l = (116 * y) - 16; const l = (116 * y) - 16;
a = 500 * (x - y); const a = 500 * (x - y);
b = 200 * (y - z); const b = 200 * (y - z);
return [l, a, b]; return [l, a, b];
}; };
convert.lab.xyz = function (lab) { convert.lab.xyz = function (lab) {
var l = lab[0]; const l = lab[0];
var a = lab[1]; const a = lab[1];
var b = lab[2]; const b = lab[2];
var x; let x;
var y; let y;
var z; let z;
y = (l + 16) / 116; y = (l + 16) / 116;
x = a / 500 + y; x = a / 500 + y;
z = y - b / 200; z = y - b / 200;
var y2 = Math.pow(y, 3); const y2 = y ** 3;
var x2 = Math.pow(x, 3); const x2 = x ** 3;
var z2 = Math.pow(z, 3); const z2 = z ** 3;
y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
@@ -507,45 +486,38 @@ convert.lab.xyz = function (lab) {
}; };
convert.lab.lch = function (lab) { convert.lab.lch = function (lab) {
var l = lab[0]; const l = lab[0];
var a = lab[1]; const a = lab[1];
var b = lab[2]; const b = lab[2];
var hr; let h;
var h;
var c;
hr = Math.atan2(b, a); const hr = Math.atan2(b, a);
h = hr * 360 / 2 / Math.PI; h = hr * 360 / 2 / Math.PI;
if (h < 0) { if (h < 0) {
h += 360; h += 360;
} }
c = Math.sqrt(a * a + b * b); const c = Math.sqrt(a * a + b * b);
return [l, c, h]; return [l, c, h];
}; };
convert.lch.lab = function (lch) { convert.lch.lab = function (lch) {
var l = lch[0]; const l = lch[0];
var c = lch[1]; const c = lch[1];
var h = lch[2]; const h = lch[2];
var a;
var b;
var hr;
hr = h / 360 * 2 * Math.PI; const hr = h / 360 * 2 * Math.PI;
a = c * Math.cos(hr); const a = c * Math.cos(hr);
b = c * Math.sin(hr); const b = c * Math.sin(hr);
return [l, a, b]; return [l, a, b];
}; };
convert.rgb.ansi16 = function (args) { convert.rgb.ansi16 = function (args, saturation = null) {
var r = args[0]; const [r, g, b] = args;
var g = args[1]; let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
var b = args[2];
var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
value = Math.round(value / 50); value = Math.round(value / 50);
@@ -553,7 +525,7 @@ convert.rgb.ansi16 = function (args) {
return 30; return 30;
} }
var ansi = 30 let ansi = 30
+ ((Math.round(b / 255) << 2) + ((Math.round(b / 255) << 2)
| (Math.round(g / 255) << 1) | (Math.round(g / 255) << 1)
| Math.round(r / 255)); | Math.round(r / 255));
@@ -566,17 +538,17 @@ convert.rgb.ansi16 = function (args) {
}; };
convert.hsv.ansi16 = function (args) { convert.hsv.ansi16 = function (args) {
// optimization here; we already know the value and don't need to get // Optimization here; we already know the value and don't need to get
// it converted for us. // it converted for us.
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
}; };
convert.rgb.ansi256 = function (args) { convert.rgb.ansi256 = function (args) {
var r = args[0]; const r = args[0];
var g = args[1]; const g = args[1];
var b = args[2]; const b = args[2];
// we use the extended greyscale palette here, with the exception of // We use the extended greyscale palette here, with the exception of
// black and white. normal palette only has 4 greyscale shades. // black and white. normal palette only has 4 greyscale shades.
if (r === g && g === b) { if (r === g && g === b) {
if (r < 8) { if (r < 8) {
@@ -590,7 +562,7 @@ convert.rgb.ansi256 = function (args) {
return Math.round(((r - 8) / 247) * 24) + 232; return Math.round(((r - 8) / 247) * 24) + 232;
} }
var ansi = 16 const ansi = 16
+ (36 * Math.round(r / 255 * 5)) + (36 * Math.round(r / 255 * 5))
+ (6 * Math.round(g / 255 * 5)) + (6 * Math.round(g / 255 * 5))
+ Math.round(b / 255 * 5); + Math.round(b / 255 * 5);
@@ -599,9 +571,9 @@ convert.rgb.ansi256 = function (args) {
}; };
convert.ansi16.rgb = function (args) { convert.ansi16.rgb = function (args) {
var color = args % 10; let color = args % 10;
// handle greyscale // Handle greyscale
if (color === 0 || color === 7) { if (color === 0 || color === 7) {
if (args > 50) { if (args > 50) {
color += 3.5; color += 3.5;
@@ -612,71 +584,71 @@ convert.ansi16.rgb = function (args) {
return [color, color, color]; return [color, color, color];
} }
var mult = (~~(args > 50) + 1) * 0.5; const mult = (~~(args > 50) + 1) * 0.5;
var r = ((color & 1) * mult) * 255; const r = ((color & 1) * mult) * 255;
var g = (((color >> 1) & 1) * mult) * 255; const g = (((color >> 1) & 1) * mult) * 255;
var b = (((color >> 2) & 1) * mult) * 255; const b = (((color >> 2) & 1) * mult) * 255;
return [r, g, b]; return [r, g, b];
}; };
convert.ansi256.rgb = function (args) { convert.ansi256.rgb = function (args) {
// handle greyscale // Handle greyscale
if (args >= 232) { if (args >= 232) {
var c = (args - 232) * 10 + 8; const c = (args - 232) * 10 + 8;
return [c, c, c]; return [c, c, c];
} }
args -= 16; args -= 16;
var rem; let rem;
var r = Math.floor(args / 36) / 5 * 255; const r = Math.floor(args / 36) / 5 * 255;
var g = Math.floor((rem = args % 36) / 6) / 5 * 255; const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
var b = (rem % 6) / 5 * 255; const b = (rem % 6) / 5 * 255;
return [r, g, b]; return [r, g, b];
}; };
convert.rgb.hex = function (args) { convert.rgb.hex = function (args) {
var integer = ((Math.round(args[0]) & 0xFF) << 16) const integer = ((Math.round(args[0]) & 0xFF) << 16)
+ ((Math.round(args[1]) & 0xFF) << 8) + ((Math.round(args[1]) & 0xFF) << 8)
+ (Math.round(args[2]) & 0xFF); + (Math.round(args[2]) & 0xFF);
var string = integer.toString(16).toUpperCase(); const string = integer.toString(16).toUpperCase();
return '000000'.substring(string.length) + string; return '000000'.substring(string.length) + string;
}; };
convert.hex.rgb = function (args) { convert.hex.rgb = function (args) {
var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
if (!match) { if (!match) {
return [0, 0, 0]; return [0, 0, 0];
} }
var colorString = match[0]; let colorString = match[0];
if (match[0].length === 3) { if (match[0].length === 3) {
colorString = colorString.split('').map(function (char) { colorString = colorString.split('').map(char => {
return char + char; return char + char;
}).join(''); }).join('');
} }
var integer = parseInt(colorString, 16); const integer = parseInt(colorString, 16);
var r = (integer >> 16) & 0xFF; const r = (integer >> 16) & 0xFF;
var g = (integer >> 8) & 0xFF; const g = (integer >> 8) & 0xFF;
var b = integer & 0xFF; const b = integer & 0xFF;
return [r, g, b]; return [r, g, b];
}; };
convert.rgb.hcg = function (rgb) { convert.rgb.hcg = function (rgb) {
var r = rgb[0] / 255; const r = rgb[0] / 255;
var g = rgb[1] / 255; const g = rgb[1] / 255;
var b = rgb[2] / 255; const b = rgb[2] / 255;
var max = Math.max(Math.max(r, g), b); const max = Math.max(Math.max(r, g), b);
var min = Math.min(Math.min(r, g), b); const min = Math.min(Math.min(r, g), b);
var chroma = (max - min); const chroma = (max - min);
var grayscale; let grayscale;
var hue; let hue;
if (chroma < 1) { if (chroma < 1) {
grayscale = min / (1 - chroma); grayscale = min / (1 - chroma);
@@ -693,7 +665,7 @@ convert.rgb.hcg = function (rgb) {
if (max === g) { if (max === g) {
hue = 2 + (b - r) / chroma; hue = 2 + (b - r) / chroma;
} else { } else {
hue = 4 + (r - g) / chroma + 4; hue = 4 + (r - g) / chroma;
} }
hue /= 6; hue /= 6;
@@ -703,17 +675,12 @@ convert.rgb.hcg = function (rgb) {
}; };
convert.hsl.hcg = function (hsl) { convert.hsl.hcg = function (hsl) {
var s = hsl[1] / 100; const s = hsl[1] / 100;
var l = hsl[2] / 100; const l = hsl[2] / 100;
var c = 1;
var f = 0;
if (l < 0.5) { const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));
c = 2.0 * s * l;
} else {
c = 2.0 * s * (1.0 - l);
}
let f = 0;
if (c < 1.0) { if (c < 1.0) {
f = (l - 0.5 * c) / (1.0 - c); f = (l - 0.5 * c) / (1.0 - c);
} }
@@ -722,11 +689,11 @@ convert.hsl.hcg = function (hsl) {
}; };
convert.hsv.hcg = function (hsv) { convert.hsv.hcg = function (hsv) {
var s = hsv[1] / 100; const s = hsv[1] / 100;
var v = hsv[2] / 100; const v = hsv[2] / 100;
var c = s * v; const c = s * v;
var f = 0; let f = 0;
if (c < 1.0) { if (c < 1.0) {
f = (v - c) / (1 - c); f = (v - c) / (1 - c);
@@ -736,20 +703,21 @@ convert.hsv.hcg = function (hsv) {
}; };
convert.hcg.rgb = function (hcg) { convert.hcg.rgb = function (hcg) {
var h = hcg[0] / 360; const h = hcg[0] / 360;
var c = hcg[1] / 100; const c = hcg[1] / 100;
var g = hcg[2] / 100; const g = hcg[2] / 100;
if (c === 0.0) { if (c === 0.0) {
return [g * 255, g * 255, g * 255]; return [g * 255, g * 255, g * 255];
} }
var pure = [0, 0, 0]; const pure = [0, 0, 0];
var hi = (h % 1) * 6; const hi = (h % 1) * 6;
var v = hi % 1; const v = hi % 1;
var w = 1 - v; const w = 1 - v;
var mg = 0; let mg = 0;
/* eslint-disable max-statements-per-line */
switch (Math.floor(hi)) { switch (Math.floor(hi)) {
case 0: case 0:
pure[0] = 1; pure[1] = v; pure[2] = 0; break; pure[0] = 1; pure[1] = v; pure[2] = 0; break;
@@ -764,6 +732,7 @@ convert.hcg.rgb = function (hcg) {
default: default:
pure[0] = 1; pure[1] = 0; pure[2] = w; pure[0] = 1; pure[1] = 0; pure[2] = w;
} }
/* eslint-enable max-statements-per-line */
mg = (1.0 - c) * g; mg = (1.0 - c) * g;
@@ -775,11 +744,11 @@ convert.hcg.rgb = function (hcg) {
}; };
convert.hcg.hsv = function (hcg) { convert.hcg.hsv = function (hcg) {
var c = hcg[1] / 100; const c = hcg[1] / 100;
var g = hcg[2] / 100; const g = hcg[2] / 100;
var v = c + g * (1.0 - c); const v = c + g * (1.0 - c);
var f = 0; let f = 0;
if (v > 0.0) { if (v > 0.0) {
f = c / v; f = c / v;
@@ -789,11 +758,11 @@ convert.hcg.hsv = function (hcg) {
}; };
convert.hcg.hsl = function (hcg) { convert.hcg.hsl = function (hcg) {
var c = hcg[1] / 100; const c = hcg[1] / 100;
var g = hcg[2] / 100; const g = hcg[2] / 100;
var l = g * (1.0 - c) + 0.5 * c; const l = g * (1.0 - c) + 0.5 * c;
var s = 0; let s = 0;
if (l > 0.0 && l < 0.5) { if (l > 0.0 && l < 0.5) {
s = c / (2 * l); s = c / (2 * l);
@@ -806,18 +775,18 @@ convert.hcg.hsl = function (hcg) {
}; };
convert.hcg.hwb = function (hcg) { convert.hcg.hwb = function (hcg) {
var c = hcg[1] / 100; const c = hcg[1] / 100;
var g = hcg[2] / 100; const g = hcg[2] / 100;
var v = c + g * (1.0 - c); const v = c + g * (1.0 - c);
return [hcg[0], (v - c) * 100, (1 - v) * 100]; return [hcg[0], (v - c) * 100, (1 - v) * 100];
}; };
convert.hwb.hcg = function (hwb) { convert.hwb.hcg = function (hwb) {
var w = hwb[1] / 100; const w = hwb[1] / 100;
var b = hwb[2] / 100; const b = hwb[2] / 100;
var v = 1 - b; const v = 1 - b;
var c = v - w; const c = v - w;
var g = 0; let g = 0;
if (c < 1) { if (c < 1) {
g = (v - c) / (1 - c); g = (v - c) / (1 - c);
@@ -838,10 +807,12 @@ convert.gray.rgb = function (args) {
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
}; };
convert.gray.hsl = convert.gray.hsv = function (args) { convert.gray.hsl = function (args) {
return [0, 0, args[0]]; return [0, 0, args[0]];
}; };
convert.gray.hsv = convert.gray.hsl;
convert.gray.hwb = function (gray) { convert.gray.hwb = function (gray) {
return [0, 100, gray[0]]; return [0, 100, gray[0]];
}; };
@@ -855,14 +826,14 @@ convert.gray.lab = function (gray) {
}; };
convert.gray.hex = function (gray) { convert.gray.hex = function (gray) {
var val = Math.round(gray[0] / 100 * 255) & 0xFF; const val = Math.round(gray[0] / 100 * 255) & 0xFF;
var integer = (val << 16) + (val << 8) + val; const integer = (val << 16) + (val << 8) + val;
var string = integer.toString(16).toUpperCase(); const string = integer.toString(16).toUpperCase();
return '000000'.substring(string.length) + string; return '000000'.substring(string.length) + string;
}; };
convert.rgb.gray = function (rgb) { convert.rgb.gray = function (rgb) {
var val = (rgb[0] + rgb[1] + rgb[2]) / 3; const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
return [val / 255 * 100]; return [val / 255 * 100];
}; };

51
node_modules/color-convert/index.js generated vendored
View File

@@ -1,24 +1,25 @@
var conversions = require('./conversions'); const conversions = require('./conversions');
var route = require('./route'); const route = require('./route');
var convert = {}; const convert = {};
var models = Object.keys(conversions); const models = Object.keys(conversions);
function wrapRaw(fn) { function wrapRaw(fn) {
var wrappedFn = function (args) { const wrappedFn = function (...args) {
if (args === undefined || args === null) { const arg0 = args[0];
return args; if (arg0 === undefined || arg0 === null) {
return arg0;
} }
if (arguments.length > 1) { if (arg0.length > 1) {
args = Array.prototype.slice.call(arguments); args = arg0;
} }
return fn(args); return fn(args);
}; };
// preserve .conversion property if there is one // Preserve .conversion property if there is one
if ('conversion' in fn) { if ('conversion' in fn) {
wrappedFn.conversion = fn.conversion; wrappedFn.conversion = fn.conversion;
} }
@@ -27,22 +28,24 @@ function wrapRaw(fn) {
} }
function wrapRounded(fn) { function wrapRounded(fn) {
var wrappedFn = function (args) { const wrappedFn = function (...args) {
if (args === undefined || args === null) { const arg0 = args[0];
return args;
if (arg0 === undefined || arg0 === null) {
return arg0;
} }
if (arguments.length > 1) { if (arg0.length > 1) {
args = Array.prototype.slice.call(arguments); args = arg0;
} }
var result = fn(args); const result = fn(args);
// we're assuming the result is an array here. // We're assuming the result is an array here.
// see notice in conversions.js; don't use box types // see notice in conversions.js; don't use box types
// in conversion functions. // in conversion functions.
if (typeof result === 'object') { if (typeof result === 'object') {
for (var len = result.length, i = 0; i < len; i++) { for (let len = result.length, i = 0; i < len; i++) {
result[i] = Math.round(result[i]); result[i] = Math.round(result[i]);
} }
} }
@@ -50,7 +53,7 @@ function wrapRounded(fn) {
return result; return result;
}; };
// preserve .conversion property if there is one // Preserve .conversion property if there is one
if ('conversion' in fn) { if ('conversion' in fn) {
wrappedFn.conversion = fn.conversion; wrappedFn.conversion = fn.conversion;
} }
@@ -58,17 +61,17 @@ function wrapRounded(fn) {
return wrappedFn; return wrappedFn;
} }
models.forEach(function (fromModel) { models.forEach(fromModel => {
convert[fromModel] = {}; convert[fromModel] = {};
Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
var routes = route(fromModel); const routes = route(fromModel);
var routeModels = Object.keys(routes); const routeModels = Object.keys(routes);
routeModels.forEach(function (toModel) { routeModels.forEach(toModel => {
var fn = routes[toModel]; const fn = routes[toModel];
convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel] = wrapRounded(fn);
convert[fromModel][toModel].raw = wrapRaw(fn); convert[fromModel][toModel].raw = wrapRaw(fn);

View File

@@ -1,117 +1,48 @@
{ {
"_args": [
[
"color-convert@^1.9.0",
"/home/pablinux/Projects/Node/app_sigma/node_modules/ansi-styles"
]
],
"_from": "color-convert@>=1.9.0 <2.0.0",
"_hasShrinkwrap": false,
"_id": "color-convert@1.9.3",
"_inCache": true,
"_installable": true,
"_location": "/color-convert",
"_nodeVersion": "9.6.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/color-convert_1.9.3_1535434358933_0.039520734999560325"
},
"_npmUser": {
"email": "i.am.qix@gmail.com",
"name": "qix"
},
"_npmVersion": "6.1.0",
"_phantomChildren": {},
"_requested": {
"name": "color-convert",
"raw": "color-convert@^1.9.0",
"rawSpec": "^1.9.0",
"scope": null,
"spec": ">=1.9.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/ansi-styles"
],
"_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"_shasum": "bb71850690e1f136567de629d2d5471deda4c1e8",
"_shrinkwrap": null,
"_spec": "color-convert@^1.9.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/ansi-styles",
"author": {
"email": "fayearthur@gmail.com",
"name": "Heather Arthur"
},
"bugs": {
"url": "https://github.com/Qix-/color-convert/issues"
},
"dependencies": {
"color-name": "1.1.3"
},
"description": "Plain color conversion functions",
"devDependencies": {
"chalk": "1.1.1",
"xo": "0.11.2"
},
"directories": {},
"dist": {
"fileCount": 7,
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhN53CRA9TVsSAnZWagAAM64QAKN/CRQ/i6v2JtWVkAob\ntboJSXsnqa/T2ozTyI5UngXYdqk+33XF1EOeTCQ4Heay0zYk8MtMDk8GCIO0\naKHGzhgC5lKYXYJ+6AE/0C/047LdgTUqEbYriwTkYTa1FyozgLMghdkBLklF\nADEZ3elhqjuCJNhe/CIHfAVBrNt/b7t8O6zhQY/n53wA6tU9N6gJq2R5njML\n/bKF5JxEX6RITFxC5jqUQecyDf1uYt0B/0IJQEylsdN8JqNrL6IzrXjLI2Xp\n37zH5P17Adl2yqIuwIoqmjDxuTFcAjA02WNPj4D0h88h7C5kmVvS5x3FC+D4\nYVZAwIKCqeFtYOtTMvoLhXd3Zgc7OSEg+KLi9UR9CxQrP42/28Bi0guZGCua\nOj/Tr660U4+sKr5Y9tRdpE8J55pm/wELPntR9TwVj8qnq8+C9efo8hDxMGT9\nJ+GWrrGAtEHP0ffs4W3O/yn5QfWXUmyIueNg7CjFgYG2pgMwSKOVgKsVc+iQ\nP6/bDsk3exESageTtRxA3gIK279QIRtqY+4M2HV7lcL3l9nPhiD841o2mep4\nVIcNiR3SD3MeAr5DBZqJKNd1qxDLRAAnCTNLfrQBx5hHtXgm9wDKrZNTdOxF\npUvIxhDTbkKIAmfSAI4fpZxwsSP10PRMHdtRRmDahZU9Uyj5qY+KEDhOnotq\nKF7e\r\n=S0I7\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "bb71850690e1f136567de629d2d5471deda4c1e8",
"tarball": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"unpackedSize": 26964
},
"files": [
"conversions.js",
"css-keywords.js",
"index.js",
"route.js"
],
"gitHead": "99dc5da127d3d17d0ff8d13a995fd2d6aab404aa",
"homepage": "https://github.com/Qix-/color-convert#readme",
"keywords": [
"ansi",
"ansi16",
"cmyk",
"color",
"colour",
"conversion",
"convert",
"converter",
"hsl",
"hsv",
"hwb",
"rgb"
],
"license": "MIT",
"maintainers": [
{
"name": "moox",
"email": "m@moox.io"
},
{
"name": "qix",
"email": "i.am.qix@gmail.com"
}
],
"name": "color-convert", "name": "color-convert",
"optionalDependencies": {}, "description": "Plain color conversion functions",
"readme": "ERROR: No README data found!", "version": "2.0.1",
"repository": { "author": "Heather Arthur <fayearthur@gmail.com>",
"type": "git", "license": "MIT",
"url": "git+https://github.com/Qix-/color-convert.git" "repository": "Qix-/color-convert",
},
"scripts": { "scripts": {
"pretest": "xo", "pretest": "xo",
"test": "node test/basic.js" "test": "node test/basic.js"
}, },
"version": "1.9.3", "engines": {
"node": ">=7.0.0"
},
"keywords": [
"color",
"colour",
"convert",
"converter",
"conversion",
"rgb",
"hsl",
"hsv",
"hwb",
"cmyk",
"ansi",
"ansi16"
],
"files": [
"index.js",
"conversions.js",
"route.js"
],
"xo": { "xo": {
"rules": { "rules": {
"default-case": 0, "default-case": 0,
"no-inline-comments": 0, "no-inline-comments": 0,
"operator-linebreak": 0 "operator-linebreak": 0
} }
},
"devDependencies": {
"chalk": "^2.4.2",
"xo": "^0.24.0"
},
"dependencies": {
"color-name": "~1.1.4"
} }
} }

44
node_modules/color-convert/route.js generated vendored
View File

@@ -1,7 +1,7 @@
var conversions = require('./conversions'); const conversions = require('./conversions');
/* /*
this function routes a model to all other models. This function routes a model to all other models.
all functions that are routed have a property `.conversion` attached all functions that are routed have a property `.conversion` attached
to the returned synthetic function. This property is an array to the returned synthetic function. This property is an array
@@ -12,11 +12,11 @@ var conversions = require('./conversions');
*/ */
function buildGraph() { function buildGraph() {
var graph = {}; const graph = {};
// https://jsperf.com/object-keys-vs-for-in-with-closure/3 // https://jsperf.com/object-keys-vs-for-in-with-closure/3
var models = Object.keys(conversions); const models = Object.keys(conversions);
for (var len = models.length, i = 0; i < len; i++) { for (let len = models.length, i = 0; i < len; i++) {
graph[models[i]] = { graph[models[i]] = {
// http://jsperf.com/1-vs-infinity // http://jsperf.com/1-vs-infinity
// micro-opt, but this is simple. // micro-opt, but this is simple.
@@ -30,18 +30,18 @@ function buildGraph() {
// https://en.wikipedia.org/wiki/Breadth-first_search // https://en.wikipedia.org/wiki/Breadth-first_search
function deriveBFS(fromModel) { function deriveBFS(fromModel) {
var graph = buildGraph(); const graph = buildGraph();
var queue = [fromModel]; // unshift -> queue -> pop const queue = [fromModel]; // Unshift -> queue -> pop
graph[fromModel].distance = 0; graph[fromModel].distance = 0;
while (queue.length) { while (queue.length) {
var current = queue.pop(); const current = queue.pop();
var adjacents = Object.keys(conversions[current]); const adjacents = Object.keys(conversions[current]);
for (var len = adjacents.length, i = 0; i < len; i++) { for (let len = adjacents.length, i = 0; i < len; i++) {
var adjacent = adjacents[i]; const adjacent = adjacents[i];
var node = graph[adjacent]; const node = graph[adjacent];
if (node.distance === -1) { if (node.distance === -1) {
node.distance = graph[current].distance + 1; node.distance = graph[current].distance + 1;
@@ -61,10 +61,10 @@ function link(from, to) {
} }
function wrapConversion(toModel, graph) { function wrapConversion(toModel, graph) {
var path = [graph[toModel].parent, toModel]; const path = [graph[toModel].parent, toModel];
var fn = conversions[graph[toModel].parent][toModel]; let fn = conversions[graph[toModel].parent][toModel];
var cur = graph[toModel].parent; let cur = graph[toModel].parent;
while (graph[cur].parent) { while (graph[cur].parent) {
path.unshift(graph[cur].parent); path.unshift(graph[cur].parent);
fn = link(conversions[graph[cur].parent][cur], fn); fn = link(conversions[graph[cur].parent][cur], fn);
@@ -76,16 +76,16 @@ function wrapConversion(toModel, graph) {
} }
module.exports = function (fromModel) { module.exports = function (fromModel) {
var graph = deriveBFS(fromModel); const graph = deriveBFS(fromModel);
var conversion = {}; const conversion = {};
var models = Object.keys(graph); const models = Object.keys(graph);
for (var len = models.length, i = 0; i < len; i++) { for (let len = models.length, i = 0; i < len; i++) {
var toModel = models[i]; const toModel = models[i];
var node = graph[toModel]; const node = graph[toModel];
if (node.parent === null) { if (node.parent === null) {
// no possible conversion, or this node is the source model. // No possible conversion, or this node is the source model.
continue; continue;
} }

View File

@@ -1,43 +0,0 @@
{
"env": {
"browser": true,
"node": true,
"commonjs": true,
"es6": true
},
"extends": "eslint:recommended",
"rules": {
"strict": 2,
"indent": 0,
"linebreak-style": 0,
"quotes": 0,
"semi": 0,
"no-cond-assign": 1,
"no-constant-condition": 1,
"no-duplicate-case": 1,
"no-empty": 1,
"no-ex-assign": 1,
"no-extra-boolean-cast": 1,
"no-extra-semi": 1,
"no-fallthrough": 1,
"no-func-assign": 1,
"no-global-assign": 1,
"no-implicit-globals": 2,
"no-inner-declarations": ["error", "functions"],
"no-irregular-whitespace": 2,
"no-loop-func": 1,
"no-multi-str": 1,
"no-mixed-spaces-and-tabs": 1,
"no-proto": 1,
"no-sequences": 1,
"no-throw-literal": 1,
"no-unmodified-loop-condition": 1,
"no-useless-call": 1,
"no-void": 1,
"no-with": 2,
"wrap-iife": 1,
"no-redeclare": 1,
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
"no-sparse-arrays": 1
}
}

107
node_modules/color-name/.npmignore generated vendored
View File

@@ -1,107 +0,0 @@
//this will affect all the git repos
git config --global core.excludesfile ~/.gitignore
//update files since .ignore won't if already tracked
git rm --cached <file>
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
# Icon?
ehthumbs.db
Thumbs.db
.cache
.project
.settings
.tmproj
*.esproj
nbproject
# Numerous always-ignore extensions #
#####################################
*.diff
*.err
*.orig
*.rej
*.swn
*.swo
*.swp
*.vi
*~
*.sass-cache
*.grunt
*.tmp
# Dreamweaver added files #
###########################
_notes
dwsync.xml
# Komodo #
###########################
*.komodoproject
.komodotools
# Node #
#####################
node_modules
# Bower #
#####################
bower_components
# Folders to ignore #
#####################
.hg
.svn
.CVS
intermediate
publish
.idea
.graphics
_test
_archive
uploads
tmp
# Vim files to ignore #
#######################
.VimballRecord
.netrwhist
bundle.*
_demo

98
node_modules/color-name/package.json generated vendored
View File

@@ -1,82 +1,28 @@
{ {
"_args": [
[
"color-name@1.1.3",
"/home/pablinux/Projects/Node/app_sigma/node_modules/color-convert"
]
],
"_from": "color-name@1.1.3",
"_id": "color-name@1.1.3",
"_inCache": true,
"_installable": true,
"_location": "/color-name",
"_nodeVersion": "8.1.2",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/color-name-1.1.3.tgz_1500157027207_0.5641644957941025"
},
"_npmUser": {
"email": "df.creative@gmail.com",
"name": "dfcreative"
},
"_npmVersion": "4.6.1",
"_phantomChildren": {},
"_requested": {
"name": "color-name",
"raw": "color-name@1.1.3",
"rawSpec": "1.1.3",
"scope": null,
"spec": "1.1.3",
"type": "version"
},
"_requiredBy": [
"/color-convert"
],
"_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"_shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25",
"_shrinkwrap": null,
"_spec": "color-name@1.1.3",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/color-convert",
"author": {
"email": "dfcreative@gmail.com",
"name": "DY"
},
"bugs": {
"url": "https://github.com/dfcreative/color-name/issues"
},
"dependencies": {},
"description": "A list of color names and its values",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25",
"tarball": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
},
"gitHead": "cb7d4629b00fe38564f741a0779f6ad84d8007a2",
"homepage": "https://github.com/dfcreative/color-name",
"keywords": [
"color",
"color-keyword",
"color-name",
"keyword"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "dfcreative",
"email": "df.creative@gmail.com"
}
],
"name": "color-name", "name": "color-name",
"optionalDependencies": {}, "version": "1.1.4",
"readme": "ERROR: No README data found!", "description": "A list of color names and its values",
"repository": { "main": "index.js",
"type": "git", "files": [
"url": "git+ssh://git@github.com/dfcreative/color-name.git" "index.js"
}, ],
"scripts": { "scripts": {
"test": "node test.js" "test": "node test.js"
}, },
"version": "1.1.3" "repository": {
"type": "git",
"url": "git@github.com:colorjs/color-name.git"
},
"keywords": [
"color-name",
"color",
"color-keyword",
"keyword"
],
"author": "DY <dfcreative@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/colorjs/color-name/issues"
},
"homepage": "https://github.com/colorjs/color-name"
} }

7
node_modules/color-name/test.js generated vendored
View File

@@ -1,7 +0,0 @@
'use strict'
var names = require('./');
var assert = require('assert');
assert.deepEqual(names.red, [255,0,0]);
assert.deepEqual(names.aliceblue, [240,248,255]);

146
node_modules/concat-map/package.json generated vendored
View File

@@ -1,109 +1,43 @@
{ {
"_args": [ "name" : "concat-map",
[ "description" : "concatenative mapdashery",
"concat-map@0.0.1", "version" : "0.0.1",
"/home/pablinux/Projects/Node/app_sigma/node_modules/brace-expansion" "repository" : {
] "type" : "git",
], "url" : "git://github.com/substack/node-concat-map.git"
"_from": "concat-map@0.0.1",
"_id": "concat-map@0.0.1",
"_inCache": true,
"_installable": true,
"_location": "/concat-map",
"_npmUser": {
"email": "mail@substack.net",
"name": "substack"
},
"_npmVersion": "1.3.21",
"_phantomChildren": {},
"_requested": {
"name": "concat-map",
"raw": "concat-map@0.0.1",
"rawSpec": "0.0.1",
"scope": null,
"spec": "0.0.1",
"type": "version"
},
"_requiredBy": [
"/brace-expansion"
],
"_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
"_shrinkwrap": null,
"_spec": "concat-map@0.0.1",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/brace-expansion",
"author": {
"email": "mail@substack.net",
"name": "James Halliday",
"url": "http://substack.net"
},
"bugs": {
"url": "https://github.com/substack/node-concat-map/issues"
},
"dependencies": {},
"description": "concatenative mapdashery",
"devDependencies": {
"tape": "~2.4.0"
},
"directories": {
"example": "example",
"test": "test"
},
"dist": {
"shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
"tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
},
"homepage": "https://github.com/substack/node-concat-map",
"keywords": [
"concat",
"concatMap",
"functional",
"higher-order",
"map"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "substack",
"email": "mail@substack.net"
}
],
"name": "concat-map",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/substack/node-concat-map.git"
},
"scripts": {
"test": "tape test/*.js"
},
"testling": {
"browsers": {
"chrome": [
10,
22
],
"ff": [
10,
15,
3.5
],
"ie": [
6,
7,
8,
9
],
"opera": [
12
],
"safari": [
5.1
]
}, },
"files": "test/*.js" "main" : "index.js",
}, "keywords" : [
"version": "0.0.1" "concat",
"concatMap",
"map",
"functional",
"higher-order"
],
"directories" : {
"example" : "example",
"test" : "test"
},
"scripts" : {
"test" : "tape test/*.js"
},
"devDependencies" : {
"tape" : "~2.4.0"
},
"license" : "MIT",
"author" : {
"name" : "James Halliday",
"email" : "mail@substack.net",
"url" : "http://substack.net"
},
"testling" : {
"files" : "test/*.js",
"browsers" : {
"ie" : [ 6, 7, 8, 9 ],
"ff" : [ 3.5, 10, 15.0 ],
"chrome" : [ 10, 22 ],
"safari" : [ 5.1 ],
"opera" : [ 12 ]
}
}
} }

106
node_modules/configstore/index.js generated vendored
View File

@@ -1,106 +0,0 @@
'use strict';
const path = require('path');
const os = require('os');
const fs = require('graceful-fs');
const makeDir = require('make-dir');
const xdgBasedir = require('xdg-basedir');
const writeFileAtomic = require('write-file-atomic');
const dotProp = require('dot-prop');
const uniqueString = require('unique-string');
const configDir = xdgBasedir.config || path.join(os.tmpdir(), uniqueString());
const permissionError = 'You don\'t have access to this file.';
const makeDirOptions = {mode: 0o0700};
const writeFileOptions = {mode: 0o0600};
class Configstore {
constructor(id, defaults, opts) {
opts = opts || {};
const pathPrefix = opts.globalConfigPath ?
path.join(id, 'config.json') :
path.join('configstore', `${id}.json`);
this.path = path.join(configDir, pathPrefix);
this.all = Object.assign({}, defaults, this.all);
}
get all() {
try {
return JSON.parse(fs.readFileSync(this.path, 'utf8'));
} catch (err) {
// Create dir if it doesn't exist
if (err.code === 'ENOENT') {
makeDir.sync(path.dirname(this.path), makeDirOptions);
return {};
}
// Improve the message of permission errors
if (err.code === 'EACCES') {
err.message = `${err.message}\n${permissionError}\n`;
}
// Empty the file if it encounters invalid JSON
if (err.name === 'SyntaxError') {
writeFileAtomic.sync(this.path, '', writeFileOptions);
return {};
}
throw err;
}
}
set all(val) {
try {
// Make sure the folder exists as it could have been deleted in the meantime
makeDir.sync(path.dirname(this.path), makeDirOptions);
writeFileAtomic.sync(this.path, JSON.stringify(val, null, '\t'), writeFileOptions);
} catch (err) {
// Improve the message of permission errors
if (err.code === 'EACCES') {
err.message = `${err.message}\n${permissionError}\n`;
}
throw err;
}
}
get size() {
return Object.keys(this.all || {}).length;
}
get(key) {
return dotProp.get(this.all, key);
}
set(key, val) {
const config = this.all;
if (arguments.length === 1) {
for (const k of Object.keys(key)) {
dotProp.set(config, k, key[k]);
}
} else {
dotProp.set(config, key, val);
}
this.all = config;
}
has(key) {
return dotProp.has(this.all, key);
}
delete(key) {
const config = this.all;
dotProp.delete(config, key);
this.all = config;
}
clear() {
this.all = {};
}
}
module.exports = Configstore;

9
node_modules/configstore/license generated vendored
View File

@@ -1,9 +0,0 @@
Copyright Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

142
node_modules/configstore/package.json generated vendored
View File

@@ -1,142 +0,0 @@
{
"_args": [
[
"configstore@^3.0.0",
"/home/pablinux/Projects/Node/app_sigma/node_modules/update-notifier"
]
],
"_from": "configstore@>=3.0.0 <4.0.0",
"_hasShrinkwrap": false,
"_id": "configstore@3.1.2",
"_inCache": true,
"_installable": true,
"_location": "/configstore",
"_nodeVersion": "8.10.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/configstore_3.1.2_1522036601058_0.2787222913818217"
},
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "5.6.0",
"_phantomChildren": {},
"_requested": {
"name": "configstore",
"raw": "configstore@^3.0.0",
"rawSpec": "^3.0.0",
"scope": null,
"spec": ">=3.0.0 <4.0.0",
"type": "range"
},
"_requiredBy": [
"/update-notifier"
],
"_resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz",
"_shasum": "c6f25defaeef26df12dd33414b001fe81a543f8f",
"_shrinkwrap": null,
"_spec": "configstore@^3.0.0",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/update-notifier",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/yeoman/configstore/issues"
},
"dependencies": {
"dot-prop": "^4.1.0",
"graceful-fs": "^4.1.2",
"make-dir": "^1.0.0",
"unique-string": "^1.0.0",
"write-file-atomic": "^2.0.0",
"xdg-basedir": "^3.0.0"
},
"description": "Easily load and save config without having to think about where and how",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"directories": {},
"dist": {
"fileCount": 4,
"integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==",
"shasum": "c6f25defaeef26df12dd33414b001fe81a543f8f",
"tarball": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz",
"unpackedSize": 6857
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"gitHead": "f09f067e50e6a636cfc648a6fc36a522062bd49d",
"homepage": "https://github.com/yeoman/configstore#readme",
"keywords": [
"conf",
"config",
"configuration",
"data",
"json",
"persist",
"persistent",
"preferences",
"save",
"settings",
"storage",
"store"
],
"license": "BSD-2-Clause",
"maintainers": [
{
"name": "addyosmani",
"email": "addyosmani@gmail.com"
},
{
"name": "arthurvr",
"email": "contact@arthurverschaeve.be"
},
{
"name": "eddiemonge",
"email": "eddie+npm@eddiemonge.com"
},
{
"name": "hemanth",
"email": "hemanth.hm@gmail.com"
},
{
"name": "mischah",
"email": "mail@michael-kuehnel.de"
},
{
"name": "passy",
"email": "phartig@rdrei.net"
},
{
"name": "sboudrias",
"email": "admin@simonboudrias.com"
},
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
{
"name": "zckrs",
"email": "mdara@eleven-labs.com"
}
],
"name": "configstore",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/yeoman/configstore.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "3.1.2"
}

116
node_modules/configstore/readme.md generated vendored
View File

@@ -1,116 +0,0 @@
# configstore [![Build Status](https://travis-ci.org/yeoman/configstore.svg?branch=master)](https://travis-ci.org/yeoman/configstore)
> Easily load and persist config without having to think about where and how
Config is stored in a JSON file located in `$XDG_CONFIG_HOME` or `~/.config`.<br>
Example: `~/.config/configstore/some-id.json`
*If you need this for Electron, check out [`electron-store`](https://github.com/sindresorhus/electron-store) instead.*
## Usage
```js
const Configstore = require('configstore');
const pkg = require('./package.json');
// create a Configstore instance with an unique ID e.g.
// Package name and optionally some default values
const conf = new Configstore(pkg.name, {foo: 'bar'});
console.log(conf.get('foo'));
//=> 'bar'
conf.set('awesome', true);
console.log(conf.get('awesome'));
//=> true
// Use dot-notation to access nested properties
conf.set('bar.baz', true);
console.log(conf.get('bar'));
//=> {baz: true}
conf.delete('awesome');
console.log(conf.get('awesome'));
//=> undefined
```
## API
### Configstore(packageName, [defaults], [options])
Returns a new instance.
#### packageName
Type: `string`
Name of your package.
#### defaults
Type: `Object`
Default config.
#### options
##### globalConfigPath
Type: `boolean`<br>
Default: `false`
Store the config at `$CONFIG/package-name/config.json` instead of the default `$CONFIG/configstore/package-name.json`. This is not recommended as you might end up conflicting with other tools, rendering the "without having to think" idea moot.
### Instance
You can use [dot-notation](https://github.com/sindresorhus/dot-prop) in a `key` to access nested properties.
### .set(key, value)
Set an item.
### .set(object)
Set multiple items at once.
### .get(key)
Get an item.
### .has(key)
Check if an item exists.
### .delete(key)
Delete an item.
### .clear()
Delete all items.
### .size
Get the item count.
### .path
Get the path to the config file. Can be used to show the user where the config file is located or even better open it for them.
### .all
Get all the config as an object or replace the current config with an object:
```js
conf.all = {
hello: 'world'
};
```
## License
[BSD license](http://opensource.org/licenses/bsd-license.php)<br>
Copyright Google

View File

@@ -1,3 +1,8 @@
0.5.4 / 2021-12-10
==================
* deps: safe-buffer@5.2.1
0.5.3 / 2018-12-17 0.5.3 / 2018-12-17
================== ==================

View File

@@ -3,7 +3,7 @@
[![NPM Version][npm-image]][npm-url] [![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url] [![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url] [![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url] [![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url] [![Test Coverage][coveralls-image]][coveralls-url]
Create and parse HTTP `Content-Disposition` header Create and parse HTTP `Content-Disposition` header
@@ -16,8 +16,6 @@ $ npm install content-disposition
## API ## API
<!-- eslint-disable no-unused-vars -->
```js ```js
var contentDisposition = require('content-disposition') var contentDisposition = require('content-disposition')
``` ```
@@ -28,8 +26,6 @@ Create an attachment `Content-Disposition` header value using the given file nam
if supplied. The `filename` is optional and if no file name is desired, but you if supplied. The `filename` is optional and if no file name is desired, but you
want to specify `options`, set `filename` to `undefined`. want to specify `options`, set `filename` to `undefined`.
<!-- eslint-disable no-undef -->
```js ```js
res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf')) res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf'))
``` ```
@@ -70,8 +66,6 @@ it). The type is normalized to lower-case.
### contentDisposition.parse(string) ### contentDisposition.parse(string)
<!-- eslint-disable no-undef, no-unused-vars -->
```js ```js
var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt') var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt')
``` ```
@@ -140,9 +134,9 @@ $ npm test
[npm-url]: https://npmjs.org/package/content-disposition [npm-url]: https://npmjs.org/package/content-disposition
[node-version-image]: https://img.shields.io/node/v/content-disposition.svg [node-version-image]: https://img.shields.io/node/v/content-disposition.svg
[node-version-url]: https://nodejs.org/en/download [node-version-url]: https://nodejs.org/en/download
[travis-image]: https://img.shields.io/travis/jshttp/content-disposition.svg
[travis-url]: https://travis-ci.org/jshttp/content-disposition
[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg [coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg
[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master [coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master
[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg [downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg
[downloads-url]: https://npmjs.org/package/content-disposition [downloads-url]: https://npmjs.org/package/content-disposition
[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/content-disposition/ci/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/content-disposition?query=workflow%3Aci

View File

@@ -255,7 +255,7 @@ function format (obj) {
} }
/** /**
* Decode a RFC 6987 field value (gracefully). * Decode a RFC 5987 field value (gracefully).
* *
* @param {string} str * @param {string} str
* @return {string} * @return {string}

View File

@@ -1,54 +1,30 @@
{ {
"_from": "content-disposition@0.5.3", "name": "content-disposition",
"_id": "content-disposition@0.5.3",
"_inBundle": false,
"_integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
"_location": "/content-disposition",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "content-disposition@0.5.3",
"name": "content-disposition",
"escapedName": "content-disposition",
"rawSpec": "0.5.3",
"saveSpec": null,
"fetchSpec": "0.5.3"
},
"_requiredBy": [
"/express"
],
"_resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
"_shasum": "e130caf7e7279087c5616c2007d0485698984fbd",
"_spec": "content-disposition@0.5.3",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/express",
"author": {
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
"bugs": {
"url": "https://github.com/jshttp/content-disposition/issues"
},
"bundleDependencies": false,
"dependencies": {
"safe-buffer": "5.1.2"
},
"deprecated": false,
"description": "Create and parse Content-Disposition header", "description": "Create and parse Content-Disposition header",
"version": "0.5.4",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"license": "MIT",
"keywords": [
"content-disposition",
"http",
"rfc6266",
"res"
],
"repository": "jshttp/content-disposition",
"dependencies": {
"safe-buffer": "5.2.1"
},
"devDependencies": { "devDependencies": {
"deep-equal": "1.0.1", "deep-equal": "1.0.1",
"eslint": "5.10.0", "eslint": "7.32.0",
"eslint-config-standard": "12.0.0", "eslint-config-standard": "13.0.1",
"eslint-plugin-import": "2.14.0", "eslint-plugin-import": "2.25.3",
"eslint-plugin-markdown": "1.0.0-rc.1", "eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "7.0.1", "eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.0.1", "eslint-plugin-promise": "5.2.0",
"eslint-plugin-standard": "4.0.0", "eslint-plugin-standard": "4.1.0",
"istanbul": "0.4.5", "istanbul": "0.4.5",
"mocha": "5.2.0" "mocha": "9.1.3"
},
"engines": {
"node": ">= 0.6"
}, },
"files": [ "files": [
"LICENSE", "LICENSE",
@@ -56,24 +32,13 @@
"README.md", "README.md",
"index.js" "index.js"
], ],
"homepage": "https://github.com/jshttp/content-disposition#readme", "engines": {
"keywords": [ "node": ">= 0.6"
"content-disposition",
"http",
"rfc6266",
"res"
],
"license": "MIT",
"name": "content-disposition",
"repository": {
"type": "git",
"url": "git+https://github.com/jshttp/content-disposition.git"
}, },
"scripts": { "scripts": {
"lint": "eslint --plugin markdown --ext js,md .", "lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/", "test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
}, }
"version": "0.5.3"
} }

View File

@@ -1,3 +1,8 @@
1.0.5 / 2023-01-29
==================
* perf: skip value escaping when unnecessary
1.0.4 / 2017-09-11 1.0.4 / 2017-09-11
================== ==================

40
node_modules/content-type/README.md generated vendored
View File

@@ -1,10 +1,10 @@
# content-type # content-type
[![NPM Version][npm-image]][npm-url] [![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url] [![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url] [![Node.js Version][node-image]][node-url]
[![Build Status][travis-image]][travis-url] [![Build Status][ci-image]][ci-url]
[![Test Coverage][coveralls-image]][coveralls-url] [![Coverage Status][coveralls-image]][coveralls-url]
Create and parse HTTP Content-Type header according to RFC 7231 Create and parse HTTP Content-Type header according to RFC 7231
@@ -26,7 +26,7 @@ var contentType = require('content-type')
var obj = contentType.parse('image/svg+xml; charset=utf-8') var obj = contentType.parse('image/svg+xml; charset=utf-8')
``` ```
Parse a content type string. This will return an object with the following Parse a `Content-Type` header. This will return an object with the following
properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
- `type`: The media type (the type and subtype, always lower case). - `type`: The media type (the type and subtype, always lower case).
@@ -43,7 +43,7 @@ Throws a `TypeError` if the string is missing or invalid.
var obj = contentType.parse(req) var obj = contentType.parse(req)
``` ```
Parse the `content-type` header from the given `req`. Short-cut for Parse the `Content-Type` header from the given `req`. Short-cut for
`contentType.parse(req.headers['content-type'])`. `contentType.parse(req.headers['content-type'])`.
Throws a `TypeError` if the `Content-Type` header is missing or invalid. Throws a `TypeError` if the `Content-Type` header is missing or invalid.
@@ -54,7 +54,7 @@ Throws a `TypeError` if the `Content-Type` header is missing or invalid.
var obj = contentType.parse(res) var obj = contentType.parse(res)
``` ```
Parse the `content-type` header set on the given `res`. Short-cut for Parse the `Content-Type` header set on the given `res`. Short-cut for
`contentType.parse(res.getHeader('content-type'))`. `contentType.parse(res.getHeader('content-type'))`.
Throws a `TypeError` if the `Content-Type` header is missing or invalid. Throws a `TypeError` if the `Content-Type` header is missing or invalid.
@@ -62,10 +62,13 @@ Throws a `TypeError` if the `Content-Type` header is missing or invalid.
### contentType.format(obj) ### contentType.format(obj)
```js ```js
var str = contentType.format({type: 'image/svg+xml'}) var str = contentType.format({
type: 'image/svg+xml',
parameters: { charset: 'utf-8' }
})
``` ```
Format an object into a content type string. This will return a string of the Format an object into a `Content-Type` header. This will return a string of the
content type for the given object with the following properties (examples are content type for the given object with the following properties (examples are
shown that produce the string `'image/svg+xml; charset=utf-8'`): shown that produce the string `'image/svg+xml; charset=utf-8'`):
@@ -80,13 +83,12 @@ Throws a `TypeError` if the object contains an invalid type or parameter names.
[MIT](LICENSE) [MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/content-type.svg [ci-image]: https://badgen.net/github/checks/jshttp/content-type/master?label=ci
[ci-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/content-type/master
[coveralls-url]: https://coveralls.io/r/jshttp/content-type?branch=master
[node-image]: https://badgen.net/npm/node/content-type
[node-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/content-type
[npm-url]: https://npmjs.org/package/content-type [npm-url]: https://npmjs.org/package/content-type
[node-version-image]: https://img.shields.io/node/v/content-type.svg [npm-version-image]: https://badgen.net/npm/v/content-type
[node-version-url]: http://nodejs.org/download/
[travis-image]: https://img.shields.io/travis/jshttp/content-type/master.svg
[travis-url]: https://travis-ci.org/jshttp/content-type
[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-type/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/content-type
[downloads-image]: https://img.shields.io/npm/dm/content-type.svg
[downloads-url]: https://npmjs.org/package/content-type

21
node_modules/content-type/index.js generated vendored
View File

@@ -20,8 +20,8 @@
* obs-text = %x80-FF * obs-text = %x80-FF
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
*/ */
var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g // eslint-disable-line no-control-regex
var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ // eslint-disable-line no-control-regex
var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/
/** /**
@@ -30,7 +30,7 @@ var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
* obs-text = %x80-FF * obs-text = %x80-FF
*/ */
var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g // eslint-disable-line no-control-regex
/** /**
* RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6 * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
@@ -119,7 +119,7 @@ function parse (string) {
var index = header.indexOf(';') var index = header.indexOf(';')
var type = index !== -1 var type = index !== -1
? header.substr(0, index).trim() ? header.slice(0, index).trim()
: header.trim() : header.trim()
if (!TYPE_REGEXP.test(type)) { if (!TYPE_REGEXP.test(type)) {
@@ -145,11 +145,14 @@ function parse (string) {
key = match[1].toLowerCase() key = match[1].toLowerCase()
value = match[2] value = match[2]
if (value[0] === '"') { if (value.charCodeAt(0) === 0x22 /* " */) {
// remove quotes and escapes // remove quotes
value = value value = value.slice(1, -1)
.substr(1, value.length - 2)
.replace(QESC_REGEXP, '$1') // remove escapes
if (value.indexOf('\\') !== -1) {
value = value.replace(QESC_REGEXP, '$1')
}
} }
obj.parameters[key] = value obj.parameters[key] = value

View File

@@ -1,58 +1,9 @@
{ {
"_from": "content-type@~1.0.4", "name": "content-type",
"_id": "content-type@1.0.4",
"_inBundle": false,
"_integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
"_location": "/content-type",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "content-type@~1.0.4",
"name": "content-type",
"escapedName": "content-type",
"rawSpec": "~1.0.4",
"saveSpec": null,
"fetchSpec": "~1.0.4"
},
"_requiredBy": [
"/body-parser",
"/express"
],
"_resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
"_shasum": "e138cc75e040c727b1966fe5e5f8c9aee256fe3b",
"_spec": "content-type@~1.0.4",
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/express",
"author": {
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
"bugs": {
"url": "https://github.com/jshttp/content-type/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Create and parse HTTP Content-Type header", "description": "Create and parse HTTP Content-Type header",
"devDependencies": { "version": "1.0.5",
"eslint": "3.19.0", "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"eslint-config-standard": "10.2.1", "license": "MIT",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-node": "5.1.1",
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-standard": "3.0.1",
"istanbul": "0.4.5",
"mocha": "~1.21.5"
},
"engines": {
"node": ">= 0.6"
},
"files": [
"LICENSE",
"HISTORY.md",
"README.md",
"index.js"
],
"homepage": "https://github.com/jshttp/content-type#readme",
"keywords": [ "keywords": [
"content-type", "content-type",
"http", "http",
@@ -60,17 +11,32 @@
"res", "res",
"rfc7231" "rfc7231"
], ],
"license": "MIT", "repository": "jshttp/content-type",
"name": "content-type", "devDependencies": {
"repository": { "deep-equal": "1.0.1",
"type": "git", "eslint": "8.32.0",
"url": "git+https://github.com/jshttp/content-type.git" "eslint-config-standard": "15.0.1",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-standard": "4.1.0",
"mocha": "10.2.0",
"nyc": "15.1.0"
},
"files": [
"LICENSE",
"HISTORY.md",
"README.md",
"index.js"
],
"engines": {
"node": ">= 0.6"
}, },
"scripts": { "scripts": {
"lint": "eslint .", "lint": "eslint .",
"test": "mocha --reporter spec --check-leaks --bail test/", "test": "mocha --reporter spec --check-leaks --bail test/",
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", "test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" "test-cov": "nyc --reporter=html --reporter=text npm test",
}, "version": "node scripts/version-history.js && git add HISTORY.md"
"version": "1.0.4" }
} }

19
node_modules/cookie/HISTORY.md generated vendored
View File

@@ -1,3 +1,22 @@
0.5.0 / 2022-04-11
==================
* Add `priority` option
* Fix `expires` option to reject invalid dates
* pref: improve default decode speed
* pref: remove slow string split in parse
0.4.2 / 2022-02-02
==================
* pref: read value only when assigning in parse
* pref: remove unnecessary regexp in parse
0.4.1 / 2020-04-21
==================
* Fix `maxAge` option to reject invalid values
0.4.0 / 2019-05-15 0.4.0 / 2019-05-15
================== ==================

97
node_modules/cookie/README.md generated vendored
View File

@@ -3,13 +3,17 @@
[![NPM Version][npm-version-image]][npm-url] [![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url] [![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url] [![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url] [![Test Coverage][coveralls-image]][coveralls-url]
Basic HTTP cookie parser and serializer for HTTP servers. Basic HTTP cookie parser and serializer for HTTP servers.
## Installation ## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh ```sh
$ npm install cookie $ npm install cookie
``` ```
@@ -108,9 +112,23 @@ so if both are set, they should point to the same date and time.
Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path
is considered the ["default path"][rfc-6265-5.1.4]. is considered the ["default path"][rfc-6265-5.1.4].
##### priority
Specifies the `string` to be the value for the [`Priority` `Set-Cookie` attribute][rfc-west-cookie-priority-00-4.1].
- `'low'` will set the `Priority` attribute to `Low`.
- `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
- `'high'` will set the `Priority` attribute to `High`.
More information about the different priority levels can be found in
[the specification][rfc-west-cookie-priority-00-4.1].
**note** This is an attribute that has not yet been fully standardized, and may change in the future.
This also means many clients may ignore this attribute until they understand it.
##### sameSite ##### sameSite
Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-03-4.1.2.7]. Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-09-5.4.7].
- `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
- `false` will not set the `SameSite` attribute. - `false` will not set the `SameSite` attribute.
@@ -119,7 +137,7 @@ Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Coo
- `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
More information about the different enforcement levels can be found in More information about the different enforcement levels can be found in
[the specification][rfc-6265bis-03-4.1.2.7]. [the specification][rfc-6265bis-09-5.4.7].
**note** This is an attribute that has not yet been fully standardized, and may change in the future. **note** This is an attribute that has not yet been fully standardized, and may change in the future.
This also means many clients may ignore this attribute until they understand it. This also means many clients may ignore this attribute until they understand it.
@@ -194,40 +212,71 @@ $ npm test
``` ```
$ npm run bench $ npm run bench
> cookie@0.3.1 bench cookie > cookie@0.4.2 bench
> node benchmark/index.js > node benchmark/index.js
http_parser@2.8.0 node@16.14.0
node@6.14.2 v8@9.4.146.24-node.20
v8@5.1.281.111 uv@1.43.0
uv@1.16.1
zlib@1.2.11 zlib@1.2.11
ares@1.10.1-DEV brotli@1.0.9
icu@58.2 ares@1.18.1
modules@48 modules@93
napi@3 nghttp2@1.45.1
openssl@1.0.2o napi@8
llhttp@6.0.4
openssl@1.1.1m+quic
cldr@40.0
icu@70.1
tz@2021a3
unicode@14.0
ngtcp2@0.1.0-DEV
nghttp3@0.1.0-DEV
> node benchmark/parse-top.js
cookie.parse - top sites
15 tests completed.
parse accounts.google.com x 2,421,245 ops/sec ±0.80% (188 runs sampled)
parse apple.com x 2,684,710 ops/sec ±0.59% (189 runs sampled)
parse cloudflare.com x 2,231,418 ops/sec ±0.76% (186 runs sampled)
parse docs.google.com x 2,316,357 ops/sec ±1.28% (187 runs sampled)
parse drive.google.com x 2,363,543 ops/sec ±0.49% (189 runs sampled)
parse en.wikipedia.org x 839,414 ops/sec ±0.53% (189 runs sampled)
parse linkedin.com x 553,797 ops/sec ±0.63% (190 runs sampled)
parse maps.google.com x 1,314,779 ops/sec ±0.72% (189 runs sampled)
parse microsoft.com x 153,783 ops/sec ±0.53% (190 runs sampled)
parse play.google.com x 2,249,574 ops/sec ±0.59% (187 runs sampled)
parse plus.google.com x 2,258,682 ops/sec ±0.60% (188 runs sampled)
parse sites.google.com x 2,247,069 ops/sec ±0.68% (189 runs sampled)
parse support.google.com x 1,456,840 ops/sec ±0.70% (187 runs sampled)
parse www.google.com x 1,046,028 ops/sec ±0.58% (188 runs sampled)
parse youtu.be x 937,428 ops/sec ±1.47% (190 runs sampled)
parse youtube.com x 963,878 ops/sec ±0.59% (190 runs sampled)
> node benchmark/parse.js > node benchmark/parse.js
cookie.parse cookie.parse - generic
6 tests completed. 6 tests completed.
simple x 1,200,691 ops/sec ±1.12% (189 runs sampled) simple x 2,745,604 ops/sec ±0.77% (185 runs sampled)
decode x 1,012,994 ops/sec ±0.97% (186 runs sampled) decode x 557,287 ops/sec ±0.60% (188 runs sampled)
unquote x 1,074,174 ops/sec ±2.43% (186 runs sampled) unquote x 2,498,475 ops/sec ±0.55% (189 runs sampled)
duplicates x 438,424 ops/sec ±2.17% (184 runs sampled) duplicates x 868,591 ops/sec ±0.89% (187 runs sampled)
10 cookies x 147,154 ops/sec ±1.01% (186 runs sampled) 10 cookies x 306,745 ops/sec ±0.49% (190 runs sampled)
100 cookies x 14,274 ops/sec ±1.07% (187 runs sampled) 100 cookies x 22,414 ops/sec ±2.38% (182 runs sampled)
``` ```
## References ## References
- [RFC 6265: HTTP State Management Mechanism][rfc-6265] - [RFC 6265: HTTP State Management Mechanism][rfc-6265]
- [Same-site Cookies][rfc-6265bis-03-4.1.2.7] - [Same-site Cookies][rfc-6265bis-09-5.4.7]
[rfc-6265bis-03-4.1.2.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7 [rfc-west-cookie-priority-00-4.1]: https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1
[rfc-6265bis-09-5.4.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7
[rfc-6265]: https://tools.ietf.org/html/rfc6265 [rfc-6265]: https://tools.ietf.org/html/rfc6265
[rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4 [rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4
[rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1 [rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1
@@ -244,10 +293,10 @@ $ npm run bench
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master [coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master
[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master [coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/cookie/ci/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml
[node-version-image]: https://badgen.net/npm/node/cookie [node-version-image]: https://badgen.net/npm/node/cookie
[node-version-url]: https://nodejs.org/en/download [node-version-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/cookie [npm-downloads-image]: https://badgen.net/npm/dm/cookie
[npm-url]: https://npmjs.org/package/cookie [npm-url]: https://npmjs.org/package/cookie
[npm-version-image]: https://badgen.net/npm/v/cookie [npm-version-image]: https://badgen.net/npm/v/cookie
[travis-image]: https://badgen.net/travis/jshttp/cookie/master
[travis-url]: https://travis-ci.org/jshttp/cookie

Some files were not shown because too many files have changed in this diff Show More