@contrast/agent 4.32.10 → 4.32.12

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.
Files changed (228) hide show
  1. package/bin/VERSION +1 -1
  2. package/bin/contrast-service-darwin-arm64 +0 -0
  3. package/bin/contrast-service-darwin-x64 +0 -0
  4. package/bin/contrast-service-linux-arm64 +0 -0
  5. package/bin/contrast-service-linux-x64 +0 -0
  6. package/bin/contrast-service-win32-x64.exe +0 -0
  7. package/node_modules/file-stream-rotator/FileStreamRotator.js +200 -41
  8. package/node_modules/file-stream-rotator/LICENSE.txt +17 -0
  9. package/node_modules/file-stream-rotator/README.md +16 -1
  10. package/node_modules/file-stream-rotator/package.json +5 -5
  11. package/node_modules/file-stream-rotator/tests/every-minute-test.js +32 -15
  12. package/node_modules/file-stream-rotator/tests/every-second-test.js +16 -7
  13. package/node_modules/file-stream-rotator/tests/large-test.js +33 -0
  14. package/node_modules/file-stream-rotator/tests/rotate-on-size-without-date.js +103 -0
  15. package/node_modules/object-hash/dist/object_hash.js +1 -2
  16. package/node_modules/object-hash/index.js +33 -21
  17. package/node_modules/object-hash/package.json +20 -18
  18. package/node_modules/object-hash/readme.markdown +20 -5
  19. package/node_modules/winston-daily-rotate-file/README.md +81 -12
  20. package/node_modules/winston-daily-rotate-file/daily-rotate-file.js +69 -30
  21. package/node_modules/winston-daily-rotate-file/index.d.ts +119 -72
  22. package/node_modules/winston-daily-rotate-file/package.json +20 -19
  23. package/node_modules/winston-transport/.eslintrc +1 -1
  24. package/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
  25. package/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
  26. package/node_modules/winston-transport/.nyc_output/processinfo/index.json +1 -1
  27. package/node_modules/winston-transport/CHANGELOG.md +11 -0
  28. package/node_modules/winston-transport/dist/index.js +2 -2
  29. package/node_modules/winston-transport/index.d.ts +2 -0
  30. package/node_modules/winston-transport/index.js +2 -2
  31. package/node_modules/winston-transport/node_modules/readable-stream/README.md +106 -0
  32. package/node_modules/winston-transport/node_modules/readable-stream/errors-browser.js +127 -0
  33. package/node_modules/winston-transport/node_modules/readable-stream/errors.js +116 -0
  34. package/node_modules/winston-transport/node_modules/readable-stream/experimentalWarning.js +17 -0
  35. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_duplex.js +41 -46
  36. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_passthrough.js +1 -11
  37. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_readable.js +271 -263
  38. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_transform.js +18 -42
  39. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_writable.js +101 -147
  40. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
  41. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
  42. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
  43. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
  44. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
  45. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
  46. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
  47. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
  48. package/node_modules/winston-transport/node_modules/readable-stream/package.json +72 -0
  49. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/readable-browser.js +2 -0
  50. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/readable.js +5 -8
  51. package/node_modules/winston-transport/package.json +16 -14
  52. package/package.json +6 -6
  53. package/node_modules/colors/LICENSE +0 -25
  54. package/node_modules/colors/README.md +0 -221
  55. package/node_modules/colors/examples/normal-usage.js +0 -82
  56. package/node_modules/colors/examples/safe-string.js +0 -79
  57. package/node_modules/colors/index.d.ts +0 -136
  58. package/node_modules/colors/lib/colors.js +0 -211
  59. package/node_modules/colors/lib/custom/trap.js +0 -46
  60. package/node_modules/colors/lib/custom/zalgo.js +0 -110
  61. package/node_modules/colors/lib/extendStringPrototype.js +0 -110
  62. package/node_modules/colors/lib/index.js +0 -13
  63. package/node_modules/colors/lib/maps/america.js +0 -10
  64. package/node_modules/colors/lib/maps/rainbow.js +0 -12
  65. package/node_modules/colors/lib/maps/random.js +0 -11
  66. package/node_modules/colors/lib/maps/zebra.js +0 -5
  67. package/node_modules/colors/lib/styles.js +0 -95
  68. package/node_modules/colors/lib/system/has-flag.js +0 -35
  69. package/node_modules/colors/lib/system/supports-colors.js +0 -151
  70. package/node_modules/colors/package.json +0 -49
  71. package/node_modules/colors/safe.d.ts +0 -48
  72. package/node_modules/colors/safe.js +0 -10
  73. package/node_modules/colors/themes/generic-logging.js +0 -12
  74. package/node_modules/core-util-is/LICENSE +0 -19
  75. package/node_modules/core-util-is/README.md +0 -3
  76. package/node_modules/core-util-is/float.patch +0 -604
  77. package/node_modules/core-util-is/lib/util.js +0 -107
  78. package/node_modules/core-util-is/package.json +0 -36
  79. package/node_modules/core-util-is/test.js +0 -68
  80. package/node_modules/cycle/README.md +0 -49
  81. package/node_modules/cycle/cycle.js +0 -170
  82. package/node_modules/cycle/package.json +0 -16
  83. package/node_modules/fast-safe-stringify/.travis.yml +0 -8
  84. package/node_modules/fast-safe-stringify/CHANGELOG.md +0 -17
  85. package/node_modules/fast-safe-stringify/LICENSE +0 -23
  86. package/node_modules/fast-safe-stringify/benchmark.js +0 -137
  87. package/node_modules/fast-safe-stringify/index.d.ts +0 -8
  88. package/node_modules/fast-safe-stringify/index.js +0 -161
  89. package/node_modules/fast-safe-stringify/package.json +0 -50
  90. package/node_modules/fast-safe-stringify/readme.md +0 -154
  91. package/node_modules/fast-safe-stringify/test-stable.js +0 -311
  92. package/node_modules/fast-safe-stringify/test.js +0 -304
  93. package/node_modules/isarray/.npmignore +0 -1
  94. package/node_modules/isarray/.travis.yml +0 -4
  95. package/node_modules/isarray/Makefile +0 -6
  96. package/node_modules/isarray/README.md +0 -60
  97. package/node_modules/isarray/component.json +0 -19
  98. package/node_modules/isarray/index.js +0 -5
  99. package/node_modules/isarray/package.json +0 -49
  100. package/node_modules/isarray/test.js +0 -20
  101. package/node_modules/object-hash/.jshintrc +0 -19
  102. package/node_modules/object-hash/.travis.yml +0 -35
  103. package/node_modules/object-hash/bower.json +0 -15
  104. package/node_modules/object-hash/dist/object_hash.js.map +0 -1
  105. package/node_modules/object-hash/dist/object_hash_test.js +0 -4737
  106. package/node_modules/object-hash/gulpfile.js +0 -97
  107. package/node_modules/object-hash/karma.conf.js +0 -69
  108. package/node_modules/object-hash/test/blob.js +0 -41
  109. package/node_modules/object-hash/test/index.js +0 -290
  110. package/node_modules/object-hash/test/object-classes.js +0 -106
  111. package/node_modules/object-hash/test/old-crypto.js +0 -60
  112. package/node_modules/object-hash/test/replacer.js +0 -36
  113. package/node_modules/object-hash/test/types.js +0 -174
  114. package/node_modules/object-hash/test/writeToStream.js +0 -27
  115. package/node_modules/process-nextick-args/index.js +0 -45
  116. package/node_modules/process-nextick-args/license.md +0 -19
  117. package/node_modules/process-nextick-args/package.json +0 -29
  118. package/node_modules/process-nextick-args/readme.md +0 -18
  119. package/node_modules/readable-stream/.travis.yml +0 -34
  120. package/node_modules/readable-stream/README.md +0 -58
  121. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
  122. package/node_modules/readable-stream/duplex-browser.js +0 -1
  123. package/node_modules/readable-stream/duplex.js +0 -1
  124. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
  125. package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -74
  126. package/node_modules/readable-stream/package.json +0 -56
  127. package/node_modules/readable-stream/passthrough.js +0 -1
  128. package/node_modules/readable-stream/transform.js +0 -1
  129. package/node_modules/readable-stream/writable-browser.js +0 -1
  130. package/node_modules/readable-stream/writable.js +0 -8
  131. package/node_modules/winston-compat/.gitattributes +0 -1
  132. package/node_modules/winston-compat/.node-version +0 -1
  133. package/node_modules/winston-compat/CHANGELOG.md +0 -17
  134. package/node_modules/winston-compat/LICENSE +0 -22
  135. package/node_modules/winston-compat/README.md +0 -2
  136. package/node_modules/winston-compat/index.js +0 -295
  137. package/node_modules/winston-compat/lib/transport.js +0 -135
  138. package/node_modules/winston-compat/node_modules/fecha/CHANGELOG.md +0 -11
  139. package/node_modules/winston-compat/node_modules/fecha/LICENSE +0 -22
  140. package/node_modules/winston-compat/node_modules/fecha/README.md +0 -259
  141. package/node_modules/winston-compat/node_modules/fecha/fecha.d.ts +0 -47
  142. package/node_modules/winston-compat/node_modules/fecha/fecha.js +0 -334
  143. package/node_modules/winston-compat/node_modules/fecha/fecha.min.js +0 -1
  144. package/node_modules/winston-compat/node_modules/fecha/package.json +0 -44
  145. package/node_modules/winston-compat/node_modules/logform/.babelrc +0 -3
  146. package/node_modules/winston-compat/node_modules/logform/.eslintrc +0 -7
  147. package/node_modules/winston-compat/node_modules/logform/.gitattributes +0 -1
  148. package/node_modules/winston-compat/node_modules/logform/.travis.yml +0 -17
  149. package/node_modules/winston-compat/node_modules/logform/CHANGELOG.md +0 -103
  150. package/node_modules/winston-compat/node_modules/logform/LICENSE +0 -21
  151. package/node_modules/winston-compat/node_modules/logform/README.md +0 -170
  152. package/node_modules/winston-compat/node_modules/logform/align.js +0 -14
  153. package/node_modules/winston-compat/node_modules/logform/browser.js +0 -36
  154. package/node_modules/winston-compat/node_modules/logform/cli.js +0 -52
  155. package/node_modules/winston-compat/node_modules/logform/colorize.js +0 -118
  156. package/node_modules/winston-compat/node_modules/logform/combine.js +0 -66
  157. package/node_modules/winston-compat/node_modules/logform/dist/align.js +0 -14
  158. package/node_modules/winston-compat/node_modules/logform/dist/browser.js +0 -37
  159. package/node_modules/winston-compat/node_modules/logform/dist/cli.js +0 -75
  160. package/node_modules/winston-compat/node_modules/logform/dist/colorize.js +0 -147
  161. package/node_modules/winston-compat/node_modules/logform/dist/combine.js +0 -66
  162. package/node_modules/winston-compat/node_modules/logform/dist/format.js +0 -69
  163. package/node_modules/winston-compat/node_modules/logform/dist/index.js +0 -54
  164. package/node_modules/winston-compat/node_modules/logform/dist/json.js +0 -27
  165. package/node_modules/winston-compat/node_modules/logform/dist/label.js +0 -19
  166. package/node_modules/winston-compat/node_modules/logform/dist/levels.js +0 -15
  167. package/node_modules/winston-compat/node_modules/logform/dist/logstash.js +0 -32
  168. package/node_modules/winston-compat/node_modules/logform/dist/metadata.js +0 -63
  169. package/node_modules/winston-compat/node_modules/logform/dist/ms.js +0 -18
  170. package/node_modules/winston-compat/node_modules/logform/dist/pad-levels.js +0 -118
  171. package/node_modules/winston-compat/node_modules/logform/dist/pretty-print.js +0 -20
  172. package/node_modules/winston-compat/node_modules/logform/dist/printf.js +0 -40
  173. package/node_modules/winston-compat/node_modules/logform/dist/simple.js +0 -36
  174. package/node_modules/winston-compat/node_modules/logform/dist/splat.js +0 -147
  175. package/node_modules/winston-compat/node_modules/logform/dist/timestamp.js +0 -28
  176. package/node_modules/winston-compat/node_modules/logform/dist/uncolorize.js +0 -31
  177. package/node_modules/winston-compat/node_modules/logform/examples/combine.js +0 -14
  178. package/node_modules/winston-compat/node_modules/logform/examples/filter.js +0 -30
  179. package/node_modules/winston-compat/node_modules/logform/examples/invalid.js +0 -6
  180. package/node_modules/winston-compat/node_modules/logform/examples/metadata.js +0 -78
  181. package/node_modules/winston-compat/node_modules/logform/examples/padLevels.js +0 -39
  182. package/node_modules/winston-compat/node_modules/logform/examples/volume.js +0 -25
  183. package/node_modules/winston-compat/node_modules/logform/format.js +0 -52
  184. package/node_modules/winston-compat/node_modules/logform/index.d.ts +0 -53
  185. package/node_modules/winston-compat/node_modules/logform/index.js +0 -52
  186. package/node_modules/winston-compat/node_modules/logform/json.js +0 -26
  187. package/node_modules/winston-compat/node_modules/logform/label.js +0 -19
  188. package/node_modules/winston-compat/node_modules/logform/levels.js +0 -12
  189. package/node_modules/winston-compat/node_modules/logform/logstash.js +0 -29
  190. package/node_modules/winston-compat/node_modules/logform/metadata.js +0 -61
  191. package/node_modules/winston-compat/node_modules/logform/ms.js +0 -18
  192. package/node_modules/winston-compat/node_modules/logform/package.json +0 -51
  193. package/node_modules/winston-compat/node_modules/logform/pad-levels.js +0 -83
  194. package/node_modules/winston-compat/node_modules/logform/pretty-print.js +0 -16
  195. package/node_modules/winston-compat/node_modules/logform/printf.js +0 -26
  196. package/node_modules/winston-compat/node_modules/logform/simple.js +0 -33
  197. package/node_modules/winston-compat/node_modules/logform/splat.js +0 -125
  198. package/node_modules/winston-compat/node_modules/logform/timestamp.js +0 -30
  199. package/node_modules/winston-compat/node_modules/logform/tsconfig.json +0 -22
  200. package/node_modules/winston-compat/node_modules/logform/uncolorize.js +0 -27
  201. package/node_modules/winston-compat/package.json +0 -46
  202. package/node_modules/winston-compat/test/clone.test.js +0 -25
  203. package/node_modules/winston-compat/test/helpers.js +0 -256
  204. package/node_modules/winston-compat/test/timestamp.test.js +0 -14
  205. package/node_modules/winston-compat/test/transports/transport.js +0 -205
  206. package/node_modules/winston-compat/test/winston-compat.test.js +0 -18
  207. package/node_modules/winston-daily-rotate-file/.eslintrc.js +0 -11
  208. package/node_modules/winston-daily-rotate-file/.node-version +0 -1
  209. package/node_modules/winston-daily-rotate-file/.travis.yml +0 -15
  210. package/node_modules/winston-daily-rotate-file/node_modules/semver/CHANGELOG.md +0 -70
  211. package/node_modules/winston-daily-rotate-file/node_modules/semver/LICENSE +0 -15
  212. package/node_modules/winston-daily-rotate-file/node_modules/semver/README.md +0 -443
  213. package/node_modules/winston-daily-rotate-file/node_modules/semver/bin/semver.js +0 -174
  214. package/node_modules/winston-daily-rotate-file/node_modules/semver/package.json +0 -32
  215. package/node_modules/winston-daily-rotate-file/node_modules/semver/range.bnf +0 -16
  216. package/node_modules/winston-daily-rotate-file/node_modules/semver/semver.js +0 -1596
  217. package/node_modules/winston-daily-rotate-file/test/memory-stream.js +0 -38
  218. package/node_modules/winston-daily-rotate-file/test/random-string.js +0 -31
  219. package/node_modules/winston-daily-rotate-file/test/transport-tests.js +0 -250
  220. package/node_modules/winston-transport/.nyc_output/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
  221. package/node_modules/winston-transport/.nyc_output/processinfo/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
  222. package/node_modules/winston-transport/.travis.yml +0 -17
  223. package/node_modules/winston-transport/tsconfig.json +0 -22
  224. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/CONTRIBUTING.md +0 -0
  225. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/GOVERNANCE.md +0 -0
  226. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/LICENSE +0 -0
  227. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/internal/streams/stream-browser.js +0 -0
  228. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/internal/streams/stream.js +0 -0
