vulcan 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vulcan/cli.rb +20 -10
- data/lib/vulcan/version.rb +1 -1
- data/server/Procfile +1 -1
- data/server/bin/web +10 -0
- data/server/lib/cloudant.coffee +20 -0
- data/server/lib/logger.coffee +17 -0
- data/server/lib/on.coffee +10 -0
- data/server/lib/spawner.coffee +65 -0
- data/server/node_modules/coffee-script/CNAME +1 -0
- data/server/node_modules/coffee-script/LICENSE +22 -0
- data/server/node_modules/coffee-script/README +51 -0
- data/server/node_modules/coffee-script/Rakefile +78 -0
- data/server/node_modules/coffee-script/bin/cake +7 -0
- data/server/node_modules/coffee-script/bin/coffee +7 -0
- data/server/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/server/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
- data/server/node_modules/coffee-script/lib/coffee-script/cake.js +111 -0
- data/server/node_modules/coffee-script/lib/coffee-script/coffee-script.js +167 -0
- data/server/node_modules/coffee-script/lib/coffee-script/command.js +500 -0
- data/server/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
- data/server/node_modules/coffee-script/lib/coffee-script/helpers.js +77 -0
- data/server/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/server/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
- data/server/node_modules/coffee-script/lib/coffee-script/nodes.js +2986 -0
- data/server/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
- data/server/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
- data/server/node_modules/coffee-script/lib/coffee-script/repl.js +261 -0
- data/server/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
- data/server/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/server/node_modules/coffee-script/package.json +55 -0
- data/server/node_modules/connect-form/History.md +0 -6
- data/server/node_modules/connect-form/lib/connect-form.js +2 -4
- data/server/node_modules/connect-form/node_modules/formidable/Readme.md +64 -36
- data/server/node_modules/connect-form/node_modules/formidable/lib/incoming_form.js +5 -1
- data/server/node_modules/connect-form/node_modules/formidable/package.json +20 -6
- data/server/node_modules/connect-form/node_modules/formidable/test/common.js +5 -6
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/file/funkyfilename.txt +1 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +1 -1
- data/server/node_modules/connect-form/node_modules/formidable/test/{slow → integration}/test-fixtures.js +38 -33
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/simple/test-incoming-form.js +11 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/run.js +1 -6
- data/server/node_modules/connect-form/node_modules/formidable/test/unit/test-incoming-form.js +63 -0
- data/server/node_modules/connect-form/package.json +27 -5
- data/server/node_modules/cradle/README.md +10 -10
- data/server/node_modules/cradle/lib/cradle.js +117 -523
- data/server/node_modules/cradle/lib/cradle/database/attachments.js +120 -0
- data/server/node_modules/cradle/lib/cradle/database/changes.js +56 -0
- data/server/node_modules/cradle/lib/cradle/database/documents.js +215 -0
- data/server/node_modules/cradle/lib/cradle/database/index.js +65 -0
- data/server/node_modules/cradle/lib/cradle/database/views.js +125 -0
- data/server/node_modules/cradle/node_modules/follow/LICENSE +202 -0
- data/server/node_modules/cradle/node_modules/follow/README.md +164 -0
- data/server/node_modules/cradle/node_modules/follow/Rakefile +54 -0
- data/server/node_modules/cradle/node_modules/follow/api.js +35 -0
- data/server/node_modules/cradle/node_modules/follow/browser/eventemitter2.js +453 -0
- data/server/node_modules/cradle/node_modules/follow/browser/export.js +78 -0
- data/server/node_modules/cradle/node_modules/follow/browser/index.html +14 -0
- data/server/node_modules/cradle/node_modules/follow/browser/jquery-1.6.1.min.js +18 -0
- data/server/node_modules/cradle/node_modules/follow/browser/log4js.js +46 -0
- data/server/node_modules/cradle/node_modules/follow/browser/main.js +92 -0
- data/server/node_modules/cradle/node_modules/follow/browser/querystring.js +28 -0
- data/server/node_modules/cradle/node_modules/follow/browser/request.jquery.js +237 -0
- data/server/node_modules/cradle/node_modules/follow/browser/require.js +33 -0
- data/server/node_modules/cradle/node_modules/follow/browser/util.js +28 -0
- data/server/node_modules/cradle/node_modules/follow/cli.js +101 -0
- data/server/node_modules/cradle/node_modules/follow/lib/feed.js +556 -0
- data/server/node_modules/cradle/node_modules/follow/lib/index.js +66 -0
- data/server/node_modules/cradle/node_modules/follow/lib/stream.js +305 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/LICENSE +55 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/README.md +285 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/main.js +618 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/mimetypes.js +146 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/oauth.js +34 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/package.json +42 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/googledoodle.png +0 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/run.sh +6 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/server.js +57 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-body.js +90 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-cookie.js +29 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-cookiejar.js +90 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-errors.js +30 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-oauth.js +109 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-pipes.js +167 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-proxy.js +39 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-timeout.js +87 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/uuid.js +19 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/vendor/cookie/index.js +55 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/vendor/cookie/jar.js +72 -0
- data/server/node_modules/cradle/node_modules/follow/package.json +45 -0
- data/server/node_modules/cradle/node_modules/follow/test/couch.js +153 -0
- data/server/node_modules/cradle/node_modules/follow/test/follow.js +136 -0
- data/server/node_modules/cradle/node_modules/follow/test/issues.js +178 -0
- data/server/node_modules/cradle/node_modules/follow/test/issues/10.js +24 -0
- data/server/node_modules/cradle/node_modules/follow/test/stream.js +493 -0
- data/server/node_modules/cradle/node_modules/request/LICENSE +55 -0
- data/server/node_modules/cradle/node_modules/request/README.md +287 -0
- data/server/node_modules/cradle/node_modules/request/forever.js +103 -0
- data/server/node_modules/cradle/node_modules/request/main.js +913 -0
- data/server/node_modules/cradle/node_modules/request/mimetypes.js +152 -0
- data/server/node_modules/cradle/node_modules/request/oauth.js +34 -0
- data/server/node_modules/cradle/node_modules/request/package.json +42 -0
- data/server/node_modules/cradle/node_modules/request/tests/googledoodle.png +0 -0
- data/server/node_modules/cradle/node_modules/request/tests/run.js +38 -0
- data/server/node_modules/cradle/node_modules/request/tests/server.js +82 -0
- data/server/node_modules/cradle/node_modules/request/tests/squid.conf +77 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.cnf +20 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.crl +0 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.crt +17 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.csr +13 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.key +18 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.srl +1 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.cnf +19 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.crt +16 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.csr +11 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.js +28 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.key +9 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/npm-ca.crt +16 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/test.crt +15 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/test.key +15 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-body.js +95 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-cookie.js +29 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-cookiejar.js +90 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-defaults.js +68 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-errors.js +37 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-headers.js +52 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-httpModule.js +94 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-https-strict.js +97 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-https.js +86 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-oauth.js +117 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-params.js +92 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-pipes.js +202 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-proxy.js +39 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-qs.js +28 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-redirect.js +154 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-timeout.js +87 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-toJSON.js +14 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-tunnel.js +61 -0
- data/server/node_modules/cradle/node_modules/request/tunnel.js +229 -0
- data/server/node_modules/cradle/node_modules/request/uuid.js +19 -0
- data/server/node_modules/cradle/node_modules/request/vendor/cookie/index.js +65 -0
- data/server/node_modules/cradle/node_modules/request/vendor/cookie/jar.js +72 -0
- data/server/node_modules/cradle/node_modules/vargs/package.json +33 -10
- data/server/node_modules/cradle/package.json +50 -12
- data/server/node_modules/cradle/test/cache-test.js +1 -4
- data/server/node_modules/cradle/test/connection-test.js +179 -0
- data/server/node_modules/cradle/test/database-attachment-test.js +344 -0
- data/server/node_modules/cradle/test/database-cache-test.js +132 -0
- data/server/node_modules/cradle/test/database-test.js +219 -0
- data/server/node_modules/cradle/test/database-view-test.js +141 -0
- data/server/node_modules/cradle/test/fixtures/databases.json +28 -1
- data/server/node_modules/cradle/test/helpers/seed.js +14 -5
- data/server/node_modules/cradle/test/response-test.js +1 -1
- data/server/node_modules/express/History.md +16 -0
- data/server/node_modules/express/bin/express +7 -6
- data/server/node_modules/express/lib-cov/application.js +510 -0
- data/server/node_modules/express/lib-cov/express.js +65 -0
- data/server/node_modules/express/lib-cov/middleware.js +54 -0
- data/server/node_modules/express/lib-cov/request.js +225 -0
- data/server/node_modules/express/lib-cov/response.js +611 -0
- data/server/node_modules/express/lib-cov/router/collection.js +40 -0
- data/server/node_modules/express/lib-cov/router/index.js +515 -0
- data/server/node_modules/express/lib-cov/router/methods.js +9 -0
- data/server/node_modules/express/lib-cov/router/route.js +68 -0
- data/server/node_modules/express/lib-cov/utils.js +151 -0
- data/server/node_modules/express/lib-cov/view.js +81 -0
- data/server/node_modules/express/lib/express.js +1 -1
- data/server/node_modules/express/lib/http.js +1 -2
- data/server/node_modules/express/lib/request.js +2 -2
- data/server/node_modules/express/lib/router/methods.js +10 -1
- data/server/node_modules/express/node_modules/connect/lib/connect.js +1 -1
- data/server/node_modules/express/node_modules/connect/lib/http.js +3 -2
- data/server/node_modules/express/node_modules/connect/lib/middleware/limit.js +0 -2
- data/server/node_modules/express/node_modules/connect/lib/middleware/session.js +1 -2
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md +42 -25
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js +1 -0
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/package.json +14 -3
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js +11 -0
- data/server/node_modules/express/node_modules/connect/package.json +35 -7
- data/server/node_modules/express/node_modules/mime/package.json +30 -8
- data/server/node_modules/express/node_modules/mkdirp/README.markdown +35 -2
- data/server/node_modules/express/node_modules/mkdirp/examples/pow.js +1 -1
- data/server/node_modules/express/node_modules/mkdirp/index.js +72 -13
- data/server/node_modules/express/node_modules/mkdirp/package.json +39 -21
- data/server/node_modules/express/node_modules/mkdirp/test/chmod.js +38 -0
- data/server/node_modules/express/node_modules/mkdirp/test/clobber.js +37 -0
- data/server/node_modules/express/node_modules/mkdirp/test/perm.js +32 -0
- data/server/node_modules/express/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/server/node_modules/express/node_modules/mkdirp/test/sync.js +27 -0
- data/server/node_modules/express/node_modules/mkdirp/test/umask.js +28 -0
- data/server/node_modules/express/node_modules/mkdirp/test/umask_sync.js +27 -0
- data/server/node_modules/express/node_modules/qs/History.md +10 -0
- data/server/node_modules/express/node_modules/qs/Readme.md +9 -2
- data/server/node_modules/express/node_modules/qs/examples.js +3 -0
- data/server/node_modules/express/node_modules/qs/lib/querystring.js +8 -6
- data/server/node_modules/express/node_modules/qs/package.json +26 -8
- data/server/node_modules/express/node_modules/qs/test/parse.js +13 -1
- data/server/node_modules/express/node_modules/qs/test/stringify.js +45 -37
- data/server/node_modules/express/package.json +55 -16
- data/server/node_modules/express/test.js +41 -0
- data/server/node_modules/knox/package.json +26 -4
- data/server/node_modules/node-uuid/package.json +40 -11
- data/server/node_modules/node-uuid/test/test.js +1 -1
- data/server/node_modules/nodemon/README.md +120 -0
- data/server/node_modules/nodemon/nodemon.js +518 -0
- data/server/node_modules/nodemon/nodemonignore.example +11 -0
- data/server/node_modules/nodemon/package.json +49 -0
- data/server/node_modules/restler/README.md +144 -94
- data/server/node_modules/restler/lib/multipartform.js +2 -0
- data/server/node_modules/restler/lib/restler.js +218 -61
- data/server/node_modules/restler/package.json +35 -8
- data/server/node_modules/restler/test/all.js +6 -1
- data/server/node_modules/restler/test/restler.js +624 -118
- data/server/package.json +14 -10
- data/server/web.coffee +64 -0
- data/server/web.js +15 -3
- metadata +170 -57
- data/server/index.js +0 -14
- data/server/node_modules/connect-form/LICENSE +0 -22
- data/server/node_modules/connect-form/index.js +0 -100
- data/server/node_modules/connect-form/node_modules/formidable/test/fast/test-incoming-form.js +0 -45
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/no-filename/generic.http +0 -13
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +0 -26
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http +0 -24
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-safari-5.http +0 -23
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +0 -24
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-7.http +0 -22
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-8.http +0 -22
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-safari-5.http +0 -22
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/multi_video.upload +0 -0
- data/server/node_modules/cradle/Makefile +0 -10
- data/server/node_modules/cradle/test/cradle-test.js +0 -650
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/no-filename/generic.http +0 -13
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +0 -26
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http +0 -24
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-safari-5.http +0 -23
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +0 -24
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-7.http +0 -22
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-8.http +0 -22
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-safari-5.http +0 -22
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multi_video.upload +0 -0
- data/server/node_modules/express/node_modules/connect/test.js +0 -52
- data/server/node_modules/express/testing/foo/app.js +0 -35
- data/server/node_modules/express/testing/foo/package.json +0 -9
- data/server/node_modules/express/testing/foo/public/stylesheets/style.css +0 -8
- data/server/node_modules/express/testing/foo/routes/index.js +0 -10
- data/server/node_modules/express/testing/foo/views/index.jade +0 -2
- data/server/node_modules/express/testing/foo/views/layout.jade +0 -6
- data/server/node_modules/express/testing/index.js +0 -43
- data/server/node_modules/express/testing/public/test.txt +0 -2971
- data/server/node_modules/express/testing/views/page.html +0 -1
- data/server/node_modules/express/testing/views/page.jade +0 -3
- data/server/node_modules/express/testing/views/test.md +0 -1
- data/server/node_modules/express/testing/views/user/index.jade +0 -1
- data/server/node_modules/express/testing/views/user/list.jade +0 -1
- data/server/node_modules/knox/lib/knox/mime/index.js +0 -308
- data/server/node_modules/knox/lib/knox/mime/test.js +0 -59
- data/server/node_modules/node-uuid/test/benchmark-native +0 -0
- data/server/node_modules/on/index.js +0 -13
- data/server/node_modules/restler/test/test_helper.js +0 -163
- data/server/node_modules/spawner/index.js +0 -106
data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js
CHANGED
@@ -247,6 +247,7 @@ IncomingForm.prototype._parseContentLength = function() {
|
|
247
247
|
if (this.headers['content-length']) {
|
248
248
|
this.bytesReceived = 0;
|
249
249
|
this.bytesExpected = parseInt(this.headers['content-length'], 10);
|
250
|
+
this.emit('progress', this.bytesReceived, this.bytesExpected);
|
250
251
|
}
|
251
252
|
};
|
252
253
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "formidable",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.9",
|
4
4
|
"dependencies": {},
|
5
5
|
"devDependencies": {
|
6
6
|
"gently": "0.8.0",
|
@@ -18,5 +18,16 @@
|
|
18
18
|
},
|
19
19
|
"engines": {
|
20
20
|
"node": "*"
|
21
|
-
}
|
22
|
-
|
21
|
+
},
|
22
|
+
"_npmUser": {
|
23
|
+
"name": "ddollar",
|
24
|
+
"email": "ddollar@gmail.com"
|
25
|
+
},
|
26
|
+
"_id": "formidable@1.0.9",
|
27
|
+
"optionalDependencies": {},
|
28
|
+
"_engineSupported": true,
|
29
|
+
"_npmVersion": "1.1.21",
|
30
|
+
"_nodeVersion": "v0.6.17",
|
31
|
+
"_defaultsLoaded": true,
|
32
|
+
"_from": "formidable@1.0.x"
|
33
|
+
}
|
@@ -372,15 +372,26 @@ test(function parseContentLength() {
|
|
372
372
|
|
373
373
|
form.headers = {};
|
374
374
|
form._parseContentLength();
|
375
|
+
assert.strictEqual(form.bytesReceived, null);
|
375
376
|
assert.strictEqual(form.bytesExpected, null);
|
376
377
|
|
377
378
|
form.headers['content-length'] = '8';
|
379
|
+
gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) {
|
380
|
+
assert.equal(event, 'progress');
|
381
|
+
assert.equal(bytesReceived, 0);
|
382
|
+
assert.equal(bytesExpected, 8);
|
383
|
+
});
|
378
384
|
form._parseContentLength();
|
379
385
|
assert.strictEqual(form.bytesReceived, 0);
|
380
386
|
assert.strictEqual(form.bytesExpected, 8);
|
381
387
|
|
382
388
|
// JS can be evil, lets make sure we are not
|
383
389
|
form.headers['content-length'] = '08';
|
390
|
+
gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) {
|
391
|
+
assert.equal(event, 'progress');
|
392
|
+
assert.equal(bytesReceived, 0);
|
393
|
+
assert.equal(bytesExpected, 8);
|
394
|
+
});
|
384
395
|
form._parseContentLength();
|
385
396
|
assert.strictEqual(form.bytesExpected, 8);
|
386
397
|
});
|
@@ -1,11 +1,23 @@
|
|
1
1
|
{
|
2
2
|
"name": "connect",
|
3
|
-
"version": "1.8.
|
3
|
+
"version": "1.8.7",
|
4
4
|
"description": "High performance middleware framework",
|
5
|
-
"keywords": [
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
"keywords": [
|
6
|
+
"framework",
|
7
|
+
"web",
|
8
|
+
"middleware",
|
9
|
+
"connect",
|
10
|
+
"rack"
|
11
|
+
],
|
12
|
+
"repository": {
|
13
|
+
"type": "git",
|
14
|
+
"url": "git://github.com/senchalabs/connect.git"
|
15
|
+
},
|
16
|
+
"author": {
|
17
|
+
"name": "TJ Holowaychuk",
|
18
|
+
"email": "tj@vision-media.ca",
|
19
|
+
"url": "http://tjholowaychuk.com"
|
20
|
+
},
|
9
21
|
"dependencies": {
|
10
22
|
"qs": ">= 0.4.0",
|
11
23
|
"mime": ">= 0.0.1",
|
@@ -20,6 +32,22 @@
|
|
20
32
|
"ejs": "0.4.3",
|
21
33
|
"should": "0.3.2"
|
22
34
|
},
|
35
|
+
"publishConfig": {
|
36
|
+
"tag": "1.8"
|
37
|
+
},
|
23
38
|
"main": "index",
|
24
|
-
"engines": {
|
25
|
-
|
39
|
+
"engines": {
|
40
|
+
"node": ">= 0.4.1 < 0.7.0"
|
41
|
+
},
|
42
|
+
"_npmUser": {
|
43
|
+
"name": "ddollar",
|
44
|
+
"email": "ddollar@gmail.com"
|
45
|
+
},
|
46
|
+
"_id": "connect@1.8.7",
|
47
|
+
"optionalDependencies": {},
|
48
|
+
"_engineSupported": true,
|
49
|
+
"_npmVersion": "1.1.21",
|
50
|
+
"_nodeVersion": "v0.6.17",
|
51
|
+
"_defaultsLoaded": true,
|
52
|
+
"_from": "connect@1.x"
|
53
|
+
}
|
@@ -1,22 +1,44 @@
|
|
1
1
|
{
|
2
2
|
"author": {
|
3
3
|
"name": "Robert Kieffer",
|
4
|
-
"
|
5
|
-
"
|
4
|
+
"email": "robert@broofa.com",
|
5
|
+
"url": "http://github.com/broofa"
|
6
6
|
},
|
7
7
|
"contributors": [
|
8
8
|
{
|
9
9
|
"name": "Benjamin Thomas",
|
10
|
-
"
|
11
|
-
"
|
10
|
+
"email": "benjamin@benjaminthomas.org",
|
11
|
+
"url": "http://github.com/bentomas"
|
12
12
|
}
|
13
13
|
],
|
14
14
|
"dependencies": {},
|
15
15
|
"description": "A comprehensive library for mime-type mapping",
|
16
|
-
"devDependencies": {
|
17
|
-
|
16
|
+
"devDependencies": {
|
17
|
+
"async_testing": ""
|
18
|
+
},
|
19
|
+
"keywords": [
|
20
|
+
"util",
|
21
|
+
"mime"
|
22
|
+
],
|
18
23
|
"main": "mime.js",
|
19
24
|
"name": "mime",
|
20
|
-
"repository": {
|
21
|
-
|
25
|
+
"repository": {
|
26
|
+
"url": "git://github.com/bentomas/node-mime.git",
|
27
|
+
"type": "git"
|
28
|
+
},
|
29
|
+
"version": "1.2.4",
|
30
|
+
"_npmUser": {
|
31
|
+
"name": "ddollar",
|
32
|
+
"email": "ddollar@gmail.com"
|
33
|
+
},
|
34
|
+
"_id": "mime@1.2.4",
|
35
|
+
"optionalDependencies": {},
|
36
|
+
"engines": {
|
37
|
+
"node": "*"
|
38
|
+
},
|
39
|
+
"_engineSupported": true,
|
40
|
+
"_npmVersion": "1.1.21",
|
41
|
+
"_nodeVersion": "v0.6.17",
|
42
|
+
"_defaultsLoaded": true,
|
43
|
+
"_from": "mime@1.2.4"
|
22
44
|
}
|
@@ -3,14 +3,14 @@ mkdirp
|
|
3
3
|
|
4
4
|
Like `mkdir -p`, but in node.js!
|
5
5
|
|
6
|
-
|
6
|
+
example
|
7
7
|
=======
|
8
8
|
|
9
9
|
pow.js
|
10
10
|
------
|
11
11
|
var mkdirp = require('mkdirp');
|
12
12
|
|
13
|
-
mkdirp('/tmp/foo/bar/baz',
|
13
|
+
mkdirp('/tmp/foo/bar/baz', function (err) {
|
14
14
|
if (err) console.error(err)
|
15
15
|
else console.log('pow!')
|
16
16
|
});
|
@@ -19,3 +19,36 @@ Output
|
|
19
19
|
pow!
|
20
20
|
|
21
21
|
And now /tmp/foo/bar/baz exists, huzzah!
|
22
|
+
|
23
|
+
methods
|
24
|
+
=======
|
25
|
+
|
26
|
+
var mkdirp = require('mkdirp');
|
27
|
+
|
28
|
+
mkdirp(dir, mode, cb)
|
29
|
+
---------------------
|
30
|
+
|
31
|
+
Create a new directory and any necessary subdirectories at `dir` with octal
|
32
|
+
permission string `mode`.
|
33
|
+
|
34
|
+
If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
|
35
|
+
|
36
|
+
mkdirp.sync(dir, mode)
|
37
|
+
----------------------
|
38
|
+
|
39
|
+
Synchronously create a new directory and any necessary subdirectories at `dir`
|
40
|
+
with octal permission string `mode`.
|
41
|
+
|
42
|
+
If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
|
43
|
+
|
44
|
+
install
|
45
|
+
=======
|
46
|
+
|
47
|
+
With [npm](http://npmjs.org) do:
|
48
|
+
|
49
|
+
npm install mkdirp
|
50
|
+
|
51
|
+
license
|
52
|
+
=======
|
53
|
+
|
54
|
+
MIT/X11
|
@@ -1,20 +1,79 @@
|
|
1
1
|
var path = require('path');
|
2
2
|
var fs = require('fs');
|
3
3
|
|
4
|
-
|
4
|
+
module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
|
5
|
+
|
6
|
+
function mkdirP (p, mode, f) {
|
7
|
+
if (typeof mode === 'function' || mode === undefined) {
|
8
|
+
f = mode;
|
9
|
+
mode = 0777 & (~process.umask());
|
10
|
+
}
|
11
|
+
|
5
12
|
var cb = f || function () {};
|
13
|
+
if (typeof mode === 'string') mode = parseInt(mode, 8);
|
6
14
|
p = path.resolve(p);
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
|
16
|
+
fs.mkdir(p, mode, function (er) {
|
17
|
+
if (!er) return cb();
|
18
|
+
switch (er.code) {
|
19
|
+
case 'ENOENT':
|
20
|
+
mkdirP(path.dirname(p), mode, function (er) {
|
21
|
+
if (er) cb(er);
|
22
|
+
else mkdirP(p, mode, cb);
|
23
|
+
});
|
24
|
+
break;
|
25
|
+
|
26
|
+
case 'EEXIST':
|
27
|
+
fs.stat(p, function (er2, stat) {
|
28
|
+
// if the stat fails, then that's super weird.
|
29
|
+
// let the original EEXIST be the failure reason.
|
30
|
+
if (er2 || !stat.isDirectory()) cb(er)
|
31
|
+
else cb();
|
32
|
+
});
|
33
|
+
break;
|
34
|
+
|
35
|
+
default:
|
36
|
+
cb(er);
|
37
|
+
break;
|
38
|
+
}
|
18
39
|
});
|
40
|
+
}
|
41
|
+
|
42
|
+
mkdirP.sync = function sync (p, mode) {
|
43
|
+
if (mode === undefined) {
|
44
|
+
mode = 0777 & (~process.umask());
|
45
|
+
}
|
46
|
+
|
47
|
+
if (typeof mode === 'string') mode = parseInt(mode, 8);
|
48
|
+
p = path.resolve(p);
|
49
|
+
|
50
|
+
try {
|
51
|
+
fs.mkdirSync(p, mode)
|
52
|
+
}
|
53
|
+
catch (err0) {
|
54
|
+
switch (err0.code) {
|
55
|
+
case 'ENOENT' :
|
56
|
+
var err1 = sync(path.dirname(p), mode)
|
57
|
+
if (err1) throw err1;
|
58
|
+
else return sync(p, mode);
|
59
|
+
break;
|
60
|
+
|
61
|
+
case 'EEXIST' :
|
62
|
+
var stat;
|
63
|
+
try {
|
64
|
+
stat = fs.statSync(p);
|
65
|
+
}
|
66
|
+
catch (err1) {
|
67
|
+
throw err0
|
68
|
+
}
|
69
|
+
if (!stat.isDirectory()) throw err0;
|
70
|
+
else return null;
|
71
|
+
break;
|
72
|
+
default :
|
73
|
+
throw err0
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
return null;
|
19
79
|
};
|
20
|
-
exports.mkdirp = exports.mkdirP = module.exports;
|
@@ -1,23 +1,41 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
2
|
+
"name": "mkdirp",
|
3
|
+
"description": "Recursively mkdir, like `mkdir -p`",
|
4
|
+
"version": "0.3.0",
|
5
|
+
"author": {
|
6
|
+
"name": "James Halliday",
|
7
|
+
"email": "mail@substack.net",
|
8
|
+
"url": "http://substack.net"
|
9
|
+
},
|
10
|
+
"main": "./index",
|
11
|
+
"keywords": [
|
12
|
+
"mkdir",
|
13
|
+
"directory"
|
14
|
+
],
|
15
|
+
"repository": {
|
16
|
+
"type": "git",
|
17
|
+
"url": "git://github.com/substack/node-mkdirp.git"
|
18
|
+
},
|
19
|
+
"scripts": {
|
20
|
+
"test": "tap test/*.js"
|
21
|
+
},
|
22
|
+
"devDependencies": {
|
23
|
+
"tap": "0.0.x"
|
24
|
+
},
|
25
|
+
"license": "MIT/X11",
|
26
|
+
"engines": {
|
27
|
+
"node": "*"
|
28
|
+
},
|
29
|
+
"_npmUser": {
|
30
|
+
"name": "ddollar",
|
31
|
+
"email": "ddollar@gmail.com"
|
32
|
+
},
|
33
|
+
"_id": "mkdirp@0.3.0",
|
34
|
+
"dependencies": {},
|
35
|
+
"optionalDependencies": {},
|
36
|
+
"_engineSupported": true,
|
37
|
+
"_npmVersion": "1.1.21",
|
38
|
+
"_nodeVersion": "v0.6.17",
|
39
|
+
"_defaultsLoaded": true,
|
40
|
+
"_from": "mkdirp@0.3.0"
|
23
41
|
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
var mkdirp = require('../').mkdirp;
|
2
|
+
var path = require('path');
|
3
|
+
var fs = require('fs');
|
4
|
+
var test = require('tap').test;
|
5
|
+
|
6
|
+
var ps = [ '', 'tmp' ];
|
7
|
+
|
8
|
+
for (var i = 0; i < 25; i++) {
|
9
|
+
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
|
10
|
+
ps.push(dir);
|
11
|
+
}
|
12
|
+
|
13
|
+
var file = ps.join('/');
|
14
|
+
|
15
|
+
test('chmod-pre', function (t) {
|
16
|
+
var mode = 0744
|
17
|
+
mkdirp(file, mode, function (er) {
|
18
|
+
t.ifError(er, 'should not error');
|
19
|
+
fs.stat(file, function (er, stat) {
|
20
|
+
t.ifError(er, 'should exist');
|
21
|
+
t.ok(stat && stat.isDirectory(), 'should be directory');
|
22
|
+
t.equal(stat && stat.mode & 0777, mode, 'should be 0744');
|
23
|
+
t.end();
|
24
|
+
});
|
25
|
+
});
|
26
|
+
});
|
27
|
+
|
28
|
+
test('chmod', function (t) {
|
29
|
+
var mode = 0755
|
30
|
+
mkdirp(file, mode, function (er) {
|
31
|
+
t.ifError(er, 'should not error');
|
32
|
+
fs.stat(file, function (er, stat) {
|
33
|
+
t.ifError(er, 'should exist');
|
34
|
+
t.ok(stat && stat.isDirectory(), 'should be directory');
|
35
|
+
t.end();
|
36
|
+
});
|
37
|
+
});
|
38
|
+
});
|
@@ -0,0 +1,37 @@
|
|
1
|
+
var mkdirp = require('../').mkdirp;
|
2
|
+
var path = require('path');
|
3
|
+
var fs = require('fs');
|
4
|
+
var test = require('tap').test;
|
5
|
+
|
6
|
+
var ps = [ '', 'tmp' ];
|
7
|
+
|
8
|
+
for (var i = 0; i < 25; i++) {
|
9
|
+
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
|
10
|
+
ps.push(dir);
|
11
|
+
}
|
12
|
+
|
13
|
+
var file = ps.join('/');
|
14
|
+
|
15
|
+
// a file in the way
|
16
|
+
var itw = ps.slice(0, 3).join('/');
|
17
|
+
|
18
|
+
|
19
|
+
test('clobber-pre', function (t) {
|
20
|
+
console.error("about to write to "+itw)
|
21
|
+
fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
|
22
|
+
|
23
|
+
fs.stat(itw, function (er, stat) {
|
24
|
+
t.ifError(er)
|
25
|
+
t.ok(stat && stat.isFile(), 'should be file')
|
26
|
+
t.end()
|
27
|
+
})
|
28
|
+
})
|
29
|
+
|
30
|
+
test('clobber', function (t) {
|
31
|
+
t.plan(2);
|
32
|
+
mkdirp(file, 0755, function (err) {
|
33
|
+
t.ok(err);
|
34
|
+
t.equal(err.code, 'ENOTDIR');
|
35
|
+
t.end();
|
36
|
+
});
|
37
|
+
});
|