fsevents 1.0.6 → 1.0.7
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.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/node_modules/are-we-there-yet/LICENSE +5 -0
- package/node_modules/are-we-there-yet/README.md +2 -1
- package/node_modules/are-we-there-yet/README.md~ +183 -0
- package/node_modules/are-we-there-yet/package.json +10 -9
- package/node_modules/async/README.md +14 -10
- package/node_modules/async/dist/async.js +22 -18
- package/node_modules/async/dist/async.min.js +1 -1
- package/node_modules/async/lib/async.js +22 -18
- package/node_modules/async/package.json +11 -10
- package/node_modules/core-util-is/package.json +2 -1
- package/node_modules/dashdash/README.md +6 -3
- package/node_modules/dashdash/lib/dashdash.js +10 -1
- package/node_modules/dashdash/package.json +9 -8
- package/node_modules/escape-string-regexp/index.js +1 -1
- package/node_modules/escape-string-regexp/package.json +17 -15
- package/node_modules/escape-string-regexp/readme.md +4 -4
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +9 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +42 -30
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +9 -9
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +28 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +11 -11
- package/node_modules/graceful-fs/package.json +2 -3
- package/node_modules/isarray/package.json +2 -1
- package/node_modules/mime-db/HISTORY.md +32 -0
- package/node_modules/mime-db/README.md +1 -1
- package/node_modules/mime-db/db.json +78 -0
- package/node_modules/mime-db/package.json +15 -14
- package/node_modules/mime-types/HISTORY.md +12 -0
- package/node_modules/mime-types/package.json +11 -10
- package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +32 -0
- package/node_modules/node-pre-gyp/package.json +8 -8
- package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/.travis.yml +6 -1
- package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/index.js +8 -1
- package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/package.json +13 -12
- package/node_modules/rc/lib/utils.js +1 -1
- package/node_modules/rc/package.json +11 -10
- package/node_modules/readable-stream/README.md +27 -6
- package/node_modules/{bl/node_modules/readable-stream → readable-stream}/doc/stream.markdown +608 -574
- package/node_modules/readable-stream/lib/_stream_duplex.js +18 -25
- package/node_modules/readable-stream/lib/_stream_passthrough.js +2 -21
- package/node_modules/readable-stream/lib/_stream_readable.js +117 -93
- package/node_modules/readable-stream/lib/_stream_transform.js +15 -27
- package/node_modules/readable-stream/lib/_stream_writable.js +140 -88
- package/node_modules/readable-stream/package.json +33 -25
- package/node_modules/readable-stream/readable.js +6 -1
- package/node_modules/rimraf/README.md +58 -0
- package/node_modules/rimraf/node_modules/glob/README.md +27 -45
- package/node_modules/rimraf/node_modules/glob/common.js +7 -26
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +1 -1
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +9 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +42 -30
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +9 -9
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +28 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +11 -11
- package/node_modules/rimraf/node_modules/glob/package.json +11 -10
- package/node_modules/rimraf/package.json +12 -11
- package/node_modules/rimraf/rimraf.js +7 -5
- package/node_modules/sshpk/bin/sshpk-conv +1 -1
- package/node_modules/sshpk/lib/dhe.js +1 -2
- package/node_modules/sshpk/lib/ssh-buffer.js +2 -1
- package/node_modules/sshpk/package.json +13 -11
- package/node_modules/string_decoder/package.json +2 -1
- package/node_modules/tar-pack/index.js +1 -2
- package/node_modules/tar-pack/node_modules/rimraf/LICENSE +12 -20
- package/node_modules/tar-pack/node_modules/rimraf/README.md +17 -4
- package/node_modules/tar-pack/node_modules/rimraf/bin.js +11 -4
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/README.md +359 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/common.js +226 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/glob.js +752 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE +15 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md +37 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js +44 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +58 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +67 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js +97 -0
- package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/package.json +3 -3
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +216 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +912 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +3 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +122 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +3 -0
- package/node_modules/tar-pack/node_modules/{readable-stream/node_modules/isarray/README.md → rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md} +0 -33
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +89 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +50 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +79 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +84 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +90 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +81 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +66 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/README.md +51 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +58 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/once.js +21 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +70 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js +20 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +78 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md +51 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/package.json +79 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/sync.js +460 -0
- package/node_modules/tar-pack/node_modules/rimraf/package.json +28 -40
- package/node_modules/tar-pack/node_modules/rimraf/rimraf.js +138 -53
- package/node_modules/tar-pack/package.json +21 -11
- package/node_modules/tunnel-agent/index.js +2 -0
- package/node_modules/tunnel-agent/package.json +10 -9
- package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/package.json +3 -2
- package/node_modules/verror/package.json +3 -2
- package/package.json +2 -2
- package/CHANGELOG.md +0 -16
- package/node_modules/bl/node_modules/readable-stream/.npmignore +0 -5
- package/node_modules/bl/node_modules/readable-stream/LICENSE +0 -18
- package/node_modules/bl/node_modules/readable-stream/README.md +0 -36
- package/node_modules/bl/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js +0 -82
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js +0 -27
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js +0 -973
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js +0 -197
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js +0 -527
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE +0 -19
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md +0 -3
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch +0 -604
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +0 -107
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +0 -67
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js +0 -68
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md +0 -54
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/build/build.js +0 -209
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json +0 -19
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js +0 -3
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json +0 -59
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore +0 -2
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE +0 -20
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md +0 -7
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js +0 -221
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json +0 -60
- package/node_modules/bl/node_modules/readable-stream/package.json +0 -82
- package/node_modules/bl/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/bl/node_modules/readable-stream/readable.js +0 -12
- package/node_modules/bl/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/bl/node_modules/readable-stream/writable.js +0 -1
- package/node_modules/node-pre-gyp/LICENSE +0 -27
- package/node_modules/readable-stream/float.patch +0 -923
- package/node_modules/tar-pack/node_modules/readable-stream/.npmignore +0 -5
- package/node_modules/tar-pack/node_modules/readable-stream/LICENSE +0 -18
- package/node_modules/tar-pack/node_modules/readable-stream/README.md +0 -15
- package/node_modules/tar-pack/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_duplex.js +0 -89
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_passthrough.js +0 -46
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_readable.js +0 -982
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_transform.js +0 -210
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_writable.js +0 -386
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/LICENSE +0 -19
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/README.md +0 -3
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/float.patch +0 -604
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +0 -107
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +0 -67
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/test.js +0 -68
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/LICENSE +0 -16
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/README.md +0 -42
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/inherits.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +0 -23
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/package.json +0 -58
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/test.js +0 -25
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/build/build.js +0 -209
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/component.json +0 -19
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/index.js +0 -3
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/package.json +0 -59
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/.npmignore +0 -2
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/LICENSE +0 -20
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/README.md +0 -7
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/index.js +0 -221
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/package.json +0 -60
- package/node_modules/tar-pack/node_modules/readable-stream/package.json +0 -76
- package/node_modules/tar-pack/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/readable.js +0 -8
- package/node_modules/tar-pack/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/writable.js +0 -1
- package/node_modules/tar-pack/node_modules/rimraf/AUTHORS +0 -6
- package/node_modules/tar-pack/node_modules/rimraf/test/run.sh +0 -16
- package/node_modules/tar-pack/node_modules/rimraf/test/setup.sh +0 -47
- package/node_modules/tar-pack/node_modules/rimraf/test/test-async.js +0 -5
- package/node_modules/tar-pack/node_modules/rimraf/test/test-sync.js +0 -3
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/license.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/readme.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/test.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → readable-stream}/.travis.yml +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → readable-stream}/.zuul.yml +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → readable-stream}/doc/wg-meetings/2015-01-30.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/LICENSE +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/README.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/inherits.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/inherits_browser.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/test.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/History.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/LICENSE +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/README.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/browser.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/node.js +0 -0
@@ -4,11 +4,17 @@ rimraf.sync = rimrafSync
|
|
4
4
|
var assert = require("assert")
|
5
5
|
var path = require("path")
|
6
6
|
var fs = require("fs")
|
7
|
+
var glob = require("glob")
|
8
|
+
|
9
|
+
var globOpts = {
|
10
|
+
nosort: true,
|
11
|
+
nocomment: true,
|
12
|
+
nonegate: true,
|
13
|
+
silent: true
|
14
|
+
}
|
7
15
|
|
8
16
|
// for EMFILE handling
|
9
17
|
var timeout = 0
|
10
|
-
exports.EMFILE_MAX = 1000
|
11
|
-
exports.BUSYTRIES_MAX = 3
|
12
18
|
|
13
19
|
var isWindows = (process.platform === "win32")
|
14
20
|
|
@@ -17,6 +23,7 @@ function defaults (options) {
|
|
17
23
|
'unlink',
|
18
24
|
'chmod',
|
19
25
|
'stat',
|
26
|
+
'lstat',
|
20
27
|
'rmdir',
|
21
28
|
'readdir'
|
22
29
|
]
|
@@ -25,6 +32,10 @@ function defaults (options) {
|
|
25
32
|
m = m + 'Sync'
|
26
33
|
options[m] = options[m] || fs[m]
|
27
34
|
})
|
35
|
+
|
36
|
+
options.maxBusyTries = options.maxBusyTries || 3
|
37
|
+
options.emfileWait = options.emfileWait || 1000
|
38
|
+
options.disableGlob = options.disableGlob || false
|
28
39
|
}
|
29
40
|
|
30
41
|
function rimraf (p, options, cb) {
|
@@ -32,41 +43,72 @@ function rimraf (p, options, cb) {
|
|
32
43
|
cb = options
|
33
44
|
options = {}
|
34
45
|
}
|
35
|
-
assert(p)
|
36
|
-
assert(options)
|
37
|
-
assert(typeof cb === 'function')
|
38
46
|
|
39
|
-
|
47
|
+
assert(p, 'rimraf: missing path')
|
48
|
+
assert.equal(typeof p, 'string', 'rimraf: path should be a string')
|
49
|
+
assert(options, 'rimraf: missing options')
|
50
|
+
assert.equal(typeof options, 'object', 'rimraf: options should be object')
|
51
|
+
assert.equal(typeof cb, 'function', 'rimraf: callback function required')
|
40
52
|
|
41
|
-
|
53
|
+
defaults(options)
|
42
54
|
|
43
55
|
var busyTries = 0
|
44
|
-
|
45
|
-
|
46
|
-
if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") &&
|
47
|
-
busyTries < exports.BUSYTRIES_MAX) {
|
48
|
-
busyTries ++
|
49
|
-
var time = busyTries * 100
|
50
|
-
// try again, with the same exact callback as this one.
|
51
|
-
return setTimeout(function () {
|
52
|
-
rimraf_(p, options, CB)
|
53
|
-
}, time)
|
54
|
-
}
|
56
|
+
var errState = null
|
57
|
+
var n = 0
|
55
58
|
|
56
|
-
|
57
|
-
|
58
|
-
return setTimeout(function () {
|
59
|
-
rimraf_(p, options, CB)
|
60
|
-
}, timeout ++)
|
61
|
-
}
|
59
|
+
if (options.disableGlob || !glob.hasMagic(p))
|
60
|
+
return afterGlob(null, [p])
|
62
61
|
|
63
|
-
|
64
|
-
|
65
|
-
|
62
|
+
fs.lstat(p, function (er, stat) {
|
63
|
+
if (!er)
|
64
|
+
return afterGlob(null, [p])
|
66
65
|
|
67
|
-
|
68
|
-
cb(er)
|
66
|
+
glob(p, globOpts, afterGlob)
|
69
67
|
})
|
68
|
+
|
69
|
+
function next (er) {
|
70
|
+
errState = errState || er
|
71
|
+
if (--n === 0)
|
72
|
+
cb(errState)
|
73
|
+
}
|
74
|
+
|
75
|
+
function afterGlob (er, results) {
|
76
|
+
if (er)
|
77
|
+
return cb(er)
|
78
|
+
|
79
|
+
n = results.length
|
80
|
+
if (n === 0)
|
81
|
+
return cb()
|
82
|
+
|
83
|
+
results.forEach(function (p) {
|
84
|
+
rimraf_(p, options, function CB (er) {
|
85
|
+
if (er) {
|
86
|
+
if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") &&
|
87
|
+
busyTries < options.maxBusyTries) {
|
88
|
+
busyTries ++
|
89
|
+
var time = busyTries * 100
|
90
|
+
// try again, with the same exact callback as this one.
|
91
|
+
return setTimeout(function () {
|
92
|
+
rimraf_(p, options, CB)
|
93
|
+
}, time)
|
94
|
+
}
|
95
|
+
|
96
|
+
// this one won't happen if graceful-fs is used.
|
97
|
+
if (er.code === "EMFILE" && timeout < options.emfileWait) {
|
98
|
+
return setTimeout(function () {
|
99
|
+
rimraf_(p, options, CB)
|
100
|
+
}, timeout ++)
|
101
|
+
}
|
102
|
+
|
103
|
+
// already gone
|
104
|
+
if (er.code === "ENOENT") er = null
|
105
|
+
}
|
106
|
+
|
107
|
+
timeout = 0
|
108
|
+
next(er)
|
109
|
+
})
|
110
|
+
})
|
111
|
+
}
|
70
112
|
}
|
71
113
|
|
72
114
|
// Two possible strategies.
|
@@ -85,18 +127,28 @@ function rimraf_ (p, options, cb) {
|
|
85
127
|
assert(options)
|
86
128
|
assert(typeof cb === 'function')
|
87
129
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
130
|
+
// sunos lets the root user unlink directories, which is... weird.
|
131
|
+
// so we have to lstat here and make sure it's not a dir.
|
132
|
+
options.lstat(p, function (er, st) {
|
133
|
+
if (er && er.code === "ENOENT")
|
134
|
+
return cb(null)
|
135
|
+
|
136
|
+
if (st && st.isDirectory())
|
137
|
+
return rmdir(p, options, er, cb)
|
138
|
+
|
139
|
+
options.unlink(p, function (er) {
|
140
|
+
if (er) {
|
141
|
+
if (er.code === "ENOENT")
|
142
|
+
return cb(null)
|
143
|
+
if (er.code === "EPERM")
|
144
|
+
return (isWindows)
|
145
|
+
? fixWinEPERM(p, options, er, cb)
|
146
|
+
: rmdir(p, options, er, cb)
|
147
|
+
if (er.code === "EISDIR")
|
148
|
+
return rmdir(p, options, er, cb)
|
149
|
+
}
|
150
|
+
return cb(er)
|
151
|
+
})
|
100
152
|
})
|
101
153
|
}
|
102
154
|
|
@@ -204,19 +256,52 @@ function rimrafSync (p, options) {
|
|
204
256
|
options = options || {}
|
205
257
|
defaults(options)
|
206
258
|
|
207
|
-
assert(p)
|
208
|
-
assert(
|
259
|
+
assert(p, 'rimraf: missing path')
|
260
|
+
assert.equal(typeof p, 'string', 'rimraf: path should be a string')
|
261
|
+
assert(options, 'rimraf: missing options')
|
262
|
+
assert.equal(typeof options, 'object', 'rimraf: options should be object')
|
209
263
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
264
|
+
var results
|
265
|
+
|
266
|
+
if (options.disableGlob || !glob.hasMagic(p)) {
|
267
|
+
results = [p]
|
268
|
+
} else {
|
269
|
+
try {
|
270
|
+
fs.lstatSync(p)
|
271
|
+
results = [p]
|
272
|
+
} catch (er) {
|
273
|
+
results = glob.sync(p, globOpts)
|
274
|
+
}
|
275
|
+
}
|
276
|
+
|
277
|
+
if (!results.length)
|
278
|
+
return
|
279
|
+
|
280
|
+
for (var i = 0; i < results.length; i++) {
|
281
|
+
var p = results[i]
|
282
|
+
|
283
|
+
try {
|
284
|
+
var st = options.lstatSync(p)
|
285
|
+
} catch (er) {
|
286
|
+
if (er.code === "ENOENT")
|
287
|
+
return
|
288
|
+
}
|
289
|
+
|
290
|
+
try {
|
291
|
+
// sunos lets the root user unlink directories, which is... weird.
|
292
|
+
if (st && st.isDirectory())
|
293
|
+
rmdirSync(p, options, null)
|
294
|
+
else
|
295
|
+
options.unlinkSync(p)
|
296
|
+
} catch (er) {
|
297
|
+
if (er.code === "ENOENT")
|
298
|
+
return
|
299
|
+
if (er.code === "EPERM")
|
300
|
+
return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
|
301
|
+
if (er.code !== "EISDIR")
|
302
|
+
throw er
|
303
|
+
rmdirSync(p, options, er)
|
304
|
+
}
|
220
305
|
}
|
221
306
|
}
|
222
307
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"_from": "tar-pack@~3.1.0",
|
3
|
-
"_id": "tar-pack@3.1.
|
3
|
+
"_id": "tar-pack@3.1.2",
|
4
4
|
"_location": "/tar-pack",
|
5
5
|
"_nodeVersion": "1.6.2",
|
6
6
|
"_npmUser": {
|
@@ -8,12 +8,19 @@
|
|
8
8
|
"name": "forbeslindesay"
|
9
9
|
},
|
10
10
|
"_npmVersion": "2.7.1",
|
11
|
-
"_phantomChildren": {
|
11
|
+
"_phantomChildren": {
|
12
|
+
"core-util-is": "1.0.2",
|
13
|
+
"inherits": "2.0.1",
|
14
|
+
"isarray": "0.0.1",
|
15
|
+
"process-nextick-args": "1.0.6",
|
16
|
+
"string_decoder": "0.10.31",
|
17
|
+
"util-deprecate": "1.0.2"
|
18
|
+
},
|
12
19
|
"_requiredBy": [
|
13
20
|
"/node-pre-gyp"
|
14
21
|
],
|
15
|
-
"_resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.1.
|
16
|
-
"_shasum": "
|
22
|
+
"_resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.1.2.tgz",
|
23
|
+
"_shasum": "15fc57c379238bd350ef7b182a2e2baf826fe048",
|
17
24
|
"bugs": {
|
18
25
|
"url": "https://github.com/ForbesLindesay/tar-pack/issues"
|
19
26
|
},
|
@@ -21,10 +28,9 @@
|
|
21
28
|
"debug": "~0.7.2",
|
22
29
|
"fstream": "~1.0.8",
|
23
30
|
"fstream-ignore": "~1.0.3",
|
24
|
-
"graceful-fs": "4.1",
|
25
31
|
"once": "~1.1.1",
|
26
|
-
"readable-stream": "~
|
27
|
-
"rimraf": "~2.
|
32
|
+
"readable-stream": "~2.0.4",
|
33
|
+
"rimraf": "~2.4.4",
|
28
34
|
"tar": "~2.2.1",
|
29
35
|
"uid-number": "0.0.3"
|
30
36
|
},
|
@@ -36,13 +42,17 @@
|
|
36
42
|
},
|
37
43
|
"directories": {},
|
38
44
|
"dist": {
|
39
|
-
"shasum": "
|
40
|
-
"tarball": "http://registry.npmjs.org/tar-pack/-/tar-pack-3.1.
|
45
|
+
"shasum": "15fc57c379238bd350ef7b182a2e2baf826fe048",
|
46
|
+
"tarball": "http://registry.npmjs.org/tar-pack/-/tar-pack-3.1.2.tgz"
|
41
47
|
},
|
42
|
-
"gitHead": "
|
48
|
+
"gitHead": "dfee7145adce4f712f9e1ddae9f54951e8c5b9e3",
|
43
49
|
"homepage": "https://github.com/ForbesLindesay/tar-pack",
|
44
50
|
"license": "BSD",
|
45
51
|
"maintainers": [
|
52
|
+
{
|
53
|
+
"name": "es128",
|
54
|
+
"email": "elan.shanker+npm@gmail.com"
|
55
|
+
},
|
46
56
|
{
|
47
57
|
"name": "forbeslindesay",
|
48
58
|
"email": "forbes@lindesay.co.uk"
|
@@ -62,5 +72,5 @@
|
|
62
72
|
"scripts": {
|
63
73
|
"test": "mocha -R list"
|
64
74
|
},
|
65
|
-
"version": "3.1.
|
75
|
+
"version": "3.1.2"
|
66
76
|
}
|
@@ -25,6 +25,7 @@ function httpsOverHttp(options) {
|
|
25
25
|
var agent = new TunnelingAgent(options)
|
26
26
|
agent.request = http.request
|
27
27
|
agent.createSocket = createSecureSocket
|
28
|
+
agent.defaultPort = 443
|
28
29
|
return agent
|
29
30
|
}
|
30
31
|
|
@@ -38,6 +39,7 @@ function httpsOverHttps(options) {
|
|
38
39
|
var agent = new TunnelingAgent(options)
|
39
40
|
agent.request = https.request
|
40
41
|
agent.createSocket = createSecureSocket
|
42
|
+
agent.defaultPort = 443
|
41
43
|
return agent
|
42
44
|
}
|
43
45
|
|
@@ -1,19 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"_from": "tunnel-agent@~0.4.1",
|
3
|
-
"_id": "tunnel-agent@0.4.
|
3
|
+
"_id": "tunnel-agent@0.4.2",
|
4
4
|
"_location": "/tunnel-agent",
|
5
|
-
"_nodeVersion": "0.
|
5
|
+
"_nodeVersion": "5.0.0",
|
6
6
|
"_npmUser": {
|
7
7
|
"email": "simeonvelichkov@gmail.com",
|
8
8
|
"name": "simov"
|
9
9
|
},
|
10
|
-
"_npmVersion": "
|
10
|
+
"_npmVersion": "3.3.12",
|
11
11
|
"_phantomChildren": {},
|
12
12
|
"_requiredBy": [
|
13
13
|
"/request"
|
14
14
|
],
|
15
|
-
"_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.
|
16
|
-
"_shasum": "
|
15
|
+
"_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.2.tgz",
|
16
|
+
"_shasum": "1104e3f36ac87125c287270067d582d18133bfee",
|
17
17
|
"author": {
|
18
18
|
"email": "mikeal.rogers@gmail.com",
|
19
19
|
"name": "Mikeal Rogers",
|
@@ -27,14 +27,15 @@
|
|
27
27
|
"devDependencies": {},
|
28
28
|
"directories": {},
|
29
29
|
"dist": {
|
30
|
-
"shasum": "
|
31
|
-
"tarball": "http://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.
|
30
|
+
"shasum": "1104e3f36ac87125c287270067d582d18133bfee",
|
31
|
+
"tarball": "http://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.2.tgz"
|
32
32
|
},
|
33
33
|
"engines": {
|
34
34
|
"node": "*"
|
35
35
|
},
|
36
|
-
"gitHead": "
|
36
|
+
"gitHead": "449634d1054949f9f145f4925985a8dea0f46b0f",
|
37
37
|
"homepage": "https://github.com/mikeal/tunnel-agent#readme",
|
38
|
+
"license": "Apache-2.0",
|
38
39
|
"main": "index.js",
|
39
40
|
"maintainers": [
|
40
41
|
{
|
@@ -61,5 +62,5 @@
|
|
61
62
|
"url": "git+https://github.com/mikeal/tunnel-agent.git"
|
62
63
|
},
|
63
64
|
"scripts": {},
|
64
|
-
"version": "0.4.
|
65
|
+
"version": "0.4.2"
|
65
66
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"_from": "util-deprecate@~1.0.1",
|
3
3
|
"_id": "util-deprecate@1.0.2",
|
4
|
-
"_location": "/
|
4
|
+
"_location": "/util-deprecate",
|
5
5
|
"_nodeVersion": "4.1.2",
|
6
6
|
"_npmUser": {
|
7
7
|
"email": "nathan@tootallnate.net",
|
@@ -10,7 +10,8 @@
|
|
10
10
|
"_npmVersion": "2.14.4",
|
11
11
|
"_phantomChildren": {},
|
12
12
|
"_requiredBy": [
|
13
|
-
"/
|
13
|
+
"/readable-stream",
|
14
|
+
"/tar-pack/readable-stream"
|
14
15
|
],
|
15
16
|
"_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
16
17
|
"_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"engines": [
|
30
30
|
"node >=0.6.0"
|
31
31
|
],
|
32
|
-
"homepage": "https://github.com/davepacheco/node-verror",
|
32
|
+
"homepage": "https://github.com/davepacheco/node-verror#readme",
|
33
33
|
"main": "./lib/verror.js",
|
34
34
|
"maintainers": [
|
35
35
|
{
|
@@ -39,7 +39,8 @@
|
|
39
39
|
],
|
40
40
|
"name": "verror",
|
41
41
|
"optionalDependencies": {},
|
42
|
-
"readme": "
|
42
|
+
"readme": "# verror: richer JavaScript errors\n\nThis module provides two classes: VError, for accretive errors, and WError, for\nwrapping errors. Both support printf-style error messages using extsprintf.\n\n## Printf-style errors\n\nAt the most basic level, VError is just like JavaScript's Error class, but with\nprintf-style arguments:\n\n var verror = require('verror');\n\n var opname = 'read';\n var err = new verror.VError('\"%s\" operation failed', opname);\n console.log(err.message);\n console.log(err.stack);\n\nThis prints:\n\n \"read\" operation failed\n \"read\" operation failed\n at Object.<anonymous> (/Users/dap/node-verror/examples/varargs.js:4:11)\n at Module._compile (module.js:449:26)\n at Object.Module._extensions..js (module.js:467:10)\n at Module.load (module.js:356:32)\n at Function.Module._load (module.js:312:12)\n at Module.runMain (module.js:492:10)\n at process.startup.processNextTick.process._tickCallback (node.js:244:9)\n\n\n## VError for accretive error messages\n\nMore interestingly, you can use VError to build up an error describing what\nhappened at various levels in the stack. For example, suppose you have a\nrequest handler that stats a file and fails if it doesn't exist:\n\n var fs = require('fs');\n var verror = require('verror');\n\n function checkFile(filename, callback) {\n fs.stat(filename, function (err) {\n if (err)\n\t\t/* Annotate the \"stat\" error with what we were doing. */\n\t \treturn (callback(new verror.VError(err,\n\t\t 'failed to check \"%s\"', filename)));\n\n\t /* ... */\n });\n }\n\n function handleRequest(filename, callback) {\n \tcheckFile('/nonexistent', function (err) {\n \t if (err) {\n \t \t/* Annotate the \"checkFile\" error with what we were doing. */\n \t \treturn (callback(new verror.VError(err, 'request failed')));\n \t }\n\n \t /* ... */\n \t});\n }\n\n handleRequest('/nonexistent', function (err) {\n\tif (err)\n\t\tconsole.log(err.message);\n\t/* ... */\n });\n\nSince the file \"/nonexistent\" doesn't exist, this prints out:\n\n request failed: failed to check \"/nonexistent\": ENOENT, stat '/nonexistent'\n\nThe idea here is that the lowest level (Node's \"fs.stat\" function) generates an\narbitrary error, and each higher level (request handler and stat callback)\ncreates a new VError that annotates the previous error with what it was doing,\nso that the result is a clear message explaining what failed at each level.\n\nThis plays nicely with extsprintf's \"%r\" specifier, which prints out a\nJava-style stacktrace with the whole chain of exceptions:\n\n EXCEPTION: VError: request failed: failed to check \"/nonexistent\": ENOENT, stat '/nonexistent'\n at /Users/dap/work/node-verror/examples/levels.js:21:21\n at /Users/dap/work/node-verror/examples/levels.js:9:12\n at Object.oncomplete (fs.js:297:15)\n Caused by: EXCEPTION: VError: failed to check \"/nonexistent\": ENOENT, stat '/nonexistent'\n at /Users/dap/work/node-verror/examples/levels.js:9:21\n at Object.oncomplete (fs.js:297:15)\n Caused by: EXCEPTION: Error: Error: ENOENT, stat '/nonexistent'\n\n\n## WError for wrapped errors\n\nSometimes you don't want an Error's \"message\" field to include the details of\nall of the low-level errors, but you still want to be able to get at them\nprogrammatically. For example, in an HTTP server, you probably don't want to\nspew all of the low-level errors back to the client, but you do want to include\nthem in the audit log entry for the request. In that case, you can use a\nWError, which is created exactly like VError (and also supports both\nprintf-style arguments and an optional cause), but the resulting \"message\" only\ncontains the top-level error. It's also more verbose, including the class\nassociated with each error in the cause chain. Using the same example above,\nbut replacing the VError in handleRequest with WError, we get this output:\n\n request failed\n\nThat's what we wanted -- just a high-level summary for the client. But we can\nget the object's toString() for the full details:\n\n WError: request failed; caused by WError: failed to check \"/nonexistent\";\n caused by Error: ENOENT, stat '/nonexistent'\n\n# Contributing\n\nContributions welcome. Code should be \"make check\" clean. To run \"make check\",\nyou'll need these tools:\n\n* https://github.com/davepacheco/jsstyle\n* https://github.com/davepacheco/javascriptlint\n\nIf you're changing something non-trivial or user-facing, you may want to submit\nan issue first.\n",
|
43
|
+
"readmeFilename": "README.md",
|
43
44
|
"repository": {
|
44
45
|
"type": "git",
|
45
46
|
"url": "git://github.com/davepacheco/node-verror.git"
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "fsevents",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.7",
|
4
4
|
"description": "Native Access to Mac OS-X FSEvents",
|
5
5
|
"main": "fsevents.js",
|
6
6
|
"dependencies": {
|
7
7
|
"nan": "^2.1.0",
|
8
|
-
"node-pre-gyp": "^0.6.
|
8
|
+
"node-pre-gyp": "^0.6.19"
|
9
9
|
},
|
10
10
|
"os": [
|
11
11
|
"darwin"
|
package/CHANGELOG.md
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# Native Access to Mac OS-X FSEvents - Change-Log
|
2
|
-
|
3
|
-
## Version 0.0.1
|
4
|
-
|
5
|
-
* Basic functionality
|
6
|
-
|
7
|
-
## Version 0.1.2
|
8
|
-
|
9
|
-
* Finally made the Jump to node 0.8+ with this module.
|
10
|
-
* Much more Event-Details
|
11
|
-
|
12
|
-
## Version 0.2.0
|
13
|
-
|
14
|
-
* More or less complete rewrite to keep up with ever changing binary compile issues
|
15
|
-
* Utilizing the ["Power of Nan"](http://npmjs.org/package/nan) (Thank you [rvag](https://github.com/rvag))
|
16
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
2
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
3
|
-
of this software and associated documentation files (the "Software"), to
|
4
|
-
deal in the Software without restriction, including without limitation the
|
5
|
-
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
6
|
-
sell copies of the Software, and to permit persons to whom the Software is
|
7
|
-
furnished to do so, subject to the following conditions:
|
8
|
-
|
9
|
-
The above copyright notice and this permission notice shall be included in
|
10
|
-
all copies or substantial portions of the Software.
|
11
|
-
|
12
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
17
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
18
|
-
IN THE SOFTWARE.
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# readable-stream
|
2
|
-
|
3
|
-
***Node-core streams for userland*** [](https://travis-ci.org/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/readable-stream)
|
11
|
-
|
12
|
-
```bash
|
13
|
-
npm install --save readable-stream
|
14
|
-
```
|
15
|
-
|
16
|
-
***Node-core streams for userland***
|
17
|
-
|
18
|
-
This package is a mirror of the Streams2 and Streams3 implementations in
|
19
|
-
Node-core, including [documentation](doc/stream.markdown).
|
20
|
-
|
21
|
-
If you want to guarantee a stable streams base, regardless of what version of
|
22
|
-
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).
|
23
|
-
|
24
|
-
As of version 2.0.0 **readable-stream** uses semantic versioning.
|
25
|
-
|
26
|
-
# Streams WG Team Members
|
27
|
-
|
28
|
-
* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com>
|
29
|
-
- Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
|
30
|
-
* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com>
|
31
|
-
- Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
|
32
|
-
* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org>
|
33
|
-
- Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
|
34
|
-
* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com>
|
35
|
-
* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com>
|
36
|
-
* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me>
|
@@ -1 +0,0 @@
|
|
1
|
-
module.exports = require("./lib/_stream_duplex.js")
|
@@ -1,82 +0,0 @@
|
|
1
|
-
// a duplex stream is just a stream that is both readable and writable.
|
2
|
-
// Since JS doesn't have multiple prototypal inheritance, this class
|
3
|
-
// prototypally inherits from Readable, and then parasitically from
|
4
|
-
// Writable.
|
5
|
-
|
6
|
-
'use strict';
|
7
|
-
|
8
|
-
/*<replacement>*/
|
9
|
-
var objectKeys = Object.keys || function (obj) {
|
10
|
-
var keys = [];
|
11
|
-
for (var key in obj) keys.push(key);
|
12
|
-
return keys;
|
13
|
-
}
|
14
|
-
/*</replacement>*/
|
15
|
-
|
16
|
-
|
17
|
-
module.exports = Duplex;
|
18
|
-
|
19
|
-
/*<replacement>*/
|
20
|
-
var processNextTick = require('process-nextick-args');
|
21
|
-
/*</replacement>*/
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
/*<replacement>*/
|
26
|
-
var util = require('core-util-is');
|
27
|
-
util.inherits = require('inherits');
|
28
|
-
/*</replacement>*/
|
29
|
-
|
30
|
-
var Readable = require('./_stream_readable');
|
31
|
-
var Writable = require('./_stream_writable');
|
32
|
-
|
33
|
-
util.inherits(Duplex, Readable);
|
34
|
-
|
35
|
-
var keys = objectKeys(Writable.prototype);
|
36
|
-
for (var v = 0; v < keys.length; v++) {
|
37
|
-
var method = keys[v];
|
38
|
-
if (!Duplex.prototype[method])
|
39
|
-
Duplex.prototype[method] = Writable.prototype[method];
|
40
|
-
}
|
41
|
-
|
42
|
-
function Duplex(options) {
|
43
|
-
if (!(this instanceof Duplex))
|
44
|
-
return new Duplex(options);
|
45
|
-
|
46
|
-
Readable.call(this, options);
|
47
|
-
Writable.call(this, options);
|
48
|
-
|
49
|
-
if (options && options.readable === false)
|
50
|
-
this.readable = false;
|
51
|
-
|
52
|
-
if (options && options.writable === false)
|
53
|
-
this.writable = false;
|
54
|
-
|
55
|
-
this.allowHalfOpen = true;
|
56
|
-
if (options && options.allowHalfOpen === false)
|
57
|
-
this.allowHalfOpen = false;
|
58
|
-
|
59
|
-
this.once('end', onend);
|
60
|
-
}
|
61
|
-
|
62
|
-
// the no-half-open enforcer
|
63
|
-
function onend() {
|
64
|
-
// if we allow half-open state, or if the writable side ended,
|
65
|
-
// then we're ok.
|
66
|
-
if (this.allowHalfOpen || this._writableState.ended)
|
67
|
-
return;
|
68
|
-
|
69
|
-
// no more data can be written.
|
70
|
-
// But allow more writes to happen in this tick.
|
71
|
-
processNextTick(onEndNT, this);
|
72
|
-
}
|
73
|
-
|
74
|
-
function onEndNT(self) {
|
75
|
-
self.end();
|
76
|
-
}
|
77
|
-
|
78
|
-
function forEach (xs, f) {
|
79
|
-
for (var i = 0, l = xs.length; i < l; i++) {
|
80
|
-
f(xs[i], i);
|
81
|
-
}
|
82
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
// a passthrough stream.
|
2
|
-
// basically just the most minimal sort of Transform stream.
|
3
|
-
// Every written chunk gets output as-is.
|
4
|
-
|
5
|
-
'use strict';
|
6
|
-
|
7
|
-
module.exports = PassThrough;
|
8
|
-
|
9
|
-
var Transform = require('./_stream_transform');
|
10
|
-
|
11
|
-
/*<replacement>*/
|
12
|
-
var util = require('core-util-is');
|
13
|
-
util.inherits = require('inherits');
|
14
|
-
/*</replacement>*/
|
15
|
-
|
16
|
-
util.inherits(PassThrough, Transform);
|
17
|
-
|
18
|
-
function PassThrough(options) {
|
19
|
-
if (!(this instanceof PassThrough))
|
20
|
-
return new PassThrough(options);
|
21
|
-
|
22
|
-
Transform.call(this, options);
|
23
|
-
}
|
24
|
-
|
25
|
-
PassThrough.prototype._transform = function(chunk, encoding, cb) {
|
26
|
-
cb(null, chunk);
|
27
|
-
};
|