@contrast/agent 4.16.2 → 4.18.0

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 (147) hide show
  1. package/esm.mjs +21 -11
  2. package/lib/assess/policy/propagators.json +4 -0
  3. package/lib/assess/policy/signatures.json +5 -0
  4. package/lib/assess/propagators/fastify-static/allowed-path.js +85 -0
  5. package/lib/assess/sources/index.js +26 -5
  6. package/lib/cli-rewriter/index.js +1 -1
  7. package/lib/contrast.js +1 -1
  8. package/lib/core/config/options.js +14 -1
  9. package/lib/core/config/util.js +39 -11
  10. package/lib/core/rewrite/index.js +2 -2
  11. package/lib/protect/service.js +2 -0
  12. package/lib/util/trace-util.js +5 -4
  13. package/node_modules/@colors/colors/LICENSE +26 -0
  14. package/node_modules/@colors/colors/README.md +219 -0
  15. package/node_modules/@colors/colors/examples/normal-usage.js +83 -0
  16. package/node_modules/@colors/colors/examples/safe-string.js +80 -0
  17. package/node_modules/@colors/colors/index.d.ts +136 -0
  18. package/node_modules/@colors/colors/lib/colors.js +211 -0
  19. package/node_modules/@colors/colors/lib/custom/trap.js +46 -0
  20. package/node_modules/@colors/colors/lib/custom/zalgo.js +110 -0
  21. package/node_modules/@colors/colors/lib/extendStringPrototype.js +110 -0
  22. package/node_modules/@colors/colors/lib/index.js +13 -0
  23. package/node_modules/@colors/colors/lib/maps/america.js +10 -0
  24. package/node_modules/@colors/colors/lib/maps/rainbow.js +12 -0
  25. package/node_modules/@colors/colors/lib/maps/random.js +11 -0
  26. package/node_modules/@colors/colors/lib/maps/zebra.js +5 -0
  27. package/node_modules/@colors/colors/lib/styles.js +95 -0
  28. package/node_modules/@colors/colors/lib/system/has-flag.js +35 -0
  29. package/node_modules/@colors/colors/lib/system/supports-colors.js +151 -0
  30. package/node_modules/@colors/colors/package.json +49 -0
  31. package/node_modules/@colors/colors/safe.d.ts +48 -0
  32. package/node_modules/@colors/colors/safe.js +10 -0
  33. package/node_modules/@colors/colors/themes/generic-logging.js +12 -0
  34. package/node_modules/@dabh/diagnostics/README.md +16 -16
  35. package/node_modules/@dabh/diagnostics/package.json +9 -9
  36. package/node_modules/color/README.md +9 -0
  37. package/node_modules/color/index.js +4 -1
  38. package/node_modules/color/package.json +8 -8
  39. package/node_modules/color-string/README.md +6 -2
  40. package/node_modules/color-string/index.js +21 -13
  41. package/node_modules/color-string/package.json +4 -4
  42. package/node_modules/colorspace/package.json +5 -5
  43. package/node_modules/fecha/dist/fecha.min.js +1 -1
  44. package/node_modules/fecha/dist/fecha.min.js.map +1 -0
  45. package/node_modules/fecha/lib/fecha.d.ts +2 -2
  46. package/node_modules/fecha/lib/fecha.js +35 -18
  47. package/node_modules/fecha/lib/fecha.js.map +1 -0
  48. package/node_modules/fecha/lib/fecha.umd.js +35 -18
  49. package/node_modules/fecha/lib/fecha.umd.js.map +1 -0
  50. package/node_modules/fecha/package.json +9 -10
  51. package/node_modules/fecha/src/fecha.ts +524 -0
  52. package/node_modules/logform/.eslintrc +1 -1
  53. package/node_modules/logform/CHANGELOG.md +24 -0
  54. package/node_modules/logform/README.md +15 -17
  55. package/node_modules/logform/browser.js +3 -1
  56. package/node_modules/logform/cli.js +1 -1
  57. package/node_modules/logform/colorize.js +2 -2
  58. package/node_modules/logform/dist/browser.js +8 -2
  59. package/node_modules/logform/dist/cli.js +2 -2
  60. package/node_modules/logform/dist/colorize.js +5 -5
  61. package/node_modules/logform/dist/errors.js +1 -1
  62. package/node_modules/logform/dist/format.js +9 -5
  63. package/node_modules/logform/dist/index.js +53 -20
  64. package/node_modules/logform/dist/json.js +7 -6
  65. package/node_modules/logform/dist/logstash.js +1 -1
  66. package/node_modules/logform/dist/pad-levels.js +4 -4
  67. package/node_modules/logform/dist/printf.js +1 -1
  68. package/node_modules/logform/dist/simple.js +1 -1
  69. package/node_modules/logform/dist/splat.js +2 -2
  70. package/node_modules/logform/dist/uncolorize.js +1 -1
  71. package/node_modules/logform/errors.js +1 -1
  72. package/node_modules/logform/index.d.ts +36 -0
  73. package/node_modules/logform/index.js +19 -20
  74. package/node_modules/logform/json.js +7 -7
  75. package/node_modules/logform/logstash.js +1 -1
  76. package/node_modules/logform/package.json +10 -9
  77. package/node_modules/logform/simple.js +1 -1
  78. package/node_modules/logform/uncolorize.js +1 -1
  79. package/node_modules/safe-stable-stringify/CHANGELOG.md +75 -0
  80. package/node_modules/safe-stable-stringify/LICENSE +21 -0
  81. package/node_modules/safe-stable-stringify/esm/package.json +4 -0
  82. package/node_modules/safe-stable-stringify/esm/wrapper.js +6 -0
  83. package/node_modules/safe-stable-stringify/index.d.ts +18 -0
  84. package/node_modules/safe-stable-stringify/index.js +618 -0
  85. package/node_modules/safe-stable-stringify/package.json +69 -0
  86. package/node_modules/safe-stable-stringify/readme.md +170 -0
  87. package/node_modules/safe-stable-stringify/tsconfig.json +22 -0
  88. package/node_modules/winston/LICENSE +18 -18
  89. package/node_modules/winston/README.md +1231 -1230
  90. package/node_modules/winston/dist/winston/common.js +10 -10
  91. package/node_modules/winston/dist/winston/config/index.js +17 -17
  92. package/node_modules/winston/dist/winston/container.js +46 -46
  93. package/node_modules/winston/dist/winston/create-logger.js +28 -24
  94. package/node_modules/winston/dist/winston/exception-handler.js +49 -49
  95. package/node_modules/winston/dist/winston/exception-stream.js +27 -27
  96. package/node_modules/winston/dist/winston/logger.js +152 -138
  97. package/node_modules/winston/dist/winston/profiler.js +22 -22
  98. package/node_modules/winston/dist/winston/rejection-handler.js +54 -54
  99. package/node_modules/winston/dist/winston/tail-file.js +14 -14
  100. package/node_modules/winston/dist/winston/transports/console.js +31 -31
  101. package/node_modules/winston/dist/winston/transports/file.js +101 -101
  102. package/node_modules/winston/dist/winston/transports/http.js +119 -41
  103. package/node_modules/winston/dist/winston/transports/index.js +17 -17
  104. package/node_modules/winston/dist/winston/transports/stream.js +24 -24
  105. package/node_modules/winston/dist/winston.js +91 -97
  106. package/node_modules/winston/index.d.ts +213 -193
  107. package/node_modules/winston/lib/winston/common.js +61 -61
  108. package/node_modules/winston/lib/winston/config/index.d.ts +99 -98
  109. package/node_modules/winston/lib/winston/config/index.js +35 -35
  110. package/node_modules/winston/lib/winston/container.js +114 -114
  111. package/node_modules/winston/lib/winston/create-logger.js +104 -104
  112. package/node_modules/winston/lib/winston/exception-handler.js +245 -245
  113. package/node_modules/winston/lib/winston/exception-stream.js +54 -54
  114. package/node_modules/winston/lib/winston/logger.js +676 -667
  115. package/node_modules/winston/lib/winston/profiler.js +51 -51
  116. package/node_modules/winston/lib/winston/rejection-handler.js +251 -251
  117. package/node_modules/winston/lib/winston/tail-file.js +124 -124
  118. package/node_modules/winston/lib/winston/transports/console.js +117 -117
  119. package/node_modules/winston/lib/winston/transports/file.js +695 -695
  120. package/node_modules/winston/lib/winston/transports/http.js +267 -202
  121. package/node_modules/winston/lib/winston/transports/index.d.ts +103 -100
  122. package/node_modules/winston/lib/winston/transports/index.js +56 -56
  123. package/node_modules/winston/lib/winston/transports/stream.js +63 -63
  124. package/node_modules/winston/lib/winston.js +176 -182
  125. package/node_modules/winston/node_modules/winston-transport/.babelrc +3 -0
  126. package/node_modules/winston/node_modules/winston-transport/.eslintrc +7 -0
  127. package/node_modules/winston/node_modules/winston-transport/.gitattributes +1 -0
  128. package/node_modules/winston/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
  129. package/node_modules/winston/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
  130. package/node_modules/winston/node_modules/winston-transport/.nyc_output/processinfo/index.json +1 -0
  131. package/node_modules/winston/node_modules/winston-transport/CHANGELOG.md +126 -0
  132. package/node_modules/winston/node_modules/winston-transport/LICENSE +22 -0
  133. package/node_modules/winston/node_modules/winston-transport/README.md +50 -0
  134. package/node_modules/winston/node_modules/winston-transport/dist/index.js +215 -0
  135. package/node_modules/winston/node_modules/winston-transport/dist/legacy.js +116 -0
  136. package/node_modules/winston/node_modules/winston-transport/index.d.ts +39 -0
  137. package/node_modules/winston/node_modules/winston-transport/index.js +215 -0
  138. package/node_modules/winston/node_modules/winston-transport/legacy.js +119 -0
  139. package/node_modules/winston/node_modules/winston-transport/package.json +56 -0
  140. package/node_modules/winston/package.json +76 -75
  141. package/package.json +9 -6
  142. package/node_modules/@dabh/diagnostics/example.png +0 -0
  143. package/node_modules/color-string/CHANGELOG.md +0 -18
  144. package/node_modules/colorspace/test.js +0 -14
  145. package/node_modules/fecha/CHANGELOG.md +0 -67
  146. package/node_modules/logform/.travis.yml +0 -17
  147. package/node_modules/winston/CHANGELOG.md +0 -560
