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,66 @@
|
|
1
|
+
{
|
2
|
+
"name": "depd",
|
3
|
+
"description": "Deprecate all the things",
|
4
|
+
"version": "1.0.1",
|
5
|
+
"author": {
|
6
|
+
"name": "Douglas Christopher Wilson",
|
7
|
+
"email": "doug@somethingdoug.com"
|
8
|
+
},
|
9
|
+
"license": "MIT",
|
10
|
+
"keywords": [
|
11
|
+
"deprecate",
|
12
|
+
"deprecated"
|
13
|
+
],
|
14
|
+
"repository": {
|
15
|
+
"type": "git",
|
16
|
+
"url": "git+https://github.com/dougwilson/nodejs-depd.git"
|
17
|
+
},
|
18
|
+
"devDependencies": {
|
19
|
+
"benchmark": "1.0.0",
|
20
|
+
"beautify-benchmark": "0.2.4",
|
21
|
+
"istanbul": "0.3.5",
|
22
|
+
"mocha": "~1.21.5"
|
23
|
+
},
|
24
|
+
"files": [
|
25
|
+
"lib/",
|
26
|
+
"History.md",
|
27
|
+
"LICENSE",
|
28
|
+
"index.js",
|
29
|
+
"Readme.md"
|
30
|
+
],
|
31
|
+
"engines": {
|
32
|
+
"node": ">= 0.6"
|
33
|
+
},
|
34
|
+
"scripts": {
|
35
|
+
"bench": "node benchmark/index.js",
|
36
|
+
"test": "mocha --reporter spec --bail test/",
|
37
|
+
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/",
|
38
|
+
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/"
|
39
|
+
},
|
40
|
+
"gitHead": "769e0f8108463c35a6937a9d634ab19fee45100a",
|
41
|
+
"bugs": {
|
42
|
+
"url": "https://github.com/dougwilson/nodejs-depd/issues"
|
43
|
+
},
|
44
|
+
"homepage": "https://github.com/dougwilson/nodejs-depd",
|
45
|
+
"_id": "depd@1.0.1",
|
46
|
+
"_shasum": "80aec64c9d6d97e65cc2a9caa93c0aa6abf73aaa",
|
47
|
+
"_from": "depd@>=1.0.1 <1.1.0",
|
48
|
+
"_npmVersion": "1.4.28",
|
49
|
+
"_npmUser": {
|
50
|
+
"name": "dougwilson",
|
51
|
+
"email": "doug@somethingdoug.com"
|
52
|
+
},
|
53
|
+
"maintainers": [
|
54
|
+
{
|
55
|
+
"name": "dougwilson",
|
56
|
+
"email": "doug@somethingdoug.com"
|
57
|
+
}
|
58
|
+
],
|
59
|
+
"dist": {
|
60
|
+
"shasum": "80aec64c9d6d97e65cc2a9caa93c0aa6abf73aaa",
|
61
|
+
"tarball": "http://registry.npmjs.org/depd/-/depd-1.0.1.tgz"
|
62
|
+
},
|
63
|
+
"directories": {},
|
64
|
+
"_resolved": "http://registry.npmjs.org/depd/-/depd-1.0.1.tgz",
|
65
|
+
"readme": "ERROR: No README data found!"
|
66
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2012-2013 TJ Holowaychuk
|
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,29 @@
|
|
1
|
+
/*!
|
2
|
+
* escape-html
|
3
|
+
* Copyright(c) 2012-2013 TJ Holowaychuk
|
4
|
+
* MIT Licensed
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Module exports.
|
9
|
+
* @public
|
10
|
+
*/
|
11
|
+
|
12
|
+
module.exports = escapeHtml;
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Escape special characters in the given string of html.
|
16
|
+
*
|
17
|
+
* @param {string} str The string to escape for inserting into HTML
|
18
|
+
* @return {string}
|
19
|
+
* @public
|
20
|
+
*/
|
21
|
+
|
22
|
+
function escapeHtml(html) {
|
23
|
+
return String(html)
|
24
|
+
.replace(/&/g, '&')
|
25
|
+
.replace(/"/g, '"')
|
26
|
+
.replace(/'/g, ''')
|
27
|
+
.replace(/</g, '<')
|
28
|
+
.replace(/>/g, '>');
|
29
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"name": "escape-html",
|
3
|
+
"description": "Escape HTML entities",
|
4
|
+
"version": "1.0.2",
|
5
|
+
"license": "MIT",
|
6
|
+
"keywords": [
|
7
|
+
"escape",
|
8
|
+
"html",
|
9
|
+
"utility"
|
10
|
+
],
|
11
|
+
"repository": {
|
12
|
+
"type": "git",
|
13
|
+
"url": "git+https://github.com/component/escape-html.git"
|
14
|
+
},
|
15
|
+
"files": [
|
16
|
+
"LICENSE",
|
17
|
+
"Readme.md",
|
18
|
+
"index.js"
|
19
|
+
],
|
20
|
+
"gitHead": "2477a23ae56f75e0a5622a20b5b55da00de3a23b",
|
21
|
+
"bugs": {
|
22
|
+
"url": "https://github.com/component/escape-html/issues"
|
23
|
+
},
|
24
|
+
"homepage": "https://github.com/component/escape-html",
|
25
|
+
"_id": "escape-html@1.0.2",
|
26
|
+
"scripts": {},
|
27
|
+
"_shasum": "d77d32fa98e38c2f41ae85e9278e0e0e6ba1022c",
|
28
|
+
"_from": "escape-html@1.0.2",
|
29
|
+
"_npmVersion": "1.4.28",
|
30
|
+
"_npmUser": {
|
31
|
+
"name": "dougwilson",
|
32
|
+
"email": "doug@somethingdoug.com"
|
33
|
+
},
|
34
|
+
"maintainers": [
|
35
|
+
{
|
36
|
+
"name": "tjholowaychuk",
|
37
|
+
"email": "tj@vision-media.ca"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"name": "dougwilson",
|
41
|
+
"email": "doug@somethingdoug.com"
|
42
|
+
}
|
43
|
+
],
|
44
|
+
"dist": {
|
45
|
+
"shasum": "d77d32fa98e38c2f41ae85e9278e0e0e6ba1022c",
|
46
|
+
"tarball": "http://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz"
|
47
|
+
},
|
48
|
+
"directories": {},
|
49
|
+
"_resolved": "http://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz",
|
50
|
+
"readme": "ERROR: No README data found!"
|
51
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
1.7.0 / 2015-06-08
|
2
|
+
==================
|
3
|
+
|
4
|
+
* Always include entity length in ETags for hash length extensions
|
5
|
+
* Generate non-Stats ETags using MD5 only (no longer CRC32)
|
6
|
+
* Improve stat performance by removing hashing
|
7
|
+
* Remove base64 padding in ETags to shorten
|
8
|
+
* Use MD5 instead of MD4 in weak ETags over 1KB
|
9
|
+
|
10
|
+
1.6.0 / 2015-05-10
|
11
|
+
==================
|
12
|
+
|
13
|
+
* Improve support for JXcore
|
14
|
+
* Remove requirement of `atime` in the stats object
|
15
|
+
* Support "fake" stats objects in environments without `fs`
|
16
|
+
|
17
|
+
1.5.1 / 2014-11-19
|
18
|
+
==================
|
19
|
+
|
20
|
+
* deps: crc@3.2.1
|
21
|
+
- Minor fixes
|
22
|
+
|
23
|
+
1.5.0 / 2014-10-14
|
24
|
+
==================
|
25
|
+
|
26
|
+
* Improve string performance
|
27
|
+
* Slightly improve speed for weak ETags over 1KB
|
28
|
+
|
29
|
+
1.4.0 / 2014-09-21
|
30
|
+
==================
|
31
|
+
|
32
|
+
* Support "fake" stats objects
|
33
|
+
* Support Node.js 0.6
|
34
|
+
|
35
|
+
1.3.1 / 2014-09-14
|
36
|
+
==================
|
37
|
+
|
38
|
+
* Use the (new and improved) `crc` for crc32
|
39
|
+
|
40
|
+
1.3.0 / 2014-08-29
|
41
|
+
==================
|
42
|
+
|
43
|
+
* Default strings to strong ETags
|
44
|
+
* Improve speed for weak ETags over 1KB
|
45
|
+
|
46
|
+
1.2.1 / 2014-08-29
|
47
|
+
==================
|
48
|
+
|
49
|
+
* Use the (much faster) `buffer-crc32` for crc32
|
50
|
+
|
51
|
+
1.2.0 / 2014-08-24
|
52
|
+
==================
|
53
|
+
|
54
|
+
* Add support for file stat objects
|
55
|
+
|
56
|
+
1.1.0 / 2014-08-24
|
57
|
+
==================
|
58
|
+
|
59
|
+
* Add fast-path for empty entity
|
60
|
+
* Add weak ETag generation
|
61
|
+
* Shrink size of generated ETags
|
62
|
+
|
63
|
+
1.0.1 / 2014-08-24
|
64
|
+
==================
|
65
|
+
|
66
|
+
* Fix behavior of string containing Unicode
|
67
|
+
|
68
|
+
1.0.0 / 2014-05-18
|
69
|
+
==================
|
70
|
+
|
71
|
+
* Initial release
|
@@ -0,0 +1,22 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2014-2015 Douglas Christopher Wilson
|
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,165 @@
|
|
1
|
+
# etag
|
2
|
+
|
3
|
+
[![NPM Version][npm-image]][npm-url]
|
4
|
+
[![NPM Downloads][downloads-image]][downloads-url]
|
5
|
+
[![Node.js Version][node-version-image]][node-version-url]
|
6
|
+
[![Build Status][travis-image]][travis-url]
|
7
|
+
[![Test Coverage][coveralls-image]][coveralls-url]
|
8
|
+
|
9
|
+
Create simple ETags
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
```sh
|
14
|
+
$ npm install etag
|
15
|
+
```
|
16
|
+
|
17
|
+
## API
|
18
|
+
|
19
|
+
```js
|
20
|
+
var etag = require('etag')
|
21
|
+
```
|
22
|
+
|
23
|
+
### etag(entity, [options])
|
24
|
+
|
25
|
+
Generate a strong ETag for the given entity. This should be the complete
|
26
|
+
body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
|
27
|
+
default, a strong ETag is generated except for `fs.Stats`, which will
|
28
|
+
generate a weak ETag (this can be overwritten by `options.weak`).
|
29
|
+
|
30
|
+
```js
|
31
|
+
res.setHeader('ETag', etag(body))
|
32
|
+
```
|
33
|
+
|
34
|
+
#### Options
|
35
|
+
|
36
|
+
`etag` accepts these properties in the options object.
|
37
|
+
|
38
|
+
##### weak
|
39
|
+
|
40
|
+
Specifies if the generated ETag will include the weak validator mark (that
|
41
|
+
is, the leading `W/`). The actual entity tag is the same. The default value
|
42
|
+
is `false`, unless the `entity` is `fs.Stats`, in which case it is `true`.
|
43
|
+
|
44
|
+
## Testing
|
45
|
+
|
46
|
+
```sh
|
47
|
+
$ npm test
|
48
|
+
```
|
49
|
+
|
50
|
+
## Benchmark
|
51
|
+
|
52
|
+
```bash
|
53
|
+
$ npm run-script bench
|
54
|
+
|
55
|
+
> etag@1.6.0 bench nodejs-etag
|
56
|
+
> node benchmark/index.js
|
57
|
+
|
58
|
+
http_parser@1.0
|
59
|
+
node@0.10.33
|
60
|
+
v8@3.14.5.9
|
61
|
+
ares@1.9.0-DEV
|
62
|
+
uv@0.10.29
|
63
|
+
zlib@1.2.3
|
64
|
+
modules@11
|
65
|
+
openssl@1.0.1j
|
66
|
+
|
67
|
+
> node benchmark/body0-100b.js
|
68
|
+
|
69
|
+
100B body
|
70
|
+
|
71
|
+
1 test completed.
|
72
|
+
2 tests completed.
|
73
|
+
3 tests completed.
|
74
|
+
4 tests completed.
|
75
|
+
|
76
|
+
* buffer - strong x 289,198 ops/sec ±1.09% (190 runs sampled)
|
77
|
+
* buffer - weak x 287,838 ops/sec ±0.91% (189 runs sampled)
|
78
|
+
* string - strong x 284,586 ops/sec ±1.05% (192 runs sampled)
|
79
|
+
* string - weak x 287,439 ops/sec ±0.82% (192 runs sampled)
|
80
|
+
|
81
|
+
> node benchmark/body1-1kb.js
|
82
|
+
|
83
|
+
1KB body
|
84
|
+
|
85
|
+
1 test completed.
|
86
|
+
2 tests completed.
|
87
|
+
3 tests completed.
|
88
|
+
4 tests completed.
|
89
|
+
|
90
|
+
* buffer - strong x 212,423 ops/sec ±0.75% (193 runs sampled)
|
91
|
+
* buffer - weak x 211,871 ops/sec ±0.74% (194 runs sampled)
|
92
|
+
string - strong x 205,291 ops/sec ±0.86% (194 runs sampled)
|
93
|
+
string - weak x 208,463 ops/sec ±0.79% (192 runs sampled)
|
94
|
+
|
95
|
+
> node benchmark/body2-5kb.js
|
96
|
+
|
97
|
+
5KB body
|
98
|
+
|
99
|
+
1 test completed.
|
100
|
+
2 tests completed.
|
101
|
+
3 tests completed.
|
102
|
+
4 tests completed.
|
103
|
+
|
104
|
+
* buffer - strong x 92,901 ops/sec ±0.58% (195 runs sampled)
|
105
|
+
* buffer - weak x 93,045 ops/sec ±0.65% (192 runs sampled)
|
106
|
+
string - strong x 89,621 ops/sec ±0.68% (194 runs sampled)
|
107
|
+
string - weak x 90,070 ops/sec ±0.70% (196 runs sampled)
|
108
|
+
|
109
|
+
> node benchmark/body3-10kb.js
|
110
|
+
|
111
|
+
10KB body
|
112
|
+
|
113
|
+
1 test completed.
|
114
|
+
2 tests completed.
|
115
|
+
3 tests completed.
|
116
|
+
4 tests completed.
|
117
|
+
|
118
|
+
* buffer - strong x 54,220 ops/sec ±0.85% (192 runs sampled)
|
119
|
+
* buffer - weak x 54,069 ops/sec ±0.83% (191 runs sampled)
|
120
|
+
string - strong x 53,078 ops/sec ±0.53% (194 runs sampled)
|
121
|
+
string - weak x 53,849 ops/sec ±0.47% (197 runs sampled)
|
122
|
+
|
123
|
+
> node benchmark/body4-100kb.js
|
124
|
+
|
125
|
+
100KB body
|
126
|
+
|
127
|
+
1 test completed.
|
128
|
+
2 tests completed.
|
129
|
+
3 tests completed.
|
130
|
+
4 tests completed.
|
131
|
+
|
132
|
+
* buffer - strong x 6,673 ops/sec ±0.15% (197 runs sampled)
|
133
|
+
* buffer - weak x 6,716 ops/sec ±0.12% (198 runs sampled)
|
134
|
+
string - strong x 6,357 ops/sec ±0.14% (197 runs sampled)
|
135
|
+
string - weak x 6,344 ops/sec ±0.21% (197 runs sampled)
|
136
|
+
|
137
|
+
> node benchmark/stats.js
|
138
|
+
|
139
|
+
stats
|
140
|
+
|
141
|
+
1 test completed.
|
142
|
+
2 tests completed.
|
143
|
+
3 tests completed.
|
144
|
+
4 tests completed.
|
145
|
+
|
146
|
+
* real - strong x 1,671,989 ops/sec ±0.13% (197 runs sampled)
|
147
|
+
* real - weak x 1,681,297 ops/sec ±0.12% (198 runs sampled)
|
148
|
+
fake - strong x 927,063 ops/sec ±0.14% (198 runs sampled)
|
149
|
+
fake - weak x 914,461 ops/sec ±0.41% (191 runs sampled)
|
150
|
+
```
|
151
|
+
|
152
|
+
## License
|
153
|
+
|
154
|
+
[MIT](LICENSE)
|
155
|
+
|
156
|
+
[npm-image]: https://img.shields.io/npm/v/etag.svg
|
157
|
+
[npm-url]: https://npmjs.org/package/etag
|
158
|
+
[node-version-image]: https://img.shields.io/node/v/etag.svg
|
159
|
+
[node-version-url]: http://nodejs.org/download/
|
160
|
+
[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg
|
161
|
+
[travis-url]: https://travis-ci.org/jshttp/etag
|
162
|
+
[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg
|
163
|
+
[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master
|
164
|
+
[downloads-image]: https://img.shields.io/npm/dm/etag.svg
|
165
|
+
[downloads-url]: https://npmjs.org/package/etag
|
@@ -0,0 +1,132 @@
|
|
1
|
+
/*!
|
2
|
+
* etag
|
3
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
4
|
+
* MIT Licensed
|
5
|
+
*/
|
6
|
+
|
7
|
+
'use strict'
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Module exports.
|
11
|
+
* @public
|
12
|
+
*/
|
13
|
+
|
14
|
+
module.exports = etag
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Module dependencies.
|
18
|
+
* @private
|
19
|
+
*/
|
20
|
+
|
21
|
+
var crypto = require('crypto')
|
22
|
+
var Stats = require('fs').Stats
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Module variables.
|
26
|
+
* @private
|
27
|
+
*/
|
28
|
+
|
29
|
+
var base64PadCharRegExp = /=+$/
|
30
|
+
var toString = Object.prototype.toString
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Generate an entity tag.
|
34
|
+
*
|
35
|
+
* @param {Buffer|string} entity
|
36
|
+
* @return {string}
|
37
|
+
* @private
|
38
|
+
*/
|
39
|
+
|
40
|
+
function entitytag(entity) {
|
41
|
+
if (entity.length === 0) {
|
42
|
+
// fast-path empty
|
43
|
+
return '"0-1B2M2Y8AsgTpgAmY7PhCfg"'
|
44
|
+
}
|
45
|
+
|
46
|
+
// compute hash of entity
|
47
|
+
var hash = crypto
|
48
|
+
.createHash('md5')
|
49
|
+
.update(entity, 'utf8')
|
50
|
+
.digest('base64')
|
51
|
+
.replace(base64PadCharRegExp, '')
|
52
|
+
|
53
|
+
// compute length of entity
|
54
|
+
var len = typeof entity === 'string'
|
55
|
+
? Buffer.byteLength(entity, 'utf8')
|
56
|
+
: entity.length
|
57
|
+
|
58
|
+
return '"' + len.toString(16) + '-' + hash + '"'
|
59
|
+
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Create a simple ETag.
|
63
|
+
*
|
64
|
+
* @param {string|Buffer|Stats} entity
|
65
|
+
* @param {object} [options]
|
66
|
+
* @param {boolean} [options.weak]
|
67
|
+
* @return {String}
|
68
|
+
* @public
|
69
|
+
*/
|
70
|
+
|
71
|
+
function etag(entity, options) {
|
72
|
+
if (entity == null) {
|
73
|
+
throw new TypeError('argument entity is required')
|
74
|
+
}
|
75
|
+
|
76
|
+
// support fs.Stats object
|
77
|
+
var isStats = isstats(entity)
|
78
|
+
var weak = options && typeof options.weak === 'boolean'
|
79
|
+
? options.weak
|
80
|
+
: isStats
|
81
|
+
|
82
|
+
// validate argument
|
83
|
+
if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) {
|
84
|
+
throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
|
85
|
+
}
|
86
|
+
|
87
|
+
// generate entity tag
|
88
|
+
var tag = isStats
|
89
|
+
? stattag(entity)
|
90
|
+
: entitytag(entity)
|
91
|
+
|
92
|
+
return weak
|
93
|
+
? 'W/' + tag
|
94
|
+
: tag
|
95
|
+
}
|
96
|
+
|
97
|
+
/**
|
98
|
+
* Determine if object is a Stats object.
|
99
|
+
*
|
100
|
+
* @param {object} obj
|
101
|
+
* @return {boolean}
|
102
|
+
* @api private
|
103
|
+
*/
|
104
|
+
|
105
|
+
function isstats(obj) {
|
106
|
+
// genuine fs.Stats
|
107
|
+
if (typeof Stats === 'function' && obj instanceof Stats) {
|
108
|
+
return true
|
109
|
+
}
|
110
|
+
|
111
|
+
// quack quack
|
112
|
+
return obj && typeof obj === 'object'
|
113
|
+
&& 'ctime' in obj && toString.call(obj.ctime) === '[object Date]'
|
114
|
+
&& 'mtime' in obj && toString.call(obj.mtime) === '[object Date]'
|
115
|
+
&& 'ino' in obj && typeof obj.ino === 'number'
|
116
|
+
&& 'size' in obj && typeof obj.size === 'number'
|
117
|
+
}
|
118
|
+
|
119
|
+
/**
|
120
|
+
* Generate a tag for a stat.
|
121
|
+
*
|
122
|
+
* @param {object} stat
|
123
|
+
* @return {string}
|
124
|
+
* @private
|
125
|
+
*/
|
126
|
+
|
127
|
+
function stattag(stat) {
|
128
|
+
var mtime = stat.mtime.getTime().toString(16)
|
129
|
+
var size = stat.size.toString(16)
|
130
|
+
|
131
|
+
return '"' + size + '-' + mtime + '"'
|
132
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
{
|
2
|
+
"name": "etag",
|
3
|
+
"description": "Create simple ETags",
|
4
|
+
"version": "1.7.0",
|
5
|
+
"contributors": [
|
6
|
+
{
|
7
|
+
"name": "Douglas Christopher Wilson",
|
8
|
+
"email": "doug@somethingdoug.com"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"name": "David Björklund",
|
12
|
+
"email": "david.bjorklund@gmail.com"
|
13
|
+
}
|
14
|
+
],
|
15
|
+
"license": "MIT",
|
16
|
+
"keywords": [
|
17
|
+
"etag",
|
18
|
+
"http",
|
19
|
+
"res"
|
20
|
+
],
|
21
|
+
"repository": {
|
22
|
+
"type": "git",
|
23
|
+
"url": "git+https://github.com/jshttp/etag.git"
|
24
|
+
},
|
25
|
+
"devDependencies": {
|
26
|
+
"benchmark": "1.0.0",
|
27
|
+
"beautify-benchmark": "0.2.4",
|
28
|
+
"istanbul": "0.3.14",
|
29
|
+
"mocha": "~1.21.4",
|
30
|
+
"seedrandom": "2.3.11"
|
31
|
+
},
|
32
|
+
"files": [
|
33
|
+
"LICENSE",
|
34
|
+
"HISTORY.md",
|
35
|
+
"README.md",
|
36
|
+
"index.js"
|
37
|
+
],
|
38
|
+
"engines": {
|
39
|
+
"node": ">= 0.6"
|
40
|
+
},
|
41
|
+
"scripts": {
|
42
|
+
"bench": "node benchmark/index.js",
|
43
|
+
"test": "mocha --reporter spec --bail --check-leaks test/",
|
44
|
+
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
|
45
|
+
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
|
46
|
+
},
|
47
|
+
"gitHead": "a511f5c8c930fd9546dbd88acb080f96bc788cfc",
|
48
|
+
"bugs": {
|
49
|
+
"url": "https://github.com/jshttp/etag/issues"
|
50
|
+
},
|
51
|
+
"homepage": "https://github.com/jshttp/etag",
|
52
|
+
"_id": "etag@1.7.0",
|
53
|
+
"_shasum": "03d30b5f67dd6e632d2945d30d6652731a34d5d8",
|
54
|
+
"_from": "etag@>=1.7.0 <1.8.0",
|
55
|
+
"_npmVersion": "1.4.28",
|
56
|
+
"_npmUser": {
|
57
|
+
"name": "dougwilson",
|
58
|
+
"email": "doug@somethingdoug.com"
|
59
|
+
},
|
60
|
+
"maintainers": [
|
61
|
+
{
|
62
|
+
"name": "dougwilson",
|
63
|
+
"email": "doug@somethingdoug.com"
|
64
|
+
}
|
65
|
+
],
|
66
|
+
"dist": {
|
67
|
+
"shasum": "03d30b5f67dd6e632d2945d30d6652731a34d5d8",
|
68
|
+
"tarball": "http://registry.npmjs.org/etag/-/etag-1.7.0.tgz"
|
69
|
+
},
|
70
|
+
"directories": {},
|
71
|
+
"_resolved": "http://registry.npmjs.org/etag/-/etag-1.7.0.tgz",
|
72
|
+
"readme": "ERROR: No README data found!"
|
73
|
+
}
|