@contrast/agent 4.32.11 → 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 (222) hide show
  1. package/node_modules/file-stream-rotator/FileStreamRotator.js +200 -41
  2. package/node_modules/file-stream-rotator/LICENSE.txt +17 -0
  3. package/node_modules/file-stream-rotator/README.md +16 -1
  4. package/node_modules/file-stream-rotator/package.json +5 -5
  5. package/node_modules/file-stream-rotator/tests/every-minute-test.js +32 -15
  6. package/node_modules/file-stream-rotator/tests/every-second-test.js +16 -7
  7. package/node_modules/file-stream-rotator/tests/large-test.js +33 -0
  8. package/node_modules/file-stream-rotator/tests/rotate-on-size-without-date.js +103 -0
  9. package/node_modules/object-hash/dist/object_hash.js +1 -2
  10. package/node_modules/object-hash/index.js +33 -21
  11. package/node_modules/object-hash/package.json +20 -18
  12. package/node_modules/object-hash/readme.markdown +20 -5
  13. package/node_modules/winston-daily-rotate-file/README.md +81 -12
  14. package/node_modules/winston-daily-rotate-file/daily-rotate-file.js +69 -30
  15. package/node_modules/winston-daily-rotate-file/index.d.ts +119 -72
  16. package/node_modules/winston-daily-rotate-file/package.json +20 -19
  17. package/node_modules/winston-transport/.eslintrc +1 -1
  18. package/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
  19. package/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
  20. package/node_modules/winston-transport/.nyc_output/processinfo/index.json +1 -1
  21. package/node_modules/winston-transport/CHANGELOG.md +11 -0
  22. package/node_modules/winston-transport/dist/index.js +2 -2
  23. package/node_modules/winston-transport/index.d.ts +2 -0
  24. package/node_modules/winston-transport/index.js +2 -2
  25. package/node_modules/winston-transport/node_modules/readable-stream/README.md +106 -0
  26. package/node_modules/winston-transport/node_modules/readable-stream/errors-browser.js +127 -0
  27. package/node_modules/winston-transport/node_modules/readable-stream/errors.js +116 -0
  28. package/node_modules/winston-transport/node_modules/readable-stream/experimentalWarning.js +17 -0
  29. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_duplex.js +41 -46
  30. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_passthrough.js +1 -11
  31. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_readable.js +271 -263
  32. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_transform.js +18 -42
  33. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_writable.js +101 -147
  34. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
  35. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
  36. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
  37. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
  38. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
  39. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
  40. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
  41. package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
  42. package/node_modules/winston-transport/node_modules/readable-stream/package.json +72 -0
  43. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/readable-browser.js +2 -0
  44. package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/readable.js +5 -8
  45. package/node_modules/winston-transport/package.json +16 -14
  46. package/package.json +6 -6
  47. package/node_modules/colors/LICENSE +0 -25
  48. package/node_modules/colors/README.md +0 -221
  49. package/node_modules/colors/examples/normal-usage.js +0 -82
  50. package/node_modules/colors/examples/safe-string.js +0 -79
  51. package/node_modules/colors/index.d.ts +0 -136
  52. package/node_modules/colors/lib/colors.js +0 -211
  53. package/node_modules/colors/lib/custom/trap.js +0 -46
  54. package/node_modules/colors/lib/custom/zalgo.js +0 -110
  55. package/node_modules/colors/lib/extendStringPrototype.js +0 -110
  56. package/node_modules/colors/lib/index.js +0 -13
  57. package/node_modules/colors/lib/maps/america.js +0 -10
  58. package/node_modules/colors/lib/maps/rainbow.js +0 -12
  59. package/node_modules/colors/lib/maps/random.js +0 -11
  60. package/node_modules/colors/lib/maps/zebra.js +0 -5
  61. package/node_modules/colors/lib/styles.js +0 -95
  62. package/node_modules/colors/lib/system/has-flag.js +0 -35
  63. package/node_modules/colors/lib/system/supports-colors.js +0 -151
  64. package/node_modules/colors/package.json +0 -49
  65. package/node_modules/colors/safe.d.ts +0 -48
  66. package/node_modules/colors/safe.js +0 -10
  67. package/node_modules/colors/themes/generic-logging.js +0 -12
  68. package/node_modules/core-util-is/LICENSE +0 -19
  69. package/node_modules/core-util-is/README.md +0 -3
  70. package/node_modules/core-util-is/float.patch +0 -604
  71. package/node_modules/core-util-is/lib/util.js +0 -107
  72. package/node_modules/core-util-is/package.json +0 -36
  73. package/node_modules/core-util-is/test.js +0 -68
  74. package/node_modules/cycle/README.md +0 -49
  75. package/node_modules/cycle/cycle.js +0 -170
  76. package/node_modules/cycle/package.json +0 -16
  77. package/node_modules/fast-safe-stringify/.travis.yml +0 -8
  78. package/node_modules/fast-safe-stringify/CHANGELOG.md +0 -17
  79. package/node_modules/fast-safe-stringify/LICENSE +0 -23
  80. package/node_modules/fast-safe-stringify/benchmark.js +0 -137
  81. package/node_modules/fast-safe-stringify/index.d.ts +0 -8
  82. package/node_modules/fast-safe-stringify/index.js +0 -161
  83. package/node_modules/fast-safe-stringify/package.json +0 -50
  84. package/node_modules/fast-safe-stringify/readme.md +0 -154
  85. package/node_modules/fast-safe-stringify/test-stable.js +0 -311
  86. package/node_modules/fast-safe-stringify/test.js +0 -304
  87. package/node_modules/isarray/.npmignore +0 -1
  88. package/node_modules/isarray/.travis.yml +0 -4
  89. package/node_modules/isarray/Makefile +0 -6
  90. package/node_modules/isarray/README.md +0 -60
  91. package/node_modules/isarray/component.json +0 -19
  92. package/node_modules/isarray/index.js +0 -5
  93. package/node_modules/isarray/package.json +0 -49
  94. package/node_modules/isarray/test.js +0 -20
  95. package/node_modules/object-hash/.jshintrc +0 -19
  96. package/node_modules/object-hash/.travis.yml +0 -35
  97. package/node_modules/object-hash/bower.json +0 -15
  98. package/node_modules/object-hash/dist/object_hash.js.map +0 -1
  99. package/node_modules/object-hash/dist/object_hash_test.js +0 -4737
  100. package/node_modules/object-hash/gulpfile.js +0 -97
  101. package/node_modules/object-hash/karma.conf.js +0 -69
  102. package/node_modules/object-hash/test/blob.js +0 -41
  103. package/node_modules/object-hash/test/index.js +0 -290
  104. package/node_modules/object-hash/test/object-classes.js +0 -106
  105. package/node_modules/object-hash/test/old-crypto.js +0 -60
  106. package/node_modules/object-hash/test/replacer.js +0 -36
  107. package/node_modules/object-hash/test/types.js +0 -174
  108. package/node_modules/object-hash/test/writeToStream.js +0 -27
  109. package/node_modules/process-nextick-args/index.js +0 -45
  110. package/node_modules/process-nextick-args/license.md +0 -19
  111. package/node_modules/process-nextick-args/package.json +0 -29
  112. package/node_modules/process-nextick-args/readme.md +0 -18
  113. package/node_modules/readable-stream/.travis.yml +0 -34
  114. package/node_modules/readable-stream/README.md +0 -58
  115. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
  116. package/node_modules/readable-stream/duplex-browser.js +0 -1
  117. package/node_modules/readable-stream/duplex.js +0 -1
  118. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
  119. package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -74
  120. package/node_modules/readable-stream/package.json +0 -56
  121. package/node_modules/readable-stream/passthrough.js +0 -1
  122. package/node_modules/readable-stream/transform.js +0 -1
  123. package/node_modules/readable-stream/writable-browser.js +0 -1
  124. package/node_modules/readable-stream/writable.js +0 -8
  125. package/node_modules/winston-compat/.gitattributes +0 -1
  126. package/node_modules/winston-compat/.node-version +0 -1
  127. package/node_modules/winston-compat/CHANGELOG.md +0 -17
  128. package/node_modules/winston-compat/LICENSE +0 -22
  129. package/node_modules/winston-compat/README.md +0 -2
  130. package/node_modules/winston-compat/index.js +0 -295
  131. package/node_modules/winston-compat/lib/transport.js +0 -135
  132. package/node_modules/winston-compat/node_modules/fecha/CHANGELOG.md +0 -11
  133. package/node_modules/winston-compat/node_modules/fecha/LICENSE +0 -22
  134. package/node_modules/winston-compat/node_modules/fecha/README.md +0 -259
  135. package/node_modules/winston-compat/node_modules/fecha/fecha.d.ts +0 -47
  136. package/node_modules/winston-compat/node_modules/fecha/fecha.js +0 -334
  137. package/node_modules/winston-compat/node_modules/fecha/fecha.min.js +0 -1
  138. package/node_modules/winston-compat/node_modules/fecha/package.json +0 -44
  139. package/node_modules/winston-compat/node_modules/logform/.babelrc +0 -3
  140. package/node_modules/winston-compat/node_modules/logform/.eslintrc +0 -7
  141. package/node_modules/winston-compat/node_modules/logform/.gitattributes +0 -1
  142. package/node_modules/winston-compat/node_modules/logform/.travis.yml +0 -17
  143. package/node_modules/winston-compat/node_modules/logform/CHANGELOG.md +0 -103
  144. package/node_modules/winston-compat/node_modules/logform/LICENSE +0 -21
  145. package/node_modules/winston-compat/node_modules/logform/README.md +0 -170
  146. package/node_modules/winston-compat/node_modules/logform/align.js +0 -14
  147. package/node_modules/winston-compat/node_modules/logform/browser.js +0 -36
  148. package/node_modules/winston-compat/node_modules/logform/cli.js +0 -52
  149. package/node_modules/winston-compat/node_modules/logform/colorize.js +0 -118
  150. package/node_modules/winston-compat/node_modules/logform/combine.js +0 -66
  151. package/node_modules/winston-compat/node_modules/logform/dist/align.js +0 -14
  152. package/node_modules/winston-compat/node_modules/logform/dist/browser.js +0 -37
  153. package/node_modules/winston-compat/node_modules/logform/dist/cli.js +0 -75
  154. package/node_modules/winston-compat/node_modules/logform/dist/colorize.js +0 -147
  155. package/node_modules/winston-compat/node_modules/logform/dist/combine.js +0 -66
  156. package/node_modules/winston-compat/node_modules/logform/dist/format.js +0 -69
  157. package/node_modules/winston-compat/node_modules/logform/dist/index.js +0 -54
  158. package/node_modules/winston-compat/node_modules/logform/dist/json.js +0 -27
  159. package/node_modules/winston-compat/node_modules/logform/dist/label.js +0 -19
  160. package/node_modules/winston-compat/node_modules/logform/dist/levels.js +0 -15
  161. package/node_modules/winston-compat/node_modules/logform/dist/logstash.js +0 -32
  162. package/node_modules/winston-compat/node_modules/logform/dist/metadata.js +0 -63
  163. package/node_modules/winston-compat/node_modules/logform/dist/ms.js +0 -18
  164. package/node_modules/winston-compat/node_modules/logform/dist/pad-levels.js +0 -118
  165. package/node_modules/winston-compat/node_modules/logform/dist/pretty-print.js +0 -20
  166. package/node_modules/winston-compat/node_modules/logform/dist/printf.js +0 -40
  167. package/node_modules/winston-compat/node_modules/logform/dist/simple.js +0 -36
  168. package/node_modules/winston-compat/node_modules/logform/dist/splat.js +0 -147
  169. package/node_modules/winston-compat/node_modules/logform/dist/timestamp.js +0 -28
  170. package/node_modules/winston-compat/node_modules/logform/dist/uncolorize.js +0 -31
  171. package/node_modules/winston-compat/node_modules/logform/examples/combine.js +0 -14
  172. package/node_modules/winston-compat/node_modules/logform/examples/filter.js +0 -30
  173. package/node_modules/winston-compat/node_modules/logform/examples/invalid.js +0 -6
  174. package/node_modules/winston-compat/node_modules/logform/examples/metadata.js +0 -78
  175. package/node_modules/winston-compat/node_modules/logform/examples/padLevels.js +0 -39
  176. package/node_modules/winston-compat/node_modules/logform/examples/volume.js +0 -25
  177. package/node_modules/winston-compat/node_modules/logform/format.js +0 -52
  178. package/node_modules/winston-compat/node_modules/logform/index.d.ts +0 -53
  179. package/node_modules/winston-compat/node_modules/logform/index.js +0 -52
  180. package/node_modules/winston-compat/node_modules/logform/json.js +0 -26
  181. package/node_modules/winston-compat/node_modules/logform/label.js +0 -19
  182. package/node_modules/winston-compat/node_modules/logform/levels.js +0 -12
  183. package/node_modules/winston-compat/node_modules/logform/logstash.js +0 -29
  184. package/node_modules/winston-compat/node_modules/logform/metadata.js +0 -61
  185. package/node_modules/winston-compat/node_modules/logform/ms.js +0 -18
  186. package/node_modules/winston-compat/node_modules/logform/package.json +0 -51
  187. package/node_modules/winston-compat/node_modules/logform/pad-levels.js +0 -83
  188. package/node_modules/winston-compat/node_modules/logform/pretty-print.js +0 -16
  189. package/node_modules/winston-compat/node_modules/logform/printf.js +0 -26
  190. package/node_modules/winston-compat/node_modules/logform/simple.js +0 -33
  191. package/node_modules/winston-compat/node_modules/logform/splat.js +0 -125
  192. package/node_modules/winston-compat/node_modules/logform/timestamp.js +0 -30
  193. package/node_modules/winston-compat/node_modules/logform/tsconfig.json +0 -22
  194. package/node_modules/winston-compat/node_modules/logform/uncolorize.js +0 -27
  195. package/node_modules/winston-compat/package.json +0 -46
  196. package/node_modules/winston-compat/test/clone.test.js +0 -25
  197. package/node_modules/winston-compat/test/helpers.js +0 -256
  198. package/node_modules/winston-compat/test/timestamp.test.js +0 -14
  199. package/node_modules/winston-compat/test/transports/transport.js +0 -205
  200. package/node_modules/winston-compat/test/winston-compat.test.js +0 -18
  201. package/node_modules/winston-daily-rotate-file/.eslintrc.js +0 -11
  202. package/node_modules/winston-daily-rotate-file/.node-version +0 -1
  203. package/node_modules/winston-daily-rotate-file/.travis.yml +0 -15
  204. package/node_modules/winston-daily-rotate-file/node_modules/semver/CHANGELOG.md +0 -70
  205. package/node_modules/winston-daily-rotate-file/node_modules/semver/LICENSE +0 -15
  206. package/node_modules/winston-daily-rotate-file/node_modules/semver/README.md +0 -443
  207. package/node_modules/winston-daily-rotate-file/node_modules/semver/bin/semver.js +0 -174
  208. package/node_modules/winston-daily-rotate-file/node_modules/semver/package.json +0 -32
  209. package/node_modules/winston-daily-rotate-file/node_modules/semver/range.bnf +0 -16
  210. package/node_modules/winston-daily-rotate-file/node_modules/semver/semver.js +0 -1596
  211. package/node_modules/winston-daily-rotate-file/test/memory-stream.js +0 -38
  212. package/node_modules/winston-daily-rotate-file/test/random-string.js +0 -31
  213. package/node_modules/winston-daily-rotate-file/test/transport-tests.js +0 -250
  214. package/node_modules/winston-transport/.nyc_output/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
  215. package/node_modules/winston-transport/.nyc_output/processinfo/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
  216. package/node_modules/winston-transport/.travis.yml +0 -17
  217. package/node_modules/winston-transport/tsconfig.json +0 -22
  218. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/CONTRIBUTING.md +0 -0
  219. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/GOVERNANCE.md +0 -0
  220. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/LICENSE +0 -0
  221. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/internal/streams/stream-browser.js +0 -0
  222. /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/internal/streams/stream.js +0 -0
