@contrast/agent 4.16.1 → 4.17.1

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 (267) hide show
  1. package/bin/VERSION +1 -1
  2. package/bin/linux/contrast-service +0 -0
  3. package/bin/mac/contrast-service +0 -0
  4. package/bin/windows/contrast-service.exe +0 -0
  5. package/esm.mjs +21 -11
  6. package/lib/assess/policy/propagators.json +4 -0
  7. package/lib/assess/policy/signatures.json +5 -0
  8. package/lib/assess/propagators/fastify-static/allowed-path.js +85 -0
  9. package/lib/cli-rewriter/index.js +1 -1
  10. package/lib/contrast.js +1 -1
  11. package/lib/core/rewrite/index.js +2 -2
  12. package/lib/protect/rules/cmd-injection/cmdinjection-rule.js +1 -1
  13. package/lib/protect/service.js +2 -0
  14. package/lib/util/trace-util.js +5 -4
  15. package/node_modules/@colors/colors/LICENSE +26 -0
  16. package/node_modules/@colors/colors/README.md +219 -0
  17. package/node_modules/@colors/colors/examples/normal-usage.js +83 -0
  18. package/node_modules/@colors/colors/examples/safe-string.js +80 -0
  19. package/node_modules/@colors/colors/index.d.ts +136 -0
  20. package/node_modules/@colors/colors/lib/colors.js +211 -0
  21. package/node_modules/@colors/colors/lib/custom/trap.js +46 -0
  22. package/node_modules/@colors/colors/lib/custom/zalgo.js +110 -0
  23. package/node_modules/@colors/colors/lib/extendStringPrototype.js +110 -0
  24. package/node_modules/@colors/colors/lib/index.js +13 -0
  25. package/node_modules/@colors/colors/lib/maps/america.js +10 -0
  26. package/node_modules/@colors/colors/lib/maps/rainbow.js +12 -0
  27. package/node_modules/@colors/colors/lib/maps/random.js +11 -0
  28. package/node_modules/@colors/colors/lib/maps/zebra.js +5 -0
  29. package/node_modules/@colors/colors/lib/styles.js +95 -0
  30. package/node_modules/@colors/colors/lib/system/has-flag.js +35 -0
  31. package/node_modules/@colors/colors/lib/system/supports-colors.js +151 -0
  32. package/node_modules/@colors/colors/package.json +49 -0
  33. package/node_modules/@colors/colors/safe.d.ts +48 -0
  34. package/node_modules/@colors/colors/safe.js +10 -0
  35. package/node_modules/@colors/colors/themes/generic-logging.js +12 -0
  36. package/node_modules/@dabh/diagnostics/README.md +16 -16
  37. package/node_modules/@dabh/diagnostics/package.json +9 -9
  38. package/node_modules/async/CHANGELOG.md +13 -0
  39. package/node_modules/async/all.js +74 -9
  40. package/node_modules/async/allLimit.js +3 -3
  41. package/node_modules/async/allSeries.js +3 -3
  42. package/node_modules/async/any.js +75 -9
  43. package/node_modules/async/anyLimit.js +3 -3
  44. package/node_modules/async/anySeries.js +3 -3
  45. package/node_modules/async/applyEach.js +2 -2
  46. package/node_modules/async/applyEachSeries.js +2 -2
  47. package/node_modules/async/asyncify.js +3 -3
  48. package/node_modules/async/auto.js +81 -15
  49. package/node_modules/async/autoInject.js +30 -4
  50. package/node_modules/async/cargo.js +1 -1
  51. package/node_modules/async/cargoQueue.js +1 -1
  52. package/node_modules/async/compose.js +1 -1
  53. package/node_modules/async/concat.js +72 -4
  54. package/node_modules/async/concatLimit.js +3 -3
  55. package/node_modules/async/concatSeries.js +2 -2
  56. package/node_modules/async/detect.js +43 -8
  57. package/node_modules/async/detectLimit.js +3 -3
  58. package/node_modules/async/detectSeries.js +3 -3
  59. package/node_modules/async/dir.js +1 -1
  60. package/node_modules/async/dist/async.js +1379 -168
  61. package/node_modules/async/dist/async.min.js +1 -1
  62. package/node_modules/async/dist/async.mjs +1372 -161
  63. package/node_modules/async/doDuring.js +3 -3
  64. package/node_modules/async/doUntil.js +2 -2
  65. package/node_modules/async/doWhilst.js +3 -3
  66. package/node_modules/async/during.js +3 -3
  67. package/node_modules/async/each.js +69 -28
  68. package/node_modules/async/eachLimit.js +4 -4
  69. package/node_modules/async/eachOf.js +85 -16
  70. package/node_modules/async/eachOfLimit.js +3 -3
  71. package/node_modules/async/eachOfSeries.js +2 -2
  72. package/node_modules/async/eachSeries.js +2 -2
  73. package/node_modules/async/ensureAsync.js +2 -2
  74. package/node_modules/async/every.js +74 -9
  75. package/node_modules/async/everyLimit.js +3 -3
  76. package/node_modules/async/everySeries.js +3 -3
  77. package/node_modules/async/filter.js +49 -9
  78. package/node_modules/async/filterLimit.js +3 -3
  79. package/node_modules/async/filterSeries.js +3 -3
  80. package/node_modules/async/find.js +43 -8
  81. package/node_modules/async/findLimit.js +3 -3
  82. package/node_modules/async/findSeries.js +3 -3
  83. package/node_modules/async/flatMap.js +72 -4
  84. package/node_modules/async/flatMapLimit.js +3 -3
  85. package/node_modules/async/flatMapSeries.js +2 -2
  86. package/node_modules/async/foldl.js +87 -11
  87. package/node_modules/async/foldr.js +2 -2
  88. package/node_modules/async/forEach.js +69 -28
  89. package/node_modules/async/forEachLimit.js +4 -4
  90. package/node_modules/async/forEachOf.js +85 -16
  91. package/node_modules/async/forEachOfLimit.js +3 -3
  92. package/node_modules/async/forEachOfSeries.js +2 -2
  93. package/node_modules/async/forEachSeries.js +2 -2
  94. package/node_modules/async/forever.js +4 -4
  95. package/node_modules/async/groupBy.js +62 -8
  96. package/node_modules/async/groupByLimit.js +3 -3
  97. package/node_modules/async/groupBySeries.js +2 -2
  98. package/node_modules/async/inject.js +87 -11
  99. package/node_modules/async/internal/applyEach.js +2 -2
  100. package/node_modules/async/internal/asyncEachOfLimit.js +1 -1
  101. package/node_modules/async/internal/consoleFunc.js +5 -1
  102. package/node_modules/async/internal/createTester.js +2 -2
  103. package/node_modules/async/internal/eachOfLimit.js +6 -6
  104. package/node_modules/async/internal/filter.js +2 -2
  105. package/node_modules/async/internal/iterator.js +5 -2
  106. package/node_modules/async/internal/map.js +1 -1
  107. package/node_modules/async/internal/parallel.js +3 -3
  108. package/node_modules/async/internal/queue.js +4 -4
  109. package/node_modules/async/internal/reject.js +2 -2
  110. package/node_modules/async/internal/setImmediate.js +6 -2
  111. package/node_modules/async/internal/wrapAsync.js +1 -1
  112. package/node_modules/async/log.js +1 -1
  113. package/node_modules/async/map.js +86 -6
  114. package/node_modules/async/mapLimit.js +3 -3
  115. package/node_modules/async/mapSeries.js +3 -3
  116. package/node_modules/async/mapValues.js +102 -12
  117. package/node_modules/async/mapValuesLimit.js +4 -4
  118. package/node_modules/async/mapValuesSeries.js +1 -1
  119. package/node_modules/async/memoize.js +3 -3
  120. package/node_modules/async/nextTick.js +3 -3
  121. package/node_modules/async/package.json +4 -6
  122. package/node_modules/async/parallel.js +96 -7
  123. package/node_modules/async/parallelLimit.js +2 -2
  124. package/node_modules/async/priorityQueue.js +11 -4
  125. package/node_modules/async/queue.js +4 -4
  126. package/node_modules/async/race.js +3 -3
  127. package/node_modules/async/reduce.js +87 -11
  128. package/node_modules/async/reduceRight.js +2 -2
  129. package/node_modules/async/reflect.js +2 -2
  130. package/node_modules/async/reflectAll.js +1 -1
  131. package/node_modules/async/reject.js +44 -10
  132. package/node_modules/async/rejectLimit.js +3 -3
  133. package/node_modules/async/rejectSeries.js +3 -3
  134. package/node_modules/async/retry.js +2 -2
  135. package/node_modules/async/retryable.js +4 -4
  136. package/node_modules/async/select.js +49 -9
  137. package/node_modules/async/selectLimit.js +3 -3
  138. package/node_modules/async/selectSeries.js +3 -3
  139. package/node_modules/async/seq.js +4 -4
  140. package/node_modules/async/series.js +112 -12
  141. package/node_modules/async/setImmediate.js +1 -1
  142. package/node_modules/async/some.js +75 -9
  143. package/node_modules/async/someLimit.js +3 -3
  144. package/node_modules/async/someSeries.js +3 -3
  145. package/node_modules/async/sortBy.js +121 -19
  146. package/node_modules/async/timeout.js +2 -2
  147. package/node_modules/async/times.js +1 -1
  148. package/node_modules/async/timesLimit.js +3 -3
  149. package/node_modules/async/timesSeries.js +1 -1
  150. package/node_modules/async/transform.js +111 -19
  151. package/node_modules/async/tryEach.js +3 -3
  152. package/node_modules/async/until.js +3 -3
  153. package/node_modules/async/waterfall.js +4 -4
  154. package/node_modules/async/whilst.js +3 -3
  155. package/node_modules/async/wrapSync.js +3 -3
  156. package/node_modules/color/README.md +9 -0
  157. package/node_modules/color/index.js +4 -1
  158. package/node_modules/color/package.json +8 -8
  159. package/node_modules/color-string/README.md +6 -2
  160. package/node_modules/color-string/index.js +21 -13
  161. package/node_modules/color-string/package.json +4 -4
  162. package/node_modules/colorspace/package.json +5 -5
  163. package/node_modules/fecha/dist/fecha.min.js +1 -1
  164. package/node_modules/fecha/dist/fecha.min.js.map +1 -0
  165. package/node_modules/fecha/lib/fecha.d.ts +2 -2
  166. package/node_modules/fecha/lib/fecha.js +35 -18
  167. package/node_modules/fecha/lib/fecha.js.map +1 -0
  168. package/node_modules/fecha/lib/fecha.umd.js +35 -18
  169. package/node_modules/fecha/lib/fecha.umd.js.map +1 -0
  170. package/node_modules/fecha/package.json +9 -10
  171. package/node_modules/fecha/src/fecha.ts +524 -0
  172. package/node_modules/logform/.eslintrc +1 -1
  173. package/node_modules/logform/CHANGELOG.md +24 -0
  174. package/node_modules/logform/README.md +15 -17
  175. package/node_modules/logform/browser.js +3 -1
  176. package/node_modules/logform/cli.js +1 -1
  177. package/node_modules/logform/colorize.js +2 -2
  178. package/node_modules/logform/dist/browser.js +8 -2
  179. package/node_modules/logform/dist/cli.js +2 -2
  180. package/node_modules/logform/dist/colorize.js +5 -5
  181. package/node_modules/logform/dist/errors.js +1 -1
  182. package/node_modules/logform/dist/format.js +9 -5
  183. package/node_modules/logform/dist/index.js +53 -20
  184. package/node_modules/logform/dist/json.js +7 -6
  185. package/node_modules/logform/dist/logstash.js +1 -1
  186. package/node_modules/logform/dist/pad-levels.js +4 -4
  187. package/node_modules/logform/dist/printf.js +1 -1
  188. package/node_modules/logform/dist/simple.js +1 -1
  189. package/node_modules/logform/dist/splat.js +2 -2
  190. package/node_modules/logform/dist/uncolorize.js +1 -1
  191. package/node_modules/logform/errors.js +1 -1
  192. package/node_modules/logform/index.d.ts +36 -0
  193. package/node_modules/logform/index.js +19 -20
  194. package/node_modules/logform/json.js +7 -7
  195. package/node_modules/logform/logstash.js +1 -1
  196. package/node_modules/logform/package.json +10 -9
  197. package/node_modules/logform/simple.js +1 -1
  198. package/node_modules/logform/uncolorize.js +1 -1
  199. package/node_modules/safe-stable-stringify/CHANGELOG.md +75 -0
  200. package/node_modules/safe-stable-stringify/LICENSE +21 -0
  201. package/node_modules/safe-stable-stringify/esm/package.json +4 -0
  202. package/node_modules/safe-stable-stringify/esm/wrapper.js +6 -0
  203. package/node_modules/safe-stable-stringify/index.d.ts +18 -0
  204. package/node_modules/safe-stable-stringify/index.js +618 -0
  205. package/node_modules/safe-stable-stringify/package.json +69 -0
  206. package/node_modules/safe-stable-stringify/readme.md +170 -0
  207. package/node_modules/safe-stable-stringify/tsconfig.json +22 -0
  208. package/node_modules/winston/LICENSE +18 -18
  209. package/node_modules/winston/README.md +1231 -1230
  210. package/node_modules/winston/dist/winston/common.js +10 -10
  211. package/node_modules/winston/dist/winston/config/index.js +17 -17
  212. package/node_modules/winston/dist/winston/container.js +46 -46
  213. package/node_modules/winston/dist/winston/create-logger.js +28 -24
  214. package/node_modules/winston/dist/winston/exception-handler.js +49 -49
  215. package/node_modules/winston/dist/winston/exception-stream.js +27 -27
  216. package/node_modules/winston/dist/winston/logger.js +152 -138
  217. package/node_modules/winston/dist/winston/profiler.js +22 -22
  218. package/node_modules/winston/dist/winston/rejection-handler.js +54 -54
  219. package/node_modules/winston/dist/winston/tail-file.js +14 -14
  220. package/node_modules/winston/dist/winston/transports/console.js +31 -31
  221. package/node_modules/winston/dist/winston/transports/file.js +101 -101
  222. package/node_modules/winston/dist/winston/transports/http.js +119 -41
  223. package/node_modules/winston/dist/winston/transports/index.js +17 -17
  224. package/node_modules/winston/dist/winston/transports/stream.js +24 -24
  225. package/node_modules/winston/dist/winston.js +91 -97
  226. package/node_modules/winston/index.d.ts +213 -193
  227. package/node_modules/winston/lib/winston/common.js +61 -61
  228. package/node_modules/winston/lib/winston/config/index.d.ts +99 -98
  229. package/node_modules/winston/lib/winston/config/index.js +35 -35
  230. package/node_modules/winston/lib/winston/container.js +114 -114
  231. package/node_modules/winston/lib/winston/create-logger.js +104 -104
  232. package/node_modules/winston/lib/winston/exception-handler.js +245 -245
  233. package/node_modules/winston/lib/winston/exception-stream.js +54 -54
  234. package/node_modules/winston/lib/winston/logger.js +676 -667
  235. package/node_modules/winston/lib/winston/profiler.js +51 -51
  236. package/node_modules/winston/lib/winston/rejection-handler.js +251 -251
  237. package/node_modules/winston/lib/winston/tail-file.js +124 -124
  238. package/node_modules/winston/lib/winston/transports/console.js +117 -117
  239. package/node_modules/winston/lib/winston/transports/file.js +695 -695
  240. package/node_modules/winston/lib/winston/transports/http.js +267 -202
  241. package/node_modules/winston/lib/winston/transports/index.d.ts +103 -100
  242. package/node_modules/winston/lib/winston/transports/index.js +56 -56
  243. package/node_modules/winston/lib/winston/transports/stream.js +63 -63
  244. package/node_modules/winston/lib/winston.js +176 -182
  245. package/node_modules/winston/node_modules/winston-transport/.babelrc +3 -0
  246. package/node_modules/winston/node_modules/winston-transport/.eslintrc +7 -0
  247. package/node_modules/winston/node_modules/winston-transport/.gitattributes +1 -0
  248. package/node_modules/winston/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
  249. package/node_modules/winston/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
  250. package/node_modules/winston/node_modules/winston-transport/.nyc_output/processinfo/index.json +1 -0
  251. package/node_modules/winston/node_modules/winston-transport/CHANGELOG.md +126 -0
  252. package/node_modules/winston/node_modules/winston-transport/LICENSE +22 -0
  253. package/node_modules/winston/node_modules/winston-transport/README.md +50 -0
  254. package/node_modules/winston/node_modules/winston-transport/dist/index.js +215 -0
  255. package/node_modules/winston/node_modules/winston-transport/dist/legacy.js +116 -0
  256. package/node_modules/winston/node_modules/winston-transport/index.d.ts +39 -0
  257. package/node_modules/winston/node_modules/winston-transport/index.js +215 -0
  258. package/node_modules/winston/node_modules/winston-transport/legacy.js +119 -0
  259. package/node_modules/winston/node_modules/winston-transport/package.json +56 -0
  260. package/node_modules/winston/package.json +76 -75
  261. package/package.json +8 -6
  262. package/node_modules/@dabh/diagnostics/example.png +0 -0
  263. package/node_modules/color-string/CHANGELOG.md +0 -18
  264. package/node_modules/colorspace/test.js +0 -14
  265. package/node_modules/fecha/CHANGELOG.md +0 -67
  266. package/node_modules/logform/.travis.yml +0 -17
  267. package/node_modules/winston/CHANGELOG.md +0 -560
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const colors = require('colors/safe');
3
+ const colors = require('@colors/colors/safe');
4
4
  const { LEVEL, MESSAGE } = require('triple-beam');