@@ -1,95 +0,0 @@
1
- /*
2
- The MIT License (MIT)
3
-
4
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- THE SOFTWARE.
23
-
24
- */
25
-
26
- var styles = {};
27
- module['exports'] = styles;
28
-
29
- var codes = {
30
- reset: [0, 0],
31
-
32
- bold: [1, 22],
33
- dim: [2, 22],
34
- italic: [3, 23],
35
- underline: [4, 24],
36
- inverse: [7, 27],
37
- hidden: [8, 28],
38
- strikethrough: [9, 29],
39
-
40
- black: [30, 39],
41
- red: [31, 39],
42
- green: [32, 39],
43
- yellow: [33, 39],
44
- blue: [34, 39],
45
- magenta: [35, 39],
46
- cyan: [36, 39],
47
- white: [37, 39],
48
- gray: [90, 39],
49
- grey: [90, 39],
50
-
51
- brightRed: [91, 39],
52
- brightGreen: [92, 39],
53
- brightYellow: [93, 39],
54
- brightBlue: [94, 39],
55
- brightMagenta: [95, 39],
56
- brightCyan: [96, 39],
57
- brightWhite: [97, 39],
58
-
59
- bgBlack: [40, 49],
60
- bgRed: [41, 49],
61
- bgGreen: [42, 49],
62
- bgYellow: [43, 49],
63
- bgBlue: [44, 49],
64
- bgMagenta: [45, 49],
65
- bgCyan: [46, 49],
66
- bgWhite: [47, 49],
67
- bgGray: [100, 49],
68
- bgGrey: [100, 49],
69
-
70
- bgBrightRed: [101, 49],
71
- bgBrightGreen: [102, 49],
72
- bgBrightYellow: [103, 49],
73
- bgBrightBlue: [104, 49],
74
- bgBrightMagenta: [105, 49],
75
- bgBrightCyan: [106, 49],
76
- bgBrightWhite: [107, 49],
77
-
78
- // legacy styles for colors pre v1.0.0
79
- blackBG: [40, 49],
80
- redBG: [41, 49],
81
- greenBG: [42, 49],
82
- yellowBG: [43, 49],
83
- blueBG: [44, 49],
84
- magentaBG: [45, 49],
85
- cyanBG: [46, 49],
86
- whiteBG: [47, 49],
87
-
88
- };
89
-
90
- Object.keys(codes).forEach(function(key) {
91
- var val = codes[key];
92
- var style = styles[key] = [];
93
- style.open = '\u001b[' + val[0] + 'm';
94
- style.close = '\u001b[' + val[1] + 'm';
95
- });
@@ -1,35 +0,0 @@
1
- /*
2
- MIT License
3
-
4
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy of
7
- this software and associated documentation files (the "Software"), to deal in
8
- the Software without restriction, including without limitation the rights to
9
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10
- of the Software, and to permit persons to whom the Software is furnished to do
11
- so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
23
- */
24
-
25
- 'use strict';
26
-
27
- module.exports = function(flag, argv) {
28
- argv = argv || process.argv;
29
-
30
- var terminatorPos = argv.indexOf('--');
31
- var prefix = /^-{1,2}/.test(flag) ? '' : '--';
32
- var pos = argv.indexOf(prefix + flag);
33
-
34
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
35
- };
@@ -1,151 +0,0 @@
1
- /*
2
- The MIT License (MIT)
3
-
4
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- THE SOFTWARE.
23
-
24
- */
25
-
26
- 'use strict';
27
-
28
- var os = require('os');
29
- var hasFlag = require('./has-flag.js');
30
-
31
- var env = process.env;
32
-
33
- var forceColor = void 0;
34
- if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
35
- forceColor = false;
36
- } else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true')
37
- || hasFlag('color=always')) {
38
- forceColor = true;
39
- }
40
- if ('FORCE_COLOR' in env) {
41
- forceColor = env.FORCE_COLOR.length === 0
42
- || parseInt(env.FORCE_COLOR, 10) !== 0;
43
- }
44
-
45
- function translateLevel(level) {
46
- if (level === 0) {
47
- return false;
48
- }
49
-
50
- return {
51
- level: level,
52
- hasBasic: true,
53
- has256: level >= 2,
54
- has16m: level >= 3,
55
- };
56
- }
57
-
58
- function supportsColor(stream) {
59
- if (forceColor === false) {
60
- return 0;
61
- }
62
-
63
- if (hasFlag('color=16m') || hasFlag('color=full')
64
- || hasFlag('color=truecolor')) {
65
- return 3;
66
- }
67
-
68
- if (hasFlag('color=256')) {
69
- return 2;
70
- }
71
-
72
- if (stream && !stream.isTTY && forceColor !== true) {
73
- return 0;
74
- }
75
-
76
- var min = forceColor ? 1 : 0;
77
-
78
- if (process.platform === 'win32') {
79
- // Node.js 7.5.0 is the first version of Node.js to include a patch to
80
- // libuv that enables 256 color output on Windows. Anything earlier and it
81
- // won't work. However, here we target Node.js 8 at minimum as it is an LTS
82
- // release, and Node.js 7 is not. Windows 10 build 10586 is the first
83
- // Windows release that supports 256 colors. Windows 10 build 14931 is the
84
- // first release that supports 16m/TrueColor.
85
- var osRelease = os.release().split('.');
86
- if (Number(process.versions.node.split('.')[0]) >= 8
87
- && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
88
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
89
- }
90
-
91
- return 1;
92
- }
93
-
94
- if ('CI' in env) {
95
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) {
96
- return sign in env;
97
- }) || env.CI_NAME === 'codeship') {
98
- return 1;
99
- }
100
-
101
- return min;
102
- }
103
-
104
- if ('TEAMCITY_VERSION' in env) {
105
- return (/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0
106
- );
107
- }
108
-
109
- if ('TERM_PROGRAM' in env) {
110
- var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
111
-
112
- switch (env.TERM_PROGRAM) {
113
- case 'iTerm.app':
114
- return version >= 3 ? 3 : 2;
115
- case 'Hyper':
116
- return 3;
117
- case 'Apple_Terminal':
118
- return 2;
119
- // No default
120
- }
121
- }
122
-
123
- if (/-256(color)?$/i.test(env.TERM)) {
124
- return 2;
125
- }
126
-
127
- if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
128
- return 1;
129
- }
130
-
131
- if ('COLORTERM' in env) {
132
- return 1;
133
- }
134
-
135
- if (env.TERM === 'dumb') {
136
- return min;
137
- }
138
-
139
- return min;
140
- }
141
-
142
- function getSupportLevel(stream) {
143
- var level = supportsColor(stream);
144
- return translateLevel(level);
145
- }
146
-
147
- module.exports = {
148
- supportsColor: getSupportLevel,
149
- stdout: getSupportLevel(process.stdout),
150
- stderr: getSupportLevel(process.stderr),
151
- };
@@ -1,49 +0,0 @@
1
- {
2
- "name": "colors",
3
- "description": "get colors in your node.js console",
4
- "version": "1.4.0",
5
- "author": "Marak Squires",
6
- "contributors": [
7
- {
8
- "name": "DABH",
9
- "url": "https://github.com/DABH"
10
- }
11
- ],
12
- "homepage": "https://github.com/Marak/colors.js",
13
- "bugs": "https://github.com/Marak/colors.js/issues",
14
- "keywords": [
15
- "ansi",
16
- "terminal",
17
- "colors"
18
- ],
19
- "repository": {
20
- "type": "git",
21
- "url": "http://github.com/Marak/colors.js.git"
22
- },
23
- "license": "MIT",
24
- "scripts": {
25
- "lint": "eslint . --fix",
26
- "test": "node tests/basic-test.js && node tests/safe-test.js"
27
- },
28
- "engines": {
29
- "node": ">=0.1.90"
30
- },
31
- "main": "lib/index.js",
32
- "files": [
33
- "examples",
34
- "lib",
35
- "LICENSE",
36
- "safe.js",
37
- "themes",
38
- "index.d.ts",
39
- "safe.d.ts"
40
- ],
41
- "devDependencies": {
42
- "eslint": "^5.2.0",
43
- "eslint-config-google": "^0.11.0"
44
- }
45
-
46
- ,"_resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz"
47
- ,"_integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA=="
48
- ,"_from": "colors@1.4.0"
49
- }
@@ -1,48 +0,0 @@
1
- // Type definitions for Colors.js 1.2
2
- // Project: https://github.com/Marak/colors.js
3
- // Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
4
- // Definitions: https://github.com/Marak/colors.js
5
-
6
- export const enabled: boolean;
7
- export function enable(): void;
8
- export function disable(): void;
9
- export function setTheme(theme: any): void;
10
-
11
- export function strip(str: string): string;
12
- export function stripColors(str: string): string;
13
-
14
- export function black(str: string): string;
15
- export function red(str: string): string;
16
- export function green(str: string): string;
17
- export function yellow(str: string): string;
18
- export function blue(str: string): string;
19
- export function magenta(str: string): string;
20
- export function cyan(str: string): string;
21
- export function white(str: string): string;
22
- export function gray(str: string): string;
23
- export function grey(str: string): string;
24
-
25
- export function bgBlack(str: string): string;
26
- export function bgRed(str: string): string;
27
- export function bgGreen(str: string): string;
28
- export function bgYellow(str: string): string;
29
- export function bgBlue(str: string): string;
30
- export function bgMagenta(str: string): string;
31
- export function bgCyan(str: string): string;
32
- export function bgWhite(str: string): string;
33
-
34
- export function reset(str: string): string;
35
- export function bold(str: string): string;
36
- export function dim(str: string): string;
37
- export function italic(str: string): string;
38
- export function underline(str: string): string;
39
- export function inverse(str: string): string;
40
- export function hidden(str: string): string;
41
- export function strikethrough(str: string): string;
42
-
43
- export function rainbow(str: string): string;
44
- export function zebra(str: string): string;
45
- export function america(str: string): string;
46
- export function trap(str: string): string;
47
- export function random(str: string): string;
48
- export function zalgo(str: string): string;
@@ -1,10 +0,0 @@
1
- //
2
- // Remark: Requiring this file will use the "safe" colors API,
3
- // which will not touch String.prototype.
4
- //
5
- // var colors = require('colors/safe');
6
- // colors.red("foo")
7
- //
8
- //
9
- var colors = require('./lib/colors');
10
- module['exports'] = colors;
@@ -1,12 +0,0 @@
1
- module['exports'] = {
2
- silly: 'rainbow',
3
- input: 'grey',
4
- verbose: 'cyan',
5
- prompt: 'grey',
6
- info: 'green',
7
- data: 'grey',
8
- help: 'cyan',
9
- warn: 'yellow',
10
- debug: 'blue',
11
- error: 'red',
12
- };
@@ -1,19 +0,0 @@
1
- Copyright Node.js contributors. All rights reserved.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to
5
- deal in the Software without restriction, including without limitation the
6
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
- sell copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
- IN THE SOFTWARE.
@@ -1,3 +0,0 @@
1
- # core-util-is
2
-
3
- The `util.is*` functions introduced in Node v0.12.