@socketsecurity/cli-with-sentry 0.14.140 → 0.14.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +26 -26
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/instrument-with-sentry.js +3 -3
- package/dist/instrument-with-sentry.js.map +1 -1
- package/dist/shadow-bin.js +4 -4
- package/dist/shadow-bin.js.map +1 -1
- package/dist/shadow-npm-inject.js +13 -13
- package/dist/shadow-npm-inject.js.map +1 -1
- package/dist/shadow-npm-paths.js +6 -6
- package/dist/shadow-npm-paths.js.map +1 -1
- package/dist/vendor.js +1051 -946
- package/dist/vendor.js.map +1 -1
- package/package.json +7 -7
- package/dist/blessed-contrib/node_modules/ansi-regex/index.js +0 -4
- package/dist/blessed-contrib/node_modules/ansi-regex/license +0 -21
- package/dist/blessed-contrib/node_modules/ansi-regex/package.json +0 -64
- package/dist/blessed-contrib/node_modules/ansi-regex/readme.md +0 -39
- package/dist/blessed-contrib/node_modules/ansi-styles/index.js +0 -65
- package/dist/blessed-contrib/node_modules/ansi-styles/license +0 -21
- package/dist/blessed-contrib/node_modules/ansi-styles/package.json +0 -50
- package/dist/blessed-contrib/node_modules/ansi-styles/readme.md +0 -86
- package/dist/blessed-contrib/node_modules/chalk/index.js +0 -116
- package/dist/blessed-contrib/node_modules/chalk/license +0 -21
- package/dist/blessed-contrib/node_modules/chalk/package.json +0 -70
- package/dist/blessed-contrib/node_modules/chalk/readme.md +0 -213
- package/dist/blessed-contrib/node_modules/escape-string-regexp/index.js +0 -11
- package/dist/blessed-contrib/node_modules/escape-string-regexp/license +0 -21
- package/dist/blessed-contrib/node_modules/escape-string-regexp/package.json +0 -41
- package/dist/blessed-contrib/node_modules/escape-string-regexp/readme.md +0 -27
- package/dist/blessed-contrib/node_modules/strip-ansi/index.js +0 -6
- package/dist/blessed-contrib/node_modules/strip-ansi/license +0 -21
- package/dist/blessed-contrib/node_modules/strip-ansi/package.json +0 -57
- package/dist/blessed-contrib/node_modules/strip-ansi/readme.md +0 -33
- package/dist/blessed-contrib/node_modules/supports-color/index.js +0 -50
- package/dist/blessed-contrib/node_modules/supports-color/license +0 -21
- package/dist/blessed-contrib/node_modules/supports-color/package.json +0 -49
- package/dist/blessed-contrib/node_modules/supports-color/readme.md +0 -36
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
<h1 align="center">
|
|
2
|
-
<br>
|
|
3
|
-
<br>
|
|
4
|
-
<img width="360" src="https://cdn.rawgit.com/chalk/chalk/19935d6484811c5e468817f846b7b3d417d7bf4a/logo.svg" alt="chalk">
|
|
5
|
-
<br>
|
|
6
|
-
<br>
|
|
7
|
-
<br>
|
|
8
|
-
</h1>
|
|
9
|
-
|
|
10
|
-
> Terminal string styling done right
|
|
11
|
-
|
|
12
|
-
[](https://travis-ci.org/chalk/chalk)
|
|
13
|
-
[](https://coveralls.io/r/chalk/chalk?branch=master)
|
|
14
|
-
[](https://www.youtube.com/watch?v=9auOCbH5Ns4)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
[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). Although there are other ones, they either do too much or not enough.
|
|
18
|
-
|
|
19
|
-
**Chalk is a clean and focused alternative.**
|
|
20
|
-
|
|
21
|
-

|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## Why
|
|
25
|
-
|
|
26
|
-
- Highly performant
|
|
27
|
-
- Doesn't extend `String.prototype`
|
|
28
|
-
- Expressive API
|
|
29
|
-
- Ability to nest styles
|
|
30
|
-
- Clean and focused
|
|
31
|
-
- Auto-detects color support
|
|
32
|
-
- Actively maintained
|
|
33
|
-
- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## Install
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
$ npm install --save chalk
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## Usage
|
|
44
|
-
|
|
45
|
-
Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
|
|
46
|
-
|
|
47
|
-
```js
|
|
48
|
-
var chalk = require('chalk');
|
|
49
|
-
|
|
50
|
-
// style a string
|
|
51
|
-
chalk.blue('Hello world!');
|
|
52
|
-
|
|
53
|
-
// combine styled and normal strings
|
|
54
|
-
chalk.blue('Hello') + 'World' + chalk.red('!');
|
|
55
|
-
|
|
56
|
-
// compose multiple styles using the chainable API
|
|
57
|
-
chalk.blue.bgRed.bold('Hello world!');
|
|
58
|
-
|
|
59
|
-
// pass in multiple arguments
|
|
60
|
-
chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz');
|
|
61
|
-
|
|
62
|
-
// nest styles
|
|
63
|
-
chalk.red('Hello', chalk.underline.bgBlue('world') + '!');
|
|
64
|
-
|
|
65
|
-
// nest styles of the same type even (color, underline, background)
|
|
66
|
-
chalk.green(
|
|
67
|
-
'I am a green line ' +
|
|
68
|
-
chalk.blue.underline.bold('with a blue substring') +
|
|
69
|
-
' that becomes green again!'
|
|
70
|
-
);
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Easily define your own themes.
|
|
74
|
-
|
|
75
|
-
```js
|
|
76
|
-
var chalk = require('chalk');
|
|
77
|
-
var error = chalk.bold.red;
|
|
78
|
-
console.log(error('Error!'));
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data).
|
|
82
|
-
|
|
83
|
-
```js
|
|
84
|
-
var name = 'Sindre';
|
|
85
|
-
console.log(chalk.green('Hello %s'), name);
|
|
86
|
-
//=> Hello Sindre
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
## API
|
|
91
|
-
|
|
92
|
-
### chalk.`<style>[.<style>...](string, [string...])`
|
|
93
|
-
|
|
94
|
-
Example: `chalk.red.bold.underline('Hello', 'world');`
|
|
95
|
-
|
|
96
|
-
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `Chalk.red.yellow.green` is equivalent to `Chalk.green`.
|
|
97
|
-
|
|
98
|
-
Multiple arguments will be separated by space.
|
|
99
|
-
|
|
100
|
-
### chalk.enabled
|
|
101
|
-
|
|
102
|
-
Color support is automatically detected, but you can override it by setting the `enabled` property. You should however only do this in your own code as it applies globally to all chalk consumers.
|
|
103
|
-
|
|
104
|
-
If you need to change this in a reusable module create a new instance:
|
|
105
|
-
|
|
106
|
-
```js
|
|
107
|
-
var ctx = new chalk.constructor({enabled: false});
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### chalk.supportsColor
|
|
111
|
-
|
|
112
|
-
Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
|
|
113
|
-
|
|
114
|
-
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
|
115
|
-
|
|
116
|
-
### chalk.styles
|
|
117
|
-
|
|
118
|
-
Exposes the styles as [ANSI escape codes](https://github.com/chalk/ansi-styles).
|
|
119
|
-
|
|
120
|
-
Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own.
|
|
121
|
-
|
|
122
|
-
```js
|
|
123
|
-
var chalk = require('chalk');
|
|
124
|
-
|
|
125
|
-
console.log(chalk.styles.red);
|
|
126
|
-
//=> {open: '\u001b[31m', close: '\u001b[39m'}
|
|
127
|
-
|
|
128
|
-
console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### chalk.hasColor(string)
|
|
132
|
-
|
|
133
|
-
Check whether a string [has color](https://github.com/chalk/has-ansi).
|
|
134
|
-
|
|
135
|
-
### chalk.stripColor(string)
|
|
136
|
-
|
|
137
|
-
[Strip color](https://github.com/chalk/strip-ansi) from a string.
|
|
138
|
-
|
|
139
|
-
Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.
|
|
140
|
-
|
|
141
|
-
Example:
|
|
142
|
-
|
|
143
|
-
```js
|
|
144
|
-
var chalk = require('chalk');
|
|
145
|
-
var styledString = getText();
|
|
146
|
-
|
|
147
|
-
if (!chalk.supportsColor) {
|
|
148
|
-
styledString = chalk.stripColor(styledString);
|
|
149
|
-
}
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## Styles
|
|
154
|
-
|
|
155
|
-
### Modifiers
|
|
156
|
-
|
|
157
|
-
- `reset`
|
|
158
|
-
- `bold`
|
|
159
|
-
- `dim`
|
|
160
|
-
- `italic` *(not widely supported)*
|
|
161
|
-
- `underline`
|
|
162
|
-
- `inverse`
|
|
163
|
-
- `hidden`
|
|
164
|
-
- `strikethrough` *(not widely supported)*
|
|
165
|
-
|
|
166
|
-
### Colors
|
|
167
|
-
|
|
168
|
-
- `black`
|
|
169
|
-
- `red`
|
|
170
|
-
- `green`
|
|
171
|
-
- `yellow`
|
|
172
|
-
- `blue` *(on Windows the bright version is used as normal blue is illegible)*
|
|
173
|
-
- `magenta`
|
|
174
|
-
- `cyan`
|
|
175
|
-
- `white`
|
|
176
|
-
- `gray`
|
|
177
|
-
|
|
178
|
-
### Background colors
|
|
179
|
-
|
|
180
|
-
- `bgBlack`
|
|
181
|
-
- `bgRed`
|
|
182
|
-
- `bgGreen`
|
|
183
|
-
- `bgYellow`
|
|
184
|
-
- `bgBlue`
|
|
185
|
-
- `bgMagenta`
|
|
186
|
-
- `bgCyan`
|
|
187
|
-
- `bgWhite`
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
## 256-colors
|
|
191
|
-
|
|
192
|
-
Chalk does not support anything other than the base eight colors, which guarantees it will work on all terminals and systems. Some terminals, specifically `xterm` compliant ones, will support the full range of 8-bit colors. For this the lower level [ansi-256-colors](https://github.com/jbnicolai/ansi-256-colors) package can be used.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
## Windows
|
|
196
|
-
|
|
197
|
-
If you're on Windows, do yourself a favor and use [`cmder`](http://bliker.github.io/cmder/) instead of `cmd.exe`.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
## Related
|
|
201
|
-
|
|
202
|
-
- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
|
|
203
|
-
- [ansi-styles](https://github.com/chalk/ansi-styles/) - ANSI escape codes for styling strings in the terminal
|
|
204
|
-
- [supports-color](https://github.com/chalk/supports-color/) - Detect whether a terminal supports color
|
|
205
|
-
- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
|
|
206
|
-
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
|
|
207
|
-
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
|
|
208
|
-
- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
## License
|
|
212
|
-
|
|
213
|
-
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "escape-string-regexp",
|
|
3
|
-
"version": "1.0.5",
|
|
4
|
-
"description": "Escape RegExp special characters",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/escape-string-regexp",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Sindre Sorhus",
|
|
9
|
-
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
-
},
|
|
12
|
-
"maintainers": [
|
|
13
|
-
"Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
|
|
14
|
-
"Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)"
|
|
15
|
-
],
|
|
16
|
-
"engines": {
|
|
17
|
-
"node": ">=0.8.0"
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"test": "xo && ava"
|
|
21
|
-
},
|
|
22
|
-
"files": [
|
|
23
|
-
"index.js"
|
|
24
|
-
],
|
|
25
|
-
"keywords": [
|
|
26
|
-
"escape",
|
|
27
|
-
"regex",
|
|
28
|
-
"regexp",
|
|
29
|
-
"re",
|
|
30
|
-
"regular",
|
|
31
|
-
"expression",
|
|
32
|
-
"string",
|
|
33
|
-
"str",
|
|
34
|
-
"special",
|
|
35
|
-
"characters"
|
|
36
|
-
],
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"ava": "*",
|
|
39
|
-
"xo": "*"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# escape-string-regexp [](https://travis-ci.org/sindresorhus/escape-string-regexp)
|
|
2
|
-
|
|
3
|
-
> Escape RegExp special characters
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
$ npm install --save escape-string-regexp
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
const escapeStringRegexp = require('escape-string-regexp');
|
|
17
|
-
|
|
18
|
-
const escapedString = escapeStringRegexp('how much $ for a unicorn?');
|
|
19
|
-
//=> 'how much \$ for a unicorn\?'
|
|
20
|
-
|
|
21
|
-
new RegExp(escapedString);
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## License
|
|
26
|
-
|
|
27
|
-
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "strip-ansi",
|
|
3
|
-
"version": "3.0.1",
|
|
4
|
-
"description": "Strip ANSI escape codes",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "chalk/strip-ansi",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Sindre Sorhus",
|
|
9
|
-
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
-
},
|
|
12
|
-
"maintainers": [
|
|
13
|
-
"Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
|
|
14
|
-
"Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)",
|
|
15
|
-
"JD Ballard <i.am.qix@gmail.com> (github.com/qix-)"
|
|
16
|
-
],
|
|
17
|
-
"engines": {
|
|
18
|
-
"node": ">=0.10.0"
|
|
19
|
-
},
|
|
20
|
-
"scripts": {
|
|
21
|
-
"test": "xo && ava"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"index.js"
|
|
25
|
-
],
|
|
26
|
-
"keywords": [
|
|
27
|
-
"strip",
|
|
28
|
-
"trim",
|
|
29
|
-
"remove",
|
|
30
|
-
"ansi",
|
|
31
|
-
"styles",
|
|
32
|
-
"color",
|
|
33
|
-
"colour",
|
|
34
|
-
"colors",
|
|
35
|
-
"terminal",
|
|
36
|
-
"console",
|
|
37
|
-
"string",
|
|
38
|
-
"tty",
|
|
39
|
-
"escape",
|
|
40
|
-
"formatting",
|
|
41
|
-
"rgb",
|
|
42
|
-
"256",
|
|
43
|
-
"shell",
|
|
44
|
-
"xterm",
|
|
45
|
-
"log",
|
|
46
|
-
"logging",
|
|
47
|
-
"command-line",
|
|
48
|
-
"text"
|
|
49
|
-
],
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"ansi-regex": "^2.0.0"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"ava": "*",
|
|
55
|
-
"xo": "*"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# strip-ansi [](https://travis-ci.org/chalk/strip-ansi)
|
|
2
|
-
|
|
3
|
-
> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
$ npm install --save strip-ansi
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
var stripAnsi = require('strip-ansi');
|
|
17
|
-
|
|
18
|
-
stripAnsi('\u001b[4mcake\u001b[0m');
|
|
19
|
-
//=> 'cake'
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Related
|
|
24
|
-
|
|
25
|
-
- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
|
|
26
|
-
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
|
|
27
|
-
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
|
|
28
|
-
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## License
|
|
32
|
-
|
|
33
|
-
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var argv = process.argv;
|
|
3
|
-
|
|
4
|
-
var terminator = argv.indexOf('--');
|
|
5
|
-
var hasFlag = function (flag) {
|
|
6
|
-
flag = '--' + flag;
|
|
7
|
-
var pos = argv.indexOf(flag);
|
|
8
|
-
return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
module.exports = (function () {
|
|
12
|
-
if ('FORCE_COLOR' in process.env) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (hasFlag('no-color') ||
|
|
17
|
-
hasFlag('no-colors') ||
|
|
18
|
-
hasFlag('color=false')) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (hasFlag('color') ||
|
|
23
|
-
hasFlag('colors') ||
|
|
24
|
-
hasFlag('color=true') ||
|
|
25
|
-
hasFlag('color=always')) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (process.stdout && !process.stdout.isTTY) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (process.platform === 'win32') {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if ('COLORTERM' in process.env) {
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (process.env.TERM === 'dumb') {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return false;
|
|
50
|
-
})();
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "supports-color",
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"description": "Detect whether a terminal supports color",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "chalk/supports-color",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Sindre Sorhus",
|
|
9
|
-
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
-
},
|
|
12
|
-
"maintainers": [
|
|
13
|
-
"Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
|
|
14
|
-
"Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)"
|
|
15
|
-
],
|
|
16
|
-
"engines": {
|
|
17
|
-
"node": ">=0.8.0"
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"test": "mocha"
|
|
21
|
-
},
|
|
22
|
-
"files": [
|
|
23
|
-
"index.js"
|
|
24
|
-
],
|
|
25
|
-
"keywords": [
|
|
26
|
-
"color",
|
|
27
|
-
"colour",
|
|
28
|
-
"colors",
|
|
29
|
-
"terminal",
|
|
30
|
-
"console",
|
|
31
|
-
"cli",
|
|
32
|
-
"ansi",
|
|
33
|
-
"styles",
|
|
34
|
-
"tty",
|
|
35
|
-
"rgb",
|
|
36
|
-
"256",
|
|
37
|
-
"shell",
|
|
38
|
-
"xterm",
|
|
39
|
-
"command-line",
|
|
40
|
-
"support",
|
|
41
|
-
"supports",
|
|
42
|
-
"capability",
|
|
43
|
-
"detect"
|
|
44
|
-
],
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"mocha": "*",
|
|
47
|
-
"require-uncached": "^1.0.2"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# supports-color [](https://travis-ci.org/chalk/supports-color)
|
|
2
|
-
|
|
3
|
-
> Detect whether a terminal supports color
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
$ npm install --save supports-color
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
var supportsColor = require('supports-color');
|
|
17
|
-
|
|
18
|
-
if (supportsColor) {
|
|
19
|
-
console.log('Terminal supports color');
|
|
20
|
-
}
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
It obeys the `--color` and `--no-color` CLI flags.
|
|
24
|
-
|
|
25
|
-
For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Related
|
|
29
|
-
|
|
30
|
-
- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
|
|
31
|
-
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## License
|
|
35
|
-
|
|
36
|
-
MIT © [Sindre Sorhus](http://sindresorhus.com)
|