@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.
- package/node_modules/file-stream-rotator/FileStreamRotator.js +200 -41
- package/node_modules/file-stream-rotator/LICENSE.txt +17 -0
- package/node_modules/file-stream-rotator/README.md +16 -1
- package/node_modules/file-stream-rotator/package.json +5 -5
- package/node_modules/file-stream-rotator/tests/every-minute-test.js +32 -15
- package/node_modules/file-stream-rotator/tests/every-second-test.js +16 -7
- package/node_modules/file-stream-rotator/tests/large-test.js +33 -0
- package/node_modules/file-stream-rotator/tests/rotate-on-size-without-date.js +103 -0
- package/node_modules/object-hash/dist/object_hash.js +1 -2
- package/node_modules/object-hash/index.js +33 -21
- package/node_modules/object-hash/package.json +20 -18
- package/node_modules/object-hash/readme.markdown +20 -5
- package/node_modules/winston-daily-rotate-file/README.md +81 -12
- package/node_modules/winston-daily-rotate-file/daily-rotate-file.js +69 -30
- package/node_modules/winston-daily-rotate-file/index.d.ts +119 -72
- package/node_modules/winston-daily-rotate-file/package.json +20 -19
- package/node_modules/winston-transport/.eslintrc +1 -1
- package/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
- package/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
- package/node_modules/winston-transport/.nyc_output/processinfo/index.json +1 -1
- package/node_modules/winston-transport/CHANGELOG.md +11 -0
- package/node_modules/winston-transport/dist/index.js +2 -2
- package/node_modules/winston-transport/index.d.ts +2 -0
- package/node_modules/winston-transport/index.js +2 -2
- package/node_modules/winston-transport/node_modules/readable-stream/README.md +106 -0
- package/node_modules/winston-transport/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/winston-transport/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/winston-transport/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_duplex.js +41 -46
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_passthrough.js +1 -11
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_readable.js +271 -263
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_transform.js +18 -42
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_writable.js +101 -147
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/node_modules/winston-transport/node_modules/readable-stream/package.json +72 -0
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/readable-browser.js +2 -0
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/readable.js +5 -8
- package/node_modules/winston-transport/package.json +16 -14
- package/package.json +6 -6
- package/node_modules/colors/LICENSE +0 -25
- package/node_modules/colors/README.md +0 -221
- package/node_modules/colors/examples/normal-usage.js +0 -82
- package/node_modules/colors/examples/safe-string.js +0 -79
- package/node_modules/colors/index.d.ts +0 -136
- package/node_modules/colors/lib/colors.js +0 -211
- package/node_modules/colors/lib/custom/trap.js +0 -46
- package/node_modules/colors/lib/custom/zalgo.js +0 -110
- package/node_modules/colors/lib/extendStringPrototype.js +0 -110
- package/node_modules/colors/lib/index.js +0 -13
- package/node_modules/colors/lib/maps/america.js +0 -10
- package/node_modules/colors/lib/maps/rainbow.js +0 -12
- package/node_modules/colors/lib/maps/random.js +0 -11
- package/node_modules/colors/lib/maps/zebra.js +0 -5
- package/node_modules/colors/lib/styles.js +0 -95
- package/node_modules/colors/lib/system/has-flag.js +0 -35
- package/node_modules/colors/lib/system/supports-colors.js +0 -151
- package/node_modules/colors/package.json +0 -49
- package/node_modules/colors/safe.d.ts +0 -48
- package/node_modules/colors/safe.js +0 -10
- package/node_modules/colors/themes/generic-logging.js +0 -12
- package/node_modules/core-util-is/LICENSE +0 -19
- package/node_modules/core-util-is/README.md +0 -3
- package/node_modules/core-util-is/float.patch +0 -604
- package/node_modules/core-util-is/lib/util.js +0 -107
- package/node_modules/core-util-is/package.json +0 -36
- package/node_modules/core-util-is/test.js +0 -68
- package/node_modules/cycle/README.md +0 -49
- package/node_modules/cycle/cycle.js +0 -170
- package/node_modules/cycle/package.json +0 -16
- package/node_modules/fast-safe-stringify/.travis.yml +0 -8
- package/node_modules/fast-safe-stringify/CHANGELOG.md +0 -17
- package/node_modules/fast-safe-stringify/LICENSE +0 -23
- package/node_modules/fast-safe-stringify/benchmark.js +0 -137
- package/node_modules/fast-safe-stringify/index.d.ts +0 -8
- package/node_modules/fast-safe-stringify/index.js +0 -161
- package/node_modules/fast-safe-stringify/package.json +0 -50
- package/node_modules/fast-safe-stringify/readme.md +0 -154
- package/node_modules/fast-safe-stringify/test-stable.js +0 -311
- package/node_modules/fast-safe-stringify/test.js +0 -304
- package/node_modules/isarray/.npmignore +0 -1
- package/node_modules/isarray/.travis.yml +0 -4
- package/node_modules/isarray/Makefile +0 -6
- package/node_modules/isarray/README.md +0 -60
- package/node_modules/isarray/component.json +0 -19
- package/node_modules/isarray/index.js +0 -5
- package/node_modules/isarray/package.json +0 -49
- package/node_modules/isarray/test.js +0 -20
- package/node_modules/object-hash/.jshintrc +0 -19
- package/node_modules/object-hash/.travis.yml +0 -35
- package/node_modules/object-hash/bower.json +0 -15
- package/node_modules/object-hash/dist/object_hash.js.map +0 -1
- package/node_modules/object-hash/dist/object_hash_test.js +0 -4737
- package/node_modules/object-hash/gulpfile.js +0 -97
- package/node_modules/object-hash/karma.conf.js +0 -69
- package/node_modules/object-hash/test/blob.js +0 -41
- package/node_modules/object-hash/test/index.js +0 -290
- package/node_modules/object-hash/test/object-classes.js +0 -106
- package/node_modules/object-hash/test/old-crypto.js +0 -60
- package/node_modules/object-hash/test/replacer.js +0 -36
- package/node_modules/object-hash/test/types.js +0 -174
- package/node_modules/object-hash/test/writeToStream.js +0 -27
- package/node_modules/process-nextick-args/index.js +0 -45
- package/node_modules/process-nextick-args/license.md +0 -19
- package/node_modules/process-nextick-args/package.json +0 -29
- package/node_modules/process-nextick-args/readme.md +0 -18
- package/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/readable-stream/README.md +0 -58
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -74
- package/node_modules/readable-stream/package.json +0 -56
- package/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/winston-compat/.gitattributes +0 -1
- package/node_modules/winston-compat/.node-version +0 -1
- package/node_modules/winston-compat/CHANGELOG.md +0 -17
- package/node_modules/winston-compat/LICENSE +0 -22
- package/node_modules/winston-compat/README.md +0 -2
- package/node_modules/winston-compat/index.js +0 -295
- package/node_modules/winston-compat/lib/transport.js +0 -135
- package/node_modules/winston-compat/node_modules/fecha/CHANGELOG.md +0 -11
- package/node_modules/winston-compat/node_modules/fecha/LICENSE +0 -22
- package/node_modules/winston-compat/node_modules/fecha/README.md +0 -259
- package/node_modules/winston-compat/node_modules/fecha/fecha.d.ts +0 -47
- package/node_modules/winston-compat/node_modules/fecha/fecha.js +0 -334
- package/node_modules/winston-compat/node_modules/fecha/fecha.min.js +0 -1
- package/node_modules/winston-compat/node_modules/fecha/package.json +0 -44
- package/node_modules/winston-compat/node_modules/logform/.babelrc +0 -3
- package/node_modules/winston-compat/node_modules/logform/.eslintrc +0 -7
- package/node_modules/winston-compat/node_modules/logform/.gitattributes +0 -1
- package/node_modules/winston-compat/node_modules/logform/.travis.yml +0 -17
- package/node_modules/winston-compat/node_modules/logform/CHANGELOG.md +0 -103
- package/node_modules/winston-compat/node_modules/logform/LICENSE +0 -21
- package/node_modules/winston-compat/node_modules/logform/README.md +0 -170
- package/node_modules/winston-compat/node_modules/logform/align.js +0 -14
- package/node_modules/winston-compat/node_modules/logform/browser.js +0 -36
- package/node_modules/winston-compat/node_modules/logform/cli.js +0 -52
- package/node_modules/winston-compat/node_modules/logform/colorize.js +0 -118
- package/node_modules/winston-compat/node_modules/logform/combine.js +0 -66
- package/node_modules/winston-compat/node_modules/logform/dist/align.js +0 -14
- package/node_modules/winston-compat/node_modules/logform/dist/browser.js +0 -37
- package/node_modules/winston-compat/node_modules/logform/dist/cli.js +0 -75
- package/node_modules/winston-compat/node_modules/logform/dist/colorize.js +0 -147
- package/node_modules/winston-compat/node_modules/logform/dist/combine.js +0 -66
- package/node_modules/winston-compat/node_modules/logform/dist/format.js +0 -69
- package/node_modules/winston-compat/node_modules/logform/dist/index.js +0 -54
- package/node_modules/winston-compat/node_modules/logform/dist/json.js +0 -27
- package/node_modules/winston-compat/node_modules/logform/dist/label.js +0 -19
- package/node_modules/winston-compat/node_modules/logform/dist/levels.js +0 -15
- package/node_modules/winston-compat/node_modules/logform/dist/logstash.js +0 -32
- package/node_modules/winston-compat/node_modules/logform/dist/metadata.js +0 -63
- package/node_modules/winston-compat/node_modules/logform/dist/ms.js +0 -18
- package/node_modules/winston-compat/node_modules/logform/dist/pad-levels.js +0 -118
- package/node_modules/winston-compat/node_modules/logform/dist/pretty-print.js +0 -20
- package/node_modules/winston-compat/node_modules/logform/dist/printf.js +0 -40
- package/node_modules/winston-compat/node_modules/logform/dist/simple.js +0 -36
- package/node_modules/winston-compat/node_modules/logform/dist/splat.js +0 -147
- package/node_modules/winston-compat/node_modules/logform/dist/timestamp.js +0 -28
- package/node_modules/winston-compat/node_modules/logform/dist/uncolorize.js +0 -31
- package/node_modules/winston-compat/node_modules/logform/examples/combine.js +0 -14
- package/node_modules/winston-compat/node_modules/logform/examples/filter.js +0 -30
- package/node_modules/winston-compat/node_modules/logform/examples/invalid.js +0 -6
- package/node_modules/winston-compat/node_modules/logform/examples/metadata.js +0 -78
- package/node_modules/winston-compat/node_modules/logform/examples/padLevels.js +0 -39
- package/node_modules/winston-compat/node_modules/logform/examples/volume.js +0 -25
- package/node_modules/winston-compat/node_modules/logform/format.js +0 -52
- package/node_modules/winston-compat/node_modules/logform/index.d.ts +0 -53
- package/node_modules/winston-compat/node_modules/logform/index.js +0 -52
- package/node_modules/winston-compat/node_modules/logform/json.js +0 -26
- package/node_modules/winston-compat/node_modules/logform/label.js +0 -19
- package/node_modules/winston-compat/node_modules/logform/levels.js +0 -12
- package/node_modules/winston-compat/node_modules/logform/logstash.js +0 -29
- package/node_modules/winston-compat/node_modules/logform/metadata.js +0 -61
- package/node_modules/winston-compat/node_modules/logform/ms.js +0 -18
- package/node_modules/winston-compat/node_modules/logform/package.json +0 -51
- package/node_modules/winston-compat/node_modules/logform/pad-levels.js +0 -83
- package/node_modules/winston-compat/node_modules/logform/pretty-print.js +0 -16
- package/node_modules/winston-compat/node_modules/logform/printf.js +0 -26
- package/node_modules/winston-compat/node_modules/logform/simple.js +0 -33
- package/node_modules/winston-compat/node_modules/logform/splat.js +0 -125
- package/node_modules/winston-compat/node_modules/logform/timestamp.js +0 -30
- package/node_modules/winston-compat/node_modules/logform/tsconfig.json +0 -22
- package/node_modules/winston-compat/node_modules/logform/uncolorize.js +0 -27
- package/node_modules/winston-compat/package.json +0 -46
- package/node_modules/winston-compat/test/clone.test.js +0 -25
- package/node_modules/winston-compat/test/helpers.js +0 -256
- package/node_modules/winston-compat/test/timestamp.test.js +0 -14
- package/node_modules/winston-compat/test/transports/transport.js +0 -205
- package/node_modules/winston-compat/test/winston-compat.test.js +0 -18
- package/node_modules/winston-daily-rotate-file/.eslintrc.js +0 -11
- package/node_modules/winston-daily-rotate-file/.node-version +0 -1
- package/node_modules/winston-daily-rotate-file/.travis.yml +0 -15
- package/node_modules/winston-daily-rotate-file/node_modules/semver/CHANGELOG.md +0 -70
- package/node_modules/winston-daily-rotate-file/node_modules/semver/LICENSE +0 -15
- package/node_modules/winston-daily-rotate-file/node_modules/semver/README.md +0 -443
- package/node_modules/winston-daily-rotate-file/node_modules/semver/bin/semver.js +0 -174
- package/node_modules/winston-daily-rotate-file/node_modules/semver/package.json +0 -32
- package/node_modules/winston-daily-rotate-file/node_modules/semver/range.bnf +0 -16
- package/node_modules/winston-daily-rotate-file/node_modules/semver/semver.js +0 -1596
- package/node_modules/winston-daily-rotate-file/test/memory-stream.js +0 -38
- package/node_modules/winston-daily-rotate-file/test/random-string.js +0 -31
- package/node_modules/winston-daily-rotate-file/test/transport-tests.js +0 -250
- package/node_modules/winston-transport/.nyc_output/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
- package/node_modules/winston-transport/.nyc_output/processinfo/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
- package/node_modules/winston-transport/.travis.yml +0 -17
- package/node_modules/winston-transport/tsconfig.json +0 -22
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/CONTRIBUTING.md +0 -0
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/GOVERNANCE.md +0 -0
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/LICENSE +0 -0
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/internal/streams/stream-browser.js +0 -0
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/internal/streams/stream.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"/Users/David/winston-transport/index.js":{"path":"/Users/David/winston-transport/index.js","statementMap":{"0":{"start":{"line":3,"column":13},"end":{"line":3,"column":28}},"1":{"start":{"line":4,"column":17},"end":{"line":4,"column":67}},"2":{"start":{"line":5,"column":18},"end":{"line":5,"column":40}},"3":{"start":{"line":18,"column":24},"end":{"line":54,"column":1}},"4":{"start":{"line":19,"column":2},"end":{"line":19,"column":82}},"5":{"start":{"line":21,"column":2},"end":{"line":21,"column":31}},"6":{"start":{"line":22,"column":2},"end":{"line":22,"column":29}},"7":{"start":{"line":23,"column":2},"end":{"line":23,"column":51}},"8":{"start":{"line":24,"column":2},"end":{"line":24,"column":51}},"9":{"start":{"line":25,"column":2},"end":{"line":25,"column":31}},"10":{"start":{"line":27,"column":2},"end":{"line":27,"column":42}},"11":{"start":{"line":27,"column":19},"end":{"line":27,"column":42}},"12":{"start":{"line":28,"column":2},"end":{"line":28,"column":45}},"13":{"start":{"line":28,"column":20},"end":{"line":28,"column":45}},"14":{"start":{"line":29,"column":2},"end":{"line":29,"column":48}},"15":{"start":{"line":29,"column":21},"end":{"line":29,"column":48}},"16":{"start":{"line":32,"column":2},"end":{"line":39,"column":5}},"17":{"start":{"line":37,"column":4},"end":{"line":37,"column":32}},"18":{"start":{"line":38,"column":4},"end":{"line":38,"column":25}},"19":{"start":{"line":42,"column":2},"end":{"line":53,"column":5}},"20":{"start":{"line":47,"column":4},"end":{"line":52,"column":5}},"21":{"start":{"line":48,"column":6},"end":{"line":48,"column":25}},"22":{"start":{"line":49,"column":6},"end":{"line":51,"column":7}},"23":{"start":{"line":50,"column":8},"end":{"line":50,"column":21}},"24":{"start":{"line":59,"column":0},"end":{"line":59,"column":41}},"25":{"start":{"line":69,"column":0},"end":{"line":107,"column":2}},"26":{"start":{"line":70,"column":2},"end":{"line":72,"column":3}},"27":{"start":{"line":71,"column":4},"end":{"line":71,"column":26}},"28":{"start":{"line":78,"column":16},"end":{"line":78,"column":64}},"29":{"start":{"line":80,"column":2},"end":{"line":104,"column":3}},"30":{"start":{"line":81,"column":4},"end":{"line":83,"column":5}},"31":{"start":{"line":82,"column":6},"end":{"line":82,"column":38}},"32":{"start":{"line":90,"column":4},"end":{"line":94,"column":5}},"33":{"start":{"line":91,"column":6},"end":{"line":91,"column":88}},"34":{"start":{"line":93,"column":6},"end":{"line":93,"column":21}},"35":{"start":{"line":96,"column":4},"end":{"line":101,"column":5}},"36":{"start":{"line":98,"column":6},"end":{"line":98,"column":17}},"37":{"start":{"line":99,"column":6},"end":{"line":99,"column":35}},"38":{"start":{"line":99,"column":20},"end":{"line":99,"column":35}},"39":{"start":{"line":100,"column":6},"end":{"line":100,"column":13}},"40":{"start":{"line":103,"column":4},"end":{"line":103,"column":43}},"41":{"start":{"line":105,"column":2},"end":{"line":105,"column":35}},"42":{"start":{"line":106,"column":2},"end":{"line":106,"column":24}},"43":{"start":{"line":117,"column":0},"end":{"line":166,"column":2}},"44":{"start":{"line":118,"column":2},"end":{"line":128,"column":3}},"45":{"start":{"line":119,"column":18},"end":{"line":119,"column":51}},"46":{"start":{"line":120,"column":4},"end":{"line":122,"column":5}},"47":{"start":{"line":121,"column":6},"end":{"line":121,"column":28}},"48":{"start":{"line":127,"column":4},"end":{"line":127,"column":38}},"49":{"start":{"line":130,"column":2},"end":{"line":163,"column":3}},"50":{"start":{"line":130,"column":15},"end":{"line":130,"column":16}},"51":{"start":{"line":131,"column":4},"end":{"line":131,"column":43}},"52":{"start":{"line":131,"column":34},"end":{"line":131,"column":43}},"53":{"start":{"line":133,"column":4},"end":{"line":136,"column":5}},"54":{"start":{"line":134,"column":6},"end":{"line":134,"column":52}},"55":{"start":{"line":135,"column":6},"end":{"line":135,"column":15}},"56":{"start":{"line":143,"column":4},"end":{"line":150,"column":5}},"57":{"start":{"line":144,"column":6},"end":{"line":147,"column":8}},"58":{"start":{"line":149,"column":6},"end":{"line":149,"column":21}},"59":{"start":{"line":152,"column":4},"end":{"line":162,"column":5}},"60":{"start":{"line":154,"column":6},"end":{"line":154,"column":27}},"61":{"start":{"line":155,"column":6},"end":{"line":159,"column":7}},"62":{"start":{"line":157,"column":8},"end":{"line":157,"column":23}},"63":{"start":{"line":158,"column":8},"end":{"line":158,"column":23}},"64":{"start":{"line":161,"column":6},"end":{"line":161,"column":48}},"65":{"start":{"line":165,"column":2},"end":{"line":165,"column":24}},"66":{"start":{"line":177,"column":0},"end":{"line":202,"column":2}},"67":{"start":{"line":178,"column":15},"end":{"line":178,"column":26}},"68":{"start":{"line":179,"column":2},"end":{"line":181,"column":3}},"69":{"start":{"line":180,"column":4},"end":{"line":180,"column":17}},"70":{"start":{"line":185,"column":16},"end":{"line":185,"column":64}},"71":{"start":{"line":188,"column":2},"end":{"line":199,"column":3}},"72":{"start":{"line":196,"column":4},"end":{"line":198,"column":5}},"73":{"start":{"line":197,"column":6},"end":{"line":197,"column":18}},"74":{"start":{"line":201,"column":2},"end":{"line":201,"column":15}},"75":{"start":{"line":208,"column":0},"end":{"line":211,"column":2}},"76":{"start":{"line":210,"column":2},"end":{"line":210,"column":24}},"77":{"start":{"line":215,"column":0},"end":{"line":215,"column":59}}},"fnMap":{"0":{"name":"TransportStream","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":65}},"loc":{"start":{"line":18,"column":80},"end":{"line":54,"column":1}},"line":18},"1":{"name":"(anonymous_1)","decl":{"start":{"line":32,"column":20},"end":{"line":32,"column":21}},"loc":{"start":{"line":32,"column":30},"end":{"line":39,"column":3}},"line":32},"2":{"name":"(anonymous_2)","decl":{"start":{"line":42,"column":22},"end":{"line":42,"column":23}},"loc":{"start":{"line":42,"column":29},"end":{"line":53,"column":3}},"line":42},"3":{"name":"_write","decl":{"start":{"line":69,"column":44},"end":{"line":69,"column":50}},"loc":{"start":{"line":69,"column":72},"end":{"line":107,"column":1}},"line":69},"4":{"name":"_writev","decl":{"start":{"line":117,"column":45},"end":{"line":117,"column":52}},"loc":{"start":{"line":117,"column":71},"end":{"line":166,"column":1}},"line":117},"5":{"name":"_accept","decl":{"start":{"line":177,"column":45},"end":{"line":177,"column":52}},"loc":{"start":{"line":177,"column":60},"end":{"line":202,"column":1}},"line":177},"6":{"name":"_nop","decl":{"start":{"line":208,"column":42},"end":{"line":208,"column":46}},"loc":{"start":{"line":208,"column":49},"end":{"line":211,"column":1}},"line":208}},"branchMap":{"0":{"loc":{"start":{"line":18,"column":66},"end":{"line":18,"column":78}},"type":"default-arg","locations":[{"start":{"line":18,"column":76},"end":{"line":18,"column":78}}],"line":18},"1":{"loc":{"start":{"line":27,"column":2},"end":{"line":27,"column":42}},"type":"if","locations":[{"start":{"line":27,"column":2},"end":{"line":27,"column":42}},{"start":{"line":27,"column":2},"end":{"line":27,"column":42}}],"line":27},"2":{"loc":{"start":{"line":28,"column":2},"end":{"line":28,"column":45}},"type":"if","locations":[{"start":{"line":28,"column":2},"end":{"line":28,"column":45}},{"start":{"line":28,"column":2},"end":{"line":28,"column":45}}],"line":28},"3":{"loc":{"start":{"line":29,"column":2},"end":{"line":29,"column":48}},"type":"if","locations":[{"start":{"line":29,"column":2},"end":{"line":29,"column":48}},{"start":{"line":29,"column":2},"end":{"line":29,"column":48}}],"line":29},"4":{"loc":{"start":{"line":47,"column":4},"end":{"line":52,"column":5}},"type":"if","locations":[{"start":{"line":47,"column":4},"end":{"line":52,"column":5}},{"start":{"line":47,"column":4},"end":{"line":52,"column":5}}],"line":47},"5":{"loc":{"start":{"line":49,"column":6},"end":{"line":51,"column":7}},"type":"if","locations":[{"start":{"line":49,"column":6},"end":{"line":51,"column":7}},{"start":{"line":49,"column":6},"end":{"line":51,"column":7}}],"line":49},"6":{"loc":{"start":{"line":70,"column":2},"end":{"line":72,"column":3}},"type":"if","locations":[{"start":{"line":70,"column":2},"end":{"line":72,"column":3}},{"start":{"line":70,"column":2},"end":{"line":72,"column":3}}],"line":70},"7":{"loc":{"start":{"line":70,"column":6},"end":{"line":70,"column":72}},"type":"binary-expr","locations":[{"start":{"line":70,"column":6},"end":{"line":70,"column":17}},{"start":{"line":70,"column":22},"end":{"line":70,"column":45}},{"start":{"line":70,"column":49},"end":{"line":70,"column":71}}],"line":70},"8":{"loc":{"start":{"line":78,"column":16},"end":{"line":78,"column":64}},"type":"binary-expr","locations":[{"start":{"line":78,"column":16},"end":{"line":78,"column":26}},{"start":{"line":78,"column":31},"end":{"line":78,"column":42}},{"start":{"line":78,"column":46},"end":{"line":78,"column":63}}],"line":78},"9":{"loc":{"start":{"line":80,"column":2},"end":{"line":104,"column":3}},"type":"if","locations":[{"start":{"line":80,"column":2},"end":{"line":104,"column":3}},{"start":{"line":80,"column":2},"end":{"line":104,"column":3}}],"line":80},"10":{"loc":{"start":{"line":80,"column":6},"end":{"line":80,"column":62}},"type":"binary-expr","locations":[{"start":{"line":80,"column":6},"end":{"line":80,"column":12}},{"start":{"line":80,"column":16},"end":{"line":80,"column":62}}],"line":80},"11":{"loc":{"start":{"line":81,"column":4},"end":{"line":83,"column":5}},"type":"if","locations":[{"start":{"line":81,"column":4},"end":{"line":83,"column":5}},{"start":{"line":81,"column":4},"end":{"line":83,"column":5}}],"line":81},"12":{"loc":{"start":{"line":81,"column":8},"end":{"line":81,"column":28}},"type":"binary-expr","locations":[{"start":{"line":81,"column":8},"end":{"line":81,"column":12}},{"start":{"line":81,"column":16},"end":{"line":81,"column":28}}],"line":81},"13":{"loc":{"start":{"line":96,"column":4},"end":{"line":101,"column":5}},"type":"if","locations":[{"start":{"line":96,"column":4},"end":{"line":101,"column":5}},{"start":{"line":96,"column":4},"end":{"line":101,"column":5}}],"line":96},"14":{"loc":{"start":{"line":96,"column":8},"end":{"line":96,"column":32}},"type":"binary-expr","locations":[{"start":{"line":96,"column":8},"end":{"line":96,"column":16}},{"start":{"line":96,"column":20},"end":{"line":96,"column":32}}],"line":96},"15":{"loc":{"start":{"line":99,"column":6},"end":{"line":99,"column":35}},"type":"if","locations":[{"start":{"line":99,"column":6},"end":{"line":99,"column":35}},{"start":{"line":99,"column":6},"end":{"line":99,"column":35}}],"line":99},"16":{"loc":{"start":{"line":118,"column":2},"end":{"line":128,"column":3}},"type":"if","locations":[{"start":{"line":118,"column":2},"end":{"line":128,"column":3}},{"start":{"line":118,"column":2},"end":{"line":128,"column":3}}],"line":118},"17":{"loc":{"start":{"line":120,"column":4},"end":{"line":122,"column":5}},"type":"if","locations":[{"start":{"line":120,"column":4},"end":{"line":122,"column":5}},{"start":{"line":120,"column":4},"end":{"line":122,"column":5}}],"line":120},"18":{"loc":{"start":{"line":131,"column":4},"end":{"line":131,"column":43}},"type":"if","locations":[{"start":{"line":131,"column":4},"end":{"line":131,"column":43}},{"start":{"line":131,"column":4},"end":{"line":131,"column":43}}],"line":131},"19":{"loc":{"start":{"line":133,"column":4},"end":{"line":136,"column":5}},"type":"if","locations":[{"start":{"line":133,"column":4},"end":{"line":136,"column":5}},{"start":{"line":133,"column":4},"end":{"line":136,"column":5}}],"line":133},"20":{"loc":{"start":{"line":133,"column":8},"end":{"line":133,"column":39}},"type":"binary-expr","locations":[{"start":{"line":133,"column":8},"end":{"line":133,"column":23}},{"start":{"line":133,"column":27},"end":{"line":133,"column":39}}],"line":133},"21":{"loc":{"start":{"line":152,"column":4},"end":{"line":162,"column":5}},"type":"if","locations":[{"start":{"line":152,"column":4},"end":{"line":162,"column":5}},{"start":{"line":152,"column":4},"end":{"line":162,"column":5}}],"line":152},"22":{"loc":{"start":{"line":152,"column":8},"end":{"line":152,"column":32}},"type":"binary-expr","locations":[{"start":{"line":152,"column":8},"end":{"line":152,"column":16}},{"start":{"line":152,"column":20},"end":{"line":152,"column":32}}],"line":152},"23":{"loc":{"start":{"line":155,"column":6},"end":{"line":159,"column":7}},"type":"if","locations":[{"start":{"line":155,"column":6},"end":{"line":159,"column":7}},{"start":{"line":155,"column":6},"end":{"line":159,"column":7}}],"line":155},"24":{"loc":{"start":{"line":179,"column":2},"end":{"line":181,"column":3}},"type":"if","locations":[{"start":{"line":179,"column":2},"end":{"line":181,"column":3}},{"start":{"line":179,"column":2},"end":{"line":181,"column":3}}],"line":179},"25":{"loc":{"start":{"line":185,"column":16},"end":{"line":185,"column":64}},"type":"binary-expr","locations":[{"start":{"line":185,"column":16},"end":{"line":185,"column":26}},{"start":{"line":185,"column":31},"end":{"line":185,"column":42}},{"start":{"line":185,"column":46},"end":{"line":185,"column":63}}],"line":185},"26":{"loc":{"start":{"line":188,"column":2},"end":{"line":199,"column":3}},"type":"if","locations":[{"start":{"line":188,"column":2},"end":{"line":199,"column":3}},{"start":{"line":188,"column":2},"end":{"line":199,"column":3}}],"line":188},"27":{"loc":{"start":{"line":189,"column":4},"end":{"line":191,"column":50}},"type":"binary-expr","locations":[{"start":{"line":189,"column":4},"end":{"line":189,"column":27}},{"start":{"line":190,"column":4},"end":{"line":190,"column":10}},{"start":{"line":191,"column":4},"end":{"line":191,"column":50}}],"line":189},"28":{"loc":{"start":{"line":196,"column":4},"end":{"line":198,"column":5}},"type":"if","locations":[{"start":{"line":196,"column":4},"end":{"line":198,"column":5}},{"start":{"line":196,"column":4},"end":{"line":198,"column":5}}],"line":196},"29":{"loc":{"start":{"line":196,"column":8},"end":{"line":196,"column":56}},"type":"binary-expr","locations":[{"start":{"line":196,"column":8},"end":{"line":196,"column":29}},{"start":{"line":196,"column":33},"end":{"line":196,"column":56}}],"line":196}},"s":{"0":1,"1":1,"2":1,"3":1,"4":51,"5":51,"6":51,"7":51,"8":51,"9":51,"10":51,"11":22,"12":51,"13":1,"14":51,"15":0,"16":51,"17":5,"18":5,"19":51,"20":2,"21":2,"22":2,"23":1,"24":1,"25":1,"26":49,"27":10,"28":39,"29":39,"30":33,"31":20,"32":13,"33":13,"34":1,"35":13,"36":8,"37":8,"38":1,"39":7,"40":5,"41":6,"42":6,"43":1,"44":6,"45":1,"46":1,"47":0,"48":1,"49":5,"50":5,"51":584,"52":15,"53":569,"54":400,"55":400,"56":169,"57":169,"58":1,"59":169,"60":8,"61":8,"62":1,"63":1,"64":161,"65":4,"66":1,"67":1425,"68":1425,"69":32,"70":1393,"71":1393,"72":1240,"73":1232,"74":161,"75":1,"76":416,"77":1},"f":{"0":51,"1":5,"2":2,"3":49,"4":6,"5":1425,"6":416},"b":{"0":[1],"1":[22,29],"2":[1,50],"3":[0,51],"4":[2,0],"5":[1,1],"6":[10,39],"7":[49,48,10],"8":[39,29,4],"9":[33,6],"10":[39,14],"11":[20,13],"12":[33,33],"13":[8,5],"14":[13,12],"15":[1,7],"16":[1,5],"17":[0,1],"18":[15,569],"19":[400,169],"20":[569,569],"21":[8,161],"22":[169,168],"23":[1,7],"24":[32,1393],"25":[1393,969,0],"26":[1240,153],"27":[1393,1377,408],"28":[1232,8],"29":[1240,1232]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"651a16831e5e6c4d31e28a9c86a4c5ea5a975e43","contentHash":"dc285c71c38b7cfbfbd3cffe4137191f1ab818e457e1535aab143981ef4af66d"},"/Users/David/winston-transport/legacy.js":{"path":"/Users/David/winston-transport/legacy.js","statementMap":{"0":{"start":{"line":3,"column":13},"end":{"line":3,"column":28}},"1":{"start":{"line":4,"column":18},"end":{"line":4,"column":40}},"2":{"start":{"line":5,"column":24},"end":{"line":5,"column":37}},"3":{"start":{"line":15,"column":30},"end":{"line":39,"column":1}},"4":{"start":{"line":16,"column":2},"end":{"line":16,"column":38}},"5":{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},"6":{"start":{"line":18,"column":4},"end":{"line":18,"column":79}},"7":{"start":{"line":21,"column":2},"end":{"line":21,"column":37}},"8":{"start":{"line":22,"column":2},"end":{"line":22,"column":53}},"9":{"start":{"line":23,"column":2},"end":{"line":23,"column":86}},"10":{"start":{"line":26,"column":2},"end":{"line":26,"column":21}},"11":{"start":{"line":32,"column":4},"end":{"line":32,"column":44}},"12":{"start":{"line":35,"column":2},"end":{"line":38,"column":3}},"13":{"start":{"line":36,"column":4},"end":{"line":36,"column":62}},"14":{"start":{"line":37,"column":4},"end":{"line":37,"column":62}},"15":{"start":{"line":44,"column":0},"end":{"line":44,"column":54}},"16":{"start":{"line":54,"column":0},"end":{"line":66,"column":2}},"17":{"start":{"line":55,"column":2},"end":{"line":57,"column":3}},"18":{"start":{"line":56,"column":4},"end":{"line":56,"column":26}},"19":{"start":{"line":61,"column":2},"end":{"line":63,"column":3}},"20":{"start":{"line":62,"column":4},"end":{"line":62,"column":67}},"21":{"start":{"line":65,"column":2},"end":{"line":65,"column":17}},"22":{"start":{"line":76,"column":0},"end":{"line":90,"column":2}},"23":{"start":{"line":77,"column":2},"end":{"line":87,"column":3}},"24":{"start":{"line":77,"column":15},"end":{"line":77,"column":16}},"25":{"start":{"line":78,"column":4},"end":{"line":86,"column":5}},"26":{"start":{"line":79,"column":6},"end":{"line":84,"column":8}},"27":{"start":{"line":85,"column":6},"end":{"line":85,"column":27}},"28":{"start":{"line":89,"column":2},"end":{"line":89,"column":24}},"29":{"start":{"line":97,"column":0},"end":{"line":103,"column":2}},"30":{"start":{"line":99,"column":2},"end":{"line":102,"column":16}},"31":{"start":{"line":110,"column":0},"end":{"line":119,"column":2}},"32":{"start":{"line":111,"column":2},"end":{"line":113,"column":3}},"33":{"start":{"line":112,"column":4},"end":{"line":112,"column":27}},"34":{"start":{"line":115,"column":2},"end":{"line":118,"column":3}},"35":{"start":{"line":116,"column":4},"end":{"line":116,"column":74}},"36":{"start":{"line":117,"column":4},"end":{"line":117,"column":41}}},"fnMap":{"0":{"name":"LegacyTransportStream","decl":{"start":{"line":15,"column":56},"end":{"line":15,"column":77}},"loc":{"start":{"line":15,"column":92},"end":{"line":39,"column":1}},"line":15},"1":{"name":"transportError","decl":{"start":{"line":31,"column":11},"end":{"line":31,"column":25}},"loc":{"start":{"line":31,"column":31},"end":{"line":33,"column":3}},"line":31},"2":{"name":"_write","decl":{"start":{"line":54,"column":50},"end":{"line":54,"column":56}},"loc":{"start":{"line":54,"column":78},"end":{"line":66,"column":1}},"line":54},"3":{"name":"_writev","decl":{"start":{"line":76,"column":51},"end":{"line":76,"column":58}},"loc":{"start":{"line":76,"column":77},"end":{"line":90,"column":1}},"line":76},"4":{"name":"_deprecated","decl":{"start":{"line":97,"column":55},"end":{"line":97,"column":66}},"loc":{"start":{"line":97,"column":69},"end":{"line":103,"column":1}},"line":97},"5":{"name":"close","decl":{"start":{"line":110,"column":49},"end":{"line":110,"column":54}},"loc":{"start":{"line":110,"column":57},"end":{"line":119,"column":1}},"line":110}},"branchMap":{"0":{"loc":{"start":{"line":15,"column":78},"end":{"line":15,"column":90}},"type":"default-arg","locations":[{"start":{"line":15,"column":88},"end":{"line":15,"column":90}}],"line":15},"1":{"loc":{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},"type":"if","locations":[{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},{"start":{"line":17,"column":2},"end":{"line":19,"column":3}}],"line":17},"2":{"loc":{"start":{"line":17,"column":6},"end":{"line":17,"column":71}},"type":"binary-expr","locations":[{"start":{"line":17,"column":6},"end":{"line":17,"column":24}},{"start":{"line":17,"column":28},"end":{"line":17,"column":71}}],"line":17},"3":{"loc":{"start":{"line":22,"column":15},"end":{"line":22,"column":52}},"type":"binary-expr","locations":[{"start":{"line":22,"column":15},"end":{"line":22,"column":25}},{"start":{"line":22,"column":29},"end":{"line":22,"column":52}}],"line":22},"4":{"loc":{"start":{"line":23,"column":26},"end":{"line":23,"column":85}},"type":"binary-expr","locations":[{"start":{"line":23,"column":26},"end":{"line":23,"column":47}},{"start":{"line":23,"column":51},"end":{"line":23,"column":85}}],"line":23},"5":{"loc":{"start":{"line":35,"column":2},"end":{"line":38,"column":3}},"type":"if","locations":[{"start":{"line":35,"column":2},"end":{"line":38,"column":3}},{"start":{"line":35,"column":2},"end":{"line":38,"column":3}}],"line":35},"6":{"loc":{"start":{"line":55,"column":2},"end":{"line":57,"column":3}},"type":"if","locations":[{"start":{"line":55,"column":2},"end":{"line":57,"column":3}},{"start":{"line":55,"column":2},"end":{"line":57,"column":3}}],"line":55},"7":{"loc":{"start":{"line":55,"column":6},"end":{"line":55,"column":72}},"type":"binary-expr","locations":[{"start":{"line":55,"column":6},"end":{"line":55,"column":17}},{"start":{"line":55,"column":22},"end":{"line":55,"column":45}},{"start":{"line":55,"column":49},"end":{"line":55,"column":71}}],"line":55},"8":{"loc":{"start":{"line":61,"column":2},"end":{"line":63,"column":3}},"type":"if","locations":[{"start":{"line":61,"column":2},"end":{"line":63,"column":3}},{"start":{"line":61,"column":2},"end":{"line":63,"column":3}}],"line":61},"9":{"loc":{"start":{"line":61,"column":6},"end":{"line":61,"column":72}},"type":"binary-expr","locations":[{"start":{"line":61,"column":6},"end":{"line":61,"column":17}},{"start":{"line":61,"column":21},"end":{"line":61,"column":72}}],"line":61},"10":{"loc":{"start":{"line":78,"column":4},"end":{"line":86,"column":5}},"type":"if","locations":[{"start":{"line":78,"column":4},"end":{"line":86,"column":5}},{"start":{"line":78,"column":4},"end":{"line":86,"column":5}}],"line":78},"11":{"loc":{"start":{"line":111,"column":2},"end":{"line":113,"column":3}},"type":"if","locations":[{"start":{"line":111,"column":2},"end":{"line":113,"column":3}},{"start":{"line":111,"column":2},"end":{"line":113,"column":3}}],"line":111},"12":{"loc":{"start":{"line":115,"column":2},"end":{"line":118,"column":3}},"type":"if","locations":[{"start":{"line":115,"column":2},"end":{"line":118,"column":3}},{"start":{"line":115,"column":2},"end":{"line":118,"column":3}}],"line":115}},"s":{"0":1,"1":1,"2":1,"3":1,"4":23,"5":23,"6":2,"7":21,"8":21,"9":21,"10":21,"11":1,"12":21,"13":18,"14":18,"15":1,"16":1,"17":29,"18":10,"19":19,"20":16,"21":19,"22":1,"23":2,"24":2,"25":415,"26":400,"27":400,"28":2,"29":1,"30":1,"31":1,"32":2,"33":2,"34":2,"35":2,"36":2},"f":{"0":23,"1":1,"2":29,"3":2,"4":1,"5":2},"b":{"0":[2],"1":[2,21],"2":[23,21],"3":[21,19],"4":[21,20],"5":[18,3],"6":[10,19],"7":[29,28,10],"8":[16,3],"9":[19,8],"10":[400,15],"11":[2,0],"12":[2,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ce7431f15ef86d6976e87183f7beb8d8b32939e7","contentHash":"32244661b8dd61e30b4a7ccd7f94fd11686d435135c266a933c6cd3b296b958f"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"parent":null,"pid":70672,"argv":["/Users/David/.nvm/versions/node/v14.19.0/bin/node","/Users/David/winston-transport/node_modules/.bin/mocha","test/index.test.js","test/inheritance.test.js","test/legacy.test.js"],"execArgv":[],"cwd":"/Users/David/winston-transport","time":1644088125255,"ppid":70671,"coverageFilename":"/Users/David/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json","externalId":"","uuid":"c3d7ddb9-cc26-466b-a4f6-993ad69e86f6","files":["/Users/David/winston-transport/index.js","/Users/David/winston-transport/legacy.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"processes":{"
|
|
1
|
+
{"processes":{"c3d7ddb9-cc26-466b-a4f6-993ad69e86f6":{"parent":null,"children":[]}},"files":{"/Users/David/winston-transport/index.js":["c3d7ddb9-cc26-466b-a4f6-993ad69e86f6"],"/Users/David/winston-transport/legacy.js":["c3d7ddb9-cc26-466b-a4f6-993ad69e86f6"]},"externalIds":{}}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
### 4.5.0 (2022/02/05)
|
|
4
|
+
|
|
5
|
+
- [#81] Memory leak fix: do not wait for `process.nextTick` to clear callbacks
|
|
6
|
+
- [#87, #82, #67] Update dependencies, CI config, and linter config
|
|
7
|
+
|
|
8
|
+
### 4.4.1 (2021/12/14)
|
|
9
|
+
|
|
10
|
+
- [#44] Add handleRejections to types.
|
|
11
|
+
- [#60] Exclude unnecessary files from npm package
|
|
12
|
+
- [#45] [#58] Update dependencies.
|
|
13
|
+
|
|
3
14
|
### 4.4.0 (2018/12/23)
|
|
4
15
|
|
|
5
16
|
- [#41] Support handleRejections option.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var util = require('util');
|
|
4
|
-
var Writable = require('readable-stream/
|
|
4
|
+
var Writable = require('readable-stream/lib/_stream_writable.js');
|
|
5
5
|
|
|
6
6
|
var _require = require('triple-beam'),
|
|
7
7
|
LEVEL = _require.LEVEL;
|
|
@@ -110,7 +110,7 @@ TransportStream.prototype._write = function _write(info, enc, callback) {
|
|
|
110
110
|
|
|
111
111
|
return this.log(transformed, callback);
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
this._writableState.sync = false;
|
|
114
114
|
return callback(null);
|
|
115
115
|
};
|
|
116
116
|
|
|
@@ -13,6 +13,7 @@ declare class TransportStream extends stream.Writable {
|
|
|
13
13
|
public level?: string;
|
|
14
14
|
public silent?: boolean;
|
|
15
15
|
public handleExceptions?: boolean;
|
|
16
|
+
public handleRejections?: boolean;
|
|
16
17
|
|
|
17
18
|
constructor(opts?: TransportStream.TransportStreamOptions);
|
|
18
19
|
|
|
@@ -27,6 +28,7 @@ declare namespace TransportStream {
|
|
|
27
28
|
level?: string;
|
|
28
29
|
silent?: boolean;
|
|
29
30
|
handleExceptions?: boolean;
|
|
31
|
+
handleRejections?: boolean;
|
|
30
32
|
|
|
31
33
|
log?(info: any, next: () => void): any;
|
|
32
34
|
logv?(info: any, next: () => void): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const util = require('util');
|
|
4
|
-
const Writable = require('readable-stream/
|
|
4
|
+
const Writable = require('readable-stream/lib/_stream_writable.js');
|
|
5
5
|
const { LEVEL } = require('triple-beam');
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -102,7 +102,7 @@ TransportStream.prototype._write = function _write(info, enc, callback) {
|
|
|
102
102
|
|
|
103
103
|
return this.log(transformed, callback);
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
this._writableState.sync = false;
|
|
106
106
|
return callback(null);
|
|
107
107
|
};
|
|
108
108
|
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# readable-stream
|
|
2
|
+
|
|
3
|
+
***Node.js core streams for userland*** [](https://travis-ci.com/nodejs/readable-stream)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[](https://nodei.co/npm/readable-stream/)
|
|
7
|
+
[](https://nodei.co/npm/readable-stream/)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
[](https://saucelabs.com/u/readabe-stream)
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install --save readable-stream
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This package is a mirror of the streams implementations in Node.js.
|
|
17
|
+
|
|
18
|
+
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.18.1/docs/api/stream.html).
|
|
19
|
+
|
|
20
|
+
If you want to guarantee a stable streams base, regardless of what version of
|
|
21
|
+
Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
|
|
22
|
+
|
|
23
|
+
As of version 2.0.0 **readable-stream** uses semantic versioning.
|
|
24
|
+
|
|
25
|
+
## Version 3.x.x
|
|
26
|
+
|
|
27
|
+
v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
|
|
28
|
+
|
|
29
|
+
1. Error codes: https://github.com/nodejs/node/pull/13310,
|
|
30
|
+
https://github.com/nodejs/node/pull/13291,
|
|
31
|
+
https://github.com/nodejs/node/pull/16589,
|
|
32
|
+
https://github.com/nodejs/node/pull/15042,
|
|
33
|
+
https://github.com/nodejs/node/pull/15665,
|
|
34
|
+
https://github.com/nodejs/readable-stream/pull/344
|
|
35
|
+
2. 'readable' have precedence over flowing
|
|
36
|
+
https://github.com/nodejs/node/pull/18994
|
|
37
|
+
3. make virtual methods errors consistent
|
|
38
|
+
https://github.com/nodejs/node/pull/18813
|
|
39
|
+
4. updated streams error handling
|
|
40
|
+
https://github.com/nodejs/node/pull/18438
|
|
41
|
+
5. writable.end should return this.
|
|
42
|
+
https://github.com/nodejs/node/pull/18780
|
|
43
|
+
6. readable continues to read when push('')
|
|
44
|
+
https://github.com/nodejs/node/pull/18211
|
|
45
|
+
7. add custom inspect to BufferList
|
|
46
|
+
https://github.com/nodejs/node/pull/17907
|
|
47
|
+
8. always defer 'readable' with nextTick
|
|
48
|
+
https://github.com/nodejs/node/pull/17979
|
|
49
|
+
|
|
50
|
+
## Version 2.x.x
|
|
51
|
+
v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11.
|
|
52
|
+
|
|
53
|
+
### Big Thanks
|
|
54
|
+
|
|
55
|
+
Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce]
|
|
56
|
+
|
|
57
|
+
# Usage
|
|
58
|
+
|
|
59
|
+
You can swap your `require('stream')` with `require('readable-stream')`
|
|
60
|
+
without any changes, if you are just using one of the main classes and
|
|
61
|
+
functions.
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
const {
|
|
65
|
+
Readable,
|
|
66
|
+
Writable,
|
|
67
|
+
Transform,
|
|
68
|
+
Duplex,
|
|
69
|
+
pipeline,
|
|
70
|
+
finished
|
|
71
|
+
} = require('readable-stream')
|
|
72
|
+
````
|
|
73
|
+
|
|
74
|
+
Note that `require('stream')` will return `Stream`, while
|
|
75
|
+
`require('readable-stream')` will return `Readable`. We discourage using
|
|
76
|
+
whatever is exported directly, but rather use one of the properties as
|
|
77
|
+
shown in the example above.
|
|
78
|
+
|
|
79
|
+
# Streams Working Group
|
|
80
|
+
|
|
81
|
+
`readable-stream` is maintained by the Streams Working Group, which
|
|
82
|
+
oversees the development and maintenance of the Streams API within
|
|
83
|
+
Node.js. The responsibilities of the Streams Working Group include:
|
|
84
|
+
|
|
85
|
+
* Addressing stream issues on the Node.js issue tracker.
|
|
86
|
+
* Authoring and editing stream documentation within the Node.js project.
|
|
87
|
+
* Reviewing changes to stream subclasses within the Node.js project.
|
|
88
|
+
* Redirecting changes to streams from the Node.js project to this
|
|
89
|
+
project.
|
|
90
|
+
* Assisting in the implementation of stream providers within Node.js.
|
|
91
|
+
* Recommending versions of `readable-stream` to be included in Node.js.
|
|
92
|
+
* Messaging about the future of streams to give the community advance
|
|
93
|
+
notice of changes.
|
|
94
|
+
|
|
95
|
+
<a name="members"></a>
|
|
96
|
+
## Team Members
|
|
97
|
+
|
|
98
|
+
* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com>
|
|
99
|
+
- Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
|
|
100
|
+
* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com>
|
|
101
|
+
* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com>
|
|
102
|
+
- Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
|
|
103
|
+
* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com>
|
|
104
|
+
* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) <yoshuawuyts@gmail.com>
|
|
105
|
+
|
|
106
|
+
[sauce]: https://saucelabs.com
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
4
|
+
|
|
5
|
+
var codes = {};
|
|
6
|
+
|
|
7
|
+
function createErrorType(code, message, Base) {
|
|
8
|
+
if (!Base) {
|
|
9
|
+
Base = Error;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function getMessage(arg1, arg2, arg3) {
|
|
13
|
+
if (typeof message === 'string') {
|
|
14
|
+
return message;
|
|
15
|
+
} else {
|
|
16
|
+
return message(arg1, arg2, arg3);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var NodeError =
|
|
21
|
+
/*#__PURE__*/
|
|
22
|
+
function (_Base) {
|
|
23
|
+
_inheritsLoose(NodeError, _Base);
|
|
24
|
+
|
|
25
|
+
function NodeError(arg1, arg2, arg3) {
|
|
26
|
+
return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return NodeError;
|
|
30
|
+
}(Base);
|
|
31
|
+
|
|
32
|
+
NodeError.prototype.name = Base.name;
|
|
33
|
+
NodeError.prototype.code = code;
|
|
34
|
+
codes[code] = NodeError;
|
|
35
|
+
} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
function oneOf(expected, thing) {
|
|
39
|
+
if (Array.isArray(expected)) {
|
|
40
|
+
var len = expected.length;
|
|
41
|
+
expected = expected.map(function (i) {
|
|
42
|
+
return String(i);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
if (len > 2) {
|
|
46
|
+
return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1];
|
|
47
|
+
} else if (len === 2) {
|
|
48
|
+
return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
|
|
49
|
+
} else {
|
|
50
|
+
return "of ".concat(thing, " ").concat(expected[0]);
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
return "of ".concat(thing, " ").concat(String(expected));
|
|
54
|
+
}
|
|
55
|
+
} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
function startsWith(str, search, pos) {
|
|
59
|
+
return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
|
|
60
|
+
} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
function endsWith(str, search, this_len) {
|
|
64
|
+
if (this_len === undefined || this_len > str.length) {
|
|
65
|
+
this_len = str.length;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return str.substring(this_len - search.length, this_len) === search;
|
|
69
|
+
} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
function includes(str, search, start) {
|
|
73
|
+
if (typeof start !== 'number') {
|
|
74
|
+
start = 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (start + search.length > str.length) {
|
|
78
|
+
return false;
|
|
79
|
+
} else {
|
|
80
|
+
return str.indexOf(search, start) !== -1;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
|
|
85
|
+
return 'The value "' + value + '" is invalid for option "' + name + '"';
|
|
86
|
+
}, TypeError);
|
|
87
|
+
createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
|
|
88
|
+
// determiner: 'must be' or 'must not be'
|
|
89
|
+
var determiner;
|
|
90
|
+
|
|
91
|
+
if (typeof expected === 'string' && startsWith(expected, 'not ')) {
|
|
92
|
+
determiner = 'must not be';
|
|
93
|
+
expected = expected.replace(/^not /, '');
|
|
94
|
+
} else {
|
|
95
|
+
determiner = 'must be';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
var msg;
|
|
99
|
+
|
|
100
|
+
if (endsWith(name, ' argument')) {
|
|
101
|
+
// For cases like 'first argument'
|
|
102
|
+
msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
|
|
103
|
+
} else {
|
|
104
|
+
var type = includes(name, '.') ? 'property' : 'argument';
|
|
105
|
+
msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
msg += ". Received type ".concat(typeof actual);
|
|
109
|
+
return msg;
|
|
110
|
+
}, TypeError);
|
|
111
|
+
createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
|
|
112
|
+
createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
|
|
113
|
+
return 'The ' + name + ' method is not implemented';
|
|
114
|
+
});
|
|
115
|
+
createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
|
|
116
|
+
createErrorType('ERR_STREAM_DESTROYED', function (name) {
|
|
117
|
+
return 'Cannot call ' + name + ' after a stream was destroyed';
|
|
118
|
+
});
|
|
119
|
+
createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
|
|
120
|
+
createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
|
|
121
|
+
createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
|
|
122
|
+
createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
|
|
123
|
+
createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
|
|
124
|
+
return 'Unknown encoding: ' + arg;
|
|
125
|
+
}, TypeError);
|
|
126
|
+
createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
|
|
127
|
+
module.exports.codes = codes;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const codes = {};
|
|
4
|
+
|
|
5
|
+
function createErrorType(code, message, Base) {
|
|
6
|
+
if (!Base) {
|
|
7
|
+
Base = Error
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function getMessage (arg1, arg2, arg3) {
|
|
11
|
+
if (typeof message === 'string') {
|
|
12
|
+
return message
|
|
13
|
+
} else {
|
|
14
|
+
return message(arg1, arg2, arg3)
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class NodeError extends Base {
|
|
19
|
+
constructor (arg1, arg2, arg3) {
|
|
20
|
+
super(getMessage(arg1, arg2, arg3));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
NodeError.prototype.name = Base.name;
|
|
25
|
+
NodeError.prototype.code = code;
|
|
26
|
+
|
|
27
|
+
codes[code] = NodeError;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
|
|
31
|
+
function oneOf(expected, thing) {
|
|
32
|
+
if (Array.isArray(expected)) {
|
|
33
|
+
const len = expected.length;
|
|
34
|
+
expected = expected.map((i) => String(i));
|
|
35
|
+
if (len > 2) {
|
|
36
|
+
return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` +
|
|
37
|
+
expected[len - 1];
|
|
38
|
+
} else if (len === 2) {
|
|
39
|
+
return `one of ${thing} ${expected[0]} or ${expected[1]}`;
|
|
40
|
+
} else {
|
|
41
|
+
return `of ${thing} ${expected[0]}`;
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
return `of ${thing} ${String(expected)}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
|
|
49
|
+
function startsWith(str, search, pos) {
|
|
50
|
+
return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
|
|
54
|
+
function endsWith(str, search, this_len) {
|
|
55
|
+
if (this_len === undefined || this_len > str.length) {
|
|
56
|
+
this_len = str.length;
|
|
57
|
+
}
|
|
58
|
+
return str.substring(this_len - search.length, this_len) === search;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
|
|
62
|
+
function includes(str, search, start) {
|
|
63
|
+
if (typeof start !== 'number') {
|
|
64
|
+
start = 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (start + search.length > str.length) {
|
|
68
|
+
return false;
|
|
69
|
+
} else {
|
|
70
|
+
return str.indexOf(search, start) !== -1;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
|
|
75
|
+
return 'The value "' + value + '" is invalid for option "' + name + '"'
|
|
76
|
+
}, TypeError);
|
|
77
|
+
createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
|
|
78
|
+
// determiner: 'must be' or 'must not be'
|
|
79
|
+
let determiner;
|
|
80
|
+
if (typeof expected === 'string' && startsWith(expected, 'not ')) {
|
|
81
|
+
determiner = 'must not be';
|
|
82
|
+
expected = expected.replace(/^not /, '');
|
|
83
|
+
} else {
|
|
84
|
+
determiner = 'must be';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
let msg;
|
|
88
|
+
if (endsWith(name, ' argument')) {
|
|
89
|
+
// For cases like 'first argument'
|
|
90
|
+
msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`;
|
|
91
|
+
} else {
|
|
92
|
+
const type = includes(name, '.') ? 'property' : 'argument';
|
|
93
|
+
msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
msg += `. Received type ${typeof actual}`;
|
|
97
|
+
return msg;
|
|
98
|
+
}, TypeError);
|
|
99
|
+
createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
|
|
100
|
+
createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
|
|
101
|
+
return 'The ' + name + ' method is not implemented'
|
|
102
|
+
});
|
|
103
|
+
createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
|
|
104
|
+
createErrorType('ERR_STREAM_DESTROYED', function (name) {
|
|
105
|
+
return 'Cannot call ' + name + ' after a stream was destroyed';
|
|
106
|
+
});
|
|
107
|
+
createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
|
|
108
|
+
createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
|
|
109
|
+
createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
|
|
110
|
+
createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
|
|
111
|
+
createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
|
|
112
|
+
return 'Unknown encoding: ' + arg
|
|
113
|
+
}, TypeError);
|
|
114
|
+
createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
|
|
115
|
+
|
|
116
|
+
module.exports.codes = codes;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
var experimentalWarnings = new Set();
|
|
4
|
+
|
|
5
|
+
function emitExperimentalWarning(feature) {
|
|
6
|
+
if (experimentalWarnings.has(feature)) return;
|
|
7
|
+
var msg = feature + ' is an experimental feature. This feature could ' +
|
|
8
|
+
'change at any time';
|
|
9
|
+
experimentalWarnings.add(feature);
|
|
10
|
+
process.emitWarning(msg, 'ExperimentalWarning');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function noop() {}
|
|
14
|
+
|
|
15
|
+
module.exports.emitExperimentalWarning = process.emitWarning
|
|
16
|
+
? emitExperimentalWarning
|
|
17
|
+
: noop;
|