5
5
 
6
6
  //
@@ -58,7 +58,7 @@ class Colorizer {
58
58
 
59
59
  /*
60
60
  * function colorize (lookup, level, message)
61
- * Performs multi-step colorization using colors/safe
61
+ * Performs multi-step colorization using @colors/colors/safe
62
62
  */
63
63
  colorize(lookup, level, message) {
64
64
  if (typeof message === 'undefined') {
@@ -25,11 +25,14 @@ Object.defineProperty(format, 'align', {
25
25
  Object.defineProperty(format, 'cli', {
26
26
  value: require('./cli')
27
27
  });
28
+ Object.defineProperty(format, 'colorize', {
29
+ value: require('./colorize')
30
+ });
28
31
  Object.defineProperty(format, 'combine', {
29
32
  value: require('./combine')
30
33
  });
31
- Object.defineProperty(format, 'colorize', {
32
- value: require('./colorize')
34
+ Object.defineProperty(format, 'errors', {
35
+ value: require('./errors')
33
36
  });
34
37
  Object.defineProperty(format, 'json', {
35
38
  value: require('./json')
@@ -43,6 +46,9 @@ Object.defineProperty(format, 'logstash', {
43
46
  Object.defineProperty(format, 'metadata', {
44
47
  value: require('./metadata')
45
48
  });
49
+ Object.defineProperty(format, 'ms', {
50
+ value: require('./ms')
51
+ });
46
52
  Object.defineProperty(format, 'padLevels', {
47
53
  value: require('./pad-levels')
48
54
  });
@@ -4,7 +4,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
4
4
 
5
5
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6
6
 
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
7
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
8
 
9
9
  var _require = require('./colorize'),
10
10
  Colorizer = _require.Colorizer;
@@ -28,7 +28,7 @@ var CliFormat = /*#__PURE__*/function () {
28
28
  _classCallCheck(this, CliFormat);
29
29
 
30
30
  if (!opts.levels) {
31
- opts.levels = configs.npm.levels;
31
+ opts.levels = configs.cli.levels;
32
32
  }
33
33
 
34
34
  this.colorizer = new Colorizer(opts);
@@ -4,9 +4,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
4
4
 
5
5
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6
6
 
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
7
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
8
 
9
- var colors = require('colors/safe');
9
+ var colors = require('@colors/colors/safe');
10
10
 
11
11
  var _require = require('triple-beam'),
12
12
  LEVEL = _require.LEVEL,
@@ -49,19 +49,19 @@ var Colorizer = /*#__PURE__*/function () {
49
49
 
50
50
  _createClass(Colorizer, [{
51
51
  key: "addColors",
52
-
52
+ value:
53
53
  /*
54
54
  * Adds the colors Object to the set of allColors
55
55
  * known by the Colorizer
56
56
  *
57
57
  * @param {Object} colors Set of color mappings to add.
58
58
  */
59
- value: function addColors(clrs) {
59
+ function addColors(clrs) {
60
60
  return Colorizer.addColors(clrs);
61
61
  }
62
62
  /*
63
63
  * function colorize (lookup, level, message)
64
- * Performs multi-step colorization using colors/safe
64
+ * Performs multi-step colorization using @colors/colors/safe
65
65
  */
66
66
 
67
67
  }, {
@@ -33,8 +33,8 @@ module.exports = format(function (einfo, _ref) {
33
33
  if (!(einfo.message instanceof Error)) return einfo; // Assign all enumerable properties and the
34
34
  // message property from the error provided.
35
35
 
36
- Object.assign(einfo, einfo.message);
37
36
  var err = einfo.message;
37
+ Object.assign(einfo, err);
38
38
  einfo.message = err.message;
39
39
  einfo[MESSAGE] = err.message; // Assign the stack if requested.
40
40
 
@@ -4,15 +4,19 @@
4
4
  * the format when it is invalid.
5
5
  */
6
6
 
7
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
7
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
8
+
9
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
+
11
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
12
 
9
13
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
14
 
11
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
15
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
12
16
 
13
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
14
18
 
15
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
19
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
16
20
 
17
21
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
18
22
 
@@ -20,7 +24,7 @@ function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new
20
24
 
21
25
  function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
22
26
 
23
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
27
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
28
 
25
29
  function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
26
30
 
@@ -43,7 +47,7 @@ var InvalidFormatError = /*#__PURE__*/function (_Error) {
43
47
  return _this;
44
48
  }
45
49
 
46
- return InvalidFormatError;
50
+ return _createClass(InvalidFormatError);
47
51
  }( /*#__PURE__*/_wrapNativeSuper(Error));
48
52
  /*
49
53
  * function format (formatFn)
@@ -22,11 +22,10 @@ exports.levels = require('./levels');
22
22
  * as a lazy-loaded getter.
23
23
  */
24
24
 
25
- function exposeFormat(name, path) {
26
- path = path || name;
25
+ function exposeFormat(name, requireFormat) {
27
26
  Object.defineProperty(format, name, {
28
27
  get: function get() {
29
- return require("./".concat(path, ".js"));
28
+ return requireFormat();
30
29
  },
31
30
  configurable: true
32
31
  });
@@ -35,20 +34,54 @@ function exposeFormat(name, path) {
35
34
  //
36
35
 
37
36
 
38
- exposeFormat('align');
39
- exposeFormat('errors');
40
- exposeFormat('cli');
41
- exposeFormat('combine');
42
- exposeFormat('colorize');
43
- exposeFormat('json');
44
- exposeFormat('label');
45
- exposeFormat('logstash');
46
- exposeFormat('metadata');
47
- exposeFormat('ms');
48
- exposeFormat('padLevels', 'pad-levels');
49
- exposeFormat('prettyPrint', 'pretty-print');
50
- exposeFormat('printf');
51
- exposeFormat('simple');
52
- exposeFormat('splat');
53
- exposeFormat('timestamp');
54
- exposeFormat('uncolorize');
37
+ exposeFormat('align', function () {
38
+ return require('./align');
39
+ });
40
+ exposeFormat('errors', function () {
41
+ return require('./errors');
42
+ });
43
+ exposeFormat('cli', function () {
44
+ return require('./cli');
45
+ });
46
+ exposeFormat('combine', function () {
47
+ return require('./combine');
48
+ });
49
+ exposeFormat('colorize', function () {
50
+ return require('./colorize');
51
+ });
52
+ exposeFormat('json', function () {
53
+ return require('./json');
54
+ });
55
+ exposeFormat('label', function () {
56
+ return require('./label');
57
+ });
58
+ exposeFormat('logstash', function () {
59
+ return require('./logstash');
60
+ });
61
+ exposeFormat('metadata', function () {
62
+ return require('./metadata');
63
+ });
64
+ exposeFormat('ms', function () {
65
+ return require('./ms');
66
+ });
67
+ exposeFormat('padLevels', function () {
68
+ return require('./pad-levels');
69
+ });
70
+ exposeFormat('prettyPrint', function () {
71
+ return require('./pretty-print');
72
+ });
73
+ exposeFormat('printf', function () {
74
+ return require('./printf');
75
+ });
76
+ exposeFormat('simple', function () {
77
+ return require('./simple');
78
+ });
79
+ exposeFormat('splat', function () {
80
+ return require('./splat');
81
+ });
82
+ exposeFormat('timestamp', function () {
83
+ return require('./timestamp');
84
+ });
85
+ exposeFormat('uncolorize', function () {
86
+ return require('./uncolorize');
87
+ });
@@ -5,7 +5,7 @@ var format = require('./format');
5
5
  var _require = require('triple-beam'),
6
6
  MESSAGE = _require.MESSAGE;
7
7
 
8
- var jsonStringify = require('fast-safe-stringify');
8
+ var stringify = require('safe-stable-stringify');
9
9
  /*
10
10
  * function replacer (key, value)
11
11
  * Handles proper stringification of Buffer and bigint output.
@@ -13,8 +13,9 @@ var jsonStringify = require('fast-safe-stringify');
13
13
 
14
14
 
15
15
  function replacer(key, value) {
16
- if (value instanceof Buffer) return value.toString('base64'); // eslint-disable-next-line valid-typeof
17
-
16
+ // safe-stable-stringify does support BigInt, however, it doesn't wrap the value in quotes.
17
+ // Leading to a loss in fidelity if the resulting string is parsed.
18
+ // It would also be a breaking change for logform.
18
19
  if (typeof value === 'bigint') return value.toString();
19
20
  return value;
20
21
  }
@@ -26,8 +27,8 @@ function replacer(key, value) {
26
27
  */
27
28
 
28
29
 
29
- module.exports = format(function (info) {
30
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
31
- info[MESSAGE] = (opts.stable ? jsonStringify.stableStringify : jsonStringify)(info, opts.replacer || replacer, opts.space);
30
+ module.exports = format(function (info, opts) {
31
+ var jsonStringify = stringify.configure(opts);
32
+ info[MESSAGE] = jsonStringify(info, opts.replacer || replacer, opts.space);
32
33
  return info;
33
34
  });
@@ -5,7 +5,7 @@ var format = require('./format');
5
5
  var _require = require('triple-beam'),
6
6
  MESSAGE = _require.MESSAGE;
7
7
 
8
- var jsonStringify = require('fast-safe-stringify');
8
+ var jsonStringify = require('safe-stable-stringify');
9
9
  /*
10
10
  * function logstash (info)
11
11
  * Returns a new instance of the LogStash Format that turns a
@@ -7,7 +7,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
7
7
 
8
8
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
9
9
 
10
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
10
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
11
 
12
12
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
13
13
 
@@ -17,7 +17,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
17
17
 
18
18
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
19
19
 
20
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
20
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
21
21
 
22
22
  var _require = require('triple-beam'),
23
23
  configs = _require.configs,
@@ -44,7 +44,7 @@ var Padder = /*#__PURE__*/function () {
44
44
 
45
45
  _createClass(Padder, [{
46
46
  key: "transform",
47
-
47
+ value:
48
48
  /**
49
49
  * Prepends the padding onto the `message` based on the `LEVEL` of
50
50
  * the `info`. This is based on the behavior of `winston@2` which also
@@ -56,7 +56,7 @@ var Padder = /*#__PURE__*/function () {
56
56
  * @param {Object} opts Options passed along to this instance.
57
57
  * @returns {Info} Modified logform info object.
58
58
  */
59
- value: function transform(info, opts) {
59
+ function transform(info, opts) {
60
60
  info.message = "".concat(this.paddings[info[LEVEL]]).concat(info.message);
61
61
 
62
62
  if (info[MESSAGE]) {
@@ -4,7 +4,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
4
4
 
5
5
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6
6
 
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
7
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
8
 
9
9
  var _require = require('triple-beam'),
10
10
  MESSAGE = _require.MESSAGE;
@@ -6,7 +6,7 @@ var format = require('./format');
6
6
  var _require = require('triple-beam'),
7
7
  MESSAGE = _require.MESSAGE;
8
8
 
9
- var jsonStringify = require('fast-safe-stringify');
9
+ var jsonStringify = require('safe-stable-stringify');
10
10
  /*
11
11
  * function simple (info)
12
12
  * Returns a new instance of the simple format TransformStream
@@ -6,7 +6,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
6
6
 
7
7
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
8
 
9
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
9
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
10
10
 
11
11
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
12
 
@@ -16,7 +16,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
16
16
 
17
17
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
18
18
 
19
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
19
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
20
20
 
21
21
  var util = require('util');
22
22
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var colors = require('colors/safe');
3
+ var colors = require('@colors/colors/safe');
4
4
 
5
5
  var format = require('./format');
6
6
 
@@ -28,8 +28,8 @@ module.exports = format((einfo, { stack }) => {
28
28
 
29
29
  // Assign all enumerable properties and the
30
30
  // message property from the error provided.
31
- Object.assign(einfo, einfo.message);
32
31
  const err = einfo.message;
32
+ Object.assign(einfo, err);
33
33
  einfo.message = err.message;
34
34
  einfo[MESSAGE] = err.message;
35
35
 
@@ -83,6 +83,42 @@ export interface JsonOptions {
83
83
  * The number of white space used to format the json.
84
84
  */
85
85
  space?: number;
86
+
87
+ // The following options come from safe-stable-stringify
88
+ // https://github.com/BridgeAR/safe-stable-stringify/blob/main/index.d.ts
89
+
90
+ /**
91
+ * If `true`, bigint values are converted to a number. Otherwise, they are ignored.
92
+ * This option is ignored by default as Logform stringifies BigInt in the default replacer.
93
+ * @default true
94
+ */
95
+ bigint?: boolean,
96
+ /**
97
+ * Defines the value for circular references.
98
+ * Set to `undefined`, circular properties are not serialized (array entries are replaced with null).
99
+ * Set to `Error`, to throw on circular references.
100
+ * @default "[Circular]"
101
+ */
102
+ circularValue?: string | null | TypeErrorConstructor | ErrorConstructor,
103
+ /**
104
+ * If `true`, guarantee a deterministic key order instead of relying on the insertion order.
105
+ * @default true
106
+ */
107
+ deterministic?: boolean,
108
+ /**
109
+ * Maximum number of entries to serialize per object (at least one).
110
+ * The serialized output contains information about how many entries have not been serialized.
111
+ * Ignored properties are counted as well (e.g., properties with symbol values).
112
+ * Using the array replacer overrules this option.
113
+ * @default Infinity
114
+ */
115
+ maximumBreadth?: number,
116
+ /**
117
+ * Maximum number of object nesting levels (at least 1) that will be serialized.
118
+ * Objects at the maximum level are serialized as `"[Object]"` and arrays as `"[Array]"`.
119
+ * @default Infinity
120
+ */
121
+ maximumDepth?: number,
86
122
  }
87
123
 
88
124
  export interface LabelOptions {
@@ -21,11 +21,10 @@ exports.levels = require('./levels');
21
21
  * Exposes a sub-format on the main format object
22
22
  * as a lazy-loaded getter.
23
23
  */
24
- function exposeFormat(name, path) {
25
- path = path || name;
24
+ function exposeFormat(name, requireFormat) {
26
25
  Object.defineProperty(format, name, {
27
26
  get() {
28
- return require(`./${path}.js`);
27
+ return requireFormat();
29
28
  },
30
29
  configurable: true
31
30
  });
@@ -34,20 +33,20 @@ function exposeFormat(name, path) {
34
33
  //
35
34
  // Setup all transports as lazy-loaded getters.
36
35
  //
37
- exposeFormat('align');
38
- exposeFormat('errors');
39
- exposeFormat('cli');
40
- exposeFormat('combine');
41
- exposeFormat('colorize');
42
- exposeFormat('json');
43
- exposeFormat('label');
44
- exposeFormat('logstash');
45
- exposeFormat('metadata');
46
- exposeFormat('ms');
47
- exposeFormat('padLevels', 'pad-levels');
48
- exposeFormat('prettyPrint', 'pretty-print');
49
- exposeFormat('printf');
50
- exposeFormat('simple');
51
- exposeFormat('splat');
52
- exposeFormat('timestamp');
53
- exposeFormat('uncolorize');
36
+ exposeFormat('align', function () { return require('./align'); });
37
+ exposeFormat('errors', function () { return require('./errors'); });
38
+ exposeFormat('cli', function () { return require('./cli'); });
39
+ exposeFormat('combine', function () { return require('./combine'); });
40
+ exposeFormat('colorize', function () { return require('./colorize'); });
41
+ exposeFormat('json', function () { return require('./json'); });
42
+ exposeFormat('label', function () { return require('./label'); });
43
+ exposeFormat('logstash', function () { return require('./logstash'); });
44
+ exposeFormat('metadata', function () { return require('./metadata'); });
45
+ exposeFormat('ms', function () { return require('./ms'); });
46
+ exposeFormat('padLevels', function () { return require('./pad-levels'); });
47
+ exposeFormat('prettyPrint', function () { return require('./pretty-print'); });
48
+ exposeFormat('printf', function () { return require('./printf'); });
49
+ exposeFormat('simple', function () { return require('./simple'); });
50
+ exposeFormat('splat', function () { return require('./splat'); });
51
+ exposeFormat('timestamp', function () { return require('./timestamp'); });
52
+ exposeFormat('uncolorize', function () { return require('./uncolorize'); });
@@ -2,16 +2,16 @@
2
2
 
3
3
  const format = require('./format');
4
4
  const { MESSAGE } = require('triple-beam');
5
- const jsonStringify = require('fast-safe-stringify');
5
+ const stringify = require('safe-stable-stringify');
6
6
 
7
7
  /*
8
8
  * function replacer (key, value)
9
9
  * Handles proper stringification of Buffer and bigint output.
10
10
  */
11
11
  function replacer(key, value) {
12
- if (value instanceof Buffer)
13
- return value.toString('base64');
14
- // eslint-disable-next-line valid-typeof
12
+ // safe-stable-stringify does support BigInt, however, it doesn't wrap the value in quotes.
13
+ // Leading to a loss in fidelity if the resulting string is parsed.
14
+ // It would also be a breaking change for logform.
15
15
  if (typeof value === 'bigint')
16
16
  return value.toString();
17
17
  return value;
@@ -23,8 +23,8 @@ function replacer(key, value) {
23
23
  * object into pure JSON. This was previously exposed as { json: true }
24
24
  * to transports in `winston < 3.0.0`.
25
25
  */
26
- module.exports = format((info, opts = {}) => {
27
- info[MESSAGE] = (opts.stable ? jsonStringify.stableStringify
28
- : jsonStringify)(info, opts.replacer || replacer, opts.space);
26
+ module.exports = format((info, opts) => {
27
+ const jsonStringify = stringify.configure(opts);
28
+ info[MESSAGE] = jsonStringify(info, opts.replacer || replacer, opts.space);
29
29
  return info;
30
30
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  const format = require('./format');
4
4
  const { MESSAGE } = require('triple-beam');
5
- const jsonStringify = require('fast-safe-stringify');
5
+ const jsonStringify = require('safe-stable-stringify');
6
6
 
7
7
  /*
8
8
  * function logstash (info)
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "logform",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "An mutable object-based log format designed for chaining & objectMode streams.",
5
5
  "main": "index.js",
6
6
  "browser": "dist/browser.js",
7
7
  "scripts": {
8
- "lint": "populist *.js test/*.js examples/*.js",
8
+ "lint": "eslint *.js test/*.js examples/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",
9
9
  "pretest": "npm run lint && npm run build",
10
10
  "test": "nyc mocha test/*.test.js",
11
11
  "build": "rimraf dist && babel *.js -d ./dist",
@@ -28,25 +28,26 @@
28
28
  },
29
29
  "homepage": "https://github.com/winstonjs/logform#readme",
30
30
  "dependencies": {
31
- "colors": "^1.2.1",
32
- "fast-safe-stringify": "^2.0.4",
31
+ "@colors/colors": "1.5.0",
33
32
  "fecha": "^4.2.0",
34
33
  "ms": "^2.1.1",
34
+ "safe-stable-stringify": "^2.3.1",
35
35
  "triple-beam": "^1.3.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@babel/cli": "^7.10.3",
39
39
  "@babel/core": "^7.10.3",
40
40
  "@babel/preset-env": "^7.10.3",
41
+ "@dabh/eslint-config-populist": "^5.0.0",
41
42
  "assume": "^2.2.0",
42
- "eslint-config-populist": "^4.1.0",
43
- "mocha": "^8.0.1",
43
+ "eslint": "^8.8.0",
44
+ "mocha": "^9.2.0",
44
45
  "nyc": "^15.1.0",
45
46
  "rimraf": "^3.0.2"
46
47
  },
47
48
  "types": "./index.d.ts"
48
49
 
49
- ,"_resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz"
50
- ,"_integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg=="
51
- ,"_from": "logform@2.2.0"
50
+ ,"_resolved": "https://registry.npmjs.org/logform/-/logform-2.4.0.tgz"
51
+ ,"_integrity": "sha512-CPSJw4ftjf517EhXZGGvTHHkYobo7ZCc0kvwUoOYcjfR2UVrI66RHj8MCrfAdEitdmFqbu2BYdYs8FHHZSb6iw=="
52
+ ,"_from": "logform@2.4.0"
52
53
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  const format = require('./format');
5
5
  const { MESSAGE } = require('triple-beam');
6
- const jsonStringify = require('fast-safe-stringify');
6
+ const jsonStringify = require('safe-stable-stringify');
7
7
 
8
8
  /*
9
9
  * function simple (info)
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const colors = require('colors/safe');
3
+ const colors = require('@colors/colors/safe');
4
4
  const format = require('./format');
5
5
  const { MESSAGE } = require('triple-beam');
6
6