@@ -1,8 +1,8 @@
1
- /**
2
- * exception-handler.js: Object for handling uncaughtException events.
3
- *
4
- * (C) 2010 Charlie Robbins
5
- * MIT LICENCE
1
+ /**
2
+ * exception-handler.js: Object for handling uncaughtException events.
3
+ *
4
+ * (C) 2010 Charlie Robbins
5
+ * MIT LICENCE
6
6
  */
7
7
  'use strict';
8
8
 
@@ -10,7 +10,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
10
10
 
11
11
  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); } }
12
12
 
13
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
13
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
14
 
15
15
  var os = require('os');
16
16
 
@@ -23,16 +23,16 @@ var once = require('one-time');
23
23
  var stackTrace = require('stack-trace');
24
24
 
25
25
  var ExceptionStream = require('./exception-stream');
26
- /**
27
- * Object for handling unhandledRejection events.
28
- * @type {RejectionHandler}
26
+ /**
27
+ * Object for handling unhandledRejection events.
28
+ * @type {RejectionHandler}
29
29
  */
30
30
 
31
31
 
32
32
  module.exports = /*#__PURE__*/function () {
33
- /**
34
- * TODO: add contructor description
35
- * @param {!Logger} logger - TODO: add param description
33
+ /**
34
+ * TODO: add contructor description
35
+ * @param {!Logger} logger - TODO: add param description
36
36
  */
37
37
  function RejectionHandler(logger) {
38
38
  _classCallCheck(this, RejectionHandler);
@@ -44,10 +44,10 @@ module.exports = /*#__PURE__*/function () {
44
44
  this.logger = logger;
45
45
  this.handlers = new Map();
46
46
  }
47
- /**
48
- * Handles `unhandledRejection` events for the current process by adding any
49
- * handlers passed in.
50
- * @returns {undefined}
47
+ /**
48
+ * Handles `unhandledRejection` events for the current process by adding any
49
+ * handlers passed in.
50
+ * @returns {undefined}
51
51
  */
52
52
 
53
53
 
@@ -75,10 +75,10 @@ module.exports = /*#__PURE__*/function () {
75
75
  process.on('unhandledRejection', this.catcher);
76
76
  }
77
77
  }
78
- /**
79
- * Removes any handlers to `unhandledRejection` events for the current
80
- * process. This does not modify the state of the `this.handlers` set.
81
- * @returns {undefined}
78
+ /**
79
+ * Removes any handlers to `unhandledRejection` events for the current
80
+ * process. This does not modify the state of the `this.handlers` set.
81
+ * @returns {undefined}
82
82
  */
83
83
 
84
84
  }, {
@@ -94,27 +94,27 @@ module.exports = /*#__PURE__*/function () {
94
94
  });
