fsevents 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/node_modules/node-pre-gyp/CHANGELOG.md +9 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +32 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/nopt/README.md +8 -7
- package/node_modules/node-pre-gyp/node_modules/nopt/package.json +16 -12
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/rc/lib/utils.js +2 -2
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/index.js +14 -2
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/package.json +10 -9
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/bool.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/kv_short.js +16 -0
- package/node_modules/node-pre-gyp/node_modules/rc/package.json +9 -8
- package/node_modules/node-pre-gyp/node_modules/request/.travis.yml +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/CHANGELOG.md +22 -2
- package/node_modules/node-pre-gyp/node_modules/request/README.md +42 -10
- package/node_modules/node-pre-gyp/node_modules/request/index.js +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/aws-sign2/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/{form-data/node_modules/async/LICENSE → bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md} +6 -6
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json +10 -9
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js +7 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/caseless/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/forever-agent/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/Readme.md +44 -9
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/lib/form_data.js +48 -25
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +13 -7
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/package.json +26 -11
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/package.json +29 -20
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md +4 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js +35 -11
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js +5 -5
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/debuggability.js +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/direct_resolve.js +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise.js +5 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promisify.js +10 -5
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/using.js +14 -3
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json +9 -8
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/index.js +2 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json +22 -15
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/readme.md +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/README.md +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml +6 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js +7 -10
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json +24 -20
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js +11 -13
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json +11 -10
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +39 -28
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/package.json +11 -12
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -18
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +8 -5
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +24 -28
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +57 -63
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +2 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +16 -6
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +24 -8
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +13 -13
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +866 -778
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/HISTORY.md +24 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/index.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md +33 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json +12 -13
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/package.json +9 -10
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.npmignore +0 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.travis.yml +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/CHANGELOG.md +13 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/README.md +11 -4
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/bower.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/component.json +15 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/dist/qs.js +523 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/parse.js +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/stringify.js +28 -7
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/package.json +20 -18
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/parse.js +14 -14
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/stringify.js +23 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/package.json +12 -12
- package/node_modules/node-pre-gyp/node_modules/request/request.js +51 -30
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +3 -2
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/rimraf/package.json +9 -8
- package/node_modules/node-pre-gyp/node_modules/rimraf/rimraf.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/semver/package.json +10 -12
- package/node_modules/node-pre-gyp/node_modules/semver/semver.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/semver/test/index.js +21 -8
- package/node_modules/node-pre-gyp/node_modules/tar/lib/entry.js +7 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/parse.js +5 -1
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js +21 -11
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js +208 -115
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/package.json +18 -17
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/polyfills.js +130 -133
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/package.json +18 -14
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/tar/package.json +22 -15
- package/node_modules/node-pre-gyp/node_modules/tar/test/parse-discard.js +29 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/README.md +12 -2
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +48 -4
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/package.json +9 -9
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/basic.js +26 -25
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/serialize.js +216 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/package.json +1 -1
- package/node_modules/node-pre-gyp/package.json +10 -10
- package/package.json +2 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/.jscsrc +0 -3
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md +0 -81
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/README.md +0 -1789
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +0 -53
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +0 -9
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +0 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +0 -8
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +0 -1
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/.npmignore +0 -1
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/LICENSE +0 -15
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/max-open.js +0 -69
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/open.js +0 -39
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/readdir-sort.js +0 -20
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/write-then-read.js +0 -47
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "process-nextick-args",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.3",
|
4
4
|
"description": "process.nextTick but always with args",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -19,19 +19,19 @@
|
|
19
19
|
"devDependencies": {
|
20
20
|
"tap": "~0.2.6"
|
21
21
|
},
|
22
|
-
"gitHead": "
|
23
|
-
"_id": "process-nextick-args@1.0.
|
24
|
-
"_shasum": "
|
22
|
+
"gitHead": "e855846a69662b9489f1ad3dde1ebf2ccc4370b8",
|
23
|
+
"_id": "process-nextick-args@1.0.3",
|
24
|
+
"_shasum": "e272eed825d5e9f4ea74d8d73b1fe311c3beb630",
|
25
25
|
"_from": "process-nextick-args@~1.0.0",
|
26
|
-
"_npmVersion": "2.
|
27
|
-
"_nodeVersion": "2.
|
26
|
+
"_npmVersion": "2.9.0",
|
27
|
+
"_nodeVersion": "2.5.0",
|
28
28
|
"_npmUser": {
|
29
29
|
"name": "cwmma",
|
30
30
|
"email": "calvin.metcalf@gmail.com"
|
31
31
|
},
|
32
32
|
"dist": {
|
33
|
-
"shasum": "
|
34
|
-
"tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.
|
33
|
+
"shasum": "e272eed825d5e9f4ea74d8d73b1fe311c3beb630",
|
34
|
+
"tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz"
|
35
35
|
},
|
36
36
|
"maintainers": [
|
37
37
|
{
|
@@ -40,5 +40,6 @@
|
|
40
40
|
}
|
41
41
|
],
|
42
42
|
"directories": {},
|
43
|
-
"_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.
|
43
|
+
"_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz",
|
44
|
+
"readme": "ERROR: No README data found!"
|
44
45
|
}
|
@@ -15,3 +15,10 @@ test('should work', function (t) {
|
|
15
15
|
t.equals(c, 'profit');
|
16
16
|
}, 'step', 3, 'profit');
|
17
17
|
});
|
18
|
+
|
19
|
+
test('correct number of arguments', function (t) {
|
20
|
+
t.plan(1);
|
21
|
+
nextTick(function () {
|
22
|
+
t.equals(2, arguments.length, 'correct number');
|
23
|
+
}, 1, 2);
|
24
|
+
});
|
@@ -57,5 +57,6 @@
|
|
57
57
|
"tarball": "http://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz"
|
58
58
|
},
|
59
59
|
"directories": {},
|
60
|
-
"_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz"
|
60
|
+
"_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
|
61
|
+
"readme": "ERROR: No README data found!"
|
61
62
|
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
# Form-Data [![Build Status](https://
|
1
|
+
# Form-Data [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) [![Build Status](https://img.shields.io/travis/form-data/form-data/master.svg)](https://travis-ci.org/form-data/form-data) [![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)
|
2
2
|
|
3
|
-
A
|
3
|
+
A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications.
|
4
4
|
|
5
|
-
The API of this
|
5
|
+
The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].
|
6
6
|
|
7
7
|
[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
|
8
8
|
[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions
|
@@ -43,7 +43,7 @@ http.request('http://nodejs.org/images/logo.png', function(response) {
|
|
43
43
|
});
|
44
44
|
```
|
45
45
|
|
46
|
-
Or @mikeal's request stream:
|
46
|
+
Or @mikeal's [request](https://github.com/request/request) stream:
|
47
47
|
|
48
48
|
``` javascript
|
49
49
|
var FormData = require('form-data');
|
@@ -61,7 +61,7 @@ In order to submit this form to a web application, call ```submit(url, [callback
|
|
61
61
|
``` javascript
|
62
62
|
form.submit('http://example.org/', function(err, res) {
|
63
63
|
// res – response object (http.IncomingMessage) //
|
64
|
-
res.resume();
|
64
|
+
res.resume();
|
65
65
|
});
|
66
66
|
|
67
67
|
```
|
@@ -161,15 +161,50 @@ form.submit({
|
|
161
161
|
});
|
162
162
|
```
|
163
163
|
|
164
|
+
### Integration with other libraries
|
165
|
+
|
166
|
+
#### Request
|
167
|
+
|
168
|
+
Form submission using [request](https://github.com/request/request):
|
169
|
+
|
170
|
+
```javascript
|
171
|
+
var formData = {
|
172
|
+
my_field: 'my_value',
|
173
|
+
my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
|
174
|
+
};
|
175
|
+
|
176
|
+
request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) {
|
177
|
+
if (err) {
|
178
|
+
return console.error('upload failed:', err);
|
179
|
+
}
|
180
|
+
console.log('Upload successful! Server responded with:', body);
|
181
|
+
});
|
182
|
+
```
|
183
|
+
|
184
|
+
For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads).
|
185
|
+
|
186
|
+
#### node-fetch
|
187
|
+
|
188
|
+
You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch):
|
189
|
+
|
190
|
+
```javascript
|
191
|
+
var form = new FormData();
|
192
|
+
|
193
|
+
form.append('a', 1);
|
194
|
+
|
195
|
+
fetch('http://example.com', { method: 'POST', body: form })
|
196
|
+
.then(function(res) {
|
197
|
+
return res.json();
|
198
|
+
}).then(function(json) {
|
199
|
+
console.log(json);
|
200
|
+
});
|
201
|
+
```
|
202
|
+
|
164
203
|
## Notes
|
165
204
|
|
166
205
|
- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.
|
167
206
|
- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]
|
168
207
|
|
169
|
-
## TODO
|
170
|
-
|
171
|
-
- Add new streams (0.10) support and try really hard not to break it for 0.8.x.
|
172
|
-
|
173
208
|
## License
|
174
209
|
|
175
210
|
Form-Data is licensed under the MIT license.
|
package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/lib/form_data.js
CHANGED
@@ -19,9 +19,12 @@ function FormData() {
|
|
19
19
|
util.inherits(FormData, CombinedStream);
|
20
20
|
|
21
21
|
FormData.LINE_BREAK = '\r\n';
|
22
|
+
FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
|
22
23
|
|
23
24
|
FormData.prototype.append = function(field, value, options) {
|
24
|
-
options = options
|
25
|
+
options = (typeof options === 'string')
|
26
|
+
? { filename: options }
|
27
|
+
: options || {};
|
25
28
|
|
26
29
|
var append = CombinedStream.prototype.append.bind(this);
|
27
30
|
|
@@ -133,37 +136,57 @@ FormData.prototype._trackLength = function(header, value, options) {
|
|
133
136
|
};
|
134
137
|
|
135
138
|
FormData.prototype._multiPartHeader = function(field, value, options) {
|
136
|
-
var boundary = this.getBoundary();
|
137
|
-
var header = '';
|
138
|
-
|
139
139
|
// custom header specified (as string)?
|
140
140
|
// it becomes responsible for boundary
|
141
141
|
// (e.g. to handle extra CRLFs on .NET servers)
|
142
142
|
if (options.header != null) {
|
143
|
-
|
144
|
-
}
|
145
|
-
header += '--' + boundary + FormData.LINE_BREAK +
|
146
|
-
'Content-Disposition: form-data; name="' + field + '"';
|
147
|
-
|
148
|
-
// fs- and request- streams have path property
|
149
|
-
// or use custom filename and/or contentType
|
150
|
-
// TODO: Use request's response mime-type
|
151
|
-
if (options.filename || value.path) {
|
152
|
-
header +=
|
153
|
-
'; filename="' + path.basename(options.filename || value.path) + '"' + FormData.LINE_BREAK +
|
154
|
-
'Content-Type: ' + (options.contentType || mime.lookup(options.filename || value.path));
|
155
|
-
|
156
|
-
// http response has not
|
157
|
-
} else if (value.readable && value.hasOwnProperty('httpVersion')) {
|
158
|
-
header +=
|
159
|
-
'; filename="' + path.basename(value.client._httpMessage.path) + '"' + FormData.LINE_BREAK +
|
160
|
-
'Content-Type: ' + value.headers['content-type'];
|
161
|
-
}
|
143
|
+
return options.header;
|
144
|
+
}
|
162
145
|
|
163
|
-
|
146
|
+
var contents = '';
|
147
|
+
var headers = {
|
148
|
+
'Content-Disposition': ['form-data', 'name="' + field + '"'],
|
149
|
+
'Content-Type': []
|
150
|
+
};
|
151
|
+
|
152
|
+
// fs- and request- streams have path property
|
153
|
+
// or use custom filename and/or contentType
|
154
|
+
// TODO: Use request's response mime-type
|
155
|
+
if (options.filename || value.path) {
|
156
|
+
headers['Content-Disposition'].push(
|
157
|
+
'filename="' + path.basename(options.filename || value.path) + '"'
|
158
|
+
);
|
159
|
+
headers['Content-Type'].push(
|
160
|
+
options.contentType ||
|
161
|
+
mime.lookup(options.filename || value.path) ||
|
162
|
+
FormData.DEFAULT_CONTENT_TYPE
|
163
|
+
);
|
164
|
+
// http response has not
|
165
|
+
} else if (value.readable && value.hasOwnProperty('httpVersion')) {
|
166
|
+
headers['Content-Disposition'].push(
|
167
|
+
'filename="' + path.basename(value.client._httpMessage.path) + '"'
|
168
|
+
);
|
169
|
+
headers['Content-Type'].push(
|
170
|
+
options.contentType ||
|
171
|
+
value.headers['content-type'] ||
|
172
|
+
FormData.DEFAULT_CONTENT_TYPE
|
173
|
+
);
|
174
|
+
} else if (Buffer.isBuffer(value)) {
|
175
|
+
headers['Content-Type'].push(
|
176
|
+
options.contentType ||
|
177
|
+
FormData.DEFAULT_CONTENT_TYPE
|
178
|
+
);
|
179
|
+
} else if (options.contentType) {
|
180
|
+
headers['Content-Type'].push(options.contentType);
|
164
181
|
}
|
165
182
|
|
166
|
-
|
183
|
+
for (var prop in headers) {
|
184
|
+
if (headers[prop].length) {
|
185
|
+
contents += prop + ': ' + headers[prop].join('; ') + FormData.LINE_BREAK;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
|
167
190
|
};
|
168
191
|
|
169
192
|
FormData.prototype._multiPartFooter = function(field, value, options) {
|
@@ -62,6 +62,12 @@
|
|
62
62
|
return _toString.call(obj) === '[object Array]';
|
63
63
|
};
|
64
64
|
|
65
|
+
// Ported from underscore.js isObject
|
66
|
+
var _isObject = function(obj) {
|
67
|
+
var type = typeof obj;
|
68
|
+
return type === 'function' || type === 'object' && !!obj;
|
69
|
+
};
|
70
|
+
|
65
71
|
function _isArrayLike(arr) {
|
66
72
|
return _isArray(arr) || (
|
67
73
|
// has a positive integer length property
|
@@ -165,7 +171,6 @@
|
|
165
171
|
switch (startIndex) {
|
166
172
|
case 0: return func.call(this, rest);
|
167
173
|
case 1: return func.call(this, arguments[0], rest);
|
168
|
-
case 2: return func.call(this, arguments[0], arguments[1], rest);
|
169
174
|
}
|
170
175
|
// Currently unused but handle cases outside of the switch statement:
|
171
176
|
// var args = Array(startIndex + 1);
|
@@ -462,6 +467,7 @@
|
|
462
467
|
}
|
463
468
|
async.detect = _createTester(async.eachOf, identity, _findGetResult);
|
464
469
|
async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult);
|
470
|
+
async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult);
|
465
471
|
|
466
472
|
async.sortBy = function (arr, iterator, callback) {
|
467
473
|
async.map(arr, function (x, callback) {
|
@@ -593,7 +599,7 @@
|
|
593
599
|
acc.times = parseInt(t.times, 10) || DEFAULT_TIMES;
|
594
600
|
acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL;
|
595
601
|
} else {
|
596
|
-
throw new Error('Unsupported argument type for \'times\': ' + typeof
|
602
|
+
throw new Error('Unsupported argument type for \'times\': ' + typeof t);
|
597
603
|
}
|
598
604
|
}
|
599
605
|
|
@@ -1013,7 +1019,7 @@
|
|
1013
1019
|
function _console_fn(name) {
|
1014
1020
|
return _restParam(function (fn, args) {
|
1015
1021
|
fn.apply(null, args.concat([_restParam(function (err, args) {
|
1016
|
-
if (typeof console
|
1022
|
+
if (typeof console === 'object') {
|
1017
1023
|
if (err) {
|
1018
1024
|
if (console.error) {
|
1019
1025
|
console.error(err);
|
@@ -1186,10 +1192,10 @@
|
|
1186
1192
|
return callback(e);
|
1187
1193
|
}
|
1188
1194
|
// if result is Promise object
|
1189
|
-
if (
|
1195
|
+
if (_isObject(result) && typeof result.then === "function") {
|
1190
1196
|
result.then(function(value) {
|
1191
1197
|
callback(null, value);
|
1192
|
-
})
|
1198
|
+
})["catch"](function(err) {
|
1193
1199
|
callback(err.message ? err : new Error(err));
|
1194
1200
|
});
|
1195
1201
|
} else {
|
@@ -1199,11 +1205,11 @@
|
|
1199
1205
|
};
|
1200
1206
|
|
1201
1207
|
// Node.js
|
1202
|
-
if (typeof module
|
1208
|
+
if (typeof module === 'object' && module.exports) {
|
1203
1209
|
module.exports = async;
|
1204
1210
|
}
|
1205
1211
|
// AMD / RequireJS
|
1206
|
-
else if (typeof define
|
1212
|
+
else if (typeof define === 'function' && define.amd) {
|
1207
1213
|
define([], function () {
|
1208
1214
|
return async;
|
1209
1215
|
});
|
@@ -2,10 +2,13 @@
|
|
2
2
|
"name": "async",
|
3
3
|
"description": "Higher-order functions and common patterns for asynchronous code",
|
4
4
|
"main": "lib/async.js",
|
5
|
+
"files": [
|
6
|
+
"lib"
|
7
|
+
],
|
5
8
|
"author": {
|
6
9
|
"name": "Caolan McMahon"
|
7
10
|
},
|
8
|
-
"version": "1.4.
|
11
|
+
"version": "1.4.2",
|
9
12
|
"keywords": [
|
10
13
|
"async",
|
11
14
|
"callback",
|
@@ -23,12 +26,19 @@
|
|
23
26
|
"devDependencies": {
|
24
27
|
"benchmark": "github:bestiejs/benchmark.js",
|
25
28
|
"bluebird": "^2.9.32",
|
29
|
+
"chai": "^3.1.0",
|
26
30
|
"coveralls": "^2.11.2",
|
27
31
|
"es6-promise": "^2.3.0",
|
28
32
|
"jscs": "^1.13.1",
|
29
33
|
"jshint": "~2.8.0",
|
34
|
+
"karma": "^0.13.2",
|
35
|
+
"karma-browserify": "^4.2.1",
|
36
|
+
"karma-firefox-launcher": "^0.1.6",
|
37
|
+
"karma-mocha": "^0.2.0",
|
38
|
+
"karma-mocha-reporter": "^1.0.2",
|
30
39
|
"lodash": "^3.9.0",
|
31
40
|
"mkdirp": "~0.5.1",
|
41
|
+
"mocha": "^2.2.5",
|
32
42
|
"native-promise-only": "^0.8.0-a",
|
33
43
|
"nodeunit": ">0.0.0",
|
34
44
|
"nyc": "^2.1.0",
|
@@ -49,7 +59,11 @@
|
|
49
59
|
]
|
50
60
|
},
|
51
61
|
"scripts": {
|
52
|
-
"test": "
|
62
|
+
"mocha-node-test": "mocha mocha_test/",
|
63
|
+
"mocha-browser-test": "karma start",
|
64
|
+
"mocha-test": "npm run mocha-node-test && npm run mocha-browser-test",
|
65
|
+
"nodeunit-test": "nodeunit test/test-async.js",
|
66
|
+
"test": "npm run-script lint && npm run nodeunit-test && npm run mocha-test",
|
53
67
|
"lint": "jshint lib/*.js test/*.js perf/*.js && jscs lib/*.js test/*.js perf/*.js",
|
54
68
|
"coverage": "nyc npm test && nyc report",
|
55
69
|
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls"
|
@@ -67,20 +81,20 @@
|
|
67
81
|
"tests"
|
68
82
|
]
|
69
83
|
},
|
70
|
-
"gitHead": "
|
84
|
+
"gitHead": "92f78aebad222d60c13e4299c0e723f2fe2d6611",
|
71
85
|
"homepage": "https://github.com/caolan/async#readme",
|
72
|
-
"_id": "async@1.4.
|
73
|
-
"_shasum": "
|
74
|
-
"_from": "async@^1.
|
75
|
-
"_npmVersion": "2.
|
76
|
-
"_nodeVersion": "2.
|
86
|
+
"_id": "async@1.4.2",
|
87
|
+
"_shasum": "6c9edcb11ced4f0dd2f2d40db0d49a109c088aab",
|
88
|
+
"_from": "async@^1.4.0",
|
89
|
+
"_npmVersion": "2.9.0",
|
90
|
+
"_nodeVersion": "2.0.1",
|
77
91
|
"_npmUser": {
|
78
92
|
"name": "megawac",
|
79
93
|
"email": "megawac@gmail.com"
|
80
94
|
},
|
81
95
|
"dist": {
|
82
|
-
"shasum": "
|
83
|
-
"tarball": "http://registry.npmjs.org/async/-/async-1.4.
|
96
|
+
"shasum": "6c9edcb11ced4f0dd2f2d40db0d49a109c088aab",
|
97
|
+
"tarball": "http://registry.npmjs.org/async/-/async-1.4.2.tgz"
|
84
98
|
},
|
85
99
|
"maintainers": [
|
86
100
|
{
|
@@ -101,5 +115,6 @@
|
|
101
115
|
}
|
102
116
|
],
|
103
117
|
"directories": {},
|
104
|
-
"_resolved": "https://registry.npmjs.org/async/-/async-1.4.
|
118
|
+
"_resolved": "https://registry.npmjs.org/async/-/async-1.4.2.tgz",
|
119
|
+
"readme": "ERROR: No README data found!"
|
105
120
|
}
|
@@ -5,49 +5,53 @@
|
|
5
5
|
"url": "http://debuggable.com/"
|
6
6
|
},
|
7
7
|
"name": "form-data",
|
8
|
-
"description": "A
|
9
|
-
"version": "1.0.0-
|
8
|
+
"description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
|
9
|
+
"version": "1.0.0-rc3",
|
10
10
|
"repository": {
|
11
11
|
"type": "git",
|
12
|
-
"url": "git://github.com/
|
12
|
+
"url": "git://github.com/form-data/form-data.git"
|
13
13
|
},
|
14
14
|
"main": "./lib/form_data",
|
15
15
|
"browser": "./lib/browser",
|
16
16
|
"scripts": {
|
17
|
-
"test": "
|
17
|
+
"test": "./test/run.js"
|
18
18
|
},
|
19
|
+
"pre-commit": [
|
20
|
+
"test"
|
21
|
+
],
|
19
22
|
"engines": {
|
20
23
|
"node": ">= 0.10"
|
21
24
|
},
|
22
25
|
"dependencies": {
|
23
|
-
"async": "^1.
|
24
|
-
"combined-stream": "^1.0.
|
25
|
-
"mime-types": "^2.1.
|
26
|
+
"async": "^1.4.0",
|
27
|
+
"combined-stream": "^1.0.5",
|
28
|
+
"mime-types": "^2.1.3"
|
26
29
|
},
|
27
30
|
"license": "MIT",
|
28
31
|
"devDependencies": {
|
29
32
|
"fake": "^0.2.2",
|
30
33
|
"far": "^0.0.7",
|
31
34
|
"formidable": "^1.0.17",
|
32
|
-
"
|
35
|
+
"pre-commit": "^1.0.10",
|
36
|
+
"request": "^2.60.0"
|
33
37
|
},
|
34
|
-
"gitHead": "
|
38
|
+
"gitHead": "c174f1b7f3a78a00ec5af0360469280445e37804",
|
35
39
|
"bugs": {
|
36
|
-
"url": "https://github.com/
|
40
|
+
"url": "https://github.com/form-data/form-data/issues"
|
37
41
|
},
|
38
|
-
"homepage": "https://github.com/
|
39
|
-
"_id": "form-data@1.0.0-
|
40
|
-
"_shasum": "
|
42
|
+
"homepage": "https://github.com/form-data/form-data#readme",
|
43
|
+
"_id": "form-data@1.0.0-rc3",
|
44
|
+
"_shasum": "d35bc62e7fbc2937ae78f948aaa0d38d90607577",
|
41
45
|
"_from": "form-data@~1.0.0-rc1",
|
42
|
-
"_npmVersion": "2.
|
43
|
-
"_nodeVersion": "
|
46
|
+
"_npmVersion": "2.11.0",
|
47
|
+
"_nodeVersion": "2.2.1",
|
44
48
|
"_npmUser": {
|
45
|
-
"name": "
|
46
|
-
"email": "
|
49
|
+
"name": "dylanpiercey",
|
50
|
+
"email": "pierceydylan@gmail.com"
|
47
51
|
},
|
48
52
|
"dist": {
|
49
|
-
"shasum": "
|
50
|
-
"tarball": "http://registry.npmjs.org/form-data/-/form-data-1.0.0-
|
53
|
+
"shasum": "d35bc62e7fbc2937ae78f948aaa0d38d90607577",
|
54
|
+
"tarball": "http://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz"
|
51
55
|
},
|
52
56
|
"maintainers": [
|
53
57
|
{
|
@@ -69,8 +73,13 @@
|
|
69
73
|
{
|
70
74
|
"name": "celer",
|
71
75
|
"email": "dtyree77@gmail.com"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"name": "dylanpiercey",
|
79
|
+
"email": "pierceydylan@gmail.com"
|
72
80
|
}
|
73
81
|
],
|
74
82
|
"directories": {},
|
75
|
-
"_resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-
|
83
|
+
"_resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz",
|
84
|
+
"readme": "ERROR: No README data found!"
|
76
85
|
}
|
@@ -5,6 +5,7 @@
|
|
5
5
|
[![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
|
6
6
|
[![coverage-98%](http://img.shields.io/badge/coverage-98%-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
|
7
7
|
|
8
|
+
**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises)
|
8
9
|
|
9
10
|
# Introduction
|
10
11
|
|
@@ -72,6 +73,8 @@ There are many ways to use bluebird in browsers:
|
|
72
73
|
- Direct downloads
|
73
74
|
- Full build [bluebird.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.js)
|
74
75
|
- Full build minified [bluebird.min.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.min.js)
|
76
|
+
- Core build [bluebird.core.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.core.js)
|
77
|
+
- Core build minified [bluebird.core.min.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.core.min.js)
|
75
78
|
- You may use browserify on the main export
|
76
79
|
- You may use the [bower](http://bower.io) package.
|
77
80
|
|
@@ -231,7 +234,7 @@ More reading:
|
|
231
234
|
|
232
235
|
# Questions and issues
|
233
236
|
|
234
|
-
|
237
|
+
The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
|
235
238
|
|
236
239
|
# Error handling
|
237
240
|
|