webpack_rails 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webpack_rails/ErrorMessagePlugin.js +37 -0
- data/lib/webpack_rails/engine.rb +6 -5
- data/lib/webpack_rails/node_modules/cors/CONTRIBUTING.md +35 -0
- data/lib/webpack_rails/node_modules/cors/LICENSE +9 -0
- data/lib/webpack_rails/node_modules/cors/README.md +192 -0
- data/lib/webpack_rails/node_modules/cors/lib/index.js +242 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/HISTORY.md +29 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/README.md +91 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/index.js +124 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/package.json +72 -0
- data/lib/webpack_rails/node_modules/cors/package.json +79 -0
- data/lib/webpack_rails/node_modules/cors/test/basic-auth.js +40 -0
- data/lib/webpack_rails/node_modules/cors/test/body-events.js +81 -0
- data/lib/webpack_rails/node_modules/cors/test/cors.js +652 -0
- data/lib/webpack_rails/node_modules/cors/test/error-response.js +77 -0
- data/lib/webpack_rails/node_modules/cors/test/example-app.js +98 -0
- data/lib/webpack_rails/node_modules/cors/test/issue-2.js +56 -0
- data/lib/webpack_rails/node_modules/cors/test/issue-31.js +58 -0
- data/lib/webpack_rails/node_modules/cors/test/mocha.opts +3 -0
- data/lib/webpack_rails/node_modules/express/History.md +3025 -0
- data/lib/webpack_rails/node_modules/express/LICENSE +24 -0
- data/lib/webpack_rails/node_modules/express/Readme.md +138 -0
- data/lib/webpack_rails/node_modules/express/index.js +11 -0
- data/lib/webpack_rails/node_modules/express/lib/application.js +643 -0
- data/lib/webpack_rails/node_modules/express/lib/express.js +103 -0
- data/lib/webpack_rails/node_modules/express/lib/middleware/init.js +36 -0
- data/lib/webpack_rails/node_modules/express/lib/middleware/query.js +51 -0
- data/lib/webpack_rails/node_modules/express/lib/request.js +489 -0
- data/lib/webpack_rails/node_modules/express/lib/response.js +1053 -0
- data/lib/webpack_rails/node_modules/express/lib/router/index.js +645 -0
- data/lib/webpack_rails/node_modules/express/lib/router/layer.js +176 -0
- data/lib/webpack_rails/node_modules/express/lib/router/route.js +210 -0
- data/lib/webpack_rails/node_modules/express/lib/utils.js +300 -0
- data/lib/webpack_rails/node_modules/express/lib/view.js +173 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/HISTORY.md +170 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/README.md +135 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/index.js +231 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md +171 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md +103 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js +188 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md +274 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md +82 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json +6474 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js +11 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json +94 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json +84 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md +76 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE +24 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md +203 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js +62 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js +102 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js +118 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js +112 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js +179 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json +86 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/package.json +98 -0
- data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/LICENSE +21 -0
- data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/README.md +43 -0
- data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/array-flatten.js +64 -0
- data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/package.json +62 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/HISTORY.md +40 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/README.md +141 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/index.js +443 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/package.json +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/HISTORY.md +9 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/README.md +92 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/index.js +214 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/package.json +65 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie/README.md +64 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie/index.js +116 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie/package.json +68 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/History.md +38 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/Readme.md +42 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/index.js +51 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/package.json +59 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/History.md +195 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/Makefile +36 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/Readme.md +188 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/bower.json +28 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/browser.js +168 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/component.json +19 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/debug.js +197 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node.js +209 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/History.md +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/LICENSE +20 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/README.md +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/index.js +125 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/package.json +47 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/package.json +73 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/History.md +75 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/Readme.md +274 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/index.js +529 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js +33 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js +101 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/lib/compat/index.js +69 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/package.json +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/escape-html/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/escape-html/Readme.md +15 -0
- data/lib/webpack_rails/node_modules/express/node_modules/escape-html/index.js +29 -0
- data/lib/webpack_rails/node_modules/express/node_modules/escape-html/package.json +51 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/HISTORY.md +71 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/README.md +165 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/index.js +132 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/package.json +73 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/HISTORY.md +90 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/README.md +133 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/index.js +151 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md +4 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md +43 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js +69 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/package.json +59 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/package.json +81 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/HISTORY.md +38 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/README.md +58 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/index.js +57 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/package.json +87 -0
- data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/README.md +34 -0
- data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/index.js +57 -0
- data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/package.json +125 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/HISTORY.md +24 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/README.md +41 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/index.js +42 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/package.json +88 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/HISTORY.md +88 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/README.md +154 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/index.js +196 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md +80 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js +95 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json +64 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/package.json +71 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/HISTORY.md +42 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/LICENSE +24 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/README.md +107 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/index.js +136 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/package.json +80 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/History.md +36 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/LICENSE +21 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/Readme.md +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/index.js +129 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/package.json +184 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/HISTORY.md +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/README.md +137 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/index.js +345 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md +4 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md +53 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json +65 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile +18 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE +19 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md +161 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js +439 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json +60 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee +374 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee +262 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/package.json +90 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/CHANGELOG.md +88 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/CONTRIBUTING.md +1 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/LICENSE +28 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/README.md +317 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/bower.json +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/index.js +15 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/parse.js +186 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/stringify.js +121 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/utils.js +190 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/package.json +56 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/test/parse.js +478 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/test/stringify.js +259 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/test/utils.js +28 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/HISTORY.md +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/README.md +48 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/index.js +49 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/package.json +76 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/HISTORY.md +295 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/README.md +195 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/index.js +820 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/destroy/README.md +38 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/destroy/index.js +36 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/destroy/package.json +67 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/HISTORY.md +76 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/README.md +63 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/index.js +120 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/LICENSE +16 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/README.md +42 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits.js +1 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits_browser.js +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/package.json +50 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/test.js +25 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/package.json +85 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/LICENSE +19 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/README.md +90 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/build/build.js +11 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/build/test.js +57 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/cli.js +8 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/mime.js +108 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/package.json +73 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/types.json +1 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/History.md +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/LICENSE +20 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/README.md +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/index.js +125 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/package.json +47 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/README.md +114 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/codes.json +64 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/index.js +60 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/package.json +84 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/package.json +89 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/HISTORY.md +284 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/LICENSE +25 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/README.md +235 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/index.js +187 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/package.json +83 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/HISTORY.md +180 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/README.md +132 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/index.js +262 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/HISTORY.md +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/README.md +81 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/index.js +270 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/package.json +58 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md +171 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md +103 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js +188 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md +274 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md +82 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json +6474 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js +11 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json +94 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json +84 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/package.json +93 -0
- data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/LICENSE +20 -0
- data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/README.md +34 -0
- data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/index.js +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/package.json +58 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/HISTORY.md +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/README.md +91 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/index.js +117 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/package.json +72 -0
- data/lib/webpack_rails/node_modules/express/package.json +167 -0
- data/lib/webpack_rails/node_modules/is-array/History.md +11 -0
- data/lib/webpack_rails/node_modules/is-array/Makefile +11 -0
- data/lib/webpack_rails/node_modules/is-array/Readme.md +27 -0
- data/lib/webpack_rails/node_modules/is-array/component.json +13 -0
- data/lib/webpack_rails/node_modules/is-array/index.js +33 -0
- data/lib/webpack_rails/node_modules/is-array/package.json +41 -0
- data/lib/webpack_rails/node_modules/is-array/test/test.html +46 -0
- data/lib/webpack_rails/node_modules/is-object/LICENSE +19 -0
- data/lib/webpack_rails/node_modules/is-object/README.md +55 -0
- data/lib/webpack_rails/node_modules/is-object/index.js +5 -0
- data/lib/webpack_rails/node_modules/is-object/package.json +91 -0
- data/lib/webpack_rails/node_modules/is-object/test/index.js +23 -0
- data/lib/webpack_rails/node_modules/is-string/CHANGELOG.md +19 -0
- data/lib/webpack_rails/node_modules/is-string/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/is-string/Makefile +61 -0
- data/lib/webpack_rails/node_modules/is-string/README.md +57 -0
- data/lib/webpack_rails/node_modules/is-string/index.js +20 -0
- data/lib/webpack_rails/node_modules/is-string/package.json +93 -0
- data/lib/webpack_rails/node_modules/is-string/test.js +36 -0
- data/lib/webpack_rails/node_modules/js-string-escape/CHANGELOG.md +9 -0
- data/lib/webpack_rails/node_modules/js-string-escape/LICENSE +21 -0
- data/lib/webpack_rails/node_modules/js-string-escape/README.md +44 -0
- data/lib/webpack_rails/node_modules/js-string-escape/index.js +22 -0
- data/lib/webpack_rails/node_modules/js-string-escape/package.json +63 -0
- data/lib/webpack_rails/node_modules/js-string-escape/test/test.js +43 -0
- data/lib/webpack_rails/node_modules/strip-ansi/index.js +6 -0
- data/lib/webpack_rails/node_modules/strip-ansi/license +21 -0
- data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/index.js +4 -0
- data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/license +21 -0
- data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/package.json +86 -0
- data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +31 -0
- data/lib/webpack_rails/node_modules/strip-ansi/package.json +85 -0
- data/lib/webpack_rails/node_modules/strip-ansi/readme.md +33 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/README.md +109 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/client-overlay.js +35 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/client.js +131 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/README.md +15 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/client.js +30 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/index.html +18 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/package.json +14 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/server.js +41 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/webpack.config.js +22 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/helpers.js +8 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/middleware.js +83 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/History.md +20 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/License.md +19 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/Readme.md +15 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/decode.js +80 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/encode.js +64 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/index.js +4 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/package.json +96 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/test/common-index.js +3 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/test/index.js +210 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/test/tap-index.js +3 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/cli.js +47 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/index.js +6 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/index.js +4 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/license +21 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/package.json +86 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +33 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/package.json +89 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/readme.md +43 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/package.json +58 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/process-update.js +105 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/client-test.js +81 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/helpers-test.js +22 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/middleware-test.js +188 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/mocha.opts +1 -0
- data/lib/webpack_rails/node_modules/xtend/LICENCE +19 -0
- data/lib/webpack_rails/node_modules/xtend/Makefile +4 -0
- data/lib/webpack_rails/node_modules/xtend/README.md +32 -0
- data/lib/webpack_rails/node_modules/xtend/immutable.js +17 -0
- data/lib/webpack_rails/node_modules/xtend/mutable.js +15 -0
- data/lib/webpack_rails/node_modules/xtend/package.json +88 -0
- data/lib/webpack_rails/node_modules/xtend/test.js +63 -0
- data/lib/webpack_rails/package.json +22 -0
- data/lib/webpack_rails/processor.rb +28 -9
- data/lib/webpack_rails/require_directive_processor.rb +51 -0
- data/lib/webpack_rails/sprockets_environment.rb +45 -0
- data/lib/webpack_rails/task.rb +51 -22
- data/lib/webpack_rails/webpack-task-dev-server.js +122 -0
- data/lib/webpack_rails/{webpack-task.js → webpack-task-watch.js} +0 -0
- data/lib/webpack_rails/webpack.rake +5 -5
- data/lib/webpack_rails.rb +1 -3
- metadata +346 -5
- data/lib/webpack_rails/sprockets_base_webpack.rb +0 -14
- data/lib/webpack_rails/sprockets_index_webpack.rb +0 -15
@@ -0,0 +1,90 @@
|
|
1
|
+
0.4.0 / 2015-06-14
|
2
|
+
==================
|
3
|
+
|
4
|
+
* Fix a false-positive when unpiping in Node.js 0.8
|
5
|
+
* Support `statusCode` property on `Error` objects
|
6
|
+
* Use `unpipe` module for unpiping requests
|
7
|
+
* deps: escape-html@1.0.2
|
8
|
+
* deps: on-finished@~2.3.0
|
9
|
+
- Add defined behavior for HTTP `CONNECT` requests
|
10
|
+
- Add defined behavior for HTTP `Upgrade` requests
|
11
|
+
- deps: ee-first@1.1.1
|
12
|
+
* perf: enable strict mode
|
13
|
+
* perf: remove argument reassignment
|
14
|
+
|
15
|
+
0.3.6 / 2015-05-11
|
16
|
+
==================
|
17
|
+
|
18
|
+
* deps: debug@~2.2.0
|
19
|
+
- deps: ms@0.7.1
|
20
|
+
|
21
|
+
0.3.5 / 2015-04-22
|
22
|
+
==================
|
23
|
+
|
24
|
+
* deps: on-finished@~2.2.1
|
25
|
+
- Fix `isFinished(req)` when data buffered
|
26
|
+
|
27
|
+
0.3.4 / 2015-03-15
|
28
|
+
==================
|
29
|
+
|
30
|
+
* deps: debug@~2.1.3
|
31
|
+
- Fix high intensity foreground color for bold
|
32
|
+
- deps: ms@0.7.0
|
33
|
+
|
34
|
+
0.3.3 / 2015-01-01
|
35
|
+
==================
|
36
|
+
|
37
|
+
* deps: debug@~2.1.1
|
38
|
+
* deps: on-finished@~2.2.0
|
39
|
+
|
40
|
+
0.3.2 / 2014-10-22
|
41
|
+
==================
|
42
|
+
|
43
|
+
* deps: on-finished@~2.1.1
|
44
|
+
- Fix handling of pipelined requests
|
45
|
+
|
46
|
+
0.3.1 / 2014-10-16
|
47
|
+
==================
|
48
|
+
|
49
|
+
* deps: debug@~2.1.0
|
50
|
+
- Implement `DEBUG_FD` env variable support
|
51
|
+
|
52
|
+
0.3.0 / 2014-09-17
|
53
|
+
==================
|
54
|
+
|
55
|
+
* Terminate in progress response only on error
|
56
|
+
* Use `on-finished` to determine request status
|
57
|
+
|
58
|
+
0.2.0 / 2014-09-03
|
59
|
+
==================
|
60
|
+
|
61
|
+
* Set `X-Content-Type-Options: nosniff` header
|
62
|
+
* deps: debug@~2.0.0
|
63
|
+
|
64
|
+
0.1.0 / 2014-07-16
|
65
|
+
==================
|
66
|
+
|
67
|
+
* Respond after request fully read
|
68
|
+
- prevents hung responses and socket hang ups
|
69
|
+
* deps: debug@1.0.4
|
70
|
+
|
71
|
+
0.0.3 / 2014-07-11
|
72
|
+
==================
|
73
|
+
|
74
|
+
* deps: debug@1.0.3
|
75
|
+
- Add support for multiple wildcards in namespaces
|
76
|
+
|
77
|
+
0.0.2 / 2014-06-19
|
78
|
+
==================
|
79
|
+
|
80
|
+
* Handle invalid status codes
|
81
|
+
|
82
|
+
0.0.1 / 2014-06-05
|
83
|
+
==================
|
84
|
+
|
85
|
+
* deps: debug@1.0.2
|
86
|
+
|
87
|
+
0.0.0 / 2014-06-05
|
88
|
+
==================
|
89
|
+
|
90
|
+
* Extracted from connect/express
|
@@ -0,0 +1,22 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,133 @@
|
|
1
|
+
# finalhandler
|
2
|
+
|
3
|
+
[![NPM Version][npm-image]][npm-url]
|
4
|
+
[![NPM Downloads][downloads-image]][downloads-url]
|
5
|
+
[![Node.js Version][node-image]][node-url]
|
6
|
+
[![Build Status][travis-image]][travis-url]
|
7
|
+
[![Test Coverage][coveralls-image]][coveralls-url]
|
8
|
+
|
9
|
+
Node.js function to invoke as the final step to respond to HTTP request.
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
```sh
|
14
|
+
$ npm install finalhandler
|
15
|
+
```
|
16
|
+
|
17
|
+
## API
|
18
|
+
|
19
|
+
```js
|
20
|
+
var finalhandler = require('finalhandler')
|
21
|
+
```
|
22
|
+
|
23
|
+
### finalhandler(req, res, [options])
|
24
|
+
|
25
|
+
Returns function to be invoked as the final step for the given `req` and `res`.
|
26
|
+
This function is to be invoked as `fn(err)`. If `err` is falsy, the handler will
|
27
|
+
write out a 404 response to the `res`. If it is truthy, an error response will
|
28
|
+
be written out to the `res`, and `res.statusCode` is set from `err.status`.
|
29
|
+
|
30
|
+
The final handler will also unpipe anything from `req` when it is invoked.
|
31
|
+
|
32
|
+
#### options.env
|
33
|
+
|
34
|
+
By default, the environment is determined by `NODE_ENV` variable, but it can be
|
35
|
+
overridden by this option.
|
36
|
+
|
37
|
+
#### options.onerror
|
38
|
+
|
39
|
+
Provide a function to be called with the `err` when it exists. Can be used for
|
40
|
+
writing errors to a central location without excessive function generation. Called
|
41
|
+
as `onerror(err, req, res)`.
|
42
|
+
|
43
|
+
## Examples
|
44
|
+
|
45
|
+
### always 404
|
46
|
+
|
47
|
+
```js
|
48
|
+
var finalhandler = require('finalhandler')
|
49
|
+
var http = require('http')
|
50
|
+
|
51
|
+
var server = http.createServer(function (req, res) {
|
52
|
+
var done = finalhandler(req, res)
|
53
|
+
done()
|
54
|
+
})
|
55
|
+
|
56
|
+
server.listen(3000)
|
57
|
+
```
|
58
|
+
|
59
|
+
### perform simple action
|
60
|
+
|
61
|
+
```js
|
62
|
+
var finalhandler = require('finalhandler')
|
63
|
+
var fs = require('fs')
|
64
|
+
var http = require('http')
|
65
|
+
|
66
|
+
var server = http.createServer(function (req, res) {
|
67
|
+
var done = finalhandler(req, res)
|
68
|
+
|
69
|
+
fs.readFile('index.html', function (err, buf) {
|
70
|
+
if (err) return done(err)
|
71
|
+
res.setHeader('Content-Type', 'text/html')
|
72
|
+
res.end(buf)
|
73
|
+
})
|
74
|
+
})
|
75
|
+
|
76
|
+
server.listen(3000)
|
77
|
+
```
|
78
|
+
|
79
|
+
### use with middleware-style functions
|
80
|
+
|
81
|
+
```js
|
82
|
+
var finalhandler = require('finalhandler')
|
83
|
+
var http = require('http')
|
84
|
+
var serveStatic = require('serve-static')
|
85
|
+
|
86
|
+
var serve = serveStatic('public')
|
87
|
+
|
88
|
+
var server = http.createServer(function (req, res) {
|
89
|
+
var done = finalhandler(req, res)
|
90
|
+
serve(req, res, done)
|
91
|
+
})
|
92
|
+
|
93
|
+
server.listen(3000)
|
94
|
+
```
|
95
|
+
|
96
|
+
### keep log of all errors
|
97
|
+
|
98
|
+
```js
|
99
|
+
var finalhandler = require('finalhandler')
|
100
|
+
var fs = require('fs')
|
101
|
+
var http = require('http')
|
102
|
+
|
103
|
+
var server = http.createServer(function (req, res) {
|
104
|
+
var done = finalhandler(req, res, {onerror: logerror})
|
105
|
+
|
106
|
+
fs.readFile('index.html', function (err, buf) {
|
107
|
+
if (err) return done(err)
|
108
|
+
res.setHeader('Content-Type', 'text/html')
|
109
|
+
res.end(buf)
|
110
|
+
})
|
111
|
+
})
|
112
|
+
|
113
|
+
server.listen(3000)
|
114
|
+
|
115
|
+
function logerror(err) {
|
116
|
+
console.error(err.stack || err.toString())
|
117
|
+
}
|
118
|
+
```
|
119
|
+
|
120
|
+
## License
|
121
|
+
|
122
|
+
[MIT](LICENSE)
|
123
|
+
|
124
|
+
[npm-image]: https://img.shields.io/npm/v/finalhandler.svg
|
125
|
+
[npm-url]: https://npmjs.org/package/finalhandler
|
126
|
+
[node-image]: https://img.shields.io/node/v/finalhandler.svg
|
127
|
+
[node-url]: http://nodejs.org/download/
|
128
|
+
[travis-image]: https://img.shields.io/travis/pillarjs/finalhandler.svg
|
129
|
+
[travis-url]: https://travis-ci.org/pillarjs/finalhandler
|
130
|
+
[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg
|
131
|
+
[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master
|
132
|
+
[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg
|
133
|
+
[downloads-url]: https://npmjs.org/package/finalhandler
|
@@ -0,0 +1,151 @@
|
|
1
|
+
/*!
|
2
|
+
* finalhandler
|
3
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
4
|
+
* MIT Licensed
|
5
|
+
*/
|
6
|
+
|
7
|
+
'use strict'
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Module dependencies.
|
11
|
+
* @private
|
12
|
+
*/
|
13
|
+
|
14
|
+
var debug = require('debug')('finalhandler')
|
15
|
+
var escapeHtml = require('escape-html')
|
16
|
+
var http = require('http')
|
17
|
+
var onFinished = require('on-finished')
|
18
|
+
var unpipe = require('unpipe')
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Module variables.
|
22
|
+
* @private
|
23
|
+
*/
|
24
|
+
|
25
|
+
/* istanbul ignore next */
|
26
|
+
var defer = typeof setImmediate === 'function'
|
27
|
+
? setImmediate
|
28
|
+
: function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
|
29
|
+
var isFinished = onFinished.isFinished
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Module exports.
|
33
|
+
* @public
|
34
|
+
*/
|
35
|
+
|
36
|
+
module.exports = finalhandler
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Create a function to handle the final response.
|
40
|
+
*
|
41
|
+
* @param {Request} req
|
42
|
+
* @param {Response} res
|
43
|
+
* @param {Object} [options]
|
44
|
+
* @return {Function}
|
45
|
+
* @public
|
46
|
+
*/
|
47
|
+
|
48
|
+
function finalhandler(req, res, options) {
|
49
|
+
var opts = options || {}
|
50
|
+
|
51
|
+
// get environment
|
52
|
+
var env = opts.env || process.env.NODE_ENV || 'development'
|
53
|
+
|
54
|
+
// get error callback
|
55
|
+
var onerror = opts.onerror
|
56
|
+
|
57
|
+
return function (err) {
|
58
|
+
var status = res.statusCode
|
59
|
+
|
60
|
+
// ignore 404 on in-flight response
|
61
|
+
if (!err && res._header) {
|
62
|
+
debug('cannot 404 after headers sent')
|
63
|
+
return
|
64
|
+
}
|
65
|
+
|
66
|
+
// unhandled error
|
67
|
+
if (err) {
|
68
|
+
// respect err.statusCode
|
69
|
+
if (err.statusCode) {
|
70
|
+
status = err.statusCode
|
71
|
+
}
|
72
|
+
|
73
|
+
// respect err.status
|
74
|
+
if (err.status) {
|
75
|
+
status = err.status
|
76
|
+
}
|
77
|
+
|
78
|
+
// default status code to 500
|
79
|
+
if (!status || status < 400) {
|
80
|
+
status = 500
|
81
|
+
}
|
82
|
+
|
83
|
+
// production gets a basic error message
|
84
|
+
var msg = env === 'production'
|
85
|
+
? http.STATUS_CODES[status]
|
86
|
+
: err.stack || err.toString()
|
87
|
+
msg = escapeHtml(msg)
|
88
|
+
.replace(/\n/g, '<br>')
|
89
|
+
.replace(/ /g, ' ') + '\n'
|
90
|
+
} else {
|
91
|
+
status = 404
|
92
|
+
msg = 'Cannot ' + escapeHtml(req.method) + ' ' + escapeHtml(req.originalUrl || req.url) + '\n'
|
93
|
+
}
|
94
|
+
|
95
|
+
debug('default %s', status)
|
96
|
+
|
97
|
+
// schedule onerror callback
|
98
|
+
if (err && onerror) {
|
99
|
+
defer(onerror, err, req, res)
|
100
|
+
}
|
101
|
+
|
102
|
+
// cannot actually respond
|
103
|
+
if (res._header) {
|
104
|
+
return req.socket.destroy()
|
105
|
+
}
|
106
|
+
|
107
|
+
send(req, res, status, msg)
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
/**
|
112
|
+
* Send response.
|
113
|
+
*
|
114
|
+
* @param {IncomingMessage} req
|
115
|
+
* @param {OutgoingMessage} res
|
116
|
+
* @param {number} status
|
117
|
+
* @param {string} body
|
118
|
+
* @private
|
119
|
+
*/
|
120
|
+
|
121
|
+
function send(req, res, status, body) {
|
122
|
+
function write() {
|
123
|
+
res.statusCode = status
|
124
|
+
|
125
|
+
// security header for content sniffing
|
126
|
+
res.setHeader('X-Content-Type-Options', 'nosniff')
|
127
|
+
|
128
|
+
// standard headers
|
129
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8')
|
130
|
+
res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8'))
|
131
|
+
|
132
|
+
if (req.method === 'HEAD') {
|
133
|
+
res.end()
|
134
|
+
return
|
135
|
+
}
|
136
|
+
|
137
|
+
res.end(body, 'utf8')
|
138
|
+
}
|
139
|
+
|
140
|
+
if (isFinished(req)) {
|
141
|
+
write()
|
142
|
+
return
|
143
|
+
}
|
144
|
+
|
145
|
+
// unpipe everything from the request
|
146
|
+
unpipe(req)
|
147
|
+
|
148
|
+
// flush the request
|
149
|
+
onFinished(req, write)
|
150
|
+
req.resume()
|
151
|
+
}
|
data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# unpipe
|
2
|
+
|
3
|
+
[![NPM Version][npm-image]][npm-url]
|
4
|
+
[![NPM Downloads][downloads-image]][downloads-url]
|
5
|
+
[![Node.js Version][node-image]][node-url]
|
6
|
+
[![Build Status][travis-image]][travis-url]
|
7
|
+
[![Test Coverage][coveralls-image]][coveralls-url]
|
8
|
+
|
9
|
+
Unpipe a stream from all destinations.
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
```sh
|
14
|
+
$ npm install unpipe
|
15
|
+
```
|
16
|
+
|
17
|
+
## API
|
18
|
+
|
19
|
+
```js
|
20
|
+
var unpipe = require('unpipe')
|
21
|
+
```
|
22
|
+
|
23
|
+
### unpipe(stream)
|
24
|
+
|
25
|
+
Unpipes all destinations from a given stream. With stream 2+, this is
|
26
|
+
equivalent to `stream.unpipe()`. When used with streams 1 style streams
|
27
|
+
(typically Node.js 0.8 and below), this module attempts to undo the
|
28
|
+
actions done in `stream.pipe(dest)`.
|
29
|
+
|
30
|
+
## License
|
31
|
+
|
32
|
+
[MIT](LICENSE)
|
33
|
+
|
34
|
+
[npm-image]: https://img.shields.io/npm/v/unpipe.svg
|
35
|
+
[npm-url]: https://npmjs.org/package/unpipe
|
36
|
+
[node-image]: https://img.shields.io/node/v/unpipe.svg
|
37
|
+
[node-url]: http://nodejs.org/download/
|
38
|
+
[travis-image]: https://img.shields.io/travis/stream-utils/unpipe.svg
|
39
|
+
[travis-url]: https://travis-ci.org/stream-utils/unpipe
|
40
|
+
[coveralls-image]: https://img.shields.io/coveralls/stream-utils/unpipe.svg
|
41
|
+
[coveralls-url]: https://coveralls.io/r/stream-utils/unpipe?branch=master
|
42
|
+
[downloads-image]: https://img.shields.io/npm/dm/unpipe.svg
|
43
|
+
[downloads-url]: https://npmjs.org/package/unpipe
|
data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
/*!
|
2
|
+
* unpipe
|
3
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
4
|
+
* MIT Licensed
|
5
|
+
*/
|
6
|
+
|
7
|
+
'use strict'
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Module exports.
|
11
|
+
* @public
|
12
|
+
*/
|
13
|
+
|
14
|
+
module.exports = unpipe
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Determine if there are Node.js pipe-like data listeners.
|
18
|
+
* @private
|
19
|
+
*/
|
20
|
+
|
21
|
+
function hasPipeDataListeners(stream) {
|
22
|
+
var listeners = stream.listeners('data')
|
23
|
+
|
24
|
+
for (var i = 0; i < listeners.length; i++) {
|
25
|
+
if (listeners[i].name === 'ondata') {
|
26
|
+
return true
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
return false
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Unpipe a stream from all destinations.
|
35
|
+
*
|
36
|
+
* @param {object} stream
|
37
|
+
* @public
|
38
|
+
*/
|
39
|
+
|
40
|
+
function unpipe(stream) {
|
41
|
+
if (!stream) {
|
42
|
+
throw new TypeError('argument stream is required')
|
43
|
+
}
|
44
|
+
|
45
|
+
if (typeof stream.unpipe === 'function') {
|
46
|
+
// new-style
|
47
|
+
stream.unpipe()
|
48
|
+
return
|
49
|
+
}
|
50
|
+
|
51
|
+
// Node.js 0.8 hack
|
52
|
+
if (!hasPipeDataListeners(stream)) {
|
53
|
+
return
|
54
|
+
}
|
55
|
+
|
56
|
+
var listener
|
57
|
+
var listeners = stream.listeners('close')
|
58
|
+
|
59
|
+
for (var i = 0; i < listeners.length; i++) {
|
60
|
+
listener = listeners[i]
|
61
|
+
|
62
|
+
if (listener.name !== 'cleanup' && listener.name !== 'onclose') {
|
63
|
+
continue
|
64
|
+
}
|
65
|
+
|
66
|
+
// invoke the listener
|
67
|
+
listener.call(stream)
|
68
|
+
}
|
69
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
{
|
2
|
+
"name": "unpipe",
|
3
|
+
"description": "Unpipe a stream from all destinations",
|
4
|
+
"version": "1.0.0",
|
5
|
+
"author": {
|
6
|
+
"name": "Douglas Christopher Wilson",
|
7
|
+
"email": "doug@somethingdoug.com"
|
8
|
+
},
|
9
|
+
"license": "MIT",
|
10
|
+
"repository": {
|
11
|
+
"type": "git",
|
12
|
+
"url": "git+https://github.com/stream-utils/unpipe.git"
|
13
|
+
},
|
14
|
+
"devDependencies": {
|
15
|
+
"istanbul": "0.3.15",
|
16
|
+
"mocha": "2.2.5",
|
17
|
+
"readable-stream": "1.1.13"
|
18
|
+
},
|
19
|
+
"files": [
|
20
|
+
"HISTORY.md",
|
21
|
+
"LICENSE",
|
22
|
+
"README.md",
|
23
|
+
"index.js"
|
24
|
+
],
|
25
|
+
"engines": {
|
26
|
+
"node": ">= 0.8"
|
27
|
+
},
|
28
|
+
"scripts": {
|
29
|
+
"test": "mocha --reporter spec --bail --check-leaks test/",
|
30
|
+
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
|
31
|
+
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
|
32
|
+
},
|
33
|
+
"gitHead": "d2df901c06487430e78dca62b6edb8bb2fc5e99d",
|
34
|
+
"bugs": {
|
35
|
+
"url": "https://github.com/stream-utils/unpipe/issues"
|
36
|
+
},
|
37
|
+
"homepage": "https://github.com/stream-utils/unpipe",
|
38
|
+
"_id": "unpipe@1.0.0",
|
39
|
+
"_shasum": "b2bf4ee8514aae6165b4817829d21b2ef49904ec",
|
40
|
+
"_from": "unpipe@>=1.0.0 <1.1.0",
|
41
|
+
"_npmVersion": "1.4.28",
|
42
|
+
"_npmUser": {
|
43
|
+
"name": "dougwilson",
|
44
|
+
"email": "doug@somethingdoug.com"
|
45
|
+
},
|
46
|
+
"maintainers": [
|
47
|
+
{
|
48
|
+
"name": "dougwilson",
|
49
|
+
"email": "doug@somethingdoug.com"
|
50
|
+
}
|
51
|
+
],
|
52
|
+
"dist": {
|
53
|
+
"shasum": "b2bf4ee8514aae6165b4817829d21b2ef49904ec",
|
54
|
+
"tarball": "http://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
|
55
|
+
},
|
56
|
+
"directories": {},
|
57
|
+
"_resolved": "http://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
58
|
+
"readme": "ERROR: No README data found!"
|
59
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
{
|
2
|
+
"name": "finalhandler",
|
3
|
+
"description": "Node.js final http responder",
|
4
|
+
"version": "0.4.0",
|
5
|
+
"author": {
|
6
|
+
"name": "Douglas Christopher Wilson",
|
7
|
+
"email": "doug@somethingdoug.com"
|
8
|
+
},
|
9
|
+
"license": "MIT",
|
10
|
+
"repository": {
|
11
|
+
"type": "git",
|
12
|
+
"url": "git+https://github.com/pillarjs/finalhandler.git"
|
13
|
+
},
|
14
|
+
"dependencies": {
|
15
|
+
"debug": "~2.2.0",
|
16
|
+
"escape-html": "1.0.2",
|
17
|
+
"on-finished": "~2.3.0",
|
18
|
+
"unpipe": "~1.0.0"
|
19
|
+
},
|
20
|
+
"devDependencies": {
|
21
|
+
"istanbul": "0.3.15",
|
22
|
+
"mocha": "2.2.5",
|
23
|
+
"readable-stream": "2.0.0",
|
24
|
+
"supertest": "1.0.1"
|
25
|
+
},
|
26
|
+
"files": [
|
27
|
+
"LICENSE",
|
28
|
+
"HISTORY.md",
|
29
|
+
"index.js"
|
30
|
+
],
|
31
|
+
"engines": {
|
32
|
+
"node": ">= 0.8"
|
33
|
+
},
|
34
|
+
"scripts": {
|
35
|
+
"test": "mocha --reporter spec --bail --check-leaks test/",
|
36
|
+
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
|
37
|
+
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
|
38
|
+
},
|
39
|
+
"gitHead": "fe4e4de9ebb0f3831493ad75119ee6ba40542853",
|
40
|
+
"bugs": {
|
41
|
+
"url": "https://github.com/pillarjs/finalhandler/issues"
|
42
|
+
},
|
43
|
+
"homepage": "https://github.com/pillarjs/finalhandler",
|
44
|
+
"_id": "finalhandler@0.4.0",
|
45
|
+
"_shasum": "965a52d9e8d05d2b857548541fb89b53a2497d9b",
|
46
|
+
"_from": "finalhandler@0.4.0",
|
47
|
+
"_npmVersion": "1.4.28",
|
48
|
+
"_npmUser": {
|
49
|
+
"name": "dougwilson",
|
50
|
+
"email": "doug@somethingdoug.com"
|
51
|
+
},
|
52
|
+
"maintainers": [
|
53
|
+
{
|
54
|
+
"name": "dougwilson",
|
55
|
+
"email": "doug@somethingdoug.com"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"name": "jongleberry",
|
59
|
+
"email": "jonathanrichardong@gmail.com"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"name": "tjholowaychuk",
|
63
|
+
"email": "tj@vision-media.ca"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"name": "fishrock123",
|
67
|
+
"email": "fishrock123@rocketmail.com"
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"name": "defunctzombie",
|
71
|
+
"email": "shtylman@gmail.com"
|
72
|
+
}
|
73
|
+
],
|
74
|
+
"dist": {
|
75
|
+
"shasum": "965a52d9e8d05d2b857548541fb89b53a2497d9b",
|
76
|
+
"tarball": "http://registry.npmjs.org/finalhandler/-/finalhandler-0.4.0.tgz"
|
77
|
+
},
|
78
|
+
"directories": {},
|
79
|
+
"_resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-0.4.0.tgz",
|
80
|
+
"readme": "ERROR: No README data found!"
|
81
|
+
}
|