95
95
  }
96
96
  }
97
- /**
98
- * TODO: add method description
99
- * @param {Error} err - Error to get information about.
100
- * @returns {mixed} - TODO: add return description.
97
+ /**
98
+ * TODO: add method description
99
+ * @param {Error} err - Error to get information about.
100
+ * @returns {mixed} - TODO: add return description.
101
101
  */
102
102
 
103
103
  }, {
104
104
  key: "getAllInfo",
105
105
  value: function getAllInfo(err) {
106
- var message = err.message;
106
+ var message = null;
107
107
 
108
- if (!message && typeof err === 'string') {
109
- message = err;
108
+ if (err) {
109
+ message = typeof err === 'string' ? err : err.message;
110
110
  }
111
111
 
112
112
  return {
113
113
  error: err,
114
114
  // TODO (indexzero): how do we configure this?
115
115
  level: 'error',
116
- message: ["unhandledRejection: ".concat(message || '(no error message)'), err.stack || ' No stack trace'].join('\n'),
117
- stack: err.stack,
116
+ message: ["unhandledRejection: ".concat(message || '(no error message)'), err && err.stack || ' No stack trace'].join('\n'),
117
+ stack: err && err.stack,
118
118
  exception: true,
119
119
  date: new Date().toString(),
120
120
  process: this.getProcessInfo(),
@@ -122,9 +122,9 @@ module.exports = /*#__PURE__*/function () {
122
122
  trace: this.getTrace(err)
123
123
  };
124
124
  }
125
- /**
126
- * Gets all relevant process information for the currently running process.
127
- * @returns {mixed} - TODO: add return description.
125
+ /**
126
+ * Gets all relevant process information for the currently running process.
127
+ * @returns {mixed} - TODO: add return description.
128
128
  */
129
129
 
130
130
  }, {
@@ -141,9 +141,9 @@ module.exports = /*#__PURE__*/function () {
141
141
  memoryUsage: process.memoryUsage()
142
142
  };
143
143
  }
144
- /**
145
- * Gets all relevant OS information for the currently running process.
146
- * @returns {mixed} - TODO: add return description.
144
+ /**
145
+ * Gets all relevant OS information for the currently running process.
146
+ * @returns {mixed} - TODO: add return description.
147
147
  */
148
148
 
149
149
  }, {
@@ -154,10 +154,10 @@ module.exports = /*#__PURE__*/function () {
154
154
  uptime: os.uptime()
155
155
  };
156
156
  }
157
- /**
158
- * Gets a stack trace for the specified error.
159
- * @param {mixed} err - TODO: add param description.
160
- * @returns {mixed} - TODO: add return description.
157
+ /**
158
+ * Gets a stack trace for the specified error.
159
+ * @param {mixed} err - TODO: add param description.
160
+ * @returns {mixed} - TODO: add return description.
161
161
  */
162
162
 
163
163
  }, {
@@ -175,10 +175,10 @@ module.exports = /*#__PURE__*/function () {
175
175
  };
176
176
  });