@@ -1,56 +0,0 @@
1
- {
2
- "name": "readable-stream",
3
- "version": "2.3.7",
4
- "description": "Streams3, a user-land copy of the stream library from Node.js",
5
- "main": "readable.js",
6
- "dependencies": {
7
- "core-util-is": "~1.0.0",
8
- "inherits": "~2.0.3",
9
- "isarray": "~1.0.0",
10
- "process-nextick-args": "~2.0.0",
11
- "safe-buffer": "~5.1.1",
12
- "string_decoder": "~1.1.1",
13
- "util-deprecate": "~1.0.1"
14
- },
15
- "devDependencies": {
16
- "assert": "^1.4.0",
17
- "babel-polyfill": "^6.9.1",
18
- "buffer": "^4.9.0",
19
- "lolex": "^2.3.2",
20
- "nyc": "^6.4.0",
21
- "tap": "^0.7.0",
22
- "tape": "^4.8.0"
23
- },
24
- "scripts": {
25
- "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js",
26
- "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
27
- "cover": "nyc npm test",
28
- "report": "nyc report --reporter=lcov"
29
- },
30
- "repository": {
31
- "type": "git",
32
- "url": "git://github.com/nodejs/readable-stream"
33
- },
34
- "keywords": [
35
- "readable",
36
- "stream",
37
- "pipe"
38
- ],
39
- "browser": {
40
- "util": false,
41
- "./readable.js": "./readable-browser.js",
42
- "./writable.js": "./writable-browser.js",
43
- "./duplex.js": "./duplex-browser.js",
44
- "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
45
- },
46
- "nyc": {
47
- "include": [
48
- "lib/**.js"
49
- ]
50
- },
51
- "license": "MIT"
52
-
53
- ,"_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz"
54
- ,"_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw=="
55
- ,"_from": "readable-stream@2.3.7"
56
- }
@@ -1 +0,0 @@
1
- module.exports = require('./readable').PassThrough
@@ -1 +0,0 @@
1
- module.exports = require('./readable').Transform
@@ -1 +0,0 @@
1
- module.exports = require('./lib/_stream_writable.js');
@@ -1,8 +0,0 @@
1
- var Stream = require("stream")
2
- var Writable = require("./lib/_stream_writable.js")
3
-
4
- if (process.env.READABLE_STREAM === 'disable') {
5
- module.exports = Stream && Stream.Writable || Writable
6
- } else {
7
- module.exports = Writable
8
- }
@@ -1 +0,0 @@
1
- package-lock.json binary
@@ -1 +0,0 @@
1
- 10.15.1
@@ -1,17 +0,0 @@
1
- # CHANGELOG
2
-
3
- ### 0.1.2
4
-
5
- - [#7] require `'util'`.
6
-
7
- ### 0.1.1
8
-
9
- - Move `vows` to `devDependencies`.
10
-
11
- ### 0.1.0
12
-
13
- - Add legacy `vows`-based test helpers.
14
-
15
- ### 0.0.1
16
-
17
- - Initial release
@@ -1,22 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Charlie Robbins & the contributors.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
@@ -1,2 +0,0 @@
1
- # winston-compat
2
- Core functionality from winston < 3.0.0 commonly used by user-created transports.
@@ -1,295 +0,0 @@
1
- 'use strict';
2
-
3
- var cycle = require('cycle');
4
- var util = require('util');
5
- var { levels, format } = require('logform');
6
- var { configs } = require('triple-beam');
7
- var { colorize } = format;
8
-
9
- levels(configs.cli);
10
- levels(configs.npm);
11
- levels(configs.syslog);
12
-
13
- //
14
- // Expose base Transport
15
- //
16
- exports.Transport = require('./lib/transport');
17
-
18
- //
19
- // ### function clone (obj)
20
- // #### @obj {Object} Object to clone.
21
- // Helper method for deep cloning pure JSON objects
22
- // i.e. JSON objects that are either literals or objects (no Arrays, etc)
23
- //
24
- exports.clone = function (obj) {
25
- //
26
- // We only need to clone reference types (Object)
27
- //
28
- var copy = {};
29
-
30
- if (obj instanceof Error) {
31
- // With potential custom Error objects, this might not be exactly correct,
32
- // but probably close-enough for purposes of this lib.
33
- copy = new Error(obj.message);
34
- Object.getOwnPropertyNames(obj).forEach(function (key) {
35
- copy[key] = obj[key];
36
- });
37
-
38
- return copy;
39
- }
40
- else if (!(obj instanceof Object)) {
41
- return obj;
42
- }
43
- else if (obj instanceof Date) {
44
- return new Date(obj.getTime());
45
- }
46
-
47
- for (var i in obj) {
48
- if (obj.hasOwnProperty(i)) {
49
- if (Array.isArray(obj[i])) {
50
- copy[i] = obj[i].slice(0);
51
- }
52
- else if (obj[i] instanceof Buffer) {
53
- copy[i] = obj[i].slice(0);
54
- }
55
- else if (typeof obj[i] != 'function') {
56
- copy[i] = obj[i] instanceof Object ? exports.clone(obj[i]) : obj[i];
57
- }
58
- else if (typeof obj[i] === 'function') {
59
- copy[i] = obj[i];
60
- }
61
- }
62
- }
63
-
64
- return copy;
65
- };
66
-
67
- //
68
- // ### function log (options)
69
- // #### @options {Object} All information about the log serialization.
70
- // Generic logging function for returning timestamped strings
71
- // with the following options:
72
- //
73
- // {
74
- // level: 'level to add to serialized message',
75
- // message: 'message to serialize',
76
- // meta: 'additional logging metadata to serialize',
77
- // colorize: false, // Colorizes output (only if `.json` is false)
78
- // align: false // Align message level.
79
- // timestamp: true // Adds a timestamp to the serialized message
80
- // label: 'label to prepend the message'
81
- // }
82
- //
83
- exports.log = function (options) {
84
- var timestampFn = typeof options.timestamp === 'function'
85
- ? options.timestamp
86
- : exports.timestamp,
87
- timestamp = options.timestamp ? timestampFn() : null,
88
- showLevel = options.showLevel === undefined ? true : options.showLevel,
89
- meta = options.meta !== null && options.meta !== undefined && !(options.meta instanceof Error)
90
- ? exports.clone(cycle.decycle(options.meta))
91
- : options.meta || null,
92
- output;
93
-
94
- //
95
- // raw mode is intended for outputing winston as streaming JSON to STDOUT
96
- //
97
- if (options.raw) {
98
- if (typeof meta !== 'object' && meta != null) {
99
- meta = { meta: meta };
100
- }
101
- output = exports.clone(meta) || {};
102
- output.level = options.level;
103
- //
104
- // Remark (jcrugzz): This used to be output.message = options.message.stripColors.
105
- // I do not know why this is, it does not make sense but im handling that
106
- // case here as well as handling the case that does make sense which is to
107
- // make the `output.message = options.message`
108
- //
109
- output.message = options.message.stripColors
110
- ? options.message.stripColors
111
- : options.message;
112
-
113
- return JSON.stringify(output);
114
- }
115
-
116
- //
117
- // json mode is intended for pretty printing multi-line json to the terminal
118
- //
119
- if (options.json || true === options.logstash) {
120
- if (typeof meta !== 'object' && meta != null) {
121
- meta = { meta: meta };
122
- }
123
-
124
- output = exports.clone(meta) || {};
125
- output.level = options.level;
126
- output.message = output.message || '';
127
-
128
- if (options.label) { output.label = options.label; }
129
- if (options.message) { output.message = options.message; }
130
- if (timestamp) { output.timestamp = timestamp; }
131
-
132
- if (options.logstash === true) {
133
- // use logstash format
134
- var logstashOutput = {};
135
- if (output.message !== undefined) {
136
- logstashOutput['@message'] = output.message;
137
- delete output.message;
138
- }
139
-
140
- if (output.timestamp !== undefined) {
141
- logstashOutput['@timestamp'] = output.timestamp;
142
- delete output.timestamp;
143
- }
144
-
145
- logstashOutput['@fields'] = exports.clone(output);
146
- output = logstashOutput;
147
- }
148
-
149
- if (typeof options.stringify === 'function') {
150
- return options.stringify(output);
151
- }
152
-
153
- return JSON.stringify(output, function (key, value) {
154
- return value instanceof Buffer
155
- ? value.toString('base64')
156
- : value;
157
- });
158
- }
159
-
160
- //
161
- // Remark: this should really be a call to `util.format`.
162
- //
163
- if (typeof options.formatter == 'function') {
164
- return String(options.formatter(exports.clone(options)));
165
- }
166
-
167
- output = timestamp ? timestamp + ' - ' : '';
168
- if (showLevel) {
169
- var opts = {};
170
- opts.level = options.colorize === 'level';
171
- opts.all = options.colorize === 'all' || options.colorize === true;
172
-
173
- output += opts.level || opts.all
174
- ? colorize().transform(options, opts).level
175
- : options.level;
176
- }
177
-
178
- output += (options.align) ? '\t' : '';
179
- output += (timestamp || showLevel) ? ': ' : '';
180
- output += options.label ? ('[' + options.label + '] ') : '';
181
- var opts = {};
182
- opts.message = options.colorize === 'message';
183
- opts.all = options.colorize === 'all';
184
-
185
- output += opts.all || opts.message
186
- ? colorize.transform(options, opts).message
187
- : options.message;
188
-
189
- if (meta !== null && meta !== undefined) {
190
- if (meta && meta instanceof Error && meta.stack) {
191
- meta = meta.stack;
192
- }
193
-
194
- if (typeof meta !== 'object') {
195
- output += ' ' + meta;
196
- }
197
- else if (Object.keys(meta).length > 0) {
198
- if (typeof options.prettyPrint === 'function') {
199
- output += ' ' + options.prettyPrint(meta);
200
- } else if (options.prettyPrint) {
201
- output += ' ' + '\n' + util.inspect(meta, false, options.depth || null, options.colorize);
202
- } else if (
203
- options.humanReadableUnhandledException
204
- && Object.keys(meta).length === 5
205
- && meta.hasOwnProperty('date')
206
- && meta.hasOwnProperty('process')
207
- && meta.hasOwnProperty('os')
208
- && meta.hasOwnProperty('trace')
209
- && meta.hasOwnProperty('stack')) {
210
-
211
- //
212
- // If meta carries unhandled exception data serialize the stack nicely
213
- //
214
- var stack = meta.stack;
215
- delete meta.stack;
216
- delete meta.trace;
217
- output += ' ' + exports.serialize(meta);
218
-
219
- if (stack) {
220
- output += '\n' + stack.join('\n');
221
- }
222
- } else {
223
- output += ' ' + exports.serialize(meta);
224
- }
225
- }
226
- }
227
-
228
- return output;
229
- };
230
-
231
- //
232
- // ### function serialize (obj, key)
233
- // #### @obj {Object|literal} Object to serialize
234
- // #### @key {string} **Optional** Optional key represented by obj in a larger object
235
- // Performs simple comma-separated, `key=value` serialization for Loggly when
236
- // logging to non-JSON inputs.
237
- //
238
- exports.serialize = function (obj, key) {
239
- if (obj === null) {
240
- obj = 'null';
241
- }
242
- else if (obj === undefined) {
243
- obj = 'undefined';
244
- }
245
- else if (obj === false) {
246
- obj = 'false';
247
- }
248
-
249
- if (typeof obj !== 'object') {
250
- return key ? key + '=' + obj : obj;
251
- }
252
-
253
- if (obj instanceof Buffer) {
254
- return key ? key + '=' + obj.toString('base64') : obj.toString('base64');
255
- }
256
-
257
- var msg = '',
258
- keys = Object.keys(obj),
259
- length = keys.length;
260
-
261
- for (var i = 0; i < length; i++) {
262
- if (Array.isArray(obj[keys[i]])) {
263
- msg += keys[i] + '=[';
264
-
265
- for (var j = 0, l = obj[keys[i]].length; j < l; j++) {
266
- msg += exports.serialize(obj[keys[i]][j]);
267
- if (j < l - 1) {
268
- msg += ', ';
269
- }
270
- }
271
-
272
- msg += ']';
273
- }
274
- else if (obj[keys[i]] instanceof Date) {
275
- msg += keys[i] + '=' + obj[keys[i]];
276
- }
277
- else {
278
- msg += exports.serialize(obj[keys[i]], keys[i]);
279
- }
280
-
281
- if (i < length - 1) {
282
- msg += ', ';
283
- }
284
- }
285
-
286
- return msg;
287
- };
288
-
289
- //
290
- // ### function timestamp ()
291
- // Returns a timestamp string for the current time.
292
- //
293
- exports.timestamp = function () {
294
- return new Date().toISOString();
295
- };
@@ -1,135 +0,0 @@
1
- /*
2
- * transport.js: Base Transport object for all Winston transports.
3
- *
4
- * (C) 2010 Charlie Robbins
5
- * MIT LICENCE
6
- *
7
- */
8
-
9
- var events = require('events'),
10
- util = require('util');
11
-
12
- //
13
- // ### function Transport (options)
14
- // #### @options {Object} Options for this instance.
15
- // Constructor function for the Tranport object responsible
16
- // base functionality for all winston transports.
17
- //
18
- var Transport = module.exports = function (options) {
19
- events.EventEmitter.call(this);
20
-
21
- options = options || {};
22
- this.silent = options.silent || false;
23
- this.raw = options.raw || false;
24
- this.name = options.name || this.name;
25
- this.formatter = options.formatter;
26
-
27
- //
28
- // Do not set a default level. When `level` is falsey on any
29
- // `Transport` instance, any `Logger` instance uses the
30
- // configured level (instead of the Transport level)
31
- //
32
- this.level = options.level;
33
-
34
- this.handleExceptions = options.handleExceptions || false;
35
- this.exceptionsLevel = options.exceptionsLevel || 'error';
36
- this.humanReadableUnhandledException = options.humanReadableUnhandledException || false;
37
- };
38
-
39
- //
40
- // Inherit from `events.EventEmitter`.
41
- //
42
- util.inherits(Transport, events.EventEmitter);
43
-
44
- //
45
- // ### function formatQuery (query)
46
- // #### @query {string|Object} Query to format
47
- // Formats the specified `query` Object (or string) to conform
48
- // with the underlying implementation of this transport.
49
- //
50
- Transport.prototype.formatQuery = function (query) {
51
- return query;
52
- };
53
-
54
- //
55
- // ### function normalizeQuery (query)
56
- // #### @options {string|Object} Query to normalize
57
- // Normalize options for query
58
- //
59
- Transport.prototype.normalizeQuery = function (options) {
60
- //
61
- // Use options similar to loggly.
62
- // [See Loggly Search API](http://wiki.loggly.com/retrieve_events#optional)
63
- //
64
-
65
- options = options || {};
66
-
67
- // limit
68
- options.rows = options.rows || options.limit || 10;
69
-
70
- // starting row offset
71
- options.start = options.start || 0;
72
-
73
- // now
74
- options.until = options.until || new Date;
75
- if (typeof options.until !== 'object') {
76
- options.until = new Date(options.until);
77
- }
78
-
79
- // now - 24
80
- options.from = options.from || (options.until - (24 * 60 * 60 * 1000));
81
- if (typeof options.from !== 'object') {
82
- options.from = new Date(options.from);
83
- }
84
-
85
-
86
- // 'asc' or 'desc'
87
- options.order = options.order || 'desc';
88
-
89
- // which fields to select
90
- options.fields = options.fields;
91
-
92
- return options;
93
- };
94
-
95
- //
96
- // ### function formatResults (results, options)
97
- // #### @results {Object|Array} Results returned from `.query`.
98
- // #### @options {Object} **Optional** Formatting options
99
- // Formats the specified `results` with the given `options` accordinging
100
- // to the implementation of this transport.
101
- //
102
- Transport.prototype.formatResults = function (results, options) {
103
- return results;
104
- };
105
-
106
- //
107
- // ### function logException (msg, meta, callback)
108
- // #### @msg {string} Message to log
109
- // #### @meta {Object} **Optional** Additional metadata to attach
110
- // #### @callback {function} Continuation to respond to when complete.
111
- // Logs the specified `msg`, `meta` and responds to the callback once the log
112
- // operation is complete to ensure that the event loop will not exit before
113
- // all logging has completed.
114
- //
115
- Transport.prototype.logException = function (msg, meta, callback) {
116
- var self = this,
117
- called;
118
-
119
- if (this.silent) {
120
- return callback();
121
- }
122
-
123
- function onComplete () {
124
- if (!called) {
125
- called = true;
126
- self.removeListener('logged', onComplete);
127
- self.removeListener('error', onComplete);
128
- callback();
129
- }
130
- }
131
-
132
- this.once('logged', onComplete);
133
- this.once('error', onComplete);
134
- this.log(self.exceptionsLevel, msg, meta, function () { });
135
- };
@@ -1,11 +0,0 @@
1
- ### 2.3.2
2
- Added typescript definitions to NPM
3
-
4
- ### 2.3.0
5
- Added strict version of date parser that returns null on invalid dates (may use strict version in v3)
6
-
7
- ### 2.2.0
8
- Fixed a bug when parsing Do format dates
9
-
10
- ## 2.0.0
11
- Fecha now throws errors on invalid dates in `fecha.format` and is stricter about what dates it accepts. Dates must pass `Object.prototype.toString.call(dateObj) !== '[object Date]'`.
@@ -1,22 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Taylor Hakes
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-