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,197 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* This is the common logic for both the Node.js and web browser
|
4
|
+
* implementations of `debug()`.
|
5
|
+
*
|
6
|
+
* Expose `debug()` as the module.
|
7
|
+
*/
|
8
|
+
|
9
|
+
exports = module.exports = debug;
|
10
|
+
exports.coerce = coerce;
|
11
|
+
exports.disable = disable;
|
12
|
+
exports.enable = enable;
|
13
|
+
exports.enabled = enabled;
|
14
|
+
exports.humanize = require('ms');
|
15
|
+
|
16
|
+
/**
|
17
|
+
* The currently active debug mode names, and names to skip.
|
18
|
+
*/
|
19
|
+
|
20
|
+
exports.names = [];
|
21
|
+
exports.skips = [];
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
25
|
+
*
|
26
|
+
* Valid key names are a single, lowercased letter, i.e. "n".
|
27
|
+
*/
|
28
|
+
|
29
|
+
exports.formatters = {};
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Previously assigned color.
|
33
|
+
*/
|
34
|
+
|
35
|
+
var prevColor = 0;
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Previous log timestamp.
|
39
|
+
*/
|
40
|
+
|
41
|
+
var prevTime;
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Select a color.
|
45
|
+
*
|
46
|
+
* @return {Number}
|
47
|
+
* @api private
|
48
|
+
*/
|
49
|
+
|
50
|
+
function selectColor() {
|
51
|
+
return exports.colors[prevColor++ % exports.colors.length];
|
52
|
+
}
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Create a debugger with the given `namespace`.
|
56
|
+
*
|
57
|
+
* @param {String} namespace
|
58
|
+
* @return {Function}
|
59
|
+
* @api public
|
60
|
+
*/
|
61
|
+
|
62
|
+
function debug(namespace) {
|
63
|
+
|
64
|
+
// define the `disabled` version
|
65
|
+
function disabled() {
|
66
|
+
}
|
67
|
+
disabled.enabled = false;
|
68
|
+
|
69
|
+
// define the `enabled` version
|
70
|
+
function enabled() {
|
71
|
+
|
72
|
+
var self = enabled;
|
73
|
+
|
74
|
+
// set `diff` timestamp
|
75
|
+
var curr = +new Date();
|
76
|
+
var ms = curr - (prevTime || curr);
|
77
|
+
self.diff = ms;
|
78
|
+
self.prev = prevTime;
|
79
|
+
self.curr = curr;
|
80
|
+
prevTime = curr;
|
81
|
+
|
82
|
+
// add the `color` if not set
|
83
|
+
if (null == self.useColors) self.useColors = exports.useColors();
|
84
|
+
if (null == self.color && self.useColors) self.color = selectColor();
|
85
|
+
|
86
|
+
var args = Array.prototype.slice.call(arguments);
|
87
|
+
|
88
|
+
args[0] = exports.coerce(args[0]);
|
89
|
+
|
90
|
+
if ('string' !== typeof args[0]) {
|
91
|
+
// anything else let's inspect with %o
|
92
|
+
args = ['%o'].concat(args);
|
93
|
+
}
|
94
|
+
|
95
|
+
// apply any `formatters` transformations
|
96
|
+
var index = 0;
|
97
|
+
args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
|
98
|
+
// if we encounter an escaped % then don't increase the array index
|
99
|
+
if (match === '%%') return match;
|
100
|
+
index++;
|
101
|
+
var formatter = exports.formatters[format];
|
102
|
+
if ('function' === typeof formatter) {
|
103
|
+
var val = args[index];
|
104
|
+
match = formatter.call(self, val);
|
105
|
+
|
106
|
+
// now we need to remove `args[index]` since it's inlined in the `format`
|
107
|
+
args.splice(index, 1);
|
108
|
+
index--;
|
109
|
+
}
|
110
|
+
return match;
|
111
|
+
});
|
112
|
+
|
113
|
+
if ('function' === typeof exports.formatArgs) {
|
114
|
+
args = exports.formatArgs.apply(self, args);
|
115
|
+
}
|
116
|
+
var logFn = enabled.log || exports.log || console.log.bind(console);
|
117
|
+
logFn.apply(self, args);
|
118
|
+
}
|
119
|
+
enabled.enabled = true;
|
120
|
+
|
121
|
+
var fn = exports.enabled(namespace) ? enabled : disabled;
|
122
|
+
|
123
|
+
fn.namespace = namespace;
|
124
|
+
|
125
|
+
return fn;
|
126
|
+
}
|
127
|
+
|
128
|
+
/**
|
129
|
+
* Enables a debug mode by namespaces. This can include modes
|
130
|
+
* separated by a colon and wildcards.
|
131
|
+
*
|
132
|
+
* @param {String} namespaces
|
133
|
+
* @api public
|
134
|
+
*/
|
135
|
+
|
136
|
+
function enable(namespaces) {
|
137
|
+
exports.save(namespaces);
|
138
|
+
|
139
|
+
var split = (namespaces || '').split(/[\s,]+/);
|
140
|
+
var len = split.length;
|
141
|
+
|
142
|
+
for (var i = 0; i < len; i++) {
|
143
|
+
if (!split[i]) continue; // ignore empty strings
|
144
|
+
namespaces = split[i].replace(/\*/g, '.*?');
|
145
|
+
if (namespaces[0] === '-') {
|
146
|
+
exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
147
|
+
} else {
|
148
|
+
exports.names.push(new RegExp('^' + namespaces + '$'));
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Disable debug output.
|
155
|
+
*
|
156
|
+
* @api public
|
157
|
+
*/
|
158
|
+
|
159
|
+
function disable() {
|
160
|
+
exports.enable('');
|
161
|
+
}
|
162
|
+
|
163
|
+
/**
|
164
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
165
|
+
*
|
166
|
+
* @param {String} name
|
167
|
+
* @return {Boolean}
|
168
|
+
* @api public
|
169
|
+
*/
|
170
|
+
|
171
|
+
function enabled(name) {
|
172
|
+
var i, len;
|
173
|
+
for (i = 0, len = exports.skips.length; i < len; i++) {
|
174
|
+
if (exports.skips[i].test(name)) {
|
175
|
+
return false;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
for (i = 0, len = exports.names.length; i < len; i++) {
|
179
|
+
if (exports.names[i].test(name)) {
|
180
|
+
return true;
|
181
|
+
}
|
182
|
+
}
|
183
|
+
return false;
|
184
|
+
}
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Coerce `val`.
|
188
|
+
*
|
189
|
+
* @param {Mixed} val
|
190
|
+
* @return {Mixed}
|
191
|
+
* @api private
|
192
|
+
*/
|
193
|
+
|
194
|
+
function coerce(val) {
|
195
|
+
if (val instanceof Error) return val.stack || val.message;
|
196
|
+
return val;
|
197
|
+
}
|
@@ -0,0 +1,209 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* Module dependencies.
|
4
|
+
*/
|
5
|
+
|
6
|
+
var tty = require('tty');
|
7
|
+
var util = require('util');
|
8
|
+
|
9
|
+
/**
|
10
|
+
* This is the Node.js implementation of `debug()`.
|
11
|
+
*
|
12
|
+
* Expose `debug()` as the module.
|
13
|
+
*/
|
14
|
+
|
15
|
+
exports = module.exports = require('./debug');
|
16
|
+
exports.log = log;
|
17
|
+
exports.formatArgs = formatArgs;
|
18
|
+
exports.save = save;
|
19
|
+
exports.load = load;
|
20
|
+
exports.useColors = useColors;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Colors.
|
24
|
+
*/
|
25
|
+
|
26
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
27
|
+
|
28
|
+
/**
|
29
|
+
* The file descriptor to write the `debug()` calls to.
|
30
|
+
* Set the `DEBUG_FD` env variable to override with another value. i.e.:
|
31
|
+
*
|
32
|
+
* $ DEBUG_FD=3 node script.js 3>debug.log
|
33
|
+
*/
|
34
|
+
|
35
|
+
var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
|
36
|
+
var stream = 1 === fd ? process.stdout :
|
37
|
+
2 === fd ? process.stderr :
|
38
|
+
createWritableStdioStream(fd);
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
42
|
+
*/
|
43
|
+
|
44
|
+
function useColors() {
|
45
|
+
var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
|
46
|
+
if (0 === debugColors.length) {
|
47
|
+
return tty.isatty(fd);
|
48
|
+
} else {
|
49
|
+
return '0' !== debugColors
|
50
|
+
&& 'no' !== debugColors
|
51
|
+
&& 'false' !== debugColors
|
52
|
+
&& 'disabled' !== debugColors;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* Map %o to `util.inspect()`, since Node doesn't do that out of the box.
|
58
|
+
*/
|
59
|
+
|
60
|
+
var inspect = (4 === util.inspect.length ?
|
61
|
+
// node <= 0.8.x
|
62
|
+
function (v, colors) {
|
63
|
+
return util.inspect(v, void 0, void 0, colors);
|
64
|
+
} :
|
65
|
+
// node > 0.8.x
|
66
|
+
function (v, colors) {
|
67
|
+
return util.inspect(v, { colors: colors });
|
68
|
+
}
|
69
|
+
);
|
70
|
+
|
71
|
+
exports.formatters.o = function(v) {
|
72
|
+
return inspect(v, this.useColors)
|
73
|
+
.replace(/\s*\n\s*/g, ' ');
|
74
|
+
};
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Adds ANSI color escape codes if enabled.
|
78
|
+
*
|
79
|
+
* @api public
|
80
|
+
*/
|
81
|
+
|
82
|
+
function formatArgs() {
|
83
|
+
var args = arguments;
|
84
|
+
var useColors = this.useColors;
|
85
|
+
var name = this.namespace;
|
86
|
+
|
87
|
+
if (useColors) {
|
88
|
+
var c = this.color;
|
89
|
+
|
90
|
+
args[0] = ' \u001b[3' + c + ';1m' + name + ' '
|
91
|
+
+ '\u001b[0m'
|
92
|
+
+ args[0] + '\u001b[3' + c + 'm'
|
93
|
+
+ ' +' + exports.humanize(this.diff) + '\u001b[0m';
|
94
|
+
} else {
|
95
|
+
args[0] = new Date().toUTCString()
|
96
|
+
+ ' ' + name + ' ' + args[0];
|
97
|
+
}
|
98
|
+
return args;
|
99
|
+
}
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Invokes `console.error()` with the specified arguments.
|
103
|
+
*/
|
104
|
+
|
105
|
+
function log() {
|
106
|
+
return stream.write(util.format.apply(this, arguments) + '\n');
|
107
|
+
}
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Save `namespaces`.
|
111
|
+
*
|
112
|
+
* @param {String} namespaces
|
113
|
+
* @api private
|
114
|
+
*/
|
115
|
+
|
116
|
+
function save(namespaces) {
|
117
|
+
if (null == namespaces) {
|
118
|
+
// If you set a process.env field to null or undefined, it gets cast to the
|
119
|
+
// string 'null' or 'undefined'. Just delete instead.
|
120
|
+
delete process.env.DEBUG;
|
121
|
+
} else {
|
122
|
+
process.env.DEBUG = namespaces;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
/**
|
127
|
+
* Load `namespaces`.
|
128
|
+
*
|
129
|
+
* @return {String} returns the previously persisted debug modes
|
130
|
+
* @api private
|
131
|
+
*/
|
132
|
+
|
133
|
+
function load() {
|
134
|
+
return process.env.DEBUG;
|
135
|
+
}
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Copied from `node/src/node.js`.
|
139
|
+
*
|
140
|
+
* XXX: It's lame that node doesn't expose this API out-of-the-box. It also
|
141
|
+
* relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
|
142
|
+
*/
|
143
|
+
|
144
|
+
function createWritableStdioStream (fd) {
|
145
|
+
var stream;
|
146
|
+
var tty_wrap = process.binding('tty_wrap');
|
147
|
+
|
148
|
+
// Note stream._type is used for test-module-load-list.js
|
149
|
+
|
150
|
+
switch (tty_wrap.guessHandleType(fd)) {
|
151
|
+
case 'TTY':
|
152
|
+
stream = new tty.WriteStream(fd);
|
153
|
+
stream._type = 'tty';
|
154
|
+
|
155
|
+
// Hack to have stream not keep the event loop alive.
|
156
|
+
// See https://github.com/joyent/node/issues/1726
|
157
|
+
if (stream._handle && stream._handle.unref) {
|
158
|
+
stream._handle.unref();
|
159
|
+
}
|
160
|
+
break;
|
161
|
+
|
162
|
+
case 'FILE':
|
163
|
+
var fs = require('fs');
|
164
|
+
stream = new fs.SyncWriteStream(fd, { autoClose: false });
|
165
|
+
stream._type = 'fs';
|
166
|
+
break;
|
167
|
+
|
168
|
+
case 'PIPE':
|
169
|
+
case 'TCP':
|
170
|
+
var net = require('net');
|
171
|
+
stream = new net.Socket({
|
172
|
+
fd: fd,
|
173
|
+
readable: false,
|
174
|
+
writable: true
|
175
|
+
});
|
176
|
+
|
177
|
+
// FIXME Should probably have an option in net.Socket to create a
|
178
|
+
// stream from an existing fd which is writable only. But for now
|
179
|
+
// we'll just add this hack and set the `readable` member to false.
|
180
|
+
// Test: ./node test/fixtures/echo.js < /etc/passwd
|
181
|
+
stream.readable = false;
|
182
|
+
stream.read = null;
|
183
|
+
stream._type = 'pipe';
|
184
|
+
|
185
|
+
// FIXME Hack to have stream not keep the event loop alive.
|
186
|
+
// See https://github.com/joyent/node/issues/1726
|
187
|
+
if (stream._handle && stream._handle.unref) {
|
188
|
+
stream._handle.unref();
|
189
|
+
}
|
190
|
+
break;
|
191
|
+
|
192
|
+
default:
|
193
|
+
// Probably an error on in uv_guess_handle()
|
194
|
+
throw new Error('Implement me. Unknown stream file type!');
|
195
|
+
}
|
196
|
+
|
197
|
+
// For supporting legacy API we put the FD here.
|
198
|
+
stream.fd = fd;
|
199
|
+
|
200
|
+
stream._isStdio = true;
|
201
|
+
|
202
|
+
return stream;
|
203
|
+
}
|
204
|
+
|
205
|
+
/**
|
206
|
+
* Enable namespaces listed in `process.env.DEBUG` initially.
|
207
|
+
*/
|
208
|
+
|
209
|
+
exports.enable(load());
|
@@ -0,0 +1,66 @@
|
|
1
|
+
|
2
|
+
0.7.1 / 2015-04-20
|
3
|
+
==================
|
4
|
+
|
5
|
+
* prevent extraordinary long inputs (@evilpacket)
|
6
|
+
* Fixed broken readme link
|
7
|
+
|
8
|
+
0.7.0 / 2014-11-24
|
9
|
+
==================
|
10
|
+
|
11
|
+
* add time abbreviations, updated tests and readme for the new units
|
12
|
+
* fix example in the readme.
|
13
|
+
* add LICENSE file
|
14
|
+
|
15
|
+
0.6.2 / 2013-12-05
|
16
|
+
==================
|
17
|
+
|
18
|
+
* Adding repository section to package.json to suppress warning from NPM.
|
19
|
+
|
20
|
+
0.6.1 / 2013-05-10
|
21
|
+
==================
|
22
|
+
|
23
|
+
* fix singularization [visionmedia]
|
24
|
+
|
25
|
+
0.6.0 / 2013-03-15
|
26
|
+
==================
|
27
|
+
|
28
|
+
* fix minutes
|
29
|
+
|
30
|
+
0.5.1 / 2013-02-24
|
31
|
+
==================
|
32
|
+
|
33
|
+
* add component namespace
|
34
|
+
|
35
|
+
0.5.0 / 2012-11-09
|
36
|
+
==================
|
37
|
+
|
38
|
+
* add short formatting as default and .long option
|
39
|
+
* add .license property to component.json
|
40
|
+
* add version to component.json
|
41
|
+
|
42
|
+
0.4.0 / 2012-10-22
|
43
|
+
==================
|
44
|
+
|
45
|
+
* add rounding to fix crazy decimals
|
46
|
+
|
47
|
+
0.3.0 / 2012-09-07
|
48
|
+
==================
|
49
|
+
|
50
|
+
* fix `ms(<String>)` [visionmedia]
|
51
|
+
|
52
|
+
0.2.0 / 2012-09-03
|
53
|
+
==================
|
54
|
+
|
55
|
+
* add component.json [visionmedia]
|
56
|
+
* add days support [visionmedia]
|
57
|
+
* add hours support [visionmedia]
|
58
|
+
* add minutes support [visionmedia]
|
59
|
+
* add seconds support [visionmedia]
|
60
|
+
* add ms string support [visionmedia]
|
61
|
+
* refactor tests to facilitate ms(number) [visionmedia]
|
62
|
+
|
63
|
+
0.1.0 / 2012-03-07
|
64
|
+
==================
|
65
|
+
|
66
|
+
* Initial release
|
@@ -0,0 +1,20 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# ms.js: miliseconds conversion utility
|
2
|
+
|
3
|
+
```js
|
4
|
+
ms('2 days') // 172800000
|
5
|
+
ms('1d') // 86400000
|
6
|
+
ms('10h') // 36000000
|
7
|
+
ms('2.5 hrs') // 9000000
|
8
|
+
ms('2h') // 7200000
|
9
|
+
ms('1m') // 60000
|
10
|
+
ms('5s') // 5000
|
11
|
+
ms('100') // 100
|
12
|
+
```
|
13
|
+
|
14
|
+
```js
|
15
|
+
ms(60000) // "1m"
|
16
|
+
ms(2 * 60000) // "2m"
|
17
|
+
ms(ms('10 hours')) // "10h"
|
18
|
+
```
|
19
|
+
|
20
|
+
```js
|
21
|
+
ms(60000, { long: true }) // "1 minute"
|
22
|
+
ms(2 * 60000, { long: true }) // "2 minutes"
|
23
|
+
ms(ms('10 hours'), { long: true }) // "10 hours"
|
24
|
+
```
|
25
|
+
|
26
|
+
- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).
|
27
|
+
- If a number is supplied to `ms`, a string with a unit is returned.
|
28
|
+
- If a string that contains the number is supplied, it returns it as
|
29
|
+
a number (e.g: it returns `100` for `'100'`).
|
30
|
+
- If you pass a string with a number and a valid unit, the number of
|
31
|
+
equivalent ms is returned.
|
32
|
+
|
33
|
+
## License
|
34
|
+
|
35
|
+
MIT
|
@@ -0,0 +1,125 @@
|
|
1
|
+
/**
|
2
|
+
* Helpers.
|
3
|
+
*/
|
4
|
+
|
5
|
+
var s = 1000;
|
6
|
+
var m = s * 60;
|
7
|
+
var h = m * 60;
|
8
|
+
var d = h * 24;
|
9
|
+
var y = d * 365.25;
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Parse or format the given `val`.
|
13
|
+
*
|
14
|
+
* Options:
|
15
|
+
*
|
16
|
+
* - `long` verbose formatting [false]
|
17
|
+
*
|
18
|
+
* @param {String|Number} val
|
19
|
+
* @param {Object} options
|
20
|
+
* @return {String|Number}
|
21
|
+
* @api public
|
22
|
+
*/
|
23
|
+
|
24
|
+
module.exports = function(val, options){
|
25
|
+
options = options || {};
|
26
|
+
if ('string' == typeof val) return parse(val);
|
27
|
+
return options.long
|
28
|
+
? long(val)
|
29
|
+
: short(val);
|
30
|
+
};
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Parse the given `str` and return milliseconds.
|
34
|
+
*
|
35
|
+
* @param {String} str
|
36
|
+
* @return {Number}
|
37
|
+
* @api private
|
38
|
+
*/
|
39
|
+
|
40
|
+
function parse(str) {
|
41
|
+
str = '' + str;
|
42
|
+
if (str.length > 10000) return;
|
43
|
+
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
|
44
|
+
if (!match) return;
|
45
|
+
var n = parseFloat(match[1]);
|
46
|
+
var type = (match[2] || 'ms').toLowerCase();
|
47
|
+
switch (type) {
|
48
|
+
case 'years':
|
49
|
+
case 'year':
|
50
|
+
case 'yrs':
|
51
|
+
case 'yr':
|
52
|
+
case 'y':
|
53
|
+
return n * y;
|
54
|
+
case 'days':
|
55
|
+
case 'day':
|
56
|
+
case 'd':
|
57
|
+
return n * d;
|
58
|
+
case 'hours':
|
59
|
+
case 'hour':
|
60
|
+
case 'hrs':
|
61
|
+
case 'hr':
|
62
|
+
case 'h':
|
63
|
+
return n * h;
|
64
|
+
case 'minutes':
|
65
|
+
case 'minute':
|
66
|
+
case 'mins':
|
67
|
+
case 'min':
|
68
|
+
case 'm':
|
69
|
+
return n * m;
|
70
|
+
case 'seconds':
|
71
|
+
case 'second':
|
72
|
+
case 'secs':
|
73
|
+
case 'sec':
|
74
|
+
case 's':
|
75
|
+
return n * s;
|
76
|
+
case 'milliseconds':
|
77
|
+
case 'millisecond':
|
78
|
+
case 'msecs':
|
79
|
+
case 'msec':
|
80
|
+
case 'ms':
|
81
|
+
return n;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Short format for `ms`.
|
87
|
+
*
|
88
|
+
* @param {Number} ms
|
89
|
+
* @return {String}
|
90
|
+
* @api private
|
91
|
+
*/
|
92
|
+
|
93
|
+
function short(ms) {
|
94
|
+
if (ms >= d) return Math.round(ms / d) + 'd';
|
95
|
+
if (ms >= h) return Math.round(ms / h) + 'h';
|
96
|
+
if (ms >= m) return Math.round(ms / m) + 'm';
|
97
|
+
if (ms >= s) return Math.round(ms / s) + 's';
|
98
|
+
return ms + 'ms';
|
99
|
+
}
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Long format for `ms`.
|
103
|
+
*
|
104
|
+
* @param {Number} ms
|
105
|
+
* @return {String}
|
106
|
+
* @api private
|
107
|
+
*/
|
108
|
+
|
109
|
+
function long(ms) {
|
110
|
+
return plural(ms, d, 'day')
|
111
|
+
|| plural(ms, h, 'hour')
|
112
|
+
|| plural(ms, m, 'minute')
|
113
|
+
|| plural(ms, s, 'second')
|
114
|
+
|| ms + ' ms';
|
115
|
+
}
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Pluralization helper.
|
119
|
+
*/
|
120
|
+
|
121
|
+
function plural(ms, n, name) {
|
122
|
+
if (ms < n) return;
|
123
|
+
if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
|
124
|
+
return Math.ceil(ms / n) + ' ' + name + 's';
|
125
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"name": "ms",
|
3
|
+
"version": "0.7.1",
|
4
|
+
"description": "Tiny ms conversion utility",
|
5
|
+
"repository": {
|
6
|
+
"type": "git",
|
7
|
+
"url": "git://github.com/guille/ms.js.git"
|
8
|
+
},
|
9
|
+
"main": "./index",
|
10
|
+
"devDependencies": {
|
11
|
+
"mocha": "*",
|
12
|
+
"expect.js": "*",
|
13
|
+
"serve": "*"
|
14
|
+
},
|
15
|
+
"component": {
|
16
|
+
"scripts": {
|
17
|
+
"ms/index.js": "index.js"
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909",
|
21
|
+
"bugs": {
|
22
|
+
"url": "https://github.com/guille/ms.js/issues"
|
23
|
+
},
|
24
|
+
"homepage": "https://github.com/guille/ms.js",
|
25
|
+
"_id": "ms@0.7.1",
|
26
|
+
"scripts": {},
|
27
|
+
"_shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
|
28
|
+
"_from": "ms@0.7.1",
|
29
|
+
"_npmVersion": "2.7.5",
|
30
|
+
"_nodeVersion": "0.12.2",
|
31
|
+
"_npmUser": {
|
32
|
+
"name": "rauchg",
|
33
|
+
"email": "rauchg@gmail.com"
|
34
|
+
},
|
35
|
+
"maintainers": [
|
36
|
+
{
|
37
|
+
"name": "rauchg",
|
38
|
+
"email": "rauchg@gmail.com"
|
39
|
+
}
|
40
|
+
],
|
41
|
+
"dist": {
|
42
|
+
"shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
|
43
|
+
"tarball": "http://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
|
44
|
+
},
|
45
|
+
"directories": {},
|
46
|
+
"_resolved": "http://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
|
47
|
+
}
|