177
177
  }
178
- /**
179
- * Helper method to add a transport as an exception handler.
180
- * @param {Transport} handler - The transport to add as an exception handler.
181
- * @returns {void}
178
+ /**
179
+ * Helper method to add a transport as an exception handler.
180
+ * @param {Transport} handler - The transport to add as an exception handler.
181
+ * @returns {void}
182
182
  */
183
183
 
184
184
  }, {
@@ -191,12 +191,12 @@ module.exports = /*#__PURE__*/function () {
191
191
  this.logger.pipe(wrapper);
192
192
  }
193
193
  }
194
- /**
195
- * Logs all relevant information around the `err` and exits the current
196
- * process.
197
- * @param {Error} err - Error to handle
198
- * @returns {mixed} - TODO: add return description.
199
- * @private
194
+ /**
195
+ * Logs all relevant information around the `err` and exits the current
196
+ * process.
197
+ * @param {Error} err - Error to handle
198
+ * @returns {mixed} - TODO: add return description.
199
+ * @private
200
200
  */
201
201
 
202
202
  }, {
@@ -263,11 +263,11 @@ module.exports = /*#__PURE__*/function () {
263
263
  timeout = setTimeout(gracefulExit, 3000);
264
264
  }
265
265
  }
266
- /**
267
- * Returns the list of transports and exceptionHandlers for this instance.
268
- * @returns {Array} - List of transports and exceptionHandlers for this
269
- * instance.
270
- * @private
266
+ /**
267
+ * Returns the list of transports and exceptionHandlers for this instance.
268
+ * @returns {Array} - List of transports and exceptionHandlers for this
269
+ * instance.
270
+ * @private
271
271
  */
