node-datachannel 0.5.0-dev → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/CMakeLists.txt +1 -1
  2. package/examples/electron-demo/package-lock.json +164 -419
  3. package/examples/electron-demo/package.json +2 -2
  4. package/lib/index.d.ts +5 -0
  5. package/lib/index.js +33 -2
  6. package/package.json +1 -5
  7. package/polyfill/RTCDtlsTransport.js +30 -12
  8. package/polyfill/RTCIceCandidate.js +1 -1
  9. package/polyfill/RTCIceTransport.js +48 -21
  10. package/polyfill/RTCPeerConnection.js +46 -23
  11. package/polyfill/RTCSctpTransport.js +33 -14
  12. package/src/peer-connection-wrapper.cpp +50 -0
  13. package/src/peer-connection-wrapper.h +2 -0
  14. package/test/connectivity.js +1 -1
  15. package/test/polyfill-connectivity.js +2 -1
  16. package/test/test.js +2 -2
  17. package/examples/build/Dockerfile +0 -30
  18. package/examples/build/README.md +0 -24
  19. package/node_modules/base64-js/LICENSE +0 -21
  20. package/node_modules/base64-js/README.md +0 -34
  21. package/node_modules/base64-js/base64js.min.js +0 -1
  22. package/node_modules/base64-js/index.d.ts +0 -3
  23. package/node_modules/base64-js/index.js +0 -150
  24. package/node_modules/base64-js/package.json +0 -47
  25. package/node_modules/buffer/AUTHORS.md +0 -70
  26. package/node_modules/buffer/LICENSE +0 -21
  27. package/node_modules/buffer/README.md +0 -410
  28. package/node_modules/buffer/index.d.ts +0 -186
  29. package/node_modules/buffer/index.js +0 -1817
  30. package/node_modules/buffer/package.json +0 -96
  31. package/node_modules/chownr/LICENSE +0 -15
  32. package/node_modules/chownr/README.md +0 -3
  33. package/node_modules/chownr/chownr.js +0 -167
  34. package/node_modules/chownr/package.json +0 -29
  35. package/node_modules/decompress-response/index.d.ts +0 -22
  36. package/node_modules/decompress-response/index.js +0 -58
  37. package/node_modules/decompress-response/license +0 -9
  38. package/node_modules/decompress-response/package.json +0 -56
  39. package/node_modules/decompress-response/readme.md +0 -48
  40. package/node_modules/deep-extend/CHANGELOG.md +0 -46
  41. package/node_modules/deep-extend/LICENSE +0 -20
  42. package/node_modules/deep-extend/README.md +0 -91
  43. package/node_modules/deep-extend/index.js +0 -1
  44. package/node_modules/deep-extend/lib/deep-extend.js +0 -150
  45. package/node_modules/deep-extend/package.json +0 -62
  46. package/node_modules/detect-libc/LICENSE +0 -201
  47. package/node_modules/detect-libc/README.md +0 -163
  48. package/node_modules/detect-libc/index.d.ts +0 -14
  49. package/node_modules/detect-libc/lib/detect-libc.js +0 -279
  50. package/node_modules/detect-libc/lib/filesystem.js +0 -41
  51. package/node_modules/detect-libc/lib/process.js +0 -19
  52. package/node_modules/detect-libc/package.json +0 -40
  53. package/node_modules/end-of-stream/LICENSE +0 -21
  54. package/node_modules/end-of-stream/README.md +0 -54
  55. package/node_modules/end-of-stream/index.js +0 -94
  56. package/node_modules/end-of-stream/package.json +0 -37
  57. package/node_modules/expand-template/.travis.yml +0 -6
  58. package/node_modules/expand-template/LICENSE +0 -21
  59. package/node_modules/expand-template/README.md +0 -43
  60. package/node_modules/expand-template/index.js +0 -26
  61. package/node_modules/expand-template/package.json +0 -29
  62. package/node_modules/expand-template/test.js +0 -67
  63. package/node_modules/fs-constants/LICENSE +0 -21
  64. package/node_modules/fs-constants/README.md +0 -26
  65. package/node_modules/fs-constants/browser.js +0 -1
  66. package/node_modules/fs-constants/index.js +0 -1
  67. package/node_modules/fs-constants/package.json +0 -19
  68. package/node_modules/github-from-package/.travis.yml +0 -4
  69. package/node_modules/github-from-package/LICENSE +0 -18
  70. package/node_modules/github-from-package/example/package.json +0 -8
  71. package/node_modules/github-from-package/example/url.js +0 -3
  72. package/node_modules/github-from-package/index.js +0 -17
  73. package/node_modules/github-from-package/package.json +0 -30
  74. package/node_modules/github-from-package/readme.markdown +0 -53
  75. package/node_modules/github-from-package/test/a.json +0 -8
  76. package/node_modules/github-from-package/test/b.json +0 -5
  77. package/node_modules/github-from-package/test/c.json +0 -5
  78. package/node_modules/github-from-package/test/d.json +0 -7
  79. package/node_modules/github-from-package/test/e.json +0 -5
  80. package/node_modules/github-from-package/test/url.js +0 -19
  81. package/node_modules/ieee754/LICENSE +0 -11
  82. package/node_modules/ieee754/README.md +0 -51
  83. package/node_modules/ieee754/index.d.ts +0 -10
  84. package/node_modules/ieee754/index.js +0 -85
  85. package/node_modules/ieee754/package.json +0 -52
  86. package/node_modules/inherits/LICENSE +0 -16
  87. package/node_modules/inherits/README.md +0 -42
  88. package/node_modules/inherits/inherits.js +0 -9
  89. package/node_modules/inherits/inherits_browser.js +0 -27
  90. package/node_modules/inherits/package.json +0 -29
  91. package/node_modules/ini/LICENSE +0 -15
  92. package/node_modules/ini/README.md +0 -102
  93. package/node_modules/ini/ini.js +0 -206
  94. package/node_modules/ini/package.json +0 -33
  95. package/node_modules/mimic-response/index.d.ts +0 -17
  96. package/node_modules/mimic-response/index.js +0 -77
  97. package/node_modules/mimic-response/license +0 -9
  98. package/node_modules/mimic-response/package.json +0 -42
  99. package/node_modules/mimic-response/readme.md +0 -78
  100. package/node_modules/minimist/.eslintrc +0 -29
  101. package/node_modules/minimist/.github/FUNDING.yml +0 -12
  102. package/node_modules/minimist/.nycrc +0 -14
  103. package/node_modules/minimist/CHANGELOG.md +0 -298
  104. package/node_modules/minimist/LICENSE +0 -18
  105. package/node_modules/minimist/README.md +0 -121
  106. package/node_modules/minimist/example/parse.js +0 -4
  107. package/node_modules/minimist/index.js +0 -263
  108. package/node_modules/minimist/package.json +0 -75
  109. package/node_modules/minimist/test/all_bool.js +0 -34
  110. package/node_modules/minimist/test/bool.js +0 -177
  111. package/node_modules/minimist/test/dash.js +0 -43
  112. package/node_modules/minimist/test/default_bool.js +0 -37
  113. package/node_modules/minimist/test/dotted.js +0 -24
  114. package/node_modules/minimist/test/kv_short.js +0 -32
  115. package/node_modules/minimist/test/long.js +0 -33
  116. package/node_modules/minimist/test/num.js +0 -38
  117. package/node_modules/minimist/test/parse.js +0 -209
  118. package/node_modules/minimist/test/parse_modified.js +0 -11
  119. package/node_modules/minimist/test/proto.js +0 -64
  120. package/node_modules/minimist/test/short.js +0 -69
  121. package/node_modules/minimist/test/stop_early.js +0 -17
  122. package/node_modules/minimist/test/unknown.js +0 -104
  123. package/node_modules/minimist/test/whitespace.js +0 -10
  124. package/node_modules/mkdirp-classic/LICENSE +0 -21
  125. package/node_modules/mkdirp-classic/README.md +0 -18
  126. package/node_modules/mkdirp-classic/index.js +0 -98
  127. package/node_modules/mkdirp-classic/package.json +0 -18
  128. package/node_modules/napi-build-utils/LICENSE +0 -21
  129. package/node_modules/napi-build-utils/README.md +0 -48
  130. package/node_modules/napi-build-utils/index.js +0 -213
  131. package/node_modules/napi-build-utils/index.md +0 -81
  132. package/node_modules/napi-build-utils/package.json +0 -41
  133. package/node_modules/node-abi/LICENSE +0 -21
  134. package/node_modules/node-abi/README.md +0 -52
  135. package/node_modules/node-abi/abi_registry.json +0 -276
  136. package/node_modules/node-abi/index.js +0 -179
  137. package/node_modules/node-abi/package.json +0 -41
  138. package/node_modules/once/LICENSE +0 -15
  139. package/node_modules/once/README.md +0 -79
  140. package/node_modules/once/once.js +0 -42
  141. package/node_modules/once/package.json +0 -33
  142. package/node_modules/prebuild-install/CHANGELOG.md +0 -116
  143. package/node_modules/prebuild-install/CONTRIBUTING.md +0 -6
  144. package/node_modules/prebuild-install/LICENSE +0 -21
  145. package/node_modules/prebuild-install/README.md +0 -163
  146. package/node_modules/prebuild-install/asset.js +0 -44
  147. package/node_modules/prebuild-install/bin.js +0 -78
  148. package/node_modules/prebuild-install/download.js +0 -142
  149. package/node_modules/prebuild-install/error.js +0 -14
  150. package/node_modules/prebuild-install/help.txt +0 -16
  151. package/node_modules/prebuild-install/index.js +0 -1
  152. package/node_modules/prebuild-install/log.js +0 -33
  153. package/node_modules/prebuild-install/package.json +0 -67
  154. package/node_modules/prebuild-install/proxy.js +0 -35
  155. package/node_modules/prebuild-install/rc.js +0 -64
  156. package/node_modules/prebuild-install/util.js +0 -143
  157. package/node_modules/pump/.travis.yml +0 -5
  158. package/node_modules/pump/LICENSE +0 -21
  159. package/node_modules/pump/README.md +0 -65
  160. package/node_modules/pump/index.js +0 -82
  161. package/node_modules/pump/package.json +0 -24
  162. package/node_modules/pump/test-browser.js +0 -66
  163. package/node_modules/pump/test-node.js +0 -53
  164. package/node_modules/rc/LICENSE.APACHE2 +0 -15
  165. package/node_modules/rc/LICENSE.BSD +0 -26
  166. package/node_modules/rc/LICENSE.MIT +0 -24
  167. package/node_modules/rc/README.md +0 -227
  168. package/node_modules/rc/browser.js +0 -7
  169. package/node_modules/rc/cli.js +0 -4
  170. package/node_modules/rc/index.js +0 -53
  171. package/node_modules/rc/lib/utils.js +0 -104
  172. package/node_modules/rc/node_modules/strip-json-comments/index.js +0 -70
  173. package/node_modules/rc/node_modules/strip-json-comments/license +0 -21
  174. package/node_modules/rc/node_modules/strip-json-comments/package.json +0 -42
  175. package/node_modules/rc/node_modules/strip-json-comments/readme.md +0 -64
  176. package/node_modules/rc/package.json +0 -29
  177. package/node_modules/rc/test/ini.js +0 -16
  178. package/node_modules/rc/test/nested-env-vars.js +0 -50
  179. package/node_modules/rc/test/test.js +0 -59
  180. package/node_modules/safe-buffer/LICENSE +0 -21
  181. package/node_modules/safe-buffer/README.md +0 -584
  182. package/node_modules/safe-buffer/index.d.ts +0 -187
  183. package/node_modules/safe-buffer/index.js +0 -65
  184. package/node_modules/safe-buffer/package.json +0 -51
  185. package/node_modules/semver/LICENSE +0 -15
  186. package/node_modules/semver/README.md +0 -637
  187. package/node_modules/semver/bin/semver.js +0 -197
  188. package/node_modules/semver/classes/comparator.js +0 -141
  189. package/node_modules/semver/classes/index.js +0 -5
  190. package/node_modules/semver/classes/range.js +0 -539
  191. package/node_modules/semver/classes/semver.js +0 -302
  192. package/node_modules/semver/functions/clean.js +0 -6
  193. package/node_modules/semver/functions/cmp.js +0 -52
  194. package/node_modules/semver/functions/coerce.js +0 -52
  195. package/node_modules/semver/functions/compare-build.js +0 -7
  196. package/node_modules/semver/functions/compare-loose.js +0 -3
  197. package/node_modules/semver/functions/compare.js +0 -5
  198. package/node_modules/semver/functions/diff.js +0 -65
  199. package/node_modules/semver/functions/eq.js +0 -3
  200. package/node_modules/semver/functions/gt.js +0 -3
  201. package/node_modules/semver/functions/gte.js +0 -3
  202. package/node_modules/semver/functions/inc.js +0 -19
  203. package/node_modules/semver/functions/lt.js +0 -3
  204. package/node_modules/semver/functions/lte.js +0 -3
  205. package/node_modules/semver/functions/major.js +0 -3
  206. package/node_modules/semver/functions/minor.js +0 -3
  207. package/node_modules/semver/functions/neq.js +0 -3
  208. package/node_modules/semver/functions/parse.js +0 -16
  209. package/node_modules/semver/functions/patch.js +0 -3
  210. package/node_modules/semver/functions/prerelease.js +0 -6
  211. package/node_modules/semver/functions/rcompare.js +0 -3
  212. package/node_modules/semver/functions/rsort.js +0 -3
  213. package/node_modules/semver/functions/satisfies.js +0 -10
  214. package/node_modules/semver/functions/sort.js +0 -3
  215. package/node_modules/semver/functions/valid.js +0 -6
  216. package/node_modules/semver/index.js +0 -89
  217. package/node_modules/semver/internal/constants.js +0 -35
  218. package/node_modules/semver/internal/debug.js +0 -9
  219. package/node_modules/semver/internal/identifiers.js +0 -23
  220. package/node_modules/semver/internal/parse-options.js +0 -15
  221. package/node_modules/semver/internal/re.js +0 -212
  222. package/node_modules/semver/node_modules/lru-cache/LICENSE +0 -15
  223. package/node_modules/semver/node_modules/lru-cache/README.md +0 -166
  224. package/node_modules/semver/node_modules/lru-cache/index.js +0 -334
  225. package/node_modules/semver/node_modules/lru-cache/package.json +0 -34
  226. package/node_modules/semver/node_modules/yallist/LICENSE +0 -15
  227. package/node_modules/semver/node_modules/yallist/README.md +0 -204
  228. package/node_modules/semver/node_modules/yallist/iterator.js +0 -8
  229. package/node_modules/semver/node_modules/yallist/package.json +0 -29
  230. package/node_modules/semver/node_modules/yallist/yallist.js +0 -426
  231. package/node_modules/semver/package.json +0 -87
  232. package/node_modules/semver/preload.js +0 -2
  233. package/node_modules/semver/range.bnf +0 -16
  234. package/node_modules/semver/ranges/gtr.js +0 -4
  235. package/node_modules/semver/ranges/intersects.js +0 -7
  236. package/node_modules/semver/ranges/ltr.js +0 -4
  237. package/node_modules/semver/ranges/max-satisfying.js +0 -25
  238. package/node_modules/semver/ranges/min-satisfying.js +0 -24
  239. package/node_modules/semver/ranges/min-version.js +0 -61
  240. package/node_modules/semver/ranges/outside.js +0 -80
  241. package/node_modules/semver/ranges/simplify.js +0 -47
  242. package/node_modules/semver/ranges/subset.js +0 -247
  243. package/node_modules/semver/ranges/to-comparators.js +0 -8
  244. package/node_modules/semver/ranges/valid.js +0 -11
  245. package/node_modules/simple-concat/.travis.yml +0 -3
  246. package/node_modules/simple-concat/LICENSE +0 -20
  247. package/node_modules/simple-concat/README.md +0 -44
  248. package/node_modules/simple-concat/index.js +0 -15
  249. package/node_modules/simple-concat/package.json +0 -47
  250. package/node_modules/simple-concat/test/basic.js +0 -41
  251. package/node_modules/simple-get/.github/dependabot.yml +0 -15
  252. package/node_modules/simple-get/.github/workflows/ci.yml +0 -23
  253. package/node_modules/simple-get/LICENSE +0 -20
  254. package/node_modules/simple-get/README.md +0 -333
  255. package/node_modules/simple-get/index.js +0 -108
  256. package/node_modules/simple-get/package.json +0 -67
  257. package/node_modules/tar-fs/.travis.yml +0 -6
  258. package/node_modules/tar-fs/LICENSE +0 -21
  259. package/node_modules/tar-fs/README.md +0 -165
  260. package/node_modules/tar-fs/index.js +0 -351
  261. package/node_modules/tar-fs/node_modules/bl/.travis.yml +0 -17
  262. package/node_modules/tar-fs/node_modules/bl/BufferList.js +0 -396
  263. package/node_modules/tar-fs/node_modules/bl/LICENSE.md +0 -13
  264. package/node_modules/tar-fs/node_modules/bl/README.md +0 -247
  265. package/node_modules/tar-fs/node_modules/bl/bl.js +0 -84
  266. package/node_modules/tar-fs/node_modules/bl/package.json +0 -37
  267. package/node_modules/tar-fs/node_modules/bl/test/convert.js +0 -21
  268. package/node_modules/tar-fs/node_modules/bl/test/indexOf.js +0 -492
  269. package/node_modules/tar-fs/node_modules/bl/test/isBufferList.js +0 -32
  270. package/node_modules/tar-fs/node_modules/bl/test/test.js +0 -869
  271. package/node_modules/tar-fs/node_modules/readable-stream/CONTRIBUTING.md +0 -38
  272. package/node_modules/tar-fs/node_modules/readable-stream/GOVERNANCE.md +0 -136
  273. package/node_modules/tar-fs/node_modules/readable-stream/LICENSE +0 -47
  274. package/node_modules/tar-fs/node_modules/readable-stream/README.md +0 -106
  275. package/node_modules/tar-fs/node_modules/readable-stream/errors-browser.js +0 -127
  276. package/node_modules/tar-fs/node_modules/readable-stream/errors.js +0 -116
  277. package/node_modules/tar-fs/node_modules/readable-stream/experimentalWarning.js +0 -17
  278. package/node_modules/tar-fs/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
  279. package/node_modules/tar-fs/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
  280. package/node_modules/tar-fs/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
  281. package/node_modules/tar-fs/node_modules/readable-stream/lib/_stream_transform.js +0 -190
  282. package/node_modules/tar-fs/node_modules/readable-stream/lib/_stream_writable.js +0 -641
  283. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
  284. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
  285. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
  286. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
  287. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
  288. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
  289. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
  290. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
  291. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  292. package/node_modules/tar-fs/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  293. package/node_modules/tar-fs/node_modules/readable-stream/package.json +0 -68
  294. package/node_modules/tar-fs/node_modules/readable-stream/readable-browser.js +0 -9
  295. package/node_modules/tar-fs/node_modules/readable-stream/readable.js +0 -16
  296. package/node_modules/tar-fs/node_modules/string_decoder/LICENSE +0 -48
  297. package/node_modules/tar-fs/node_modules/string_decoder/README.md +0 -47
  298. package/node_modules/tar-fs/node_modules/string_decoder/lib/string_decoder.js +0 -296
  299. package/node_modules/tar-fs/node_modules/string_decoder/package.json +0 -34
  300. package/node_modules/tar-fs/node_modules/tar-stream/LICENSE +0 -21
  301. package/node_modules/tar-fs/node_modules/tar-stream/README.md +0 -168
  302. package/node_modules/tar-fs/node_modules/tar-stream/extract.js +0 -257
  303. package/node_modules/tar-fs/node_modules/tar-stream/headers.js +0 -295
  304. package/node_modules/tar-fs/node_modules/tar-stream/index.js +0 -2
  305. package/node_modules/tar-fs/node_modules/tar-stream/pack.js +0 -255
  306. package/node_modules/tar-fs/node_modules/tar-stream/package.json +0 -58
  307. package/node_modules/tar-fs/node_modules/tar-stream/sandbox.js +0 -11
  308. package/node_modules/tar-fs/package.json +0 -41
  309. package/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
  310. package/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
  311. package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
  312. package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
  313. package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
  314. package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
  315. package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
  316. package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
  317. package/node_modules/tar-fs/test/fixtures/e/file +0 -0
  318. package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
  319. package/node_modules/tar-fs/test/index.js +0 -346
  320. package/node_modules/tunnel-agent/LICENSE +0 -55
  321. package/node_modules/tunnel-agent/README.md +0 -4
  322. package/node_modules/tunnel-agent/index.js +0 -244
  323. package/node_modules/tunnel-agent/package.json +0 -22
  324. package/node_modules/util-deprecate/History.md +0 -16
  325. package/node_modules/util-deprecate/LICENSE +0 -24
  326. package/node_modules/util-deprecate/README.md +0 -53
  327. package/node_modules/util-deprecate/browser.js +0 -67
  328. package/node_modules/util-deprecate/node.js +0 -6
  329. package/node_modules/util-deprecate/package.json +0 -27
  330. package/node_modules/wrappy/LICENSE +0 -15
  331. package/node_modules/wrappy/README.md +0 -36
  332. package/node_modules/wrappy/package.json +0 -29
  333. package/node_modules/wrappy/wrappy.js +0 -33
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;
4
- function highWaterMarkFrom(options, isDuplex, duplexKey) {
5
- return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
6
- }
7
- function getHighWaterMark(state, options, duplexKey, isDuplex) {
8
- var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
9
- if (hwm != null) {
10
- if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
11
- var name = isDuplex ? duplexKey : 'highWaterMark';
12
- throw new ERR_INVALID_OPT_VALUE(name, hwm);
13
- }
14
- return Math.floor(hwm);
15
- }
16
-
17
- // Default value
18
- return state.objectMode ? 16 : 16 * 1024;
19
- }
20
- module.exports = {
21
- getHighWaterMark: getHighWaterMark
22
- };
@@ -1 +0,0 @@
1
- module.exports = require('events').EventEmitter;
@@ -1 +0,0 @@
1
- module.exports = require('stream');
@@ -1,68 +0,0 @@
1
- {
2
- "name": "readable-stream",
3
- "version": "3.6.2",
4
- "description": "Streams3, a user-land copy of the stream library from Node.js",
5
- "main": "readable.js",
6
- "engines": {
7
- "node": ">= 6"
8
- },
9
- "dependencies": {
10
- "inherits": "^2.0.3",
11
- "string_decoder": "^1.1.1",
12
- "util-deprecate": "^1.0.1"
13
- },
14
- "devDependencies": {
15
- "@babel/cli": "^7.2.0",
16
- "@babel/core": "^7.2.0",
17
- "@babel/polyfill": "^7.0.0",
18
- "@babel/preset-env": "^7.2.0",
19
- "airtap": "0.0.9",
20
- "assert": "^1.4.0",
21
- "bl": "^2.0.0",
22
- "deep-strict-equal": "^0.2.0",
23
- "events.once": "^2.0.2",
24
- "glob": "^7.1.2",
25
- "gunzip-maybe": "^1.4.1",
26
- "hyperquest": "^2.1.3",
27
- "lolex": "^2.6.0",
28
- "nyc": "^11.0.0",
29
- "pump": "^3.0.0",
30
- "rimraf": "^2.6.2",
31
- "tap": "^12.0.0",
32
- "tape": "^4.9.0",
33
- "tar-fs": "^1.16.2",
34
- "util-promisify": "^2.1.0"
35
- },
36
- "scripts": {
37
- "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js",
38
- "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap",
39
- "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js",
40
- "test-browser-local": "airtap --open --local -- test/browser.js",
41
- "cover": "nyc npm test",
42
- "report": "nyc report --reporter=lcov",
43
- "update-browser-errors": "babel -o errors-browser.js errors.js"
44
- },
45
- "repository": {
46
- "type": "git",
47
- "url": "git://github.com/nodejs/readable-stream"
48
- },
49
- "keywords": [
50
- "readable",
51
- "stream",
52
- "pipe"
53
- ],
54
- "browser": {
55
- "util": false,
56
- "worker_threads": false,
57
- "./errors": "./errors-browser.js",
58
- "./readable.js": "./readable-browser.js",
59
- "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js",
60
- "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
61
- },
62
- "nyc": {
63
- "include": [
64
- "lib/**.js"
65
- ]
66
- },
67
- "license": "MIT"
68
- }
@@ -1,9 +0,0 @@
1
- exports = module.exports = require('./lib/_stream_readable.js');
2
- exports.Stream = exports;
3
- exports.Readable = exports;
4
- exports.Writable = require('./lib/_stream_writable.js');
5
- exports.Duplex = require('./lib/_stream_duplex.js');
6
- exports.Transform = require('./lib/_stream_transform.js');
7
- exports.PassThrough = require('./lib/_stream_passthrough.js');
8
- exports.finished = require('./lib/internal/streams/end-of-stream.js');
9
- exports.pipeline = require('./lib/internal/streams/pipeline.js');
@@ -1,16 +0,0 @@
1
- var Stream = require('stream');
2
- if (process.env.READABLE_STREAM === 'disable' && Stream) {
3
- module.exports = Stream.Readable;
4
- Object.assign(module.exports, Stream);
5
- module.exports.Stream = Stream;
6
- } else {
7
- exports = module.exports = require('./lib/_stream_readable.js');
8
- exports.Stream = Stream || exports;
9
- exports.Readable = exports;
10
- exports.Writable = require('./lib/_stream_writable.js');
11
- exports.Duplex = require('./lib/_stream_duplex.js');
12
- exports.Transform = require('./lib/_stream_transform.js');
13
- exports.PassThrough = require('./lib/_stream_passthrough.js');
14
- exports.finished = require('./lib/internal/streams/end-of-stream.js');
15
- exports.pipeline = require('./lib/internal/streams/pipeline.js');
16
- }
@@ -1,48 +0,0 @@
1
- Node.js is licensed for use as follows:
2
-
3
- """
4
- Copyright Node.js contributors. All rights reserved.
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to
8
- deal in the Software without restriction, including without limitation the
9
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
- sell copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
- IN THE SOFTWARE.
23
- """
24
-
25
- This license applies to parts of Node.js originating from the
26
- https://github.com/joyent/node repository:
27
-
28
- """
29
- Copyright Joyent, Inc. and other Node contributors. All rights reserved.
30
- Permission is hereby granted, free of charge, to any person obtaining a copy
31
- of this software and associated documentation files (the "Software"), to
32
- deal in the Software without restriction, including without limitation the
33
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
34
- sell copies of the Software, and to permit persons to whom the Software is
35
- furnished to do so, subject to the following conditions:
36
-
37
- The above copyright notice and this permission notice shall be included in
38
- all copies or substantial portions of the Software.
39
-
40
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
46
- IN THE SOFTWARE.
47
- """
48
-
@@ -1,47 +0,0 @@
1
- # string_decoder
2
-
3
- ***Node-core v8.9.4 string_decoder for userland***
4
-
5
-
6
- [![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
7
- [![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
8
-
9
-
10
- ```bash
11
- npm install --save string_decoder
12
- ```
13
-
14
- ***Node-core string_decoder for userland***
15
-
16
- This package is a mirror of the string_decoder implementation in Node-core.
17
-
18
- Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
19
-
20
- As of version 1.0.0 **string_decoder** uses semantic versioning.
21
-
22
- ## Previous versions
23
-
24
- Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
25
-
26
- ## Update
27
-
28
- The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
29
-
30
- ## Streams Working Group
31
-
32
- `string_decoder` is maintained by the Streams Working Group, which
33
- oversees the development and maintenance of the Streams API within
34
- Node.js. The responsibilities of the Streams Working Group include:
35
-
36
- * Addressing stream issues on the Node.js issue tracker.
37
- * Authoring and editing stream documentation within the Node.js project.
38
- * Reviewing changes to stream subclasses within the Node.js project.
39
- * Redirecting changes to streams from the Node.js project to this
40
- project.
41
- * Assisting in the implementation of stream providers within Node.js.
42
- * Recommending versions of `readable-stream` to be included in Node.js.
43
- * Messaging about the future of streams to give the community advance
44
- notice of changes.
45
-
46
- See [readable-stream](https://github.com/nodejs/readable-stream) for
47
- more details.
@@ -1,296 +0,0 @@
1
- // Copyright Joyent, Inc. and other Node contributors.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a
4
- // copy of this software and associated documentation files (the
5
- // "Software"), to deal in the Software without restriction, including
6
- // without limitation the rights to use, copy, modify, merge, publish,
7
- // distribute, sublicense, and/or sell copies of the Software, and to permit
8
- // persons to whom the Software is furnished to do so, subject to the
9
- // following conditions:
10
- //
11
- // The above copyright notice and this permission notice shall be included
12
- // in all copies or substantial portions of the Software.
13
- //
14
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-
22
- 'use strict';
23
-
24
- /*<replacement>*/
25
-
26
- var Buffer = require('safe-buffer').Buffer;
27
- /*</replacement>*/
28
-
29
- var isEncoding = Buffer.isEncoding || function (encoding) {
30
- encoding = '' + encoding;
31
- switch (encoding && encoding.toLowerCase()) {
32
- case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
33
- return true;
34
- default:
35
- return false;
36
- }
37
- };
38
-
39
- function _normalizeEncoding(enc) {
40
- if (!enc) return 'utf8';
41
- var retried;
42
- while (true) {
43
- switch (enc) {
44
- case 'utf8':
45
- case 'utf-8':
46
- return 'utf8';
47
- case 'ucs2':
48
- case 'ucs-2':
49
- case 'utf16le':
50
- case 'utf-16le':
51
- return 'utf16le';
52
- case 'latin1':
53
- case 'binary':
54
- return 'latin1';
55
- case 'base64':
56
- case 'ascii':
57
- case 'hex':
58
- return enc;
59
- default:
60
- if (retried) return; // undefined
61
- enc = ('' + enc).toLowerCase();
62
- retried = true;
63
- }
64
- }
65
- };
66
-
67
- // Do not cache `Buffer.isEncoding` when checking encoding names as some
68
- // modules monkey-patch it to support additional encodings
69
- function normalizeEncoding(enc) {
70
- var nenc = _normalizeEncoding(enc);
71
- if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
72
- return nenc || enc;
73
- }
74
-
75
- // StringDecoder provides an interface for efficiently splitting a series of
76
- // buffers into a series of JS strings without breaking apart multi-byte
77
- // characters.
78
- exports.StringDecoder = StringDecoder;
79
- function StringDecoder(encoding) {
80
- this.encoding = normalizeEncoding(encoding);
81
- var nb;
82
- switch (this.encoding) {
83
- case 'utf16le':
84
- this.text = utf16Text;
85
- this.end = utf16End;
86
- nb = 4;
87
- break;
88
- case 'utf8':
89
- this.fillLast = utf8FillLast;
90
- nb = 4;
91
- break;
92
- case 'base64':
93
- this.text = base64Text;
94
- this.end = base64End;
95
- nb = 3;
96
- break;
97
- default:
98
- this.write = simpleWrite;
99
- this.end = simpleEnd;
100
- return;
101
- }
102
- this.lastNeed = 0;
103
- this.lastTotal = 0;
104
- this.lastChar = Buffer.allocUnsafe(nb);
105
- }
106
-
107
- StringDecoder.prototype.write = function (buf) {
108
- if (buf.length === 0) return '';
109
- var r;
110
- var i;
111
- if (this.lastNeed) {
112
- r = this.fillLast(buf);
113
- if (r === undefined) return '';
114
- i = this.lastNeed;
115
- this.lastNeed = 0;
116
- } else {
117
- i = 0;
118
- }
119
- if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
120
- return r || '';
121
- };
122
-
123
- StringDecoder.prototype.end = utf8End;
124
-
125
- // Returns only complete characters in a Buffer
126
- StringDecoder.prototype.text = utf8Text;
127
-
128
- // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
129
- StringDecoder.prototype.fillLast = function (buf) {
130
- if (this.lastNeed <= buf.length) {
131
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
132
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
133
- }
134
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
135
- this.lastNeed -= buf.length;
136
- };
137
-
138
- // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
139
- // continuation byte. If an invalid byte is detected, -2 is returned.
140
- function utf8CheckByte(byte) {
141
- if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
142
- return byte >> 6 === 0x02 ? -1 : -2;
143
- }
144
-
145
- // Checks at most 3 bytes at the end of a Buffer in order to detect an
146
- // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
147
- // needed to complete the UTF-8 character (if applicable) are returned.
148
- function utf8CheckIncomplete(self, buf, i) {
149
- var j = buf.length - 1;
150
- if (j < i) return 0;
151
- var nb = utf8CheckByte(buf[j]);
152
- if (nb >= 0) {
153
- if (nb > 0) self.lastNeed = nb - 1;
154
- return nb;
155
- }
156
- if (--j < i || nb === -2) return 0;
157
- nb = utf8CheckByte(buf[j]);
158
- if (nb >= 0) {
159
- if (nb > 0) self.lastNeed = nb - 2;
160
- return nb;
161
- }
162
- if (--j < i || nb === -2) return 0;
163
- nb = utf8CheckByte(buf[j]);
164
- if (nb >= 0) {
165
- if (nb > 0) {
166
- if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
167
- }
168
- return nb;
169
- }
170
- return 0;
171
- }
172
-
173
- // Validates as many continuation bytes for a multi-byte UTF-8 character as
174
- // needed or are available. If we see a non-continuation byte where we expect
175
- // one, we "replace" the validated continuation bytes we've seen so far with
176
- // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
177
- // behavior. The continuation byte check is included three times in the case
178
- // where all of the continuation bytes for a character exist in the same buffer.
179
- // It is also done this way as a slight performance increase instead of using a
180
- // loop.
181
- function utf8CheckExtraBytes(self, buf, p) {
182
- if ((buf[0] & 0xC0) !== 0x80) {
183
- self.lastNeed = 0;
184
- return '\ufffd';
185
- }
186
- if (self.lastNeed > 1 && buf.length > 1) {
187
- if ((buf[1] & 0xC0) !== 0x80) {
188
- self.lastNeed = 1;
189
- return '\ufffd';
190
- }
191
- if (self.lastNeed > 2 && buf.length > 2) {
192
- if ((buf[2] & 0xC0) !== 0x80) {
193
- self.lastNeed = 2;
194
- return '\ufffd';
195
- }
196
- }
197
- }
198
- }
199
-
200
- // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
201
- function utf8FillLast(buf) {
202
- var p = this.lastTotal - this.lastNeed;
203
- var r = utf8CheckExtraBytes(this, buf, p);
204
- if (r !== undefined) return r;
205
- if (this.lastNeed <= buf.length) {
206
- buf.copy(this.lastChar, p, 0, this.lastNeed);
207
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
208
- }
209
- buf.copy(this.lastChar, p, 0, buf.length);
210
- this.lastNeed -= buf.length;
211
- }
212
-
213
- // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
214
- // partial character, the character's bytes are buffered until the required
215
- // number of bytes are available.
216
- function utf8Text(buf, i) {
217
- var total = utf8CheckIncomplete(this, buf, i);
218
- if (!this.lastNeed) return buf.toString('utf8', i);
219
- this.lastTotal = total;
220
- var end = buf.length - (total - this.lastNeed);
221
- buf.copy(this.lastChar, 0, end);
222
- return buf.toString('utf8', i, end);
223
- }
224
-
225
- // For UTF-8, a replacement character is added when ending on a partial
226
- // character.
227
- function utf8End(buf) {
228
- var r = buf && buf.length ? this.write(buf) : '';
229
- if (this.lastNeed) return r + '\ufffd';
230
- return r;
231
- }
232
-
233
- // UTF-16LE typically needs two bytes per character, but even if we have an even
234
- // number of bytes available, we need to check if we end on a leading/high
235
- // surrogate. In that case, we need to wait for the next two bytes in order to
236
- // decode the last character properly.
237
- function utf16Text(buf, i) {
238
- if ((buf.length - i) % 2 === 0) {
239
- var r = buf.toString('utf16le', i);
240
- if (r) {
241
- var c = r.charCodeAt(r.length - 1);
242
- if (c >= 0xD800 && c <= 0xDBFF) {
243
- this.lastNeed = 2;
244
- this.lastTotal = 4;
245
- this.lastChar[0] = buf[buf.length - 2];
246
- this.lastChar[1] = buf[buf.length - 1];
247
- return r.slice(0, -1);
248
- }
249
- }
250
- return r;
251
- }
252
- this.lastNeed = 1;
253
- this.lastTotal = 2;
254
- this.lastChar[0] = buf[buf.length - 1];
255
- return buf.toString('utf16le', i, buf.length - 1);
256
- }
257
-
258
- // For UTF-16LE we do not explicitly append special replacement characters if we
259
- // end on a partial character, we simply let v8 handle that.
260
- function utf16End(buf) {
261
- var r = buf && buf.length ? this.write(buf) : '';
262
- if (this.lastNeed) {
263
- var end = this.lastTotal - this.lastNeed;
264
- return r + this.lastChar.toString('utf16le', 0, end);
265
- }
266
- return r;
267
- }
268
-
269
- function base64Text(buf, i) {
270
- var n = (buf.length - i) % 3;
271
- if (n === 0) return buf.toString('base64', i);
272
- this.lastNeed = 3 - n;
273
- this.lastTotal = 3;
274
- if (n === 1) {
275
- this.lastChar[0] = buf[buf.length - 1];
276
- } else {
277
- this.lastChar[0] = buf[buf.length - 2];
278
- this.lastChar[1] = buf[buf.length - 1];
279
- }
280
- return buf.toString('base64', i, buf.length - n);
281
- }
282
-
283
- function base64End(buf) {
284
- var r = buf && buf.length ? this.write(buf) : '';
285
- if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
286
- return r;
287
- }
288
-
289
- // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
290
- function simpleWrite(buf) {
291
- return buf.toString(this.encoding);
292
- }
293
-
294
- function simpleEnd(buf) {
295
- return buf && buf.length ? this.write(buf) : '';
296
- }
@@ -1,34 +0,0 @@
1
- {
2
- "name": "string_decoder",
3
- "version": "1.3.0",
4
- "description": "The string_decoder module from Node core",
5
- "main": "lib/string_decoder.js",
6
- "files": [
7
- "lib"
8
- ],
9
- "dependencies": {
10
- "safe-buffer": "~5.2.0"
11
- },
12
- "devDependencies": {
13
- "babel-polyfill": "^6.23.0",
14
- "core-util-is": "^1.0.2",
15
- "inherits": "^2.0.3",
16
- "tap": "~0.4.8"
17
- },
18
- "scripts": {
19
- "test": "tap test/parallel/*.js && node test/verify-dependencies",
20
- "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js"
21
- },
22
- "repository": {
23
- "type": "git",
24
- "url": "git://github.com/nodejs/string_decoder.git"
25
- },
26
- "homepage": "https://github.com/nodejs/string_decoder",
27
- "keywords": [
28
- "string",
29
- "decoder",
30
- "browser",
31
- "browserify"
32
- ],
33
- "license": "MIT"
34
- }
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2014 Mathias Buus
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
13
- all 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
21
- THE SOFTWARE.