272
272
 
273
273
  }, {
@@ -1,8 +1,8 @@
1
- /**
2
- * tail-file.js: TODO: add file header description.
3
- *
4
- * (C) 2010 Charlie Robbins
5
- * MIT LICENCE
1
+ /**
2
+ * tail-file.js: TODO: add file header description.
3
+ *
4
+ * (C) 2010 Charlie Robbins
5
+ * MIT LICENCE
6
6
  */
7
7
  'use strict';
8
8
 
@@ -13,19 +13,19 @@ var _require = require('string_decoder'),
13
13
 
14
14
  var _require2 = require('readable-stream'),
15
15
  Stream = _require2.Stream;
16
- /**
17
- * Simple no-op function.
18
- * @returns {undefined}
16
+ /**
17
+ * Simple no-op function.
18
+ * @returns {undefined}
19
19
  */
20
20
 
21
21
 
22
22
  function noop() {}
23
- /**
24
- * TODO: add function description.
25
- * @param {Object} options - Options for tail.
26
- * @param {function} iter - Iterator function to execute on every line.
27
- * `tail -f` a file. Options must include file.
28
- * @returns {mixed} - TODO: add return description.
23
+ /**
24
+ * TODO: add function description.
25
+ * @param {Object} options - Options for tail.
26
+ * @param {function} iter - Iterator function to execute on every line.
27
+ * `tail -f` a file. Options must include file.
28
+ * @returns {mixed} - TODO: add return description.
29
29
  */
30
30
 
31
31
 
@@ -1,32 +1,32 @@
1
1
  /* eslint-disable no-console */
2
2
 
3
- /*
4
- * console.js: Transport for outputting to the console.
5
- *
6
- * (C) 2010 Charlie Robbins
7
- * MIT LICENCE
3
+ /*
4
+ * console.js: Transport for outputting to the console.
5
+ *
6
+ * (C) 2010 Charlie Robbins
7
+ * MIT LICENCE
8
8
  */
9
9
  'use strict';
10
10
 
11
- 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); }
11
+ 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); }
12
12
 
13
13
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
14
 
15
15
  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); } }
16
16
 
17
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
17
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
18
 
19
- 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); }
19
+ 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); }
20
20
 
21
21
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
22
 
23
23
  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); }; }
24
24
 
25
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
25
+ 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); }
26
26
 
27
27
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
28
 
29
- 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; } }
29
+ 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; } }
30
30
 
31
31
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
32
32
 
@@ -37,10 +37,10 @@ var _require = require('triple-beam'),
37
37
  MESSAGE = _require.MESSAGE;
38
38
 
39
39
  var TransportStream = require('winston-transport');
40
- /**
41
- * Transport for outputting to the console.
42
- * @type {Console}
43
- * @extends {TransportStream}
40
+ /**
41
+ * Transport for outputting to the console.
42
+ * @type {Console}
43
+ * @extends {TransportStream}
44
44
  */
45
45
 
46
46
 
@@ -49,10 +49,10 @@ module.exports = /*#__PURE__*/function (_TransportStream) {
49
49
 
50
50
  var _super = _createSuper(Console);
51
51
 
52
- /**
53
- * Constructor function for the Console transport object responsible for
54
- * persisting log messages and metadata to a terminal or TTY.
55
- * @param {!Object} [options={}] - Options for this instance.
52
+ /**
53
+ * Constructor function for the Console transport object responsible for
54
+ * persisting log messages and metadata to a terminal or TTY.
55
+ * @param {!Object} [options={}] - Options for this instance.
56
56
  */
57
57
  function Console() {
58
58
  var _this;
@@ -66,17 +66,17 @@ module.exports = /*#__PURE__*/function (_TransportStream) {
66
66
  _this.name = options.name || 'console';
67
67
  _this.stderrLevels = _this._stringArrayToSet(options.stderrLevels);
68
68
  _this.consoleWarnLevels = _this._stringArrayToSet(options.consoleWarnLevels);
69
- _this.eol = options.eol || os.EOL;
69
+ _this.eol = typeof options.eol === 'string' ? options.eol : os.EOL;
70
70
 
71
71
  _this.setMaxListeners(30);
72
72
 
73
73
  return _this;
74
74
  }
75
- /**
76
- * Core logging method exposed to Winston.
77
- * @param {Object} info - TODO: add param description.
78
- * @param {Function} callback - TODO: add param description.
79
- * @returns {undefined}
75
+ /**
76
+ * Core logging method exposed to Winston.
77
+ * @param {Object} info - TODO: add param description.
78
+ * @param {Function} callback - TODO: add param description.
79
+ * @returns {undefined}
80
80
  */
81
81
 
82
82
 
@@ -132,13 +132,13 @@ module.exports = /*#__PURE__*/function (_TransportStream) {
132
132
  callback(); // eslint-disable-line callback-return
133
133
  }
134
134
  }
135
- /**
136
- * Returns a Set-like object with strArray's elements as keys (each with the
137
- * value true).
138
- * @param {Array} strArray - Array of Set-elements as strings.
139
- * @param {?string} [errMsg] - Custom error message thrown on invalid input.
140
- * @returns {Object} - TODO: add return description.
141
- * @private
135
+ /**
136
+ * Returns a Set-like object with strArray's elements as keys (each with the
137
+ * value true).
138
+ * @param {Array} strArray - Array of Set-elements as strings.
139
+ * @param {?string} [errMsg] - Custom error message thrown on invalid input.
140
+ * @returns {Object} - TODO: add return description.
141
+ * @private
142
142
  */
143
143
 
144
144
  }, {