From cf95136db0019280a3d945ae485491513fa92764 Mon Sep 17 00:00:00 2001 From: Mitchell Date: Mon, 4 Jan 2016 12:25:28 -0500 Subject: [PATCH] updated package.json --- node_modules/.bin/mkdirp | 1 + node_modules/.bin/ncp | 1 + node_modules/.bin/rimraf | 1 + .../array-slice => ansi-green}/LICENSE | 2 +- node_modules/ansi-green/index.js | 14 + node_modules/ansi-green/package.json | 108 + node_modules/ansi-green/readme.md | 74 + .../lazy-cache => ansi-wrap}/LICENSE | 0 node_modules/ansi-wrap/README.md | 89 + node_modules/ansi-wrap/index.js | 5 + node_modules/ansi-wrap/package.json | 81 + node_modules/anymatch/LICENSE | 15 + node_modules/anymatch/README.md | 91 + node_modules/anymatch/index.js | 64 + node_modules/anymatch/package.json | 95 + .../is-extglob => arr-diff}/LICENSE | 0 node_modules/arr-diff/README.md | 74 + node_modules/arr-diff/index.js | 58 + node_modules/arr-diff/package.json | 111 + .../is-glob => arr-flatten}/LICENSE | 0 node_modules/arr-flatten/README.md | 73 + node_modules/arr-flatten/index.js | 27 + node_modules/arr-flatten/package.json | 100 + .../isobject => array-unique}/LICENSE | 0 node_modules/array-unique/README.md | 51 + node_modules/array-unique/index.js | 28 + node_modules/array-unique/package.json | 86 + .../node_modules => }/arrify/index.js | 2 +- .../chokidar/node_modules => }/arrify/license | 0 node_modules/arrify/package.json | 89 + .../node_modules => }/arrify/readme.md | 4 +- node_modules/async-each/.npmignore | 25 + node_modules/async-each/CHANGELOG.md | 20 + node_modules/async-each/README.md | 64 + node_modules/async-each/bower.json | 22 + node_modules/async-each/component.json | 18 + node_modules/async-each/index.js | 38 + node_modules/async-each/package.json | 88 + .../node_modules/acorn => async}/LICENSE | 2 +- node_modules/async/README.md | 1425 +++++++ node_modules/async/component.json | 11 + node_modules/async/lib/async.js | 958 +++++ node_modules/async/package.json | 87 + .../minimatch => balanced-match}/.npmignore | 1 + .../.travis.yml | 0 node_modules/balanced-match/LICENSE.md | 21 + node_modules/balanced-match/Makefile | 6 + node_modules/balanced-match/README.md | 89 + node_modules/balanced-match/example.js | 5 + node_modules/balanced-match/index.js | 50 + node_modules/balanced-match/package.json | 98 + node_modules/balanced-match/test/balanced.js | 84 + .../binary-extensions/binary-extensions.json | 188 + node_modules/binary-extensions/license | 21 + node_modules/binary-extensions/package.json | 104 + node_modules/binary-extensions/readme.md | 33 + node_modules/brace-expansion/.npmignore | 3 + node_modules/brace-expansion/README.md | 122 + node_modules/brace-expansion/example.js | 8 + node_modules/brace-expansion/index.js | 191 + node_modules/brace-expansion/package.json | 100 + node_modules/braces/LICENSE | 24 + node_modules/braces/README.md | 230 ++ node_modules/braces/index.js | 399 ++ node_modules/braces/package.json | 122 + node_modules/broadway/.npmignore | 4 + node_modules/broadway/.travis.yml | 10 + node_modules/broadway/LICENSE | 19 + node_modules/broadway/README.md | 124 + node_modules/broadway/bin/build | 66 + node_modules/broadway/examples/browser/app.js | 12 + .../broadway/examples/browser/index.html | 11 + .../examples/browser/plugins/helloworld.js | 23 + node_modules/broadway/examples/nodejs/app.js | 17 + .../examples/nodejs/plugins/helloworld.js | 23 + node_modules/broadway/lib/broadway.js | 19 + node_modules/broadway/lib/broadway/app.js | 225 ++ .../broadway/lib/broadway/bootstrapper.js | 84 + node_modules/broadway/lib/broadway/browser.js | 75 + .../lib/broadway/common/directories.js | 78 + .../broadway/lib/broadway/common/index.js | 18 + .../broadway/lib/broadway/features/index.js | 48 + .../broadway/lib/broadway/plugins/config.js | 46 + .../lib/broadway/plugins/directories.js | 49 + .../lib/broadway/plugins/exceptions.js | 70 + .../broadway/lib/broadway/plugins/inspect.js | 40 + .../broadway/lib/broadway/plugins/log.js | 227 ++ node_modules/broadway/package.json | 91 + .../broadway/test/common/directories-test.js | 60 + .../broadway/test/core/app-init-test.js | 100 + node_modules/broadway/test/core/app-test.js | 73 + .../broadway/test/core/broadway-test.js | 26 + .../d/d/t => broadway/test/fixtures/.gitkeep} | 0 .../test/fixtures/empty-app/.gitkeep} | 0 .../broadway/test/fixtures/sample-app.json | 8 + .../test/fixtures/sample-app/app/index.js | 2 + .../fixtures/sample-app/config/topics.json | 5 + node_modules/broadway/test/helpers/assert.js | 107 + node_modules/broadway/test/helpers/helpers.js | 24 + node_modules/broadway/test/helpers/macros.js | 74 + .../broadway/test/plugins/config-test.js | 19 + .../broadway/test/plugins/directories-test.js | 28 + .../broadway/test/plugins/log-test.js | 69 + node_modules/chokidar/CHANGELOG.md | 240 ++ node_modules/chokidar/README.md | 285 ++ node_modules/chokidar/index.js | 686 ++++ node_modules/chokidar/lib/fsevents-handler.js | 361 ++ node_modules/chokidar/lib/nodefs-handler.js | 481 +++ node_modules/chokidar/package.json | 109 + node_modules/cliff/.npmignore | 2 + node_modules/cliff/LICENSE | 19 + node_modules/cliff/README.md | 227 ++ node_modules/cliff/assets/inspect.png | Bin 0 -> 27533 bytes node_modules/cliff/assets/put-object-rows.png | Bin 0 -> 54871 bytes node_modules/cliff/assets/put-object.png | Bin 0 -> 32635 bytes node_modules/cliff/assets/put-rows-colors.png | Bin 0 -> 23408 bytes node_modules/cliff/assets/put-rows.png | Bin 0 -> 21809 bytes .../cliff/assets/string-object-rows.png | Bin 0 -> 53234 bytes node_modules/cliff/assets/string-rows.png | Bin 0 -> 20775 bytes node_modules/cliff/examples/inspect.js | 24 + .../cliff/examples/put-object-rows.js | 23 + node_modules/cliff/examples/put-object.js | 24 + .../cliff/examples/put-rows-colors.js | 12 + node_modules/cliff/examples/put-rows.js | 11 + .../cliff/examples/string-object-rows.js | 23 + node_modules/cliff/examples/string-rows.js | 11 + node_modules/cliff/lib/cliff.js | 287 ++ node_modules/cliff/package.json | 89 + node_modules/cliff/test/cliff-test.js | 79 + node_modules/colors/MIT-LICENSE.txt | 22 + node_modules/colors/ReadMe.md | 77 + node_modules/colors/colors.js | 342 ++ node_modules/colors/example.html | 76 + node_modules/colors/example.js | 77 + node_modules/colors/package.json | 74 + node_modules/colors/test.js | 70 + node_modules/colors/themes/winston-dark.js | 12 + node_modules/colors/themes/winston-light.js | 12 + .../minimatch => concat-map}/.travis.yml | 4 +- .../minimist => concat-map}/LICENSE | 0 node_modules/concat-map/README.markdown | 62 + node_modules/concat-map/example/map.js | 6 + node_modules/concat-map/index.js | 13 + node_modules/concat-map/package.json | 109 + node_modules/concat-map/test/map.js | 39 + node_modules/core-util-is/LICENSE | 19 + node_modules/core-util-is/README.md | 3 + node_modules/core-util-is/float.patch | 604 +++ .../core-util-is => core-util-is/lib}/util.js | 19 +- node_modules/core-util-is/package.json | 86 + node_modules/core-util-is/test.js | 68 + node_modules/cycle/README.md | 49 + node_modules/cycle/cycle.js | 170 + node_modules/cycle/package.json | 73 + node_modules/deep-equal/.travis.yml | 8 + node_modules/deep-equal/LICENSE | 18 + node_modules/deep-equal/example/cmp.js | 11 + node_modules/deep-equal/index.js | 94 + node_modules/deep-equal/lib/is_arguments.js | 20 + node_modules/deep-equal/lib/keys.js | 9 + node_modules/deep-equal/package.json | 110 + node_modules/deep-equal/readme.markdown | 61 + node_modules/deep-equal/test/cmp.js | 95 + node_modules/event-stream/.gitmodules | 3 + .../node_modules => }/event-stream/.npmignore | 0 node_modules/event-stream/LICENCE | 22 + node_modules/event-stream/examples/pretty.js | 25 + node_modules/event-stream/index.js | 504 +++ .../node_modules/optimist/.npmignore | 4 + .../node_modules/optimist/LICENSE | 21 + .../node_modules/optimist/README.markdown | 474 +++ .../node_modules/optimist/examples/bool.js | 10 + .../optimist/examples/boolean_double.js | 7 + .../optimist/examples/boolean_single.js | 7 + .../optimist/examples/default_hash.js | 8 + .../optimist/examples/default_singles.js | 7 + .../node_modules/optimist/examples/divide.js | 8 + .../optimist/examples/line_count.js | 20 + .../optimist/examples/line_count_options.js | 29 + .../optimist/examples/line_count_wrap.js | 29 + .../node_modules/optimist/examples/nonopt.js | 4 + .../node_modules/optimist/examples/reflect.js | 2 + .../node_modules/optimist/examples/short.js | 3 + .../node_modules/optimist/examples/string.js | 11 + .../optimist/examples/usage-options.js | 19 + .../node_modules/optimist/examples/xup.js | 10 + .../node_modules/optimist/index.js | 457 +++ .../node_modules/optimist/package.json | 98 + .../node_modules/optimist/test/_.js | 66 + .../node_modules/optimist/test/_/argv.js | 2 + .../node_modules/optimist/test/_/bin.js | 3 + .../node_modules/optimist/test/parse.js | 304 ++ .../node_modules/optimist/test/usage.js | 256 ++ .../acorn/dist/.keep => event-stream/out} | 0 node_modules/event-stream/package.json | 80 + node_modules/event-stream/readme.markdown | 358 ++ .../event-stream/test/.npmignore | 0 node_modules/event-stream/test/package.json | 11 + node_modules/event-stream/test/pipe.async.js | 54 + .../event-stream/test/readArray.asynct.js | 88 + .../test/readme.markdown} | 0 .../event-stream/test/simple-map.asynct.js | 96 + .../event-stream/test/split.asynct.js | 34 + .../event-stream/test/writeArray.asynct.js | 31 + node_modules/eventemitter2/README.md | 248 ++ node_modules/eventemitter2/index.js | 1 + .../eventemitter2/lib/eventemitter2.js | 573 +++ node_modules/eventemitter2/package.json | 109 + node_modules/expand-brackets/LICENSE | 21 + node_modules/expand-brackets/README.md | 89 + node_modules/expand-brackets/index.js | 157 + node_modules/expand-brackets/package.json | 106 + node_modules/expand-range/LICENSE | 24 + node_modules/expand-range/README.md | 107 + node_modules/expand-range/index.js | 43 + node_modules/expand-range/package.json | 107 + node_modules/extglob/LICENSE | 21 + node_modules/extglob/README.md | 88 + node_modules/extglob/index.js | 178 + node_modules/extglob/package.json | 108 + .../lodash._baseflatten => eyes}/LICENSE | 4 +- node_modules/eyes/Makefile | 4 + node_modules/eyes/README.md | 73 + node_modules/eyes/lib/eyes.js | 236 ++ node_modules/eyes/package.json | 88 + node_modules/eyes/test/eyes-test.js | 56 + node_modules/filename-regex/README.md | 51 + node_modules/filename-regex/index.js | 10 + node_modules/filename-regex/package.json | 92 + .../is-extglob => fill-range}/LICENSE | 0 node_modules/fill-range/README.md | 290 ++ node_modules/fill-range/index.js | 408 ++ node_modules/fill-range/package.json | 123 + .../node_modules/is-glob => for-in}/LICENSE | 0 node_modules/for-in/README.md | 52 + node_modules/for-in/index.js | 16 + node_modules/for-in/package.json | 96 + node_modules/for-own/LICENSE | 21 + node_modules/for-own/README.md | 52 + node_modules/for-own/index.js | 19 + node_modules/for-own/package.json | 98 + node_modules/forever/.npmignore | 3 +- node_modules/forever/.travis.yml | 7 +- node_modules/forever/CHANGELOG.md | 1101 +++--- node_modules/forever/README.md | 112 +- node_modules/forever/lib/forever.js | 16 +- node_modules/forever/lib/forever/cli.js | 80 +- .../cliff/node_modules/colors/package.json | 26 +- .../cliff/node_modules/eyes/package.json | 25 +- .../forever/node_modules/cliff/package.json | 32 +- .../forever/node_modules/clone/package.json | 2 +- .../forever/node_modules/colors/package.json | 24 +- .../cliff/node_modules/eyes/package.json | 24 +- .../broadway/node_modules/cliff/package.json | 26 +- .../node_modules/eventemitter2/package.json | 27 +- .../winston/node_modules/async/package.json | 24 +- .../winston/node_modules/cycle/package.json | 21 +- .../winston/node_modules/eyes/package.json | 24 +- .../winston/node_modules/pkginfo/README.md | 4 +- .../winston/node_modules/pkginfo/package.json | 40 +- .../node_modules/stack-trace/package.json | 30 +- .../node_modules/winston/package.json | 34 +- .../node_modules/broadway/package.json | 35 +- .../node_modules/director/package.json | 5 +- .../node_modules/minimist/package.json | 21 +- .../node_modules/wordwrap/package.json | 22 +- .../node_modules/optimist/package.json | 25 +- .../prompt/node_modules/pkginfo/README.md | 4 +- .../prompt/node_modules/pkginfo/package.json | 40 +- .../prompt/node_modules/read/LICENCE | 25 - .../node_modules/read/example/example.js | 13 - .../node_modules/mute-stream/package.json | 5 +- .../prompt/node_modules/read/package.json | 26 +- .../prompt/node_modules/read/rs.js | 4 - .../prompt/node_modules/read/test/basic.js | 60 - .../prompt/node_modules/read/test/defaults.js | 60 - .../prompt/node_modules/read/test/many.js | 83 - .../node_modules/revalidator/package.json | 28 +- .../flatiron/node_modules/prompt/package.json | 5 +- .../node_modules/flatiron/package.json | 31 +- .../node_modules/forever-monitor/.travis.yml | 6 +- .../node_modules/forever-monitor/README.md | 4 +- .../lib/forever-monitor/monitor.js | 8 +- .../lib/forever-monitor/plugins/watch.js | 30 +- .../forever-monitor/node_modules/.bin/watch | 1 - .../cliff/node_modules/eyes/package.json | 24 +- .../broadway/node_modules/cliff/package.json | 27 +- .../node_modules/eventemitter2/package.json | 27 +- .../winston/node_modules/async/package.json | 24 +- .../winston/node_modules/cycle/package.json | 22 +- .../winston/node_modules/eyes/package.json | 24 +- .../winston/node_modules/pkginfo/README.md | 4 +- .../winston/node_modules/pkginfo/package.json | 40 +- .../node_modules/stack-trace/package.json | 29 +- .../node_modules/winston/package.json | 35 +- .../node_modules/broadway/package.json | 35 +- .../node_modules/chokidar/CHANGELOG.md | 21 + .../node_modules/chokidar/README.md | 87 +- .../node_modules/chokidar/index.js | 275 +- .../chokidar/lib/fsevents-handler.js | 2 +- .../chokidar/lib/nodefs-handler.js | 19 +- .../anymatch/node_modules/arrify/index.js | 8 + .../anymatch/node_modules/arrify/license | 21 + .../node_modules}/arrify/package.json | 33 +- .../anymatch/node_modules/arrify/readme.md | 36 + .../node_modules/micromatch/README.md | 94 +- .../anymatch/node_modules/micromatch/index.js | 73 +- .../node_modules/micromatch/lib/chars.js | 18 +- .../node_modules/micromatch/lib/expand.js | 63 +- .../node_modules/micromatch/lib/glob.js | 49 +- .../node_modules/micromatch/lib/utils.js | 80 +- .../micromatch/node_modules/arr-diff/LICENSE | 35 +- .../node_modules/arr-diff/README.md | 7 +- .../micromatch/node_modules/arr-diff/index.js | 4 +- .../node_modules/arr-flatten/package.json | 2 +- .../node_modules/array-slice/README.md | 54 - .../node_modules/array-slice/index.js | 36 - .../node_modules/array-slice/package.json | 65 - .../node_modules/arr-diff/package.json | 36 +- .../node_modules/array-unique/package.json | 2 +- .../micromatch/node_modules/braces/README.md | 56 +- .../micromatch/node_modules/braces/index.js | 15 +- .../node_modules/is-number/README.md | 49 +- .../node_modules/is-number/index.js | 13 +- .../node_modules/is-number/package.json | 50 +- .../node_modules/isobject/README.md | 4 +- .../fill-range/node_modules/isobject/index.js | 7 +- .../isobject/node_modules/isarray/README.md | 54 + .../node_modules/isarray/build/build.js | 209 ++ .../node_modules/isarray/component.json | 19 + .../isobject/node_modules/isarray/index.js | 3 + .../node_modules/isarray/package.json | 53 + .../node_modules/isobject/package.json | 43 +- .../node_modules/randomatic/LICENSE | 21 + .../node_modules/randomatic/README.md | 62 +- .../node_modules/randomatic/index.js | 9 +- .../node_modules/randomatic/package.json | 59 +- .../node_modules/repeat-string/package.json | 2 +- .../node_modules/fill-range/package.json | 45 +- .../node_modules/expand-range/package.json | 2 +- .../braces/node_modules/lazy-cache/README.md | 92 - .../braces/node_modules/lazy-cache/index.js | 62 - .../node_modules/lazy-cache/package.json | 75 - .../braces/node_modules/preserve/package.json | 2 +- .../node_modules/repeat-element/package.json | 2 +- .../node_modules/braces/package.json | 24 +- .../node_modules/expand-brackets/package.json | 2 +- .../node_modules/ansi-green/package.json | 2 +- .../node_modules/success-symbol/package.json | 2 +- .../node_modules/extglob/package.json | 2 +- .../node_modules/filename-regex/package.json | 2 +- .../node_modules/is-extglob/LICENSE | 21 + .../node_modules => }/is-extglob/README.md | 0 .../node_modules => }/is-extglob/index.js | 0 .../node_modules => }/is-extglob/package.json | 4 +- .../micromatch/node_modules/is-glob/README.md | 69 - .../micromatch/node_modules/is-glob/index.js | 11 - .../node_modules/is-glob/package.json | 72 - .../micromatch/node_modules/kind-of/LICENSE | 21 + .../micromatch/node_modules/kind-of/README.md | 196 +- .../micromatch/node_modules/kind-of/index.js | 92 +- .../node_modules/is-buffer/.travis.yml | 7 + .../kind-of/node_modules/is-buffer/.zuul.yml | 18 + .../kind-of/node_modules/is-buffer/LICENSE | 21 + .../kind-of/node_modules/is-buffer/README.md | 49 + .../kind-of/node_modules/is-buffer/index.js | 17 + .../node_modules/is-buffer/package.json | 73 + .../node_modules/is-buffer/test/basic.js | 20 + .../node_modules/kind-of/package.json | 51 +- .../node_modules/normalize-path/LICENSE | 21 + .../node_modules/normalize-path/README.md | 75 + .../node_modules/normalize-path/index.js | 17 + .../node_modules/normalize-path/package.json | 91 + .../node_modules/object.omit/README.md | 61 +- .../node_modules/object.omit/index.js | 24 +- .../for-own/node_modules/for-in/package.json | 2 +- .../node_modules/for-own/package.json | 2 +- .../node_modules/is-extendable/LICENSE | 21 + .../node_modules/is-extendable/README.md | 72 + .../node_modules/is-extendable/index.js | 13 + .../node_modules/is-extendable/package.json | 79 + .../node_modules/isobject/package.json | 74 - .../node_modules/object.omit/package.json | 56 +- .../node_modules/glob-base/package.json | 2 +- .../node_modules/is-dotfile/README.md | 34 +- .../node_modules/is-dotfile/package.json | 41 +- .../node_modules/parse-glob/package.json | 2 +- .../is-equal-shallow/package.json | 2 +- .../node_modules/is-primitive/package.json | 2 +- .../node_modules/regex-cache/package.json | 2 +- .../node_modules/micromatch/package.json | 63 +- .../node_modules/anymatch/package.json | 2 +- .../node_modules/async-each/package.json | 2 +- .../node_modules/glob-parent/package.json | 2 +- .../node_modules => }/inherits/LICENSE | 0 .../node_modules => }/inherits/README.md | 0 .../node_modules => }/inherits/inherits.js | 0 .../inherits/inherits_browser.js | 0 .../node_modules => }/inherits/package.json | 8 +- .../node_modules => }/inherits/test.js | 0 .../binary-extensions/binary-extensions.json | 2 + .../binary-extensions/package.json | 20 +- .../node_modules/is-binary-path/package.json | 2 +- .../node_modules/is-extglob/package.json | 2 +- .../node_modules/is-glob/package.json | 2 +- .../node_modules/lodash.flatten/LICENSE.txt | 22 - .../node_modules/lodash.flatten/README.md | 20 - .../node_modules/lodash.flatten/index.js | 40 - .../lodash._baseflatten/README.md | 20 - .../node_modules/lodash._baseflatten/index.js | 131 - .../node_modules/lodash.isarguments/LICENSE | 22 - .../node_modules/lodash.isarguments/README.md | 20 - .../node_modules/lodash.isarguments/index.js | 106 - .../lodash.isarguments/package.json | 93 - .../node_modules/lodash.isarray/README.md | 20 - .../node_modules/lodash.isarray/index.js | 180 - .../node_modules/lodash.isarray/package.json | 93 - .../lodash._baseflatten/package.json | 91 - .../lodash._isiterateecall/LICENSE.txt | 22 - .../lodash._isiterateecall/README.md | 20 - .../lodash._isiterateecall/index.js | 132 - .../lodash._isiterateecall/package.json | 87 - .../node_modules/lodash.flatten/package.json | 97 - .../node_modules/graceful-fs/package.json | 2 +- .../node_modules/readable-stream/.travis.yml | 37 +- .../readable-stream/doc/stream.markdown | 1203 +++--- .../readable-stream/lib/_stream_readable.js | 54 +- .../readable-stream/lib/_stream_writable.js | 21 +- .../node_modules/core-util-is/LICENSE | 19 + .../node_modules/core-util-is/lib/util.js | 22 +- .../node_modules/core-util-is/package.json | 32 +- .../node_modules/core-util-is/test.js | 68 + .../process-nextick-args/.travis.yml | 7 +- .../process-nextick-args/index.js | 9 +- .../process-nextick-args/package.json | 20 +- .../node_modules/string_decoder/package.json | 2 +- .../node_modules/util-deprecate/History.md | 5 + .../node_modules/util-deprecate/browser.js | 7 +- .../node_modules/util-deprecate/package.json | 19 +- .../node_modules/readable-stream/package.json | 25 +- .../node_modules/readdirp/package.json | 2 +- .../node_modules/chokidar/package.json | 36 +- .../node_modules/minimatch/LICENSE | 32 +- .../node_modules/minimatch/README.md | 2 - .../node_modules/minimatch/minimatch.js | 715 ++-- .../node_modules/balanced-match/.travis.yml | 1 - .../node_modules/balanced-match/LICENSE.md | 21 + .../node_modules/balanced-match/README.md | 9 + .../node_modules/balanced-match/index.js | 80 +- .../node_modules/balanced-match/package.json | 26 +- .../balanced-match/test/balanced.js | 28 + .../node_modules/brace-expansion/package.json | 28 +- .../node_modules/lru-cache/.npmignore | 1 - .../node_modules/lru-cache/CONTRIBUTORS | 14 - .../node_modules/lru-cache/README.md | 109 - .../node_modules/lru-cache/lib/lru-cache.js | 274 -- .../node_modules/lru-cache/package.json | 58 - .../node_modules/lru-cache/test/basic.js | 395 -- .../node_modules/lru-cache/test/foreach.js | 121 - .../lru-cache/test/memory-leak.js | 50 - .../minimatch/node_modules/sigmund/README.md | 53 - .../minimatch/node_modules/sigmund/bench.js | 283 -- .../node_modules/sigmund/package.json | 60 - .../minimatch/node_modules/sigmund/sigmund.js | 39 - .../node_modules/sigmund/test/basic.js | 24 - .../node_modules/minimatch/package.json | 50 +- .../node_modules/minimatch/test/basic.js | 399 -- .../minimatch/test/brace-expand.js | 40 - .../node_modules/minimatch/test/caching.js | 14 - .../node_modules/minimatch/test/defaults.js | 274 -- .../test/extglob-ending-with-state-char.js | 8 - .../node_modules/event-stream/.gitignore | 3 + .../node_modules/wordwrap/package.json | 22 +- .../node_modules/optimist/package.json | 31 +- .../node_modules/event-stream/package.json | 31 +- .../node_modules/event-stream/test/.gitignore | 3 + .../node_modules/ps-tree/package.json | 31 +- .../node_modules/watch/LICENSE | 55 - .../forever-monitor/node_modules/watch/cli.js | 33 - .../node_modules/watch/main.js | 143 - .../watch/node_modules/minimist/package.json | 54 - .../node_modules/minimist/test/all_bool.js | 32 - .../node_modules/minimist/test/stop_early.js | 15 - .../node_modules/minimist/test/unknown.js | 102 - .../node_modules/watch/package.json | 42 - .../node_modules/watch/readme.mkd | 94 - .../node_modules/watch/release.sh | 3 - .../node_modules/watch/test/test_monitor.js | 31 - .../watch/test/test_monitorRootDirectory.js | 28 - .../node_modules/watch/test/test_watchTree.js | 23 - .../node_modules/forever-monitor/package.json | 43 +- .../forever-monitor/test/fixtures/watch/file | 2 +- .../test/plugins/watch-test.js | 92 +- .../nconf/node_modules/async/package.json | 25 +- .../nconf/node_modules/ini/package.json | 5 +- .../node_modules/minimist/package.json | 21 +- .../node_modules/wordwrap/package.json | 22 +- .../nconf/node_modules/optimist/package.json | 24 +- .../forever/node_modules/nconf/package.json | 29 +- .../node_modules/eventemitter2/package.json | 28 +- .../nssocket/node_modules/lazy/package.json | 26 +- .../node_modules/nssocket/package.json | 26 +- .../node_modules/object-assign/package.json | 2 +- .../node_modules/minimist/package.json | 22 +- .../node_modules/wordwrap/package.json | 23 +- .../node_modules/optimist/package.json | 26 +- .../path-is-absolute/package.json | 2 +- .../node_modules/colors/package.json | 2 +- .../node_modules/minimist/package.json | 2 +- .../node_modules/prettyjson/package.json | 2 +- .../tape/node_modules/deep-equal/package.json | 2 +- .../tape/node_modules/defined/package.json | 4 +- .../tape/node_modules/inherits/package.json | 7 +- .../tape/node_modules/jsonify/package.json | 4 +- .../tape/node_modules/resumer/package.json | 2 +- .../tape/node_modules/through/package.json | 2 +- .../caller/node_modules/tape/package.json | 2 +- .../shush/node_modules/caller/package.json | 2 +- .../strip-json-comments/package.json | 2 +- .../forever/node_modules/shush/package.json | 2 +- .../node_modules/timespan/package.json | 26 +- .../utile/node_modules/async/package.json | 25 +- .../utile/node_modules/deep-equal/.travis.yml | 8 +- .../utile/node_modules/deep-equal/index.js | 2 +- .../node_modules/deep-equal/package.json | 29 +- .../utile/node_modules/deep-equal/test/cmp.js | 6 + .../utile/node_modules/i/package.json | 23 +- .../mkdirp/node_modules/minimist/package.json | 3 +- .../utile/node_modules/mkdirp/package.json | 24 +- .../utile/node_modules/ncp/package.json | 28 +- .../utile/node_modules/rimraf/README.md | 71 +- .../utile/node_modules/rimraf/bin.js | 15 +- .../rimraf/node_modules/glob/README.md | 70 +- .../rimraf/node_modules/glob/common.js | 35 +- .../rimraf/node_modules/glob/glob.js | 18 +- .../inflight/node_modules/wrappy/package.json | 25 +- .../glob/node_modules/inflight/package.json | 34 +- .../glob/node_modules/inherits/package.json | 25 +- .../glob/node_modules/minimatch/minimatch.js | 59 +- .../node_modules/brace-expansion/.npmignore | 5 +- .../node_modules/brace-expansion/README.md | 1 + .../node_modules/balanced-match/.travis.yml | 1 - .../node_modules/balanced-match/LICENSE.md | 21 + .../node_modules/balanced-match/README.md | 9 + .../node_modules/balanced-match/index.js | 80 +- .../node_modules/balanced-match/package.json | 33 +- .../balanced-match/test/balanced.js | 28 + .../node_modules/concat-map/package.json | 22 +- .../node_modules/brace-expansion/package.json | 39 +- .../brace-expansion/test/bash-comparison.js | 32 - .../brace-expansion/test/bash-results.txt | 1075 ------ .../brace-expansion/test/cases.txt | 182 - .../brace-expansion/test/dollar.js | 9 - .../brace-expansion/test/empty-option.js | 10 - .../brace-expansion/test/generate.sh | 24 - .../test/negative-increment.js | 15 - .../brace-expansion/test/nested.js | 16 - .../brace-expansion/test/order.js | 10 - .../node_modules/brace-expansion/test/pad.js | 13 - .../brace-expansion/test/same-type.js | 7 - .../brace-expansion/test/sequence.js | 50 - .../glob/node_modules/minimatch/package.json | 41 +- .../once/node_modules/wrappy/package.json | 25 +- .../glob/node_modules/once/package.json | 34 +- .../glob/node_modules/once/test/once.js | 23 - .../rimraf/node_modules/glob/package.json | 41 +- .../rimraf/node_modules/glob/sync.js | 11 +- .../utile/node_modules/rimraf/package.json | 33 +- .../utile/node_modules/rimraf/rimraf.js | 14 +- .../forever/node_modules/utile/package.json | 29 +- .../winston/node_modules/async/package.json | 24 +- .../winston/node_modules/cycle/package.json | 22 +- .../winston/node_modules/eyes/package.json | 24 +- .../node_modules/isstream/package.json | 26 +- .../winston/node_modules/pkginfo/README.md | 4 +- .../winston/node_modules/pkginfo/package.json | 39 +- .../node_modules/stack-trace/package.json | 30 +- .../forever/node_modules/winston/package.json | 36 +- node_modules/forever/package.json | 58 +- .../test/core/daemonic-inheritance-test.js | 3 +- .../test/core/start-stop-relative-test.js | 19 +- .../test/core/stopbypid-peaceful-test.js | 21 +- node_modules/forever/test/fixtures/server.js | 4 +- .../test/worker/multiple-workers-test.js | 4 +- node_modules/glob-base/LICENSE | 21 + node_modules/glob-base/README.md | 158 + node_modules/glob-base/index.js | 51 + node_modules/glob-base/package.json | 108 + node_modules/glob-parent/.npmignore | 4 + node_modules/glob-parent/.travis.yml | 8 + node_modules/glob-parent/LICENSE | 15 + node_modules/glob-parent/README.md | 43 + node_modules/glob-parent/index.js | 10 + node_modules/glob-parent/package.json | 86 + node_modules/glob-parent/test.js | 28 + .../node_modules/lru-cache => glob}/LICENSE | 0 node_modules/glob/README.md | 359 ++ node_modules/glob/common.js | 226 ++ node_modules/glob/glob.js | 752 ++++ node_modules/glob/package.json | 98 + node_modules/glob/sync.js | 460 +++ node_modules/graceful-fs/LICENSE | 15 + node_modules/graceful-fs/README.md | 36 + node_modules/graceful-fs/fs.js | 21 + node_modules/graceful-fs/graceful-fs.js | 251 ++ node_modules/graceful-fs/legacy-streams.js | 118 + node_modules/graceful-fs/package.json | 99 + node_modules/graceful-fs/polyfills.js | 252 ++ .../prompt/node_modules/read => i}/.npmignore | 3 +- node_modules/i/.travis.yml | 9 + .../node_modules/lodash.isarray => i}/LICENSE | 4 - node_modules/i/README.md | 174 + node_modules/i/lib/defaults.js | 63 + node_modules/i/lib/inflect.js | 11 + node_modules/i/lib/inflections.js | 116 + node_modules/i/lib/methods.js | 233 ++ node_modules/i/lib/native.js | 26 + node_modules/i/lib/util.js | 136 + node_modules/i/package.json | 104 + node_modules/i/test/inflector/cases.js | 209 ++ .../i/test/inflector/inflections-test.js | 87 + node_modules/i/test/inflector/methods-test.js | 342 ++ node_modules/i/test/utils/array-test.js | 39 + node_modules/i/test/utils/string-test.js | 88 + node_modules/inflight/.eslintrc | 17 + node_modules/inflight/LICENSE | 15 + node_modules/inflight/README.md | 37 + node_modules/inflight/inflight.js | 44 + node_modules/inflight/package.json | 86 + node_modules/inflight/test.js | 97 + node_modules/inherits/LICENSE | 16 + node_modules/inherits/README.md | 42 + node_modules/inherits/inherits.js | 1 + node_modules/inherits/inherits_browser.js | 23 + node_modules/inherits/package.json | 79 + node_modules/inherits/test.js | 25 + .../node_modules/sigmund => ini}/LICENSE | 0 node_modules/ini/README.md | 102 + node_modules/ini/ini.js | 190 + node_modules/ini/package.json | 81 + node_modules/is-binary-path/index.js | 12 + node_modules/is-binary-path/license | 21 + node_modules/is-binary-path/package.json | 102 + node_modules/is-binary-path/readme.md | 34 + node_modules/is-buffer/.travis.yml | 7 + node_modules/is-buffer/.zuul.yml | 18 + node_modules/is-buffer/LICENSE | 21 + node_modules/is-buffer/README.md | 49 + node_modules/is-buffer/index.js | 17 + node_modules/is-buffer/package.json | 99 + node_modules/is-buffer/test/basic.js | 20 + node_modules/is-dotfile/LICENSE | 21 + node_modules/is-dotfile/README.md | 74 + node_modules/is-dotfile/index.js | 15 + node_modules/is-dotfile/package.json | 108 + node_modules/is-equal-shallow/LICENSE | 21 + node_modules/is-equal-shallow/README.md | 90 + node_modules/is-equal-shallow/index.js | 27 + node_modules/is-equal-shallow/package.json | 112 + node_modules/is-extendable/LICENSE | 21 + node_modules/is-extendable/README.md | 72 + node_modules/is-extendable/index.js | 13 + node_modules/is-extendable/package.json | 106 + node_modules/is-extglob/LICENSE | 21 + .../node_modules => }/is-extglob/README.md | 0 .../node_modules => }/is-extglob/index.js | 0 .../node_modules => }/is-extglob/package.json | 101 +- node_modules/is-glob/LICENSE | 21 + .../node_modules => }/is-glob/README.md | 0 .../node_modules => }/is-glob/index.js | 0 .../node_modules => }/is-glob/package.json | 123 +- node_modules/is-number/LICENSE | 21 + node_modules/is-number/README.md | 103 + node_modules/is-number/index.js | 19 + node_modules/is-number/package.json | 118 + node_modules/is-primitive/LICENSE | 21 + node_modules/is-primitive/README.md | 57 + node_modules/is-primitive/index.js | 13 + node_modules/is-primitive/package.json | 96 + node_modules/isarray/README.md | 54 + node_modules/isarray/build/build.js | 209 ++ node_modules/isarray/component.json | 19 + node_modules/isarray/index.js | 3 + node_modules/isarray/package.json | 79 + node_modules/isobject/LICENSE | 21 + .../node_modules => }/isobject/README.md | 4 +- .../node_modules => }/isobject/index.js | 7 +- node_modules/isobject/package.json | 108 + .../constantinople/node_modules/.bin/acorn | 1 - .../node_modules/acorn/.editorconfig | 7 - .../node_modules/acorn/.gitattributes | 1 - .../node_modules/acorn/.npmignore | 3 - .../node_modules/acorn/.tern-project | 6 - .../node_modules/acorn/.travis.yml | 2 - .../constantinople/node_modules/acorn/AUTHORS | 41 - .../node_modules/acorn/README.md | 377 -- .../node_modules/acorn/bin/acorn | 55 - .../node_modules/acorn/bin/build-acorn.js | 51 - .../acorn/bin/generate-identifier-regex.js | 47 - .../node_modules/acorn/bin/update_authors.sh | 6 - .../node_modules/acorn/bin/without_eval | 48 - .../node_modules/acorn/dist/acorn.js | 3312 ----------------- .../node_modules/acorn/dist/acorn_csp.js | 3284 ---------------- .../node_modules/acorn/dist/acorn_loose.js | 1273 ------- .../node_modules/acorn/dist/walk.js | 376 -- .../node_modules/acorn/package.json | 179 - .../node_modules/acorn/src/expression.js | 694 ---- .../node_modules/acorn/src/identifier.js | 129 - .../node_modules/acorn/src/index.js | 68 - .../node_modules/acorn/src/location.js | 24 - .../node_modules/acorn/src/locutil.js | 42 - .../acorn/src/loose/expression.js | 512 --- .../node_modules/acorn/src/loose/index.js | 49 - .../node_modules/acorn/src/loose/parseutil.js | 1 - .../node_modules/acorn/src/loose/state.js | 124 - .../node_modules/acorn/src/loose/statement.js | 421 --- .../node_modules/acorn/src/loose/tokenize.js | 108 - .../node_modules/acorn/src/lval.js | 204 - .../node_modules/acorn/src/node.js | 50 - .../node_modules/acorn/src/options.js | 119 - .../node_modules/acorn/src/parseutil.js | 90 - .../node_modules/acorn/src/state.js | 91 - .../node_modules/acorn/src/statement.js | 612 --- .../node_modules/acorn/src/tokencontext.js | 109 - .../node_modules/acorn/src/tokenize.js | 682 ---- .../node_modules/acorn/src/tokentype.js | 142 - .../node_modules/acorn/src/util.js | 9 - .../node_modules/acorn/src/walk/index.js | 339 -- .../node_modules/acorn/src/whitespace.js | 12 - .../node_modules/acorn/.tern-project | 7 +- .../acorn-globals/node_modules/acorn/AUTHORS | 3 - .../node_modules/acorn/README.md | 14 +- .../node_modules/acorn/bin/acorn | 3 +- .../node_modules/acorn/bin/prepublish.sh | 2 + .../node_modules/acorn/dist/acorn.js | 2344 ++++++++---- .../node_modules/acorn/dist/acorn_csp.js | 2339 ++++++++---- .../node_modules/acorn/dist/acorn_loose.js | 759 ++-- .../node_modules/acorn/dist/walk.js | 178 +- .../node_modules/acorn/package.json | 130 +- .../node_modules/acorn/src/expression.js | 69 +- .../node_modules/acorn/src/index.js | 19 +- .../node_modules/acorn/src/location.js | 52 +- .../node_modules/acorn/src/locutil.js | 42 - .../acorn/src/loose/expression.js | 3 +- .../node_modules/acorn/src/loose/index.js | 1 + .../node_modules/acorn/src/loose/parseutil.js | 127 +- .../node_modules/acorn/src/loose/state.js | 135 +- .../node_modules/acorn/src/loose/statement.js | 2 - .../node_modules/acorn/src/lval.js | 11 +- .../node_modules/acorn/src/node.js | 76 +- .../node_modules/acorn/src/options.js | 2 +- .../node_modules/acorn/src/parseutil.js | 3 +- .../node_modules/acorn/src/state.js | 151 +- .../node_modules/acorn/src/statement.js | 30 +- .../node_modules/acorn/src/tokencontext.js | 14 +- .../node_modules/acorn/src/tokenize.js | 214 +- .../node_modules/acorn/src/tokentype.js | 2 +- .../node_modules/acorn/src/walk/index.js | 88 +- node_modules/kind-of/LICENSE | 21 + node_modules/kind-of/README.md | 237 ++ node_modules/kind-of/index.js | 113 + node_modules/kind-of/package.json | 127 + node_modules/micromatch/LICENSE | 21 + node_modules/micromatch/README.md | 616 +++ node_modules/micromatch/index.js | 428 +++ node_modules/micromatch/lib/chars.js | 67 + node_modules/micromatch/lib/expand.js | 311 ++ node_modules/micromatch/lib/glob.js | 193 + node_modules/micromatch/lib/utils.js | 144 + node_modules/micromatch/package.json | 164 + node_modules/minimatch/LICENSE | 15 + node_modules/minimatch/README.md | 216 ++ .../node_modules => }/minimatch/browser.js | 64 +- node_modules/minimatch/minimatch.js | 912 +++++ node_modules/minimatch/package.json | 90 + .../node_modules => }/minimist/.travis.yml | 0 node_modules/minimist/LICENSE | 18 + .../minimist/example/parse.js | 0 .../watch/node_modules => }/minimist/index.js | 118 +- node_modules/minimist/package.json | 93 + .../minimist/readme.markdown | 20 +- .../node_modules => }/minimist/test/bool.js | 0 .../node_modules => }/minimist/test/dash.js | 7 - .../minimist/test/default_bool.js | 15 - .../node_modules => }/minimist/test/dotted.js | 0 .../node_modules => }/minimist/test/long.js | 0 .../node_modules => }/minimist/test/num.js | 0 .../node_modules => }/minimist/test/parse.js | 0 .../minimist/test/parse_modified.js | 2 +- .../node_modules => }/minimist/test/short.js | 0 .../minimist/test/whitespace.js | 0 node_modules/mkdirp/.travis.yml | 8 + node_modules/mkdirp/LICENSE | 21 + node_modules/mkdirp/bin/cmd.js | 33 + node_modules/mkdirp/bin/usage.txt | 12 + node_modules/mkdirp/examples/pow.js | 6 + node_modules/mkdirp/index.js | 98 + .../mkdirp/node_modules/minimist/.travis.yml | 4 + .../mkdirp/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../mkdirp/node_modules/minimist/index.js | 187 + .../mkdirp/node_modules/minimist/package.json | 93 + .../node_modules/minimist/readme.markdown | 73 + .../mkdirp/node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../mkdirp/node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/parse.js | 318 ++ .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/mkdirp/package.json | 85 + node_modules/mkdirp/readme.markdown | 100 + node_modules/mkdirp/test/chmod.js | 41 + node_modules/mkdirp/test/clobber.js | 38 + node_modules/mkdirp/test/mkdirp.js | 28 + node_modules/mkdirp/test/opts_fs.js | 29 + node_modules/mkdirp/test/opts_fs_sync.js | 27 + node_modules/mkdirp/test/perm.js | 32 + node_modules/mkdirp/test/perm_sync.js | 36 + node_modules/mkdirp/test/race.js | 37 + node_modules/mkdirp/test/rel.js | 32 + node_modules/mkdirp/test/return.js | 25 + node_modules/mkdirp/test/return_sync.js | 24 + node_modules/mkdirp/test/root.js | 19 + node_modules/mkdirp/test/sync.js | 32 + node_modules/mkdirp/test/umask.js | 28 + node_modules/mkdirp/test/umask_sync.js | 32 + node_modules/nconf/.npmignore | 10 + node_modules/nconf/.travis.yml | 12 + node_modules/nconf/CHANGELOG.md | 9 + node_modules/nconf/LICENSE | 19 + node_modules/nconf/README.md | 274 ++ node_modules/nconf/docs/docco.css | 194 + node_modules/nconf/docs/nconf.html | 20 + node_modules/nconf/docs/nconf/common.html | 85 + node_modules/nconf/docs/nconf/formats.html | 22 + node_modules/nconf/docs/nconf/provider.html | 378 ++ node_modules/nconf/docs/nconf/stores.html | 19 + .../nconf/docs/nconf/stores/file.html | 170 + .../nconf/docs/nconf/stores/memory.html | 143 + .../nconf/docs/nconf/stores/system.html | 98 + node_modules/nconf/lib/nconf.js | 40 + node_modules/nconf/lib/nconf/common.js | 113 + node_modules/nconf/lib/nconf/formats.js | 28 + node_modules/nconf/lib/nconf/provider.js | 565 +++ node_modules/nconf/lib/nconf/stores/argv.js | 61 + node_modules/nconf/lib/nconf/stores/env.js | 67 + node_modules/nconf/lib/nconf/stores/file.js | 237 ++ .../nconf/lib/nconf/stores/literal.js | 29 + node_modules/nconf/lib/nconf/stores/memory.js | 224 ++ node_modules/nconf/node_modules/async/LICENSE | 19 + .../nconf/node_modules/async/README.md | 1414 +++++++ .../nconf/node_modules/async/component.json | 11 + .../nconf/node_modules/async/lib/async.js | 955 +++++ .../nconf/node_modules/async/package.json | 86 + node_modules/nconf/package.json | 91 + node_modules/nconf/test/common-test.js | 32 + node_modules/nconf/test/complete-test.js | 126 + node_modules/nconf/test/fixtures/bom.json | 19 + .../nconf/test/fixtures/complete.json | 19 + node_modules/nconf/test/fixtures/data.js | 30 + .../nconf/test/fixtures/hierarchy/global.json | 5 + .../test/fixtures/hierarchy/hierarchical.json | 3 + .../nconf/test/fixtures/hierarchy/user.json | 4 + .../nconf/test/fixtures/malformed.json | 3 + .../nconf/test/fixtures/merge/file1.json | 19 + .../nconf/test/fixtures/merge/file2.json | 10 + node_modules/nconf/test/fixtures/no-bom.json | 19 + .../nconf/test/fixtures/scripts/nconf-argv.js | 10 + .../fixtures/scripts/nconf-change-argv.js | 16 + .../nconf/test/fixtures/scripts/nconf-env.js | 10 + .../scripts/nconf-hierarchical-file-argv.js | 17 + .../scripts/nconf-hierarchical-load-merge.js | 18 + .../scripts/nconf-hierarchical-load-save.js | 32 + .../test/fixtures/scripts/nconf-nested-env.js | 11 + .../test/fixtures/scripts/provider-argv.js | 12 + .../test/fixtures/scripts/provider-env.js | 12 + node_modules/nconf/test/helpers.js | 68 + node_modules/nconf/test/hierarchy-test.js | 113 + node_modules/nconf/test/mocks/mock-store.js | 38 + node_modules/nconf/test/nconf-test.js | 132 + node_modules/nconf/test/provider-save-test.js | 39 + node_modules/nconf/test/provider-test.js | 170 + node_modules/nconf/test/stores/argv-test.js | 22 + node_modules/nconf/test/stores/env-test.js | 24 + .../nconf/test/stores/file-store-test.js | 226 ++ .../nconf/test/stores/literal-test.js | 31 + .../nconf/test/stores/memory-store-test.js | 108 + node_modules/nconf/usage.js | 50 + node_modules/ncp/.npmignore | 4 + node_modules/ncp/.travis.yml | 7 + node_modules/ncp/LICENSE.md | 21 + node_modules/ncp/README.md | 52 + node_modules/ncp/bin/ncp | 48 + node_modules/ncp/lib/ncp.js | 222 ++ node_modules/ncp/package.json | 84 + node_modules/ncp/test/fixtures/src/a | 1 + node_modules/ncp/test/fixtures/src/b | 1 + node_modules/ncp/test/fixtures/src/c | 0 node_modules/ncp/test/fixtures/src/d | 0 node_modules/ncp/test/fixtures/src/e | 0 node_modules/ncp/test/fixtures/src/f | 0 node_modules/ncp/test/fixtures/src/sub/a | 1 + node_modules/ncp/test/fixtures/src/sub/b | 0 node_modules/ncp/test/ncp-test.js | 86 + node_modules/normalize-path/LICENSE | 21 + node_modules/normalize-path/README.md | 75 + node_modules/normalize-path/index.js | 17 + node_modules/normalize-path/package.json | 118 + node_modules/object.omit/LICENSE | 21 + node_modules/object.omit/README.md | 104 + node_modules/object.omit/index.js | 40 + node_modules/object.omit/package.json | 105 + node_modules/once/LICENSE | 15 + node_modules/once/README.md | 51 + node_modules/once/once.js | 21 + node_modules/once/package.json | 89 + node_modules/optimist/.travis.yml | 4 + node_modules/optimist/LICENSE | 21 + node_modules/optimist/example/bool.js | 10 + .../optimist/example/boolean_double.js | 7 + .../optimist/example/boolean_single.js | 7 + node_modules/optimist/example/default_hash.js | 8 + .../optimist/example/default_singles.js | 7 + node_modules/optimist/example/divide.js | 8 + node_modules/optimist/example/line_count.js | 20 + .../optimist/example/line_count_options.js | 29 + .../optimist/example/line_count_wrap.js | 29 + node_modules/optimist/example/nonopt.js | 4 + node_modules/optimist/example/reflect.js | 2 + node_modules/optimist/example/short.js | 3 + node_modules/optimist/example/string.js | 11 + .../optimist/example/usage-options.js | 19 + node_modules/optimist/example/xup.js | 10 + node_modules/optimist/index.js | 343 ++ node_modules/optimist/package.json | 89 + node_modules/optimist/readme.markdown | 500 +++ node_modules/optimist/test/_.js | 71 + node_modules/optimist/test/_/argv.js | 2 + node_modules/optimist/test/_/bin.js | 3 + node_modules/optimist/test/dash.js | 31 + node_modules/optimist/test/parse.js | 446 +++ node_modules/optimist/test/parse_modified.js | 14 + node_modules/optimist/test/short.js | 16 + node_modules/optimist/test/usage.js | 292 ++ node_modules/optimist/test/whitespace.js | 8 + node_modules/parse-glob/LICENSE | 21 + node_modules/parse-glob/README.md | 115 + node_modules/parse-glob/index.js | 156 + node_modules/parse-glob/package.json | 116 + node_modules/path-is-absolute/index.js | 20 + node_modules/path-is-absolute/license | 21 + node_modules/path-is-absolute/package.json | 98 + node_modules/path-is-absolute/readme.md | 51 + node_modules/pkginfo/.npmignore | 2 + node_modules/pkginfo/LICENSE | 19 + node_modules/pkginfo/README.md | 86 + node_modules/pkginfo/docs/docco.css | 194 + node_modules/pkginfo/docs/pkginfo.html | 101 + .../pkginfo/examples/all-properties.js | 19 + .../pkginfo/examples/array-argument.js | 20 + .../pkginfo/examples/multiple-properties.js | 19 + .../pkginfo/examples/object-argument.js | 22 + node_modules/pkginfo/examples/package.json | 10 + .../pkginfo/examples/single-property.js | 19 + .../pkginfo/examples/subdir/package.json | 11 + node_modules/pkginfo/examples/target-dir.js | 20 + node_modules/pkginfo/lib/pkginfo.js | 136 + node_modules/pkginfo/package.json | 82 + node_modules/pkginfo/test/pkginfo-test.js | 83 + node_modules/preserve/.gitattributes | 14 + node_modules/preserve/.jshintrc | 24 + node_modules/preserve/.npmignore | 53 + node_modules/preserve/.travis.yml | 3 + node_modules/preserve/.verb.md | 59 + node_modules/preserve/LICENSE | 24 + node_modules/preserve/README.md | 90 + node_modules/preserve/index.js | 54 + node_modules/preserve/package.json | 96 + node_modules/preserve/test.js | 48 + node_modules/process-nextick-args/.travis.yml | 12 + node_modules/process-nextick-args/index.js | 20 + node_modules/process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 71 + node_modules/process-nextick-args/readme.md | 18 + node_modules/process-nextick-args/test.js | 24 + node_modules/ps-tree/.npmignore | 3 + node_modules/ps-tree/index.js | 49 + node_modules/ps-tree/package.json | 70 + node_modules/ps-tree/readme.markdown | 48 + node_modules/randomatic/LICENSE | 21 + node_modules/randomatic/README.md | 132 + node_modules/randomatic/index.js | 83 + node_modules/randomatic/package.json | 108 + node_modules/readable-stream/.npmignore | 5 + node_modules/readable-stream/.travis.yml | 50 + node_modules/readable-stream/.zuul.yml | 1 + node_modules/readable-stream/LICENSE | 18 + node_modules/readable-stream/README.md | 36 + .../readable-stream/doc/stream.markdown | 1730 +++++++++ .../doc/wg-meetings/2015-01-30.md | 60 + node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 82 + .../lib/_stream_passthrough.js | 27 + .../readable-stream/lib/_stream_readable.js | 975 +++++ .../readable-stream/lib/_stream_transform.js | 197 + .../readable-stream/lib/_stream_writable.js | 529 +++ node_modules/readable-stream/package.json | 101 + node_modules/readable-stream/passthrough.js | 1 + node_modules/readable-stream/readable.js | 12 + node_modules/readable-stream/transform.js | 1 + node_modules/readable-stream/writable.js | 1 + node_modules/readdirp/.npmignore | 15 + node_modules/readdirp/.travis.yml | 8 + node_modules/readdirp/LICENSE | 18 + node_modules/readdirp/README.md | 233 ++ node_modules/readdirp/examples/Readme.md | 37 + .../readdirp/examples/callback-api.js | 10 + node_modules/readdirp/examples/grep.js | 71 + node_modules/readdirp/examples/package.json | 9 + .../readdirp/examples/stream-api-pipe.js | 19 + node_modules/readdirp/examples/stream-api.js | 15 + node_modules/readdirp/package.json | 99 + node_modules/readdirp/readdirp.js | 288 ++ node_modules/readdirp/stream-api.js | 100 + .../test/bed/root_dir1/root_dir1_file1.ext1 | 0 .../test/bed/root_dir1/root_dir1_file2.ext2 | 0 .../test/bed/root_dir1/root_dir1_file3.ext3 | 0 .../root1_dir1_subdir1_file1.ext1 | 0 .../test/bed/root_dir2/root_dir2_file1.ext1 | 0 .../test/bed/root_dir2/root_dir2_file2.ext2 | 0 .../readdirp/test/bed/root_file1.ext1 | 0 .../readdirp/test/bed/root_file2.ext2 | 0 .../readdirp/test/bed/root_file3.ext3 | 0 node_modules/readdirp/test/readdirp-stream.js | 310 ++ node_modules/readdirp/test/readdirp.js | 289 ++ node_modules/regex-cache/LICENSE | 21 + node_modules/regex-cache/README.md | 148 + node_modules/regex-cache/index.js | 67 + node_modules/regex-cache/package.json | 101 + node_modules/repeat-element/LICENSE | 21 + node_modules/repeat-element/README.md | 71 + node_modules/repeat-element/index.js | 18 + node_modules/repeat-element/package.json | 94 + node_modules/repeat-string/LICENSE | 24 + node_modules/repeat-string/README.md | 94 + node_modules/repeat-string/index.js | 66 + node_modules/repeat-string/package.json | 105 + node_modules/rimraf/LICENSE | 15 + node_modules/rimraf/README.md | 101 + node_modules/rimraf/bin.js | 40 + node_modules/rimraf/package.json | 87 + node_modules/rimraf/rimraf.js | 335 ++ node_modules/stack-trace/.npmignore | 1 + node_modules/stack-trace/License | 19 + node_modules/stack-trace/Makefile | 11 + node_modules/stack-trace/Readme.md | 98 + node_modules/stack-trace/lib/stack-trace.js | 111 + node_modules/stack-trace/package.json | 81 + node_modules/string_decoder/.npmignore | 2 + node_modules/string_decoder/LICENSE | 20 + node_modules/string_decoder/README.md | 7 + node_modules/string_decoder/index.js | 221 ++ node_modules/string_decoder/package.json | 79 + node_modules/success-symbol/LICENSE | 21 + node_modules/success-symbol/README.md | 52 + node_modules/success-symbol/index.js | 1 + node_modules/success-symbol/package.json | 106 + node_modules/util-deprecate/History.md | 16 + node_modules/util-deprecate/LICENSE | 24 + node_modules/util-deprecate/README.md | 53 + node_modules/util-deprecate/browser.js | 67 + node_modules/util-deprecate/node.js | 6 + node_modules/util-deprecate/package.json | 81 + node_modules/utile/.npmignore | 4 + node_modules/utile/.travis.yml | 10 + node_modules/utile/CHANGELOG.md | 16 + node_modules/utile/LICENSE | 19 + node_modules/utile/README.md | 87 + node_modules/utile/lib/args.js | 46 + node_modules/utile/lib/base64.js | 44 + node_modules/utile/lib/file.js | 33 + node_modules/utile/lib/format.js | 25 + node_modules/utile/lib/index.js | 467 +++ node_modules/utile/package.json | 90 + node_modules/utile/test/file-test.js | 31 + .../test/fixtures/read-json-file/config.json | 9 + .../require-directory/directory/index.js | 2 + .../fixtures/require-directory/helloWorld.js | 2 + node_modules/utile/test/format-test.js | 31 + node_modules/utile/test/function-args-test.js | 104 + node_modules/utile/test/helpers/macros.js | 37 + node_modules/utile/test/random-string-test.js | 39 + .../utile/test/require-directory-test.js | 35 + node_modules/utile/test/utile-test.js | 126 + node_modules/winston/.npmignore | 6 + node_modules/winston/.travis.yml | 10 + node_modules/winston/CHANGELOG.md | 9 + node_modules/winston/LICENSE | 19 + node_modules/winston/README.md | 911 +++++ node_modules/winston/docs/transports.md | 369 ++ node_modules/winston/examples/couchdb.js | 18 + .../winston/examples/custom-levels.js | 44 + node_modules/winston/examples/exception.js | 4 + node_modules/winston/examples/raw-mode.js | 10 + node_modules/winston/examples/webhook-post.js | 17 + node_modules/winston/lib/winston.js | 163 + node_modules/winston/lib/winston/common.js | 347 ++ node_modules/winston/lib/winston/config.js | 59 + .../winston/lib/winston/config/cli-config.js | 35 + .../winston/lib/winston/config/npm-config.js | 27 + .../lib/winston/config/syslog-config.js | 31 + node_modules/winston/lib/winston/container.js | 112 + node_modules/winston/lib/winston/exception.js | 56 + node_modules/winston/lib/winston/logger.js | 665 ++++ .../winston/lib/winston/transports.js | 34 + .../winston/lib/winston/transports/console.js | 89 + .../winston/transports/daily-rotate-file.js | 569 +++ .../winston/lib/winston/transports/file.js | 538 +++ .../winston/lib/winston/transports/http.js | 228 ++ .../winston/lib/winston/transports/memory.js | 85 + .../lib/winston/transports/transport.js | 121 + .../winston/lib/winston/transports/webhook.js | 146 + node_modules/winston/package.json | 106 + node_modules/winston/test/cli-test.js | 40 + node_modules/winston/test/container-test.js | 99 + .../winston/test/custom-timestamp-test.js | 62 + node_modules/winston/test/exception-test.js | 47 + node_modules/winston/test/fixtures/.gitkeep | 0 .../test/fixtures/keys/agent2-cert.pem | 13 + .../winston/test/fixtures/keys/agent2-key.pem | 9 + .../winston/test/fixtures/logs/.gitkeep | 0 .../fixtures/scripts/default-exceptions.js | 21 + .../test/fixtures/scripts/exit-on-error.js | 25 + .../test/fixtures/scripts/log-exceptions.js | 25 + .../fixtures/scripts/unhandle-exceptions.js | 26 + node_modules/winston/test/helpers.js | 183 + .../winston/test/log-exception-test.js | 60 + .../winston/test/log-rewriter-test.js | 98 + .../winston/test/logger-levels-test.js | 116 + node_modules/winston/test/logger-test.js | 346 ++ .../winston/test/transports/console-test.js | 39 + .../test/transports/daily-rotate-file-test.js | 62 + .../test/transports/file-maxfiles-test.js | 102 + .../test/transports/file-maxsize-test.js | 82 + .../winston/test/transports/file-open-test.js | 61 + .../test/transports/file-stress-test.js | 76 + .../winston/test/transports/file-test.js | 60 + .../winston/test/transports/memory-test.js | 31 + .../winston/test/transports/transport.js | 215 ++ .../winston/test/transports/webhook-test.js | 125 + node_modules/winston/test/winston-test.js | 98 + node_modules/wordwrap/LICENSE | 18 + node_modules/wordwrap/README.markdown | 70 + node_modules/wordwrap/example/center.js | 10 + node_modules/wordwrap/example/meat.js | 3 + node_modules/wordwrap/index.js | 76 + node_modules/wordwrap/package.json | 90 + node_modules/wordwrap/test/break.js | 30 + node_modules/wordwrap/test/idleness.txt | 63 + node_modules/wordwrap/test/wrap.js | 31 + node_modules/wrappy/LICENSE | 15 + node_modules/wrappy/README.md | 36 + node_modules/wrappy/package.json | 78 + node_modules/wrappy/test/basic.js | 51 + node_modules/wrappy/wrappy.js | 33 + package.json | 3 +- 1168 files changed, 73752 insertions(+), 26424 deletions(-) create mode 120000 node_modules/.bin/mkdirp create mode 120000 node_modules/.bin/ncp create mode 120000 node_modules/.bin/rimraf rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice => ansi-green}/LICENSE (89%) mode change 100755 => 100644 create mode 100644 node_modules/ansi-green/index.js create mode 100644 node_modules/ansi-green/package.json create mode 100644 node_modules/ansi-green/readme.md rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache => ansi-wrap}/LICENSE (100%) create mode 100644 node_modules/ansi-wrap/README.md create mode 100644 node_modules/ansi-wrap/index.js create mode 100644 node_modules/ansi-wrap/package.json create mode 100644 node_modules/anymatch/LICENSE create mode 100644 node_modules/anymatch/README.md create mode 100644 node_modules/anymatch/index.js create mode 100644 node_modules/anymatch/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob => arr-diff}/LICENSE (100%) mode change 100644 => 100755 create mode 100644 node_modules/arr-diff/README.md create mode 100644 node_modules/arr-diff/index.js create mode 100644 node_modules/arr-diff/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob => arr-flatten}/LICENSE (100%) mode change 100644 => 100755 create mode 100755 node_modules/arr-flatten/README.md create mode 100755 node_modules/arr-flatten/index.js create mode 100644 node_modules/arr-flatten/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject => array-unique}/LICENSE (100%) mode change 100644 => 100755 create mode 100755 node_modules/array-unique/README.md create mode 100755 node_modules/array-unique/index.js create mode 100644 node_modules/array-unique/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules => }/arrify/index.js (72%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules => }/arrify/license (100%) create mode 100644 node_modules/arrify/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules => }/arrify/readme.md (89%) create mode 100644 node_modules/async-each/.npmignore create mode 100644 node_modules/async-each/CHANGELOG.md create mode 100644 node_modules/async-each/README.md create mode 100644 node_modules/async-each/bower.json create mode 100644 node_modules/async-each/component.json create mode 100644 node_modules/async-each/index.js create mode 100644 node_modules/async-each/package.json rename node_modules/{jade/node_modules/constantinople/node_modules/acorn => async}/LICENSE (94%) create mode 100644 node_modules/async/README.md create mode 100644 node_modules/async/component.json create mode 100755 node_modules/async/lib/async.js create mode 100644 node_modules/async/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/minimatch => balanced-match}/.npmignore (56%) rename node_modules/{forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion => balanced-match}/.travis.yml (100%) create mode 100644 node_modules/balanced-match/LICENSE.md create mode 100644 node_modules/balanced-match/Makefile create mode 100644 node_modules/balanced-match/README.md create mode 100644 node_modules/balanced-match/example.js create mode 100644 node_modules/balanced-match/index.js create mode 100644 node_modules/balanced-match/package.json create mode 100644 node_modules/balanced-match/test/balanced.js create mode 100644 node_modules/binary-extensions/binary-extensions.json create mode 100644 node_modules/binary-extensions/license create mode 100644 node_modules/binary-extensions/package.json create mode 100644 node_modules/binary-extensions/readme.md create mode 100644 node_modules/brace-expansion/.npmignore create mode 100644 node_modules/brace-expansion/README.md create mode 100644 node_modules/brace-expansion/example.js create mode 100644 node_modules/brace-expansion/index.js create mode 100644 node_modules/brace-expansion/package.json create mode 100644 node_modules/braces/LICENSE create mode 100644 node_modules/braces/README.md create mode 100644 node_modules/braces/index.js create mode 100644 node_modules/braces/package.json create mode 100644 node_modules/broadway/.npmignore create mode 100644 node_modules/broadway/.travis.yml create mode 100644 node_modules/broadway/LICENSE create mode 100644 node_modules/broadway/README.md create mode 100755 node_modules/broadway/bin/build create mode 100644 node_modules/broadway/examples/browser/app.js create mode 100644 node_modules/broadway/examples/browser/index.html create mode 100644 node_modules/broadway/examples/browser/plugins/helloworld.js create mode 100644 node_modules/broadway/examples/nodejs/app.js create mode 100644 node_modules/broadway/examples/nodejs/plugins/helloworld.js create mode 100644 node_modules/broadway/lib/broadway.js create mode 100644 node_modules/broadway/lib/broadway/app.js create mode 100644 node_modules/broadway/lib/broadway/bootstrapper.js create mode 100644 node_modules/broadway/lib/broadway/browser.js create mode 100644 node_modules/broadway/lib/broadway/common/directories.js create mode 100644 node_modules/broadway/lib/broadway/common/index.js create mode 100644 node_modules/broadway/lib/broadway/features/index.js create mode 100644 node_modules/broadway/lib/broadway/plugins/config.js create mode 100644 node_modules/broadway/lib/broadway/plugins/directories.js create mode 100644 node_modules/broadway/lib/broadway/plugins/exceptions.js create mode 100644 node_modules/broadway/lib/broadway/plugins/inspect.js create mode 100644 node_modules/broadway/lib/broadway/plugins/log.js create mode 100644 node_modules/broadway/package.json create mode 100644 node_modules/broadway/test/common/directories-test.js create mode 100644 node_modules/broadway/test/core/app-init-test.js create mode 100644 node_modules/broadway/test/core/app-test.js create mode 100644 node_modules/broadway/test/core/broadway-test.js rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/test/d/d/t => broadway/test/fixtures/.gitkeep} (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/test/d/t => broadway/test/fixtures/empty-app/.gitkeep} (100%) create mode 100644 node_modules/broadway/test/fixtures/sample-app.json create mode 100644 node_modules/broadway/test/fixtures/sample-app/app/index.js create mode 100644 node_modules/broadway/test/fixtures/sample-app/config/topics.json create mode 100644 node_modules/broadway/test/helpers/assert.js create mode 100644 node_modules/broadway/test/helpers/helpers.js create mode 100644 node_modules/broadway/test/helpers/macros.js create mode 100644 node_modules/broadway/test/plugins/config-test.js create mode 100644 node_modules/broadway/test/plugins/directories-test.js create mode 100644 node_modules/broadway/test/plugins/log-test.js create mode 100644 node_modules/chokidar/CHANGELOG.md create mode 100644 node_modules/chokidar/README.md create mode 100755 node_modules/chokidar/index.js create mode 100644 node_modules/chokidar/lib/fsevents-handler.js create mode 100644 node_modules/chokidar/lib/nodefs-handler.js create mode 100644 node_modules/chokidar/package.json create mode 100644 node_modules/cliff/.npmignore create mode 100644 node_modules/cliff/LICENSE create mode 100644 node_modules/cliff/README.md create mode 100755 node_modules/cliff/assets/inspect.png create mode 100755 node_modules/cliff/assets/put-object-rows.png create mode 100755 node_modules/cliff/assets/put-object.png create mode 100755 node_modules/cliff/assets/put-rows-colors.png create mode 100755 node_modules/cliff/assets/put-rows.png create mode 100755 node_modules/cliff/assets/string-object-rows.png create mode 100755 node_modules/cliff/assets/string-rows.png create mode 100644 node_modules/cliff/examples/inspect.js create mode 100644 node_modules/cliff/examples/put-object-rows.js create mode 100644 node_modules/cliff/examples/put-object.js create mode 100644 node_modules/cliff/examples/put-rows-colors.js create mode 100644 node_modules/cliff/examples/put-rows.js create mode 100644 node_modules/cliff/examples/string-object-rows.js create mode 100644 node_modules/cliff/examples/string-rows.js create mode 100644 node_modules/cliff/lib/cliff.js create mode 100644 node_modules/cliff/package.json create mode 100644 node_modules/cliff/test/cliff-test.js create mode 100644 node_modules/colors/MIT-LICENSE.txt create mode 100644 node_modules/colors/ReadMe.md create mode 100644 node_modules/colors/colors.js create mode 100644 node_modules/colors/example.html create mode 100644 node_modules/colors/example.js create mode 100644 node_modules/colors/package.json create mode 100644 node_modules/colors/test.js create mode 100644 node_modules/colors/themes/winston-dark.js create mode 100644 node_modules/colors/themes/winston-light.js rename node_modules/{forever/node_modules/forever-monitor/node_modules/minimatch => concat-map}/.travis.yml (60%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist => concat-map}/LICENSE (100%) create mode 100644 node_modules/concat-map/README.markdown create mode 100644 node_modules/concat-map/example/map.js create mode 100644 node_modules/concat-map/index.js create mode 100644 node_modules/concat-map/package.json create mode 100644 node_modules/concat-map/test/map.js create mode 100644 node_modules/core-util-is/LICENSE create mode 100644 node_modules/core-util-is/README.md create mode 100644 node_modules/core-util-is/float.patch rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is => core-util-is/lib}/util.js (88%) create mode 100644 node_modules/core-util-is/package.json create mode 100644 node_modules/core-util-is/test.js create mode 100644 node_modules/cycle/README.md create mode 100644 node_modules/cycle/cycle.js create mode 100644 node_modules/cycle/package.json create mode 100644 node_modules/deep-equal/.travis.yml create mode 100644 node_modules/deep-equal/LICENSE create mode 100644 node_modules/deep-equal/example/cmp.js create mode 100644 node_modules/deep-equal/index.js create mode 100644 node_modules/deep-equal/lib/is_arguments.js create mode 100644 node_modules/deep-equal/lib/keys.js create mode 100644 node_modules/deep-equal/package.json create mode 100644 node_modules/deep-equal/readme.markdown create mode 100644 node_modules/deep-equal/test/cmp.js create mode 100644 node_modules/event-stream/.gitmodules rename node_modules/{forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules => }/event-stream/.npmignore (100%) create mode 100644 node_modules/event-stream/LICENCE create mode 100644 node_modules/event-stream/examples/pretty.js create mode 100644 node_modules/event-stream/index.js create mode 100644 node_modules/event-stream/node_modules/optimist/.npmignore create mode 100644 node_modules/event-stream/node_modules/optimist/LICENSE create mode 100644 node_modules/event-stream/node_modules/optimist/README.markdown create mode 100644 node_modules/event-stream/node_modules/optimist/examples/bool.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/boolean_double.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/boolean_single.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/default_hash.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/default_singles.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/divide.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/line_count.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/line_count_options.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/line_count_wrap.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/nonopt.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/reflect.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/short.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/string.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/usage-options.js create mode 100644 node_modules/event-stream/node_modules/optimist/examples/xup.js create mode 100644 node_modules/event-stream/node_modules/optimist/index.js create mode 100644 node_modules/event-stream/node_modules/optimist/package.json create mode 100644 node_modules/event-stream/node_modules/optimist/test/_.js create mode 100644 node_modules/event-stream/node_modules/optimist/test/_/argv.js create mode 100755 node_modules/event-stream/node_modules/optimist/test/_/bin.js create mode 100644 node_modules/event-stream/node_modules/optimist/test/parse.js create mode 100644 node_modules/event-stream/node_modules/optimist/test/usage.js rename node_modules/{jade/node_modules/constantinople/node_modules/acorn/dist/.keep => event-stream/out} (100%) create mode 100644 node_modules/event-stream/package.json create mode 100644 node_modules/event-stream/readme.markdown rename node_modules/{forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules => }/event-stream/test/.npmignore (100%) create mode 100644 node_modules/event-stream/test/package.json create mode 100644 node_modules/event-stream/test/pipe.async.js create mode 100644 node_modules/event-stream/test/readArray.asynct.js rename node_modules/{jade/node_modules/constantinople/node_modules/acorn/src/loose/acorn_loose.js => event-stream/test/readme.markdown} (100%) create mode 100644 node_modules/event-stream/test/simple-map.asynct.js create mode 100644 node_modules/event-stream/test/split.asynct.js create mode 100644 node_modules/event-stream/test/writeArray.asynct.js create mode 100644 node_modules/eventemitter2/README.md create mode 100644 node_modules/eventemitter2/index.js create mode 100644 node_modules/eventemitter2/lib/eventemitter2.js create mode 100644 node_modules/eventemitter2/package.json create mode 100644 node_modules/expand-brackets/LICENSE create mode 100644 node_modules/expand-brackets/README.md create mode 100644 node_modules/expand-brackets/index.js create mode 100644 node_modules/expand-brackets/package.json create mode 100755 node_modules/expand-range/LICENSE create mode 100755 node_modules/expand-range/README.md create mode 100755 node_modules/expand-range/index.js create mode 100644 node_modules/expand-range/package.json create mode 100644 node_modules/extglob/LICENSE create mode 100644 node_modules/extglob/README.md create mode 100644 node_modules/extglob/index.js create mode 100644 node_modules/extglob/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten => eyes}/LICENSE (83%) create mode 100644 node_modules/eyes/Makefile create mode 100644 node_modules/eyes/README.md create mode 100644 node_modules/eyes/lib/eyes.js create mode 100644 node_modules/eyes/package.json create mode 100644 node_modules/eyes/test/eyes-test.js create mode 100644 node_modules/filename-regex/README.md create mode 100644 node_modules/filename-regex/index.js create mode 100644 node_modules/filename-regex/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob => fill-range}/LICENSE (100%) mode change 100644 => 100755 create mode 100755 node_modules/fill-range/README.md create mode 100644 node_modules/fill-range/index.js create mode 100644 node_modules/fill-range/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob => for-in}/LICENSE (100%) create mode 100644 node_modules/for-in/README.md create mode 100644 node_modules/for-in/index.js create mode 100644 node_modules/for-in/package.json create mode 100644 node_modules/for-own/LICENSE create mode 100644 node_modules/for-own/README.md create mode 100644 node_modules/for-own/index.js create mode 100644 node_modules/for-own/package.json delete mode 100644 node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/LICENCE delete mode 100644 node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/example/example.js delete mode 100644 node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/rs.js delete mode 100644 node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/test/basic.js delete mode 100644 node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/test/defaults.js delete mode 100644 node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/test/many.js delete mode 120000 node_modules/forever/node_modules/forever-monitor/node_modules/.bin/watch create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/index.js create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/license rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/{ => anymatch/node_modules}/arrify/package.json (56%) create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/readme.md mode change 100755 => 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/README.md mode change 100755 => 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/index.js mode change 100644 => 100755 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/arr-flatten/package.json delete mode 100755 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/README.md delete mode 100755 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/index.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/package.json mode change 100644 => 100755 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/array-unique/package.json create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/README.md create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/build/build.js create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/component.json create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/index.js create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/package.json create mode 100755 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/LICENSE mode change 100644 => 100755 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/README.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/index.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/package.json create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/LICENSE rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/{extglob/node_modules => }/is-extglob/README.md (100%) rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/{extglob/node_modules => }/is-extglob/index.js (100%) rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/{parse-glob/node_modules => }/is-extglob/package.json (93%) delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/README.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/index.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/package.json create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/LICENSE create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/.travis.yml create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/.zuul.yml create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/LICENSE create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/README.md create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/index.js create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/package.json create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/test/basic.js create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/LICENSE create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/README.md create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/index.js create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/package.json create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/LICENSE create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/README.md create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/index.js create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/package.json rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/{readdirp/node_modules/readable-stream/node_modules => }/inherits/LICENSE (100%) rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/{readdirp/node_modules/readable-stream/node_modules => }/inherits/README.md (100%) rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/{readdirp/node_modules/readable-stream/node_modules => }/inherits/inherits.js (100%) rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/{readdirp/node_modules/readable-stream/node_modules => }/inherits/inherits_browser.js (100%) rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/{readdirp/node_modules/readable-stream/node_modules => }/inherits/package.json (83%) rename node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/{readdirp/node_modules/readable-stream/node_modules => }/inherits/test.js (100%) delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/LICENSE.txt delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/README.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/index.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/README.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/index.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/LICENSE delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/README.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/index.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/README.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/index.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/LICENSE.txt delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/README.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/index.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/package.json create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/LICENSE create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/test.js create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/.npmignore delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/README.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/basic.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/foreach.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/README.md delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/bench.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/sigmund.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/test/basic.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/basic.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/brace-expand.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/caching.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/defaults.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/extglob-ending-with-state-char.js create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/.gitignore create mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/test/.gitignore delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/LICENSE delete mode 100755 node_modules/forever/node_modules/forever-monitor/node_modules/watch/cli.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/main.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/all_bool.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/stop_early.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/unknown.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/package.json delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/readme.mkd delete mode 100755 node_modules/forever/node_modules/forever-monitor/node_modules/watch/release.sh delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_monitor.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_monitorRootDirectory.js delete mode 100644 node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_watchTree.js create mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js delete mode 100644 node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js create mode 100644 node_modules/glob-base/LICENSE create mode 100644 node_modules/glob-base/README.md create mode 100644 node_modules/glob-base/index.js create mode 100644 node_modules/glob-base/package.json create mode 100644 node_modules/glob-parent/.npmignore create mode 100644 node_modules/glob-parent/.travis.yml create mode 100644 node_modules/glob-parent/LICENSE create mode 100644 node_modules/glob-parent/README.md create mode 100644 node_modules/glob-parent/index.js create mode 100644 node_modules/glob-parent/package.json create mode 100644 node_modules/glob-parent/test.js rename node_modules/{forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache => glob}/LICENSE (100%) create mode 100644 node_modules/glob/README.md create mode 100644 node_modules/glob/common.js create mode 100644 node_modules/glob/glob.js create mode 100644 node_modules/glob/package.json create mode 100644 node_modules/glob/sync.js create mode 100644 node_modules/graceful-fs/LICENSE create mode 100644 node_modules/graceful-fs/README.md create mode 100644 node_modules/graceful-fs/fs.js create mode 100644 node_modules/graceful-fs/graceful-fs.js create mode 100644 node_modules/graceful-fs/legacy-streams.js create mode 100644 node_modules/graceful-fs/package.json create mode 100644 node_modules/graceful-fs/polyfills.js rename node_modules/{forever/node_modules/flatiron/node_modules/prompt/node_modules/read => i}/.npmignore (81%) create mode 100644 node_modules/i/.travis.yml rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray => i}/LICENSE (82%) create mode 100644 node_modules/i/README.md create mode 100644 node_modules/i/lib/defaults.js create mode 100644 node_modules/i/lib/inflect.js create mode 100644 node_modules/i/lib/inflections.js create mode 100644 node_modules/i/lib/methods.js create mode 100644 node_modules/i/lib/native.js create mode 100644 node_modules/i/lib/util.js create mode 100644 node_modules/i/package.json create mode 100644 node_modules/i/test/inflector/cases.js create mode 100644 node_modules/i/test/inflector/inflections-test.js create mode 100644 node_modules/i/test/inflector/methods-test.js create mode 100644 node_modules/i/test/utils/array-test.js create mode 100644 node_modules/i/test/utils/string-test.js create mode 100644 node_modules/inflight/.eslintrc create mode 100644 node_modules/inflight/LICENSE create mode 100644 node_modules/inflight/README.md create mode 100644 node_modules/inflight/inflight.js create mode 100644 node_modules/inflight/package.json create mode 100644 node_modules/inflight/test.js create mode 100644 node_modules/inherits/LICENSE create mode 100644 node_modules/inherits/README.md create mode 100644 node_modules/inherits/inherits.js create mode 100644 node_modules/inherits/inherits_browser.js create mode 100644 node_modules/inherits/package.json create mode 100644 node_modules/inherits/test.js rename node_modules/{forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund => ini}/LICENSE (100%) create mode 100644 node_modules/ini/README.md create mode 100644 node_modules/ini/ini.js create mode 100644 node_modules/ini/package.json create mode 100644 node_modules/is-binary-path/index.js create mode 100644 node_modules/is-binary-path/license create mode 100644 node_modules/is-binary-path/package.json create mode 100644 node_modules/is-binary-path/readme.md create mode 100644 node_modules/is-buffer/.travis.yml create mode 100644 node_modules/is-buffer/.zuul.yml create mode 100644 node_modules/is-buffer/LICENSE create mode 100644 node_modules/is-buffer/README.md create mode 100644 node_modules/is-buffer/index.js create mode 100644 node_modules/is-buffer/package.json create mode 100644 node_modules/is-buffer/test/basic.js create mode 100644 node_modules/is-dotfile/LICENSE create mode 100644 node_modules/is-dotfile/README.md create mode 100644 node_modules/is-dotfile/index.js create mode 100644 node_modules/is-dotfile/package.json create mode 100644 node_modules/is-equal-shallow/LICENSE create mode 100644 node_modules/is-equal-shallow/README.md create mode 100644 node_modules/is-equal-shallow/index.js create mode 100644 node_modules/is-equal-shallow/package.json create mode 100644 node_modules/is-extendable/LICENSE create mode 100644 node_modules/is-extendable/README.md create mode 100644 node_modules/is-extendable/index.js create mode 100644 node_modules/is-extendable/package.json create mode 100644 node_modules/is-extglob/LICENSE rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules => }/is-extglob/README.md (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules => }/is-extglob/index.js (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules => }/is-extglob/package.json (63%) create mode 100644 node_modules/is-glob/LICENSE rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules => }/is-glob/README.md (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules => }/is-glob/index.js (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules => }/is-glob/package.json (72%) create mode 100644 node_modules/is-number/LICENSE create mode 100644 node_modules/is-number/README.md create mode 100644 node_modules/is-number/index.js create mode 100644 node_modules/is-number/package.json create mode 100644 node_modules/is-primitive/LICENSE create mode 100644 node_modules/is-primitive/README.md create mode 100644 node_modules/is-primitive/index.js create mode 100644 node_modules/is-primitive/package.json create mode 100644 node_modules/isarray/README.md create mode 100644 node_modules/isarray/build/build.js create mode 100644 node_modules/isarray/component.json create mode 100644 node_modules/isarray/index.js create mode 100644 node_modules/isarray/package.json create mode 100644 node_modules/isobject/LICENSE rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules => }/isobject/README.md (95%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules => }/isobject/index.js (55%) create mode 100644 node_modules/isobject/package.json delete mode 120000 node_modules/jade/node_modules/constantinople/node_modules/.bin/acorn delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/.editorconfig delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/.gitattributes delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/.npmignore delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/.tern-project delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/.travis.yml delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/AUTHORS delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/README.md delete mode 100755 node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/acorn delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/build-acorn.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/generate-identifier-regex.js delete mode 100755 node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/update_authors.sh delete mode 100755 node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/without_eval delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/dist/acorn.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/dist/acorn_csp.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/dist/acorn_loose.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/dist/walk.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/package.json delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/expression.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/identifier.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/index.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/location.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/locutil.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/loose/expression.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/loose/index.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/loose/parseutil.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/loose/state.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/loose/statement.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/loose/tokenize.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/lval.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/node.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/options.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/parseutil.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/state.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/statement.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/tokencontext.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/tokenize.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/tokentype.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/util.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/walk/index.js delete mode 100644 node_modules/jade/node_modules/constantinople/node_modules/acorn/src/whitespace.js create mode 100755 node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/bin/prepublish.sh mode change 100644 => 100755 node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/expression.js mode change 100644 => 100755 node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/location.js delete mode 100644 node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/locutil.js mode change 100644 => 100755 node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/lval.js mode change 100644 => 100755 node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/node.js create mode 100644 node_modules/kind-of/LICENSE create mode 100644 node_modules/kind-of/README.md create mode 100644 node_modules/kind-of/index.js create mode 100644 node_modules/kind-of/package.json create mode 100755 node_modules/micromatch/LICENSE create mode 100755 node_modules/micromatch/README.md create mode 100755 node_modules/micromatch/index.js create mode 100644 node_modules/micromatch/lib/chars.js create mode 100644 node_modules/micromatch/lib/expand.js create mode 100644 node_modules/micromatch/lib/glob.js create mode 100644 node_modules/micromatch/lib/utils.js create mode 100644 node_modules/micromatch/package.json create mode 100644 node_modules/minimatch/LICENSE create mode 100644 node_modules/minimatch/README.md rename node_modules/{forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules => }/minimatch/browser.js (91%) create mode 100644 node_modules/minimatch/minimatch.js create mode 100644 node_modules/minimatch/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/.travis.yml (100%) create mode 100644 node_modules/minimist/LICENSE rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/example/parse.js (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/index.js (63%) create mode 100644 node_modules/minimist/package.json rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/readme.markdown (63%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/bool.js (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/dash.js (74%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/default_bool.js (58%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/dotted.js (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/long.js (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/num.js (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/parse.js (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/parse_modified.js (80%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/short.js (100%) rename node_modules/{forever/node_modules/forever-monitor/node_modules/watch/node_modules => }/minimist/test/whitespace.js (100%) create mode 100644 node_modules/mkdirp/.travis.yml create mode 100644 node_modules/mkdirp/LICENSE create mode 100755 node_modules/mkdirp/bin/cmd.js create mode 100644 node_modules/mkdirp/bin/usage.txt create mode 100644 node_modules/mkdirp/examples/pow.js create mode 100644 node_modules/mkdirp/index.js create mode 100644 node_modules/mkdirp/node_modules/minimist/.travis.yml create mode 100644 node_modules/mkdirp/node_modules/minimist/LICENSE create mode 100644 node_modules/mkdirp/node_modules/minimist/example/parse.js create mode 100644 node_modules/mkdirp/node_modules/minimist/index.js create mode 100644 node_modules/mkdirp/node_modules/minimist/package.json create mode 100644 node_modules/mkdirp/node_modules/minimist/readme.markdown create mode 100644 node_modules/mkdirp/node_modules/minimist/test/dash.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/dotted.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/long.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/short.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/mkdirp/package.json create mode 100644 node_modules/mkdirp/readme.markdown create mode 100644 node_modules/mkdirp/test/chmod.js create mode 100644 node_modules/mkdirp/test/clobber.js create mode 100644 node_modules/mkdirp/test/mkdirp.js create mode 100644 node_modules/mkdirp/test/opts_fs.js create mode 100644 node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 node_modules/mkdirp/test/perm.js create mode 100644 node_modules/mkdirp/test/perm_sync.js create mode 100644 node_modules/mkdirp/test/race.js create mode 100644 node_modules/mkdirp/test/rel.js create mode 100644 node_modules/mkdirp/test/return.js create mode 100644 node_modules/mkdirp/test/return_sync.js create mode 100644 node_modules/mkdirp/test/root.js create mode 100644 node_modules/mkdirp/test/sync.js create mode 100644 node_modules/mkdirp/test/umask.js create mode 100644 node_modules/mkdirp/test/umask_sync.js create mode 100644 node_modules/nconf/.npmignore create mode 100644 node_modules/nconf/.travis.yml create mode 100644 node_modules/nconf/CHANGELOG.md create mode 100644 node_modules/nconf/LICENSE create mode 100644 node_modules/nconf/README.md create mode 100644 node_modules/nconf/docs/docco.css create mode 100644 node_modules/nconf/docs/nconf.html create mode 100644 node_modules/nconf/docs/nconf/common.html create mode 100644 node_modules/nconf/docs/nconf/formats.html create mode 100644 node_modules/nconf/docs/nconf/provider.html create mode 100644 node_modules/nconf/docs/nconf/stores.html create mode 100644 node_modules/nconf/docs/nconf/stores/file.html create mode 100644 node_modules/nconf/docs/nconf/stores/memory.html create mode 100644 node_modules/nconf/docs/nconf/stores/system.html create mode 100644 node_modules/nconf/lib/nconf.js create mode 100644 node_modules/nconf/lib/nconf/common.js create mode 100644 node_modules/nconf/lib/nconf/formats.js create mode 100644 node_modules/nconf/lib/nconf/provider.js create mode 100644 node_modules/nconf/lib/nconf/stores/argv.js create mode 100644 node_modules/nconf/lib/nconf/stores/env.js create mode 100644 node_modules/nconf/lib/nconf/stores/file.js create mode 100644 node_modules/nconf/lib/nconf/stores/literal.js create mode 100644 node_modules/nconf/lib/nconf/stores/memory.js create mode 100644 node_modules/nconf/node_modules/async/LICENSE create mode 100644 node_modules/nconf/node_modules/async/README.md create mode 100644 node_modules/nconf/node_modules/async/component.json create mode 100755 node_modules/nconf/node_modules/async/lib/async.js create mode 100644 node_modules/nconf/node_modules/async/package.json create mode 100644 node_modules/nconf/package.json create mode 100644 node_modules/nconf/test/common-test.js create mode 100644 node_modules/nconf/test/complete-test.js create mode 100644 node_modules/nconf/test/fixtures/bom.json create mode 100644 node_modules/nconf/test/fixtures/complete.json create mode 100644 node_modules/nconf/test/fixtures/data.js create mode 100644 node_modules/nconf/test/fixtures/hierarchy/global.json create mode 100644 node_modules/nconf/test/fixtures/hierarchy/hierarchical.json create mode 100644 node_modules/nconf/test/fixtures/hierarchy/user.json create mode 100644 node_modules/nconf/test/fixtures/malformed.json create mode 100644 node_modules/nconf/test/fixtures/merge/file1.json create mode 100644 node_modules/nconf/test/fixtures/merge/file2.json create mode 100644 node_modules/nconf/test/fixtures/no-bom.json create mode 100644 node_modules/nconf/test/fixtures/scripts/nconf-argv.js create mode 100644 node_modules/nconf/test/fixtures/scripts/nconf-change-argv.js create mode 100644 node_modules/nconf/test/fixtures/scripts/nconf-env.js create mode 100644 node_modules/nconf/test/fixtures/scripts/nconf-hierarchical-file-argv.js create mode 100644 node_modules/nconf/test/fixtures/scripts/nconf-hierarchical-load-merge.js create mode 100644 node_modules/nconf/test/fixtures/scripts/nconf-hierarchical-load-save.js create mode 100644 node_modules/nconf/test/fixtures/scripts/nconf-nested-env.js create mode 100644 node_modules/nconf/test/fixtures/scripts/provider-argv.js create mode 100644 node_modules/nconf/test/fixtures/scripts/provider-env.js create mode 100644 node_modules/nconf/test/helpers.js create mode 100644 node_modules/nconf/test/hierarchy-test.js create mode 100644 node_modules/nconf/test/mocks/mock-store.js create mode 100644 node_modules/nconf/test/nconf-test.js create mode 100644 node_modules/nconf/test/provider-save-test.js create mode 100644 node_modules/nconf/test/provider-test.js create mode 100644 node_modules/nconf/test/stores/argv-test.js create mode 100644 node_modules/nconf/test/stores/env-test.js create mode 100644 node_modules/nconf/test/stores/file-store-test.js create mode 100644 node_modules/nconf/test/stores/literal-test.js create mode 100644 node_modules/nconf/test/stores/memory-store-test.js create mode 100644 node_modules/nconf/usage.js create mode 100644 node_modules/ncp/.npmignore create mode 100644 node_modules/ncp/.travis.yml create mode 100644 node_modules/ncp/LICENSE.md create mode 100644 node_modules/ncp/README.md create mode 100755 node_modules/ncp/bin/ncp create mode 100644 node_modules/ncp/lib/ncp.js create mode 100644 node_modules/ncp/package.json create mode 100644 node_modules/ncp/test/fixtures/src/a create mode 100644 node_modules/ncp/test/fixtures/src/b create mode 100644 node_modules/ncp/test/fixtures/src/c create mode 100644 node_modules/ncp/test/fixtures/src/d create mode 100644 node_modules/ncp/test/fixtures/src/e create mode 100644 node_modules/ncp/test/fixtures/src/f create mode 100644 node_modules/ncp/test/fixtures/src/sub/a create mode 100644 node_modules/ncp/test/fixtures/src/sub/b create mode 100644 node_modules/ncp/test/ncp-test.js create mode 100644 node_modules/normalize-path/LICENSE create mode 100644 node_modules/normalize-path/README.md create mode 100644 node_modules/normalize-path/index.js create mode 100644 node_modules/normalize-path/package.json create mode 100644 node_modules/object.omit/LICENSE create mode 100644 node_modules/object.omit/README.md create mode 100644 node_modules/object.omit/index.js create mode 100644 node_modules/object.omit/package.json create mode 100644 node_modules/once/LICENSE create mode 100644 node_modules/once/README.md create mode 100644 node_modules/once/once.js create mode 100644 node_modules/once/package.json create mode 100644 node_modules/optimist/.travis.yml create mode 100644 node_modules/optimist/LICENSE create mode 100644 node_modules/optimist/example/bool.js create mode 100644 node_modules/optimist/example/boolean_double.js create mode 100644 node_modules/optimist/example/boolean_single.js create mode 100644 node_modules/optimist/example/default_hash.js create mode 100644 node_modules/optimist/example/default_singles.js create mode 100644 node_modules/optimist/example/divide.js create mode 100644 node_modules/optimist/example/line_count.js create mode 100644 node_modules/optimist/example/line_count_options.js create mode 100644 node_modules/optimist/example/line_count_wrap.js create mode 100644 node_modules/optimist/example/nonopt.js create mode 100644 node_modules/optimist/example/reflect.js create mode 100644 node_modules/optimist/example/short.js create mode 100644 node_modules/optimist/example/string.js create mode 100644 node_modules/optimist/example/usage-options.js create mode 100644 node_modules/optimist/example/xup.js create mode 100644 node_modules/optimist/index.js create mode 100644 node_modules/optimist/package.json create mode 100644 node_modules/optimist/readme.markdown create mode 100644 node_modules/optimist/test/_.js create mode 100644 node_modules/optimist/test/_/argv.js create mode 100755 node_modules/optimist/test/_/bin.js create mode 100644 node_modules/optimist/test/dash.js create mode 100644 node_modules/optimist/test/parse.js create mode 100644 node_modules/optimist/test/parse_modified.js create mode 100644 node_modules/optimist/test/short.js create mode 100644 node_modules/optimist/test/usage.js create mode 100644 node_modules/optimist/test/whitespace.js create mode 100644 node_modules/parse-glob/LICENSE create mode 100644 node_modules/parse-glob/README.md create mode 100644 node_modules/parse-glob/index.js create mode 100644 node_modules/parse-glob/package.json create mode 100644 node_modules/path-is-absolute/index.js create mode 100644 node_modules/path-is-absolute/license create mode 100644 node_modules/path-is-absolute/package.json create mode 100644 node_modules/path-is-absolute/readme.md create mode 100644 node_modules/pkginfo/.npmignore create mode 100644 node_modules/pkginfo/LICENSE create mode 100644 node_modules/pkginfo/README.md create mode 100644 node_modules/pkginfo/docs/docco.css create mode 100644 node_modules/pkginfo/docs/pkginfo.html create mode 100644 node_modules/pkginfo/examples/all-properties.js create mode 100644 node_modules/pkginfo/examples/array-argument.js create mode 100644 node_modules/pkginfo/examples/multiple-properties.js create mode 100644 node_modules/pkginfo/examples/object-argument.js create mode 100644 node_modules/pkginfo/examples/package.json create mode 100644 node_modules/pkginfo/examples/single-property.js create mode 100644 node_modules/pkginfo/examples/subdir/package.json create mode 100644 node_modules/pkginfo/examples/target-dir.js create mode 100644 node_modules/pkginfo/lib/pkginfo.js create mode 100644 node_modules/pkginfo/package.json create mode 100644 node_modules/pkginfo/test/pkginfo-test.js create mode 100644 node_modules/preserve/.gitattributes create mode 100644 node_modules/preserve/.jshintrc create mode 100644 node_modules/preserve/.npmignore create mode 100644 node_modules/preserve/.travis.yml create mode 100644 node_modules/preserve/.verb.md create mode 100644 node_modules/preserve/LICENSE create mode 100644 node_modules/preserve/README.md create mode 100644 node_modules/preserve/index.js create mode 100644 node_modules/preserve/package.json create mode 100644 node_modules/preserve/test.js create mode 100644 node_modules/process-nextick-args/.travis.yml create mode 100644 node_modules/process-nextick-args/index.js create mode 100644 node_modules/process-nextick-args/license.md create mode 100644 node_modules/process-nextick-args/package.json create mode 100644 node_modules/process-nextick-args/readme.md create mode 100644 node_modules/process-nextick-args/test.js create mode 100644 node_modules/ps-tree/.npmignore create mode 100644 node_modules/ps-tree/index.js create mode 100644 node_modules/ps-tree/package.json create mode 100644 node_modules/ps-tree/readme.markdown create mode 100755 node_modules/randomatic/LICENSE create mode 100644 node_modules/randomatic/README.md create mode 100644 node_modules/randomatic/index.js create mode 100644 node_modules/randomatic/package.json create mode 100644 node_modules/readable-stream/.npmignore create mode 100644 node_modules/readable-stream/.travis.yml create mode 100644 node_modules/readable-stream/.zuul.yml create mode 100644 node_modules/readable-stream/LICENSE create mode 100644 node_modules/readable-stream/README.md create mode 100644 node_modules/readable-stream/doc/stream.markdown create mode 100644 node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 node_modules/readable-stream/duplex.js create mode 100644 node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/readable-stream/package.json create mode 100644 node_modules/readable-stream/passthrough.js create mode 100644 node_modules/readable-stream/readable.js create mode 100644 node_modules/readable-stream/transform.js create mode 100644 node_modules/readable-stream/writable.js create mode 100644 node_modules/readdirp/.npmignore create mode 100644 node_modules/readdirp/.travis.yml create mode 100644 node_modules/readdirp/LICENSE create mode 100644 node_modules/readdirp/README.md create mode 100644 node_modules/readdirp/examples/Readme.md create mode 100644 node_modules/readdirp/examples/callback-api.js create mode 100644 node_modules/readdirp/examples/grep.js create mode 100644 node_modules/readdirp/examples/package.json create mode 100644 node_modules/readdirp/examples/stream-api-pipe.js create mode 100644 node_modules/readdirp/examples/stream-api.js create mode 100644 node_modules/readdirp/package.json create mode 100644 node_modules/readdirp/readdirp.js create mode 100644 node_modules/readdirp/stream-api.js create mode 100644 node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 create mode 100644 node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 create mode 100644 node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 create mode 100644 node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 create mode 100644 node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 create mode 100644 node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 create mode 100644 node_modules/readdirp/test/bed/root_file1.ext1 create mode 100644 node_modules/readdirp/test/bed/root_file2.ext2 create mode 100644 node_modules/readdirp/test/bed/root_file3.ext3 create mode 100644 node_modules/readdirp/test/readdirp-stream.js create mode 100644 node_modules/readdirp/test/readdirp.js create mode 100644 node_modules/regex-cache/LICENSE create mode 100644 node_modules/regex-cache/README.md create mode 100644 node_modules/regex-cache/index.js create mode 100644 node_modules/regex-cache/package.json create mode 100644 node_modules/repeat-element/LICENSE create mode 100644 node_modules/repeat-element/README.md create mode 100644 node_modules/repeat-element/index.js create mode 100644 node_modules/repeat-element/package.json create mode 100644 node_modules/repeat-string/LICENSE create mode 100644 node_modules/repeat-string/README.md create mode 100644 node_modules/repeat-string/index.js create mode 100644 node_modules/repeat-string/package.json create mode 100644 node_modules/rimraf/LICENSE create mode 100644 node_modules/rimraf/README.md create mode 100755 node_modules/rimraf/bin.js create mode 100644 node_modules/rimraf/package.json create mode 100644 node_modules/rimraf/rimraf.js create mode 100644 node_modules/stack-trace/.npmignore create mode 100644 node_modules/stack-trace/License create mode 100644 node_modules/stack-trace/Makefile create mode 100644 node_modules/stack-trace/Readme.md create mode 100644 node_modules/stack-trace/lib/stack-trace.js create mode 100644 node_modules/stack-trace/package.json create mode 100644 node_modules/string_decoder/.npmignore create mode 100644 node_modules/string_decoder/LICENSE create mode 100644 node_modules/string_decoder/README.md create mode 100644 node_modules/string_decoder/index.js create mode 100644 node_modules/string_decoder/package.json create mode 100644 node_modules/success-symbol/LICENSE create mode 100644 node_modules/success-symbol/README.md create mode 100644 node_modules/success-symbol/index.js create mode 100644 node_modules/success-symbol/package.json create mode 100644 node_modules/util-deprecate/History.md create mode 100644 node_modules/util-deprecate/LICENSE create mode 100644 node_modules/util-deprecate/README.md create mode 100644 node_modules/util-deprecate/browser.js create mode 100644 node_modules/util-deprecate/node.js create mode 100644 node_modules/util-deprecate/package.json create mode 100644 node_modules/utile/.npmignore create mode 100644 node_modules/utile/.travis.yml create mode 100644 node_modules/utile/CHANGELOG.md create mode 100644 node_modules/utile/LICENSE create mode 100644 node_modules/utile/README.md create mode 100644 node_modules/utile/lib/args.js create mode 100644 node_modules/utile/lib/base64.js create mode 100644 node_modules/utile/lib/file.js create mode 100644 node_modules/utile/lib/format.js create mode 100644 node_modules/utile/lib/index.js create mode 100644 node_modules/utile/package.json create mode 100644 node_modules/utile/test/file-test.js create mode 100644 node_modules/utile/test/fixtures/read-json-file/config.json create mode 100644 node_modules/utile/test/fixtures/require-directory/directory/index.js create mode 100644 node_modules/utile/test/fixtures/require-directory/helloWorld.js create mode 100644 node_modules/utile/test/format-test.js create mode 100644 node_modules/utile/test/function-args-test.js create mode 100644 node_modules/utile/test/helpers/macros.js create mode 100644 node_modules/utile/test/random-string-test.js create mode 100644 node_modules/utile/test/require-directory-test.js create mode 100644 node_modules/utile/test/utile-test.js create mode 100644 node_modules/winston/.npmignore create mode 100644 node_modules/winston/.travis.yml create mode 100644 node_modules/winston/CHANGELOG.md create mode 100644 node_modules/winston/LICENSE create mode 100644 node_modules/winston/README.md create mode 100644 node_modules/winston/docs/transports.md create mode 100644 node_modules/winston/examples/couchdb.js create mode 100644 node_modules/winston/examples/custom-levels.js create mode 100644 node_modules/winston/examples/exception.js create mode 100644 node_modules/winston/examples/raw-mode.js create mode 100644 node_modules/winston/examples/webhook-post.js create mode 100644 node_modules/winston/lib/winston.js create mode 100644 node_modules/winston/lib/winston/common.js create mode 100644 node_modules/winston/lib/winston/config.js create mode 100644 node_modules/winston/lib/winston/config/cli-config.js create mode 100644 node_modules/winston/lib/winston/config/npm-config.js create mode 100644 node_modules/winston/lib/winston/config/syslog-config.js create mode 100644 node_modules/winston/lib/winston/container.js create mode 100644 node_modules/winston/lib/winston/exception.js create mode 100755 node_modules/winston/lib/winston/logger.js create mode 100644 node_modules/winston/lib/winston/transports.js create mode 100644 node_modules/winston/lib/winston/transports/console.js create mode 100644 node_modules/winston/lib/winston/transports/daily-rotate-file.js create mode 100644 node_modules/winston/lib/winston/transports/file.js create mode 100644 node_modules/winston/lib/winston/transports/http.js create mode 100644 node_modules/winston/lib/winston/transports/memory.js create mode 100644 node_modules/winston/lib/winston/transports/transport.js create mode 100644 node_modules/winston/lib/winston/transports/webhook.js create mode 100644 node_modules/winston/package.json create mode 100644 node_modules/winston/test/cli-test.js create mode 100644 node_modules/winston/test/container-test.js create mode 100644 node_modules/winston/test/custom-timestamp-test.js create mode 100644 node_modules/winston/test/exception-test.js create mode 100644 node_modules/winston/test/fixtures/.gitkeep create mode 100644 node_modules/winston/test/fixtures/keys/agent2-cert.pem create mode 100644 node_modules/winston/test/fixtures/keys/agent2-key.pem create mode 100644 node_modules/winston/test/fixtures/logs/.gitkeep create mode 100644 node_modules/winston/test/fixtures/scripts/default-exceptions.js create mode 100644 node_modules/winston/test/fixtures/scripts/exit-on-error.js create mode 100644 node_modules/winston/test/fixtures/scripts/log-exceptions.js create mode 100644 node_modules/winston/test/fixtures/scripts/unhandle-exceptions.js create mode 100644 node_modules/winston/test/helpers.js create mode 100644 node_modules/winston/test/log-exception-test.js create mode 100644 node_modules/winston/test/log-rewriter-test.js create mode 100644 node_modules/winston/test/logger-levels-test.js create mode 100755 node_modules/winston/test/logger-test.js create mode 100644 node_modules/winston/test/transports/console-test.js create mode 100644 node_modules/winston/test/transports/daily-rotate-file-test.js create mode 100644 node_modules/winston/test/transports/file-maxfiles-test.js create mode 100644 node_modules/winston/test/transports/file-maxsize-test.js create mode 100644 node_modules/winston/test/transports/file-open-test.js create mode 100644 node_modules/winston/test/transports/file-stress-test.js create mode 100644 node_modules/winston/test/transports/file-test.js create mode 100644 node_modules/winston/test/transports/memory-test.js create mode 100644 node_modules/winston/test/transports/transport.js create mode 100644 node_modules/winston/test/transports/webhook-test.js create mode 100644 node_modules/winston/test/winston-test.js create mode 100644 node_modules/wordwrap/LICENSE create mode 100644 node_modules/wordwrap/README.markdown create mode 100644 node_modules/wordwrap/example/center.js create mode 100644 node_modules/wordwrap/example/meat.js create mode 100644 node_modules/wordwrap/index.js create mode 100644 node_modules/wordwrap/package.json create mode 100644 node_modules/wordwrap/test/break.js create mode 100644 node_modules/wordwrap/test/idleness.txt create mode 100644 node_modules/wordwrap/test/wrap.js create mode 100644 node_modules/wrappy/LICENSE create mode 100644 node_modules/wrappy/README.md create mode 100644 node_modules/wrappy/package.json create mode 100644 node_modules/wrappy/test/basic.js create mode 100644 node_modules/wrappy/wrappy.js diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 0000000..017896c --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/ncp b/node_modules/.bin/ncp new file mode 120000 index 0000000..1c02648 --- /dev/null +++ b/node_modules/.bin/ncp @@ -0,0 +1 @@ +../ncp/bin/ncp \ No newline at end of file diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf new file mode 120000 index 0000000..4cd49a4 --- /dev/null +++ b/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/LICENSE b/node_modules/ansi-green/LICENSE old mode 100755 new mode 100644 similarity index 89% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/LICENSE rename to node_modules/ansi-green/LICENSE index c2d4bd0..41283c9 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/LICENSE +++ b/node_modules/ansi-green/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2015, Jon Schlinkert.Copyright (c) 2012-2015, The Dojo Foundation.copyright (c) 2009-2015, Jeremy Ashkenas. +Copyright (c) <%= year() %>, Jon Schlinkert. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/ansi-green/index.js b/node_modules/ansi-green/index.js new file mode 100644 index 0000000..1a741e5 --- /dev/null +++ b/node_modules/ansi-green/index.js @@ -0,0 +1,14 @@ +/*! + * ansi-green + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var wrap = require('ansi-wrap'); + +module.exports = function green(message) { + return wrap(32, 39, message); +}; diff --git a/node_modules/ansi-green/package.json b/node_modules/ansi-green/package.json new file mode 100644 index 0000000..92a2906 --- /dev/null +++ b/node_modules/ansi-green/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "ansi-green@^0.1.1", + "/home/mywebsite/node_modules/extglob" + ] + ], + "_from": "ansi-green@>=0.1.1 <0.2.0", + "_id": "ansi-green@0.1.1", + "_inCache": true, + "_installable": true, + "_location": "/ansi-green", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "ansi-green", + "raw": "ansi-green@^0.1.1", + "rawSpec": "^0.1.1", + "scope": null, + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/extglob" + ], + "_resolved": "https://registry.npmjs.org/ansi-green/-/ansi-green-0.1.1.tgz", + "_shasum": "8a5d9a979e458d57c40e33580b37390b8e10d0f7", + "_shrinkwrap": null, + "_spec": "ansi-green@^0.1.1", + "_where": "/home/mywebsite/node_modules/extglob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/ansi-green/issues" + }, + "dependencies": { + "ansi-wrap": "0.1.0" + }, + "description": "The color green, in ansi.", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "8a5d9a979e458d57c40e33580b37390b8e10d0f7", + "tarball": "http://registry.npmjs.org/ansi-green/-/ansi-green-0.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/ansi-green", + "keywords": [ + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command", + "command-line", + "console", + "format", + "formatting", + "green", + "iterm", + "log", + "logging", + "rgb", + "shell", + "string", + "style", + "styles", + "styling", + "terminal", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "ansi-green", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/ansi-green.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.1" +} diff --git a/node_modules/ansi-green/readme.md b/node_modules/ansi-green/readme.md new file mode 100644 index 0000000..4b9c7ab --- /dev/null +++ b/node_modules/ansi-green/readme.md @@ -0,0 +1,74 @@ +# ansi-green [![NPM version](https://badge.fury.io/js/ansi-green.svg)](http://badge.fury.io/js/ansi-green) + +> The color green, in ansi. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i ansi-green --save +``` + +## Usage + +```js +var green = require('ansi-green'); +``` + +## Related projects + +* [ansi-reset](https://github.com/jonschlinkert/ansi-reset) +* [ansi-bold](https://github.com/jonschlinkert/ansi-bold) +* [ansi-dim](https://github.com/jonschlinkert/ansi-dim) +* [ansi-italic](https://github.com/jonschlinkert/ansi-italic) +* [ansi-underline](https://github.com/jonschlinkert/ansi-underline) +* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse) +* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden) +* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough) +* [ansi-black](https://github.com/jonschlinkert/ansi-black) +* [ansi-red](https://github.com/jonschlinkert/ansi-red) +* [ansi-green](https://github.com/jonschlinkert/ansi-green) +* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow) +* [ansi-blue](https://github.com/jonschlinkert/ansi-blue) +* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta) +* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan) +* [ansi-white](https://github.com/jonschlinkert/ansi-white) +* [ansi-gray](https://github.com/jonschlinkert/ansi-gray) +* [ansi-grey](https://github.com/jonschlinkert/ansi-grey) +* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack) +* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred) +* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen) +* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow) +* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue) +* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta) +* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan) +* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-green/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/LICENSE b/node_modules/ansi-wrap/LICENSE similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/LICENSE rename to node_modules/ansi-wrap/LICENSE diff --git a/node_modules/ansi-wrap/README.md b/node_modules/ansi-wrap/README.md new file mode 100644 index 0000000..032c1e6 --- /dev/null +++ b/node_modules/ansi-wrap/README.md @@ -0,0 +1,89 @@ +# ansi-wrap [![NPM version](https://badge.fury.io/js/ansi-wrap.svg)](http://badge.fury.io/js/ansi-wrap) + +> Create ansi colors by passing the open and close codes. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i ansi-wrap --save +``` + +## Usage + +```js +var wrap = require('ansi-wrap'); +``` + +**Example** + +Pass codes for [ansi magenta background](https://github.com/jonschlinkert/ansi-bgmagenta): + +```js +console.log(wrap(45, 49, 'This is a message...')); +//=> '\u001b[45mfoo\u001b[49m' +``` + +Which prints out... + +[![screen shot 2015-05-21 at 8 28 32 pm](https://cloud.githubusercontent.com/assets/383994/7761769/12488afa-fff8-11e4-9cc1-71a8a6ec14a4.png)](https://www.npmjs.com/) + +## Related projects + +This is used in these projects: + +* [ansi-reset](https://github.com/jonschlinkert/ansi-reset) +* [ansi-bold](https://github.com/jonschlinkert/ansi-bold) +* [ansi-dim](https://github.com/jonschlinkert/ansi-dim) +* [ansi-italic](https://github.com/jonschlinkert/ansi-italic) +* [ansi-underline](https://github.com/jonschlinkert/ansi-underline) +* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse) +* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden) +* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough) +* [ansi-black](https://github.com/jonschlinkert/ansi-black) +* [ansi-red](https://github.com/jonschlinkert/ansi-red) +* [ansi-green](https://github.com/jonschlinkert/ansi-green) +* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow) +* [ansi-blue](https://github.com/jonschlinkert/ansi-blue) +* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta) +* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan) +* [ansi-white](https://github.com/jonschlinkert/ansi-white) +* [ansi-gray](https://github.com/jonschlinkert/ansi-gray) +* [ansi-grey](https://github.com/jonschlinkert/ansi-grey) +* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack) +* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred) +* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen) +* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow) +* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue) +* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta) +* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan) +* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-wrap/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._ \ No newline at end of file diff --git a/node_modules/ansi-wrap/index.js b/node_modules/ansi-wrap/index.js new file mode 100644 index 0000000..ffc52d7 --- /dev/null +++ b/node_modules/ansi-wrap/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(a, b, msg) { + return '\u001b['+ a + 'm' + msg + '\u001b[' + b + 'm'; +}; diff --git a/node_modules/ansi-wrap/package.json b/node_modules/ansi-wrap/package.json new file mode 100644 index 0000000..14b1edf --- /dev/null +++ b/node_modules/ansi-wrap/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "ansi-wrap@0.1.0", + "/home/mywebsite/node_modules/ansi-green" + ] + ], + "_from": "ansi-wrap@0.1.0", + "_id": "ansi-wrap@0.1.0", + "_inCache": true, + "_installable": true, + "_location": "/ansi-wrap", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "ansi-wrap", + "raw": "ansi-wrap@0.1.0", + "rawSpec": "0.1.0", + "scope": null, + "spec": "0.1.0", + "type": "version" + }, + "_requiredBy": [ + "/ansi-green" + ], + "_resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "_shasum": "a82250ddb0015e9a27ca82e82ea603bbfa45efaf", + "_shrinkwrap": null, + "_spec": "ansi-wrap@0.1.0", + "_where": "/home/mywebsite/node_modules/ansi-green", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/ansi-wrap/issues" + }, + "dependencies": {}, + "description": "Create ansi colors by passing the open and close codes.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "a82250ddb0015e9a27ca82e82ea603bbfa45efaf", + "tarball": "http://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/ansi-wrap", + "keywords": [], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/ansi-wrap/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "ansi-wrap", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/ansi-wrap.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.0" +} diff --git a/node_modules/anymatch/LICENSE b/node_modules/anymatch/LICENSE new file mode 100644 index 0000000..bc42470 --- /dev/null +++ b/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2014 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/anymatch/README.md b/node_modules/anymatch/README.md new file mode 100644 index 0000000..0a63292 --- /dev/null +++ b/node_modules/anymatch/README.md @@ -0,0 +1,91 @@ +anymatch [![Build Status](https://travis-ci.org/es128/anymatch.svg?branch=master)](https://travis-ci.org/es128/anymatch) [![Coverage Status](https://img.shields.io/coveralls/es128/anymatch.svg?branch=master)](https://coveralls.io/r/es128/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/) +[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/) + +Usage +----- +```sh +npm install anymatch --save +``` + +#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. +* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a +subset out of the array of provided matchers to test against. Can be useful +with bound matcher functions (see below). When used with `returnIndex = true` +preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e. +includes array members up to, but not including endIndex). + +```js +var anymatch = require('anymatch'); + +var matchers = [ + 'path/to/file.js', + 'path/anyjs/**/*.js', + /foo.js$/, + function (string) { + return string.indexOf('bar') !== -1 && string.length > 10 + } +]; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', true); // 2 +anymatch(matchers, 'path/anyjs/foo.js', true); // 1 + +// skip matchers +anymatch(matchers, 'path/to/file.js', false, 1); // false +anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 +anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 +``` + +#### anymatch (matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array.prototype.filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 +matcher('path/anyjs/baz.js', true, 2); // -1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Change Log +---------- +[See release notes page on GitHub](https://github.com/es128/anymatch/releases) + +NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. The glob matching behavior should be functionally +equivalent to the commonly used [minimatch](https://github.com/isaacs/minimatch) +library (aside from some fixed bugs and greater performance), so a major +version bump wasn't merited. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/es128/anymatch/master/LICENSE) diff --git a/node_modules/anymatch/index.js b/node_modules/anymatch/index.js new file mode 100644 index 0000000..fd70ba0 --- /dev/null +++ b/node_modules/anymatch/index.js @@ -0,0 +1,64 @@ +'use strict'; + +var arrify = require('arrify'); +var micromatch = require('micromatch'); +var path = require('path'); + +var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { + criteria = arrify(criteria); + value = arrify(value); + if (arguments.length === 1) { + return anymatch.bind(null, criteria.map(function(criterion) { + return typeof criterion === 'string' && criterion[0] !== '!' ? + micromatch.matcher(criterion) : criterion; + })); + } + startIndex = startIndex || 0; + var string = value[0]; + var altString; + var matched = false; + var matchIndex = -1; + function testCriteria (criterion, index) { + var result; + switch (toString.call(criterion)) { + case '[object String]': + result = string === criterion || altString && altString === criterion; + result = result || micromatch.isMatch(string, criterion); + break; + case '[object RegExp]': + result = criterion.test(string) || altString && criterion.test(altString); + break; + case '[object Function]': + result = criterion.apply(null, value); + break; + default: + result = false; + } + if (result) { + matchIndex = index + startIndex; + } + return result; + } + var crit = criteria; + var negGlobs = crit.reduce(function(arr, criterion, index) { + if (typeof criterion === 'string' && criterion[0] === '!') { + if (crit === criteria) { + // make a copy before modifying + crit = crit.slice(); + } + crit[index] = null; + arr.push(criterion.substr(1)); + } + return arr; + }, []); + if (!negGlobs.length || !micromatch.any(string, negGlobs)) { + if (path.sep === '\\' && typeof string === 'string') { + altString = string.split('\\').join('/'); + altString = altString === string ? null : altString; + } + matched = crit.slice(startIndex, endIndex).some(testCriteria); + } + return returnIndex === true ? matchIndex : matched; +}; + +module.exports = anymatch; diff --git a/node_modules/anymatch/package.json b/node_modules/anymatch/package.json new file mode 100644 index 0000000..fe8b801 --- /dev/null +++ b/node_modules/anymatch/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "anymatch@^1.3.0", + "/home/mywebsite/node_modules/chokidar" + ] + ], + "_from": "anymatch@>=1.3.0 <2.0.0", + "_id": "anymatch@1.3.0", + "_inCache": true, + "_installable": true, + "_location": "/anymatch", + "_nodeVersion": "1.6.2", + "_npmUser": { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + "_npmVersion": "2.7.3", + "_phantomChildren": {}, + "_requested": { + "name": "anymatch", + "raw": "anymatch@^1.3.0", + "rawSpec": "^1.3.0", + "scope": null, + "spec": ">=1.3.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", + "_shasum": "a3e52fa39168c825ff57b0248126ce5a8ff95507", + "_shrinkwrap": null, + "_spec": "anymatch@^1.3.0", + "_where": "/home/mywebsite/node_modules/chokidar", + "author": { + "name": "Elan Shanker", + "url": "http://github.com/es128" + }, + "bugs": { + "url": "https://github.com/es128/anymatch/issues" + }, + "dependencies": { + "arrify": "^1.0.0", + "micromatch": "^2.1.5" + }, + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.13", + "mocha": "^2.2.4" + }, + "directories": {}, + "dist": { + "shasum": "a3e52fa39168c825ff57b0248126ce5a8ff95507", + "tarball": "http://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "253d2ad42f644ed18557f561312a7f8426daca84", + "homepage": "https://github.com/es128/anymatch", + "keywords": [ + "any", + "expression", + "file", + "fs", + "function", + "glob", + "list", + "match", + "regex", + "regexp", + "regular", + "string" + ], + "license": "ISC", + "maintainers": [ + { + "name": "es128", + "email": "elan.shanker+npm@gmail.com" + } + ], + "name": "anymatch", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/es128/anymatch.git" + }, + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "version": "1.3.0" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob/LICENSE b/node_modules/arr-diff/LICENSE old mode 100644 new mode 100755 similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob/LICENSE rename to node_modules/arr-diff/LICENSE diff --git a/node_modules/arr-diff/README.md b/node_modules/arr-diff/README.md new file mode 100644 index 0000000..7705c6c --- /dev/null +++ b/node_modules/arr-diff/README.md @@ -0,0 +1,74 @@ +# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg)](https://www.npmjs.com/package/arr-diff) [![Build Status](https://img.shields.io/travis/jonschlinkert/base.svg)](https://travis-ci.org/jonschlinkert/base) + +> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i arr-diff --save +``` +Install with [bower](http://bower.io/) + +```sh +$ bower install arr-diff --save +``` + +## API + +### [diff](index.js#L33) + +Return the difference between the first array and additional arrays. + +**Params** + +* `a` **{Array}** +* `b` **{Array}** +* `returns` **{Array}** + +**Example** + +```js +var diff = require('arr-diff'); + +var a = ['a', 'b', 'c', 'd']; +var b = ['b', 'c']; + +console.log(diff(a, b)) +//=> ['a', 'd'] +``` + +## Related projects + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten) +* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter) +* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://www.npmjs.com/package/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-diff/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on Sat Dec 05 2015 23:24:53 GMT-0500 (EST)._ diff --git a/node_modules/arr-diff/index.js b/node_modules/arr-diff/index.js new file mode 100644 index 0000000..bc7200d --- /dev/null +++ b/node_modules/arr-diff/index.js @@ -0,0 +1,58 @@ +/*! + * arr-diff + * + * Copyright (c) 2014 Jon Schlinkert, contributors. + * Licensed under the MIT License + */ + +'use strict'; + +var flatten = require('arr-flatten'); +var slice = [].slice; + +/** + * Return the difference between the first array and + * additional arrays. + * + * ```js + * var diff = require('{%= name %}'); + * + * var a = ['a', 'b', 'c', 'd']; + * var b = ['b', 'c']; + * + * console.log(diff(a, b)) + * //=> ['a', 'd'] + * ``` + * + * @param {Array} `a` + * @param {Array} `b` + * @return {Array} + * @api public + */ + +function diff(arr, arrays) { + var argsLen = arguments.length; + var len = arr.length, i = -1; + var res = [], arrays; + + if (argsLen === 1) { + return arr; + } + + if (argsLen > 2) { + arrays = flatten(slice.call(arguments, 1)); + } + + while (++i < len) { + if (!~arrays.indexOf(arr[i])) { + res.push(arr[i]); + } + } + return res; +} + +/** + * Expose `diff` + */ + +module.exports = diff; diff --git a/node_modules/arr-diff/package.json b/node_modules/arr-diff/package.json new file mode 100644 index 0000000..67c2472 --- /dev/null +++ b/node_modules/arr-diff/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + "arr-diff@^2.0.0", + "/home/mywebsite/node_modules/micromatch" + ] + ], + "_from": "arr-diff@>=2.0.0 <3.0.0", + "_id": "arr-diff@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/arr-diff", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "arr-diff", + "raw": "arr-diff@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "_shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", + "_shrinkwrap": null, + "_spec": "arr-diff@^2.0.0", + "_where": "/home/mywebsite/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-diff/issues" + }, + "dependencies": { + "arr-flatten": "^1.0.1" + }, + "description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.", + "devDependencies": { + "array-differ": "^1.0.0", + "array-slice": "^0.2.3", + "benchmarked": "^0.1.4", + "chalk": "^1.1.1", + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", + "tarball": "http://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "b89f54eb88ca51afd0e0ea6be9a4a63e5ccecf27", + "homepage": "https://github.com/jonschlinkert/arr-diff", + "keywords": [ + "arr", + "array", + "diff", + "differ", + "difference" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + }, + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "paulmillr", + "email": "paul@paulmillr.com" + } + ], + "name": "arr-diff", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-diff.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "arr-flatten", + "array-filter", + "array-intersection" + ] + } + }, + "version": "2.0.0" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/LICENSE b/node_modules/arr-flatten/LICENSE old mode 100644 new mode 100755 similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/LICENSE rename to node_modules/arr-flatten/LICENSE diff --git a/node_modules/arr-flatten/README.md b/node_modules/arr-flatten/README.md new file mode 100755 index 0000000..bd696e6 --- /dev/null +++ b/node_modules/arr-flatten/README.md @@ -0,0 +1,73 @@ +# arr-flatten [![NPM version](https://badge.fury.io/js/arr-flatten.svg)](http://badge.fury.io/js/arr-flatten) [![Build Status](https://travis-ci.org/jonschlinkert/arr-flatten.svg)](https://travis-ci.org/jonschlinkert/arr-flatten) + +> Recursively flatten an array or arrays. This is the fastest implementation of array flatten. + +Why another flatten utility? I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%. + +## Run benchmarks + +```bash +npm run benchmarks +``` + +Benchmark results comparing this library to [array-flatten]: + +```bash +#1: large.js + arr-flatten.js x 487,030 ops/sec ±0.67% (92 runs sampled) + array-flatten.js x 347,020 ops/sec ±0.57% (98 runs sampled) + +#2: medium.js + arr-flatten.js x 1,914,516 ops/sec ±0.76% (94 runs sampled) + array-flatten.js x 1,391,661 ops/sec ±0.63% (96 runs sampled) + +#3: small.js + arr-flatten.js x 5,158,980 ops/sec ±0.85% (94 runs sampled) + array-flatten.js x 3,683,173 ops/sec ±0.79% (97 runs sampled) +``` + +## Run tests + +Install dev dependencies: + +```bash +npm i -d && npm test +``` + +## Install with [npm](npmjs.org) + +```bash +npm i arr-flatten --save +``` +### Install with [bower](https://github.com/bower/bower) + +```bash +bower install arr-flatten --save +``` + + +## Usage + +```js +var flatten = require('arr-flatten'); + +flatten(['a', ['b', ['c']], 'd', ['e']]); +//=> ['a', 'b', 'c', 'd', 'e'] +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014-2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 11, 2015._ + +[array-flatten]: https://github.com/blakeembrey/array-flatten \ No newline at end of file diff --git a/node_modules/arr-flatten/index.js b/node_modules/arr-flatten/index.js new file mode 100755 index 0000000..f74e48c --- /dev/null +++ b/node_modules/arr-flatten/index.js @@ -0,0 +1,27 @@ +/*! + * arr-flatten + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function flatten(arr) { + return flat(arr, []); +}; + +function flat(arr, res) { + var len = arr.length; + var i = -1; + + while (len--) { + var cur = arr[++i]; + if (Array.isArray(cur)) { + flat(cur, res); + } else { + res.push(cur); + } + } + return res; +} \ No newline at end of file diff --git a/node_modules/arr-flatten/package.json b/node_modules/arr-flatten/package.json new file mode 100644 index 0000000..1c0b6e1 --- /dev/null +++ b/node_modules/arr-flatten/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "arr-flatten@^1.0.1", + "/home/mywebsite/node_modules/arr-diff" + ] + ], + "_from": "arr-flatten@>=1.0.1 <2.0.0", + "_id": "arr-flatten@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/arr-flatten", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "arr-flatten", + "raw": "arr-flatten@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/arr-diff" + ], + "_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz", + "_shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b", + "_shrinkwrap": null, + "_spec": "arr-flatten@^1.0.1", + "_where": "/home/mywebsite/node_modules/arr-diff", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-flatten/issues" + }, + "dependencies": {}, + "description": "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.", + "devDependencies": { + "array-flatten": "^1.0.2", + "array-slice": "^0.2.2", + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "glob": "^4.3.5", + "kind-of": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b", + "tarball": "http://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7b3706eaa0093d8f5ba65af8ed590b6fcb3fe7cf", + "homepage": "https://github.com/jonschlinkert/arr-flatten", + "keywords": [ + "arr", + "array", + "elements", + "flat", + "flatten", + "nested", + "recurse", + "recursive", + "recursively" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/arr-flatten/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "arr-flatten", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/arr-flatten.git" + }, + "scripts": { + "benchmarks": "node benchmark", + "test": "mocha" + }, + "version": "1.0.1" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/LICENSE b/node_modules/array-unique/LICENSE old mode 100644 new mode 100755 similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/LICENSE rename to node_modules/array-unique/LICENSE diff --git a/node_modules/array-unique/README.md b/node_modules/array-unique/README.md new file mode 100755 index 0000000..2e28774 --- /dev/null +++ b/node_modules/array-unique/README.md @@ -0,0 +1,51 @@ +# array-unique [![NPM version](https://badge.fury.io/js/array-unique.svg)](http://badge.fury.io/js/array-unique) [![Build Status](https://travis-ci.org/jonschlinkert/array-unique.svg)](https://travis-ci.org/jonschlinkert/array-unique) + +> Return an array free of duplicate values. Fastest ES5 implementation. + +## Install with [npm](npmjs.org) + +```bash +npm i array-unique --save +``` + +## Usage + +```js +var unique = require('array-unique'); + +unique(['a', 'b', 'c', 'c']); +//=> ['a', 'b', 'c'] +``` + +## Related +* [arr-diff](https://github.com/jonschlinkert/arr-diff): Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. +* [arr-union](https://github.com/jonschlinkert/arr-union): Returns an array of unique values using strict equality for comparisons. +* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. +* [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements. +* [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map. +* [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection. + +## Run tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-unique/issues) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 24, 2015._ \ No newline at end of file diff --git a/node_modules/array-unique/index.js b/node_modules/array-unique/index.js new file mode 100755 index 0000000..7fa75af --- /dev/null +++ b/node_modules/array-unique/index.js @@ -0,0 +1,28 @@ +/*! + * array-unique + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function unique(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var len = arr.length; + var i = -1; + + while (i++ < len) { + var j = i + 1; + + for (; j < arr.length; ++j) { + if (arr[i] === arr[j]) { + arr.splice(j--, 1); + } + } + } + return arr; +}; diff --git a/node_modules/array-unique/package.json b/node_modules/array-unique/package.json new file mode 100644 index 0000000..0f661d4 --- /dev/null +++ b/node_modules/array-unique/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "array-unique@^0.2.1", + "/home/mywebsite/node_modules/micromatch" + ] + ], + "_from": "array-unique@>=0.2.1 <0.3.0", + "_id": "array-unique@0.2.1", + "_inCache": true, + "_installable": true, + "_location": "/array-unique", + "_nodeVersion": "1.6.2", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.7.1", + "_phantomChildren": {}, + "_requested": { + "name": "array-unique", + "raw": "array-unique@^0.2.1", + "rawSpec": "^0.2.1", + "scope": null, + "spec": ">=0.2.1 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "_shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53", + "_shrinkwrap": null, + "_spec": "array-unique@^0.2.1", + "_where": "/home/mywebsite/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-unique/issues" + }, + "dependencies": {}, + "description": "Return an array free of duplicate values. Fastest ES5 implementation.", + "devDependencies": { + "array-uniq": "^1.0.2", + "benchmarked": "^0.1.3", + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53", + "tarball": "http://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "36fde8e586fb7cf880b8b3aa6515df889e64ed85", + "homepage": "https://github.com/jonschlinkert/array-unique", + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/array-unique/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "array-unique", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/array-unique.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.2.1" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/index.js b/node_modules/arrify/index.js similarity index 72% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/index.js rename to node_modules/arrify/index.js index 4cd753e..2a2fdee 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/index.js +++ b/node_modules/arrify/index.js @@ -1,6 +1,6 @@ 'use strict'; module.exports = function (val) { - if (val == null) { + if (val === null || val === undefined) { return []; } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/license b/node_modules/arrify/license similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/license rename to node_modules/arrify/license diff --git a/node_modules/arrify/package.json b/node_modules/arrify/package.json new file mode 100644 index 0000000..0201f00 --- /dev/null +++ b/node_modules/arrify/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "arrify@^1.0.0", + "/home/mywebsite/node_modules/anymatch" + ] + ], + "_from": "arrify@>=1.0.0 <2.0.0", + "_id": "arrify@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/arrify", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "3.5.2", + "_phantomChildren": {}, + "_requested": { + "name": "arrify", + "raw": "arrify@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/anymatch" + ], + "_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "_shasum": "898508da2226f380df904728456849c1501a4b0d", + "_shrinkwrap": null, + "_spec": "arrify@^1.0.0", + "_where": "/home/mywebsite/node_modules/anymatch", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/arrify/issues" + }, + "dependencies": {}, + "description": "Convert a value to an array", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "898508da2226f380df904728456849c1501a4b0d", + "tarball": "http://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "087edee1a58d5adaac6cae5a107886121ef43783", + "homepage": "https://github.com/sindresorhus/arrify#readme", + "keywords": [ + "arr", + "array", + "arrayify", + "arrify", + "convert", + "value" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "arrify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/arrify.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/readme.md b/node_modules/arrify/readme.md similarity index 89% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/readme.md rename to node_modules/arrify/readme.md index c69ff4b..183d075 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/readme.md +++ b/node_modules/arrify/readme.md @@ -13,7 +13,7 @@ $ npm install --save arrify ## Usage ```js -var arrify = require('arrify'); +const arrify = require('arrify'); arrify('unicorn'); //=> ['unicorn'] @@ -24,7 +24,7 @@ arrify(['unicorn']); arrify(null); //=> [] -arrift(undefined); +arrify(undefined); //=> [] ``` diff --git a/node_modules/async-each/.npmignore b/node_modules/async-each/.npmignore new file mode 100644 index 0000000..b2971ef --- /dev/null +++ b/node_modules/async-each/.npmignore @@ -0,0 +1,25 @@ +# Numerous always-ignore extensions +*.diff +*.err +*.orig +*.log +*~ + +# OS or Editor folders +.DS_Store +.cache +Icon? + +# Folders to ignore +.hg +.svn + +# Node.js package manager +/node_modules +/npm-debug.log + +# Other stuff +*.pyc +/tmp + +# Project stuff diff --git a/node_modules/async-each/CHANGELOG.md b/node_modules/async-each/CHANGELOG.md new file mode 100644 index 0000000..949a2cf --- /dev/null +++ b/node_modules/async-each/CHANGELOG.md @@ -0,0 +1,20 @@ +# async-each 0.1.6 (5 November 2014) +* Add license to package.json + +# async-each 0.1.5 (22 October 2014) +* Clean up package.json to fix npm warning about `repo` + +# async-each 0.1.4 (12 November 2013) +* Fixed AMD definition. + +# async-each 0.1.3 (25 July 2013) +* Fixed double wrapping of errors. + +# async-each 0.1.2 (7 July 2013) +* Fixed behaviour on empty arrays. + +# async-each 0.1.1 (14 June 2013) +* Wrapped function in closure, enabled strict mode. + +# async-each 0.1.0 (14 June 2013) +* Initial release. diff --git a/node_modules/async-each/README.md b/node_modules/async-each/README.md new file mode 100644 index 0000000..5300186 --- /dev/null +++ b/node_modules/async-each/README.md @@ -0,0 +1,64 @@ +# async-each + +No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach function for JavaScript. + +We don't need junky 30K async libs. Really. + +For browsers and node.js. + +## Installation +* Just include async-each before your scripts. +* `npm install async-each` if you’re using node.js. +* `component install paulmillr/async-each` if you’re using [component(1)](https://github.com/component/component). +* `bower install async-each` if you’re using [Twitter Bower](http://bower.io). + +## Usage + +* `each(array, iterator, callback);` — `Array`, `Function`, `(optional) Function` +* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments. +* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`. + +Node.js: + +```javascript +var each = require('async-each'); +each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) { + if (error) console.error(error); + console.log('Contents for a, b and c:', contents); +}); +``` + +Browser: + +```javascript +// component(1) +var each = require('async-each'); +each(list, fn, callback); + +// Default: +window.asyncEach(list, fn, callback); +``` + +## License + +The MIT License (MIT) + +Copyright (c) 2013 Paul Miller (http://paulmillr.com/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/async-each/bower.json b/node_modules/async-each/bower.json new file mode 100644 index 0000000..6510855 --- /dev/null +++ b/node_modules/async-each/bower.json @@ -0,0 +1,22 @@ +{ + "name": "async-each", + "repo": "paulmillr/async-each", + "description": "No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.", + "version": "0.1.6", + "keywords": [ + "async", "forEach", "each", "map", + "asynchronous", + "iteration", "iterate", + "loop", "parallel", + "concurrent", "array", + "flow", "control flow" + ], + "main": "index.js", + "dependencies": {}, + "development": {}, + "ignore": [ + "**/.*", + "node_modules", + "bower_components" + ] +} diff --git a/node_modules/async-each/component.json b/node_modules/async-each/component.json new file mode 100644 index 0000000..83bc0a5 --- /dev/null +++ b/node_modules/async-each/component.json @@ -0,0 +1,18 @@ +{ + "name": "async-each", + "repo": "paulmillr/async-each", + "description": "No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.", + "version": "0.1.6", + "keywords": [ + "async", "forEach", "each", "map", + "asynchronous", + "iteration", "iterate", + "loop", "parallel", + "concurrent", "array", + "flow", "control flow" + ], + "main": "index.js", + "scripts": ["index.js"], + "dependencies": {}, + "development": {} +} diff --git a/node_modules/async-each/index.js b/node_modules/async-each/index.js new file mode 100644 index 0000000..1c51c95 --- /dev/null +++ b/node_modules/async-each/index.js @@ -0,0 +1,38 @@ +// async-each MIT license (by Paul Miller from http://paulmillr.com). +(function(globals) { + 'use strict'; + var each = function(items, next, callback) { + if (!Array.isArray(items)) throw new TypeError('each() expects array as first argument'); + if (typeof next !== 'function') throw new TypeError('each() expects function as second argument'); + if (typeof callback !== 'function') callback = Function.prototype; // no-op + + if (items.length === 0) return callback(undefined, items); + + var transformed = new Array(items.length); + var count = 0; + var returned = false; + + items.forEach(function(item, index) { + next(item, function(error, transformedItem) { + if (returned) return; + if (error) { + returned = true; + return callback(error); + } + transformed[index] = transformedItem; + count += 1; + if (count === items.length) return callback(undefined, transformed); + }); + }); + }; + + if (typeof define !== 'undefined' && define.amd) { + define([], function() { + return each; + }); // RequireJS + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = each; // CommonJS + } else { + globals.asyncEach = each; // + +``` + +## Documentation + +### Collections + +* [each](#each) +* [eachSeries](#eachSeries) +* [eachLimit](#eachLimit) +* [map](#map) +* [mapSeries](#mapSeries) +* [mapLimit](#mapLimit) +* [filter](#filter) +* [filterSeries](#filterSeries) +* [reject](#reject) +* [rejectSeries](#rejectSeries) +* [reduce](#reduce) +* [reduceRight](#reduceRight) +* [detect](#detect) +* [detectSeries](#detectSeries) +* [sortBy](#sortBy) +* [some](#some) +* [every](#every) +* [concat](#concat) +* [concatSeries](#concatSeries) + +### Control Flow + +* [series](#series) +* [parallel](#parallel) +* [parallelLimit](#parallellimittasks-limit-callback) +* [whilst](#whilst) +* [doWhilst](#doWhilst) +* [until](#until) +* [doUntil](#doUntil) +* [forever](#forever) +* [waterfall](#waterfall) +* [compose](#compose) +* [applyEach](#applyEach) +* [applyEachSeries](#applyEachSeries) +* [queue](#queue) +* [cargo](#cargo) +* [auto](#auto) +* [iterator](#iterator) +* [apply](#apply) +* [nextTick](#nextTick) +* [times](#times) +* [timesSeries](#timesSeries) + +### Utils + +* [memoize](#memoize) +* [unmemoize](#unmemoize) +* [log](#log) +* [dir](#dir) +* [noConflict](#noConflict) + + +## Collections + + + +### each(arr, iterator, callback) + +Applies an iterator function to each item in an array, in parallel. +The iterator is called with an item from the list and a callback for when it +has finished. If the iterator passes an error to this callback, the main +callback for the each function is immediately called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err) which must be called once it has + completed. If no error has occured, the callback should be run without + arguments or with an explicit null argument. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + +```js +// assuming openFiles is an array of file names and saveFile is a function +// to save the modified contents of that file: + +async.each(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +--------------------------------------- + + + +### eachSeries(arr, iterator, callback) + +The same as each only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. This means the iterator functions will complete in order. + + +--------------------------------------- + + + +### eachLimit(arr, limit, iterator, callback) + +The same as each only no more than "limit" iterators will be simultaneously +running at any time. + +Note that the items are not processed in batches, so there is no guarantee that + the first "limit" iterator functions will complete before any others are +started. + +__Arguments__ + +* arr - An array to iterate over. +* limit - The maximum number of iterators to run at any time. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err) which must be called once it has + completed. If no error has occured, the callback should be run without + arguments or with an explicit null argument. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + +```js +// Assume documents is an array of JSON objects and requestApi is a +// function that interacts with a rate-limited REST api. + +async.eachLimit(documents, 20, requestApi, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +--------------------------------------- + + +### map(arr, iterator, callback) + +Produces a new array of values by mapping each value in the given array through +the iterator function. The iterator is called with an item from the array and a +callback for when it has finished processing. The callback takes 2 arguments, +an error and the transformed item from the array. If the iterator passes an +error to this callback, the main callback for the map function is immediately +called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order, however +the results array will be in the same order as the original array. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, transformed) which must be called once + it has completed with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + +```js +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + +### mapSeries(arr, iterator, callback) + +The same as map only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +--------------------------------------- + + +### mapLimit(arr, limit, iterator, callback) + +The same as map only no more than "limit" iterators will be simultaneously +running at any time. + +Note that the items are not processed in batches, so there is no guarantee that + the first "limit" iterator functions will complete before any others are +started. + +__Arguments__ + +* arr - An array to iterate over. +* limit - The maximum number of iterators to run at any time. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, transformed) which must be called once + it has completed with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + +```js +async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + +### filter(arr, iterator, callback) + +__Alias:__ select + +Returns a new array of all the values which pass an async truth test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(results) - A callback which is called after all the iterator + functions have finished. + +__Example__ + +```js +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); +``` + +--------------------------------------- + + +### filterSeries(arr, iterator, callback) + +__alias:__ selectSeries + +The same as filter only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + +--------------------------------------- + + +### reject(arr, iterator, callback) + +The opposite of filter. Removes values that pass an async truth test. + +--------------------------------------- + + +### rejectSeries(arr, iterator, callback) + +The same as reject, only the iterator is applied to each item in the array +in series. + + +--------------------------------------- + + +### reduce(arr, memo, iterator, callback) + +__aliases:__ inject, foldl + +Reduces a list of values into a single value using an async iterator to return +each successive step. Memo is the initial state of the reduction. This +function only operates in series. For performance reasons, it may make sense to +split a call to this function into a parallel map, then use the normal +Array.prototype.reduce on the results. This function is for situations where +each step in the reduction needs to be async, if you can get the data before +reducing it then it's probably a good idea to do so. + +__Arguments__ + +* arr - An array to iterate over. +* memo - The initial state of the reduction. +* iterator(memo, item, callback) - A function applied to each item in the + array to produce the next step in the reduction. The iterator is passed a + callback(err, reduction) which accepts an optional error as its first + argument, and the state of the reduction as the second. If an error is + passed to the callback, the reduction is stopped and the main callback is + immediately called with the error. +* callback(err, result) - A callback which is called after all the iterator + functions have finished. Result is the reduced value. + +__Example__ + +```js +async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); +}, function(err, result){ + // result is now equal to the last value of memo, which is 6 +}); +``` + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, callback) + +__Alias:__ foldr + +Same as reduce, only operates on the items in the array in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, callback) + +Returns the first value in a list that passes an async truth test. The +iterator is applied in parallel, meaning the first iterator to return true will +fire the detect callback with that result. That means the result might not be +the first item in the original array (in terms of order) that passes the test. + +If order within the original array is important then look at detectSeries. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value undefined if none passed. + +__Example__ + +```js +async.detect(['file1','file2','file3'], fs.exists, function(result){ + // result now equals the first file in the list that exists +}); +``` + +--------------------------------------- + + +### detectSeries(arr, iterator, callback) + +The same as detect, only the iterator is applied to each item in the array +in series. This means the result is always the first in the original array (in +terms of array order) that passes the truth test. + + +--------------------------------------- + + +### sortBy(arr, iterator, callback) + +Sorts a list by the results of running each value through an async iterator. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, sortValue) which must be called once it + has completed with an error (which can be null) and a value to use as the sort + criteria. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is the items from + the original array sorted by the values returned by the iterator calls. + +__Example__ + +```js +async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); +}, function(err, results){ + // results is now the original array of files sorted by + // modified date +}); +``` + +--------------------------------------- + + +### some(arr, iterator, callback) + +__Alias:__ any + +Returns true if at least one element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. Once any iterator +call returns true, the main callback is immediately called. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + either true or false depending on the values of the async tests. + +__Example__ + +```js +async.some(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then at least one of the files exists +}); +``` + +--------------------------------------- + + +### every(arr, iterator, callback) + +__Alias:__ all + +Returns true if every element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called after all the iterator + functions have finished. Result will be either true or false depending on + the values of the async tests. + +__Example__ + +```js +async.every(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then every file exists +}); +``` + +--------------------------------------- + + +### concat(arr, iterator, callback) + +Applies an iterator to each item in a list, concatenating the results. Returns the +concatenated list. The iterators are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of the arguments passed to the iterator function. + +__Arguments__ + +* arr - An array to iterate over +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, results) which must be called once it + has completed with an error (which can be null) and an array of results. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array containing + the concatenated results of the iterator function. + +__Example__ + +```js +async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories +}); +``` + +--------------------------------------- + + +### concatSeries(arr, iterator, callback) + +Same as async.concat, but executes in series instead of parallel. + + +## Control Flow + + +### series(tasks, [callback]) + +Run an array of functions in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run and the callback for the series is +immediately called with the value of the error. Once the tasks have completed, +the results are passed to the final callback as an array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.series. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + } +], +// optional callback +function(err, results){ + // results is now equal to ['one', 'two'] +}); + + +// an example using an object instead of an array +async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equal to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run an array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main callback is immediately called with the value of the error. +Once the tasks have completed, the results are passed to the final callback as an +array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.parallel. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + } +], +// optional callback +function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}); + + +// an example using an object instead of an array +async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equals to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallelLimit(tasks, limit, [callback]) + +The same as parallel only the tasks are executed in parallel with a maximum of "limit" +tasks executing at any time. + +Note that the tasks are not executed in batches, so there is no guarantee that +the first "limit" tasks will complete before any others are started. + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* limit - The maximum number of tasks to run at any time. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call fn, while test returns true. Calls the callback when stopped, +or an error occurs. + +__Arguments__ + +* test() - synchronous truth test to perform before each execution of fn. +* fn(callback) - A function to call each time the test passes. The function is + passed a callback(err) which must be called once it has completed with an + optional error argument. +* callback(err) - A callback which is called after the test fails and repeated + execution of fn has stopped. + +__Example__ + +```js +var count = 0; + +async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } +); +``` + +--------------------------------------- + + +### doWhilst(fn, test, callback) + +The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call fn, until test returns true. Calls the callback when stopped, +or an error occurs. + +The inverse of async.whilst. + +--------------------------------------- + + +### doUntil(fn, test, callback) + +Like doWhilst except the test is inverted. Note the argument ordering differs from `until`. + +--------------------------------------- + + +### forever(fn, callback) + +Calls the asynchronous function 'fn' repeatedly, in series, indefinitely. +If an error is passed to fn's callback then 'callback' is called with the +error, otherwise it will never be called. + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs an array of functions in series, each passing their results to the next in +the array. However, if any of the functions pass an error to the callback, the +next function is not executed and the main callback is immediately called with +the error. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a + callback(err, result1, result2, ...) it must call on completion. The first + argument is an error (which can be null) and any further arguments will be + passed as arguments in order to the next task. +* callback(err, [results]) - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + +```js +async.waterfall([ + function(callback){ + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback){ + callback(null, 'three'); + }, + function(arg1, callback){ + // arg1 now equals 'three' + callback(null, 'done'); + } +], function (err, result) { + // result now equals 'done' +}); +``` + +--------------------------------------- + +### compose(fn1, fn2...) + +Creates a function which is a composition of the passed asynchronous +functions. Each function consumes the return value of the function that +follows. Composing functions f(), g() and h() would produce the result of +f(g(h())), only this version uses callbacks to obtain the return values. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* functions... - the asynchronous functions to compose + + +__Example__ + +```js +function add1(n, callback) { + setTimeout(function () { + callback(null, n + 1); + }, 10); +} + +function mul3(n, callback) { + setTimeout(function () { + callback(null, n * 3); + }, 10); +} + +var add1mul3 = async.compose(mul3, add1); + +add1mul3(4, function (err, result) { + // result now equals 15 +}); +``` + +--------------------------------------- + +### applyEach(fns, args..., callback) + +Applies the provided arguments to each function in the array, calling the +callback after all functions have completed. If you only provide the first +argument then it will return a function which lets you pass in the +arguments as if it were a single function call. + +__Arguments__ + +* fns - the asynchronous functions to all call with the same arguments +* args... - any number of separate arguments to pass to the function +* callback - the final argument should be the callback, called when all + functions have completed processing + + +__Example__ + +```js +async.applyEach([enableSearch, updateSchema], 'bucket', callback); + +// partial application example: +async.each( + buckets, + async.applyEach([enableSearch, updateSchema]), + callback +); +``` + +--------------------------------------- + + +### applyEachSeries(arr, iterator, callback) + +The same as applyEach only the functions are applied in series. + +--------------------------------------- + + +### queue(worker, concurrency) + +Creates a queue object with the specified concurrency. Tasks added to the +queue will be processed in parallel (up to the concurrency limit). If all +workers are in progress, the task is queued until one is available. Once +a worker has completed a task, the task's callback is called. + +__Arguments__ + +* worker(task, callback) - An asynchronous function for processing a queued + task, which must call its callback(err) argument when finished, with an + optional error as an argument. +* concurrency - An integer for determining how many worker functions should be + run in parallel. + +__Queue objects__ + +The queue object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* concurrency - an integer for determining how many worker functions should be + run in parallel. This property can be changed after a queue is created to + alter the concurrency on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* unshift(task, [callback]) - add a new task to the front of the queue. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + +```js +// create a queue object with concurrency 2 + +var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); +}, 2); + + +// assign a callback +q.drain = function() { + console.log('all items have been processed'); +} + +// add some items to the queue + +q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); +}); +q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); + +// add some items to the queue (batch-wise) + +q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing bar'); +}); + +// add some items to the front of the queue + +q.unshift({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); +``` + +--------------------------------------- + + +### cargo(worker, [payload]) + +Creates a cargo object with the specified payload. Tasks added to the +cargo will be processed altogether (up to the payload limit). If the +worker is in progress, the task is queued until it is available. Once +the worker has completed some tasks, each callback of those tasks is called. + +__Arguments__ + +* worker(tasks, callback) - An asynchronous function for processing an array of + queued tasks, which must call its callback(err) argument when finished, with + an optional error as an argument. +* payload - An optional integer for determining how many tasks should be + processed per round; if omitted, the default is unlimited. + +__Cargo objects__ + +The cargo object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* payload - an integer for determining how many tasks should be + process per round. This property can be changed after a cargo is created to + alter the payload on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + +```js +// create a cargo object with payload 2 + +var cargo = async.cargo(function (tasks, callback) { + for(var i=0; i +### auto(tasks, [callback]) + +Determines the best order for running functions based on their requirements. +Each function can optionally depend on other functions being completed first, +and each function is run as soon as its requirements are satisfied. If any of +the functions pass an error to their callback, that function will not complete +(so any other functions depending on it will not run) and the main callback +will be called immediately with the error. Functions also receive an object +containing the results of functions which have completed so far. + +Note, all functions are called with a results object as a second argument, +so it is unsafe to pass functions in the tasks object which cannot handle the +extra argument. For example, this snippet of code: + +```js +async.auto({ + readData: async.apply(fs.readFile, 'data.txt', 'utf-8') +}, callback); +``` + +will have the effect of calling readFile with the results object as the last +argument, which will fail: + +```js +fs.readFile('data.txt', 'utf-8', cb, {}); +``` + +Instead, wrap the call to readFile in a function which does not forward the +results object: + +```js +async.auto({ + readData: function(cb, results){ + fs.readFile('data.txt', 'utf-8', cb); + } +}, callback); +``` + +__Arguments__ + +* tasks - An object literal containing named functions or an array of + requirements, with the function itself the last item in the array. The key + used for each function or array is used when specifying requirements. The + function receives two arguments: (1) a callback(err, result) which must be + called when finished, passing an error (which can be null) and the result of + the function's execution, and (2) a results object, containing the results of + the previously executed functions. +* callback(err, results) - An optional callback which is called when all the + tasks have been completed. The callback will receive an error as an argument + if any tasks pass an error to their callback. Results will always be passed + but if an error occurred, no other tasks will be performed, and the results + object will only contain partial results. + + +__Example__ + +```js +async.auto({ + get_data: function(callback){ + // async code to get some data + }, + make_folder: function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + }, + write_file: ['get_data', 'make_folder', function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, filename); + }], + email_link: ['write_file', function(callback, results){ + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + }] +}); +``` + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + +```js +async.parallel([ + function(callback){ + // async code to get some data + }, + function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + } +], +function(err, results){ + async.series([ + function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + }, + function(callback){ + // once the file is written let's email a link to it... + } + ]); +}); +``` + +For a complicated series of async tasks using the auto function makes adding +new tasks much easier and makes the code more readable. + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the array, +returning a continuation to call the next one after that. It's also possible to +'peek' the next iterator by doing iterator.next(). + +This function is used internally by the async module but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* tasks - An array of functions to run. + +__Example__ + +```js +var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } +]); + +node> var iterator2 = iterator(); +'one' +node> var iterator3 = iterator2(); +'two' +node> iterator3(); +'three' +node> var nextfn = iterator2.next(); +node> nextfn(); +'three' +``` + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied, a useful +shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + +```js +// using apply + +async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), +]); + + +// the same process without using apply + +async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + } +]); +``` + +It's possible to pass any number of additional arguments when calling the +continuation: + +```js +node> var fn = async.apply(sys.puts, 'one'); +node> fn('two', 'three'); +one +two +three +``` + +--------------------------------------- + + +### nextTick(callback) + +Calls the callback on a later loop around the event loop. In node.js this just +calls process.nextTick, in the browser it falls back to setImmediate(callback) +if available, otherwise setTimeout(callback, 0), which means other higher priority +events may precede the execution of the callback. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* callback - The function to call on a later loop around the event loop. + +__Example__ + +```js +var call_order = []; +async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two'] +}); +call_order.push('one') +``` + + +### times(n, callback) + +Calls the callback n times and accumulates results in the same manner +you would use with async.map. + +__Arguments__ + +* n - The number of times to run the function. +* callback - The function to call n times. + +__Example__ + +```js +// Pretend this is some complicated async factory +var createUser = function(id, callback) { + callback(null, { + id: 'user' + id + }) +} +// generate 5 users +async.times(5, function(n, next){ + createUser(n, function(err, user) { + next(err, user) + }) +}, function(err, users) { + // we should now have 5 users +}); +``` + + +### timesSeries(n, callback) + +The same as times only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an async function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +The cache of results is exposed as the `memo` property of the function returned +by `memoize`. + +__Arguments__ + +* fn - the function you to proxy and cache results from. +* hasher - an optional function for generating a custom hash for storing + results, it has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + +```js +var slow_fn = function (name, callback) { + // do something + callback(null, result); +}; +var fn = async.memoize(slow_fn); + +// fn can now be used as if it were slow_fn +fn('some name', function () { + // callback +}); +``` + + +### unmemoize(fn) + +Undoes a memoized function, reverting it to the original, unmemoized +form. Comes handy in tests. + +__Arguments__ + +* fn - the memoized function + + +### log(function, arguments) + +Logs the result of an async function to the console. Only works in node.js or +in browsers that support console.log and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.log is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); +}; +``` +```js +node> async.log(hello, 'world'); +'hello world' +``` + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an async function to the console using console.dir to +display the properties of the resulting object. Only works in node.js or +in browsers that support console.dir and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.dir is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); +}; +``` +```js +node> async.dir(hello, 'world'); +{hello: 'world'} +``` + +--------------------------------------- + + +### noConflict() + +Changes the value of async back to its original value, returning a reference to the +async object. diff --git a/node_modules/async/component.json b/node_modules/async/component.json new file mode 100644 index 0000000..bbb0115 --- /dev/null +++ b/node_modules/async/component.json @@ -0,0 +1,11 @@ +{ + "name": "async", + "repo": "caolan/async", + "description": "Higher-order functions and common patterns for asynchronous code", + "version": "0.1.23", + "keywords": [], + "dependencies": {}, + "development": {}, + "main": "lib/async.js", + "scripts": [ "lib/async.js" ] +} diff --git a/node_modules/async/lib/async.js b/node_modules/async/lib/async.js new file mode 100755 index 0000000..1eebb15 --- /dev/null +++ b/node_modules/async/lib/async.js @@ -0,0 +1,958 @@ +/*global setImmediate: false, setTimeout: false, console: false */ +(function () { + + var async = {}; + + // global on the server, window in the browser + var root, previous_async; + + root = this; + if (root != null) { + previous_async = root.async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + function only_once(fn) { + var called = false; + return function() { + if (called) throw new Error("Callback was already called."); + called = true; + fn.apply(root, arguments); + } + } + + //// cross-browser compatiblity functions //// + + var _each = function (arr, iterator) { + if (arr.forEach) { + return arr.forEach(iterator); + } + for (var i = 0; i < arr.length; i += 1) { + iterator(arr[i], i, arr); + } + }; + + var _map = function (arr, iterator) { + if (arr.map) { + return arr.map(iterator); + } + var results = []; + _each(arr, function (x, i, a) { + results.push(iterator(x, i, a)); + }); + return results; + }; + + var _reduce = function (arr, iterator, memo) { + if (arr.reduce) { + return arr.reduce(iterator, memo); + } + _each(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + }; + + var _keys = function (obj) { + if (Object.keys) { + return Object.keys(obj); + } + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + if (typeof process === 'undefined' || !(process.nextTick)) { + if (typeof setImmediate === 'function') { + async.nextTick = function (fn) { + // not a direct alias for IE10 compatibility + setImmediate(fn); + }; + async.setImmediate = async.nextTick; + } + else { + async.nextTick = function (fn) { + setTimeout(fn, 0); + }; + async.setImmediate = async.nextTick; + } + } + else { + async.nextTick = process.nextTick; + if (typeof setImmediate !== 'undefined') { + async.setImmediate = function (fn) { + // not a direct alias for IE10 compatibility + setImmediate(fn); + }; + } + else { + async.setImmediate = async.nextTick; + } + } + + async.each = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + _each(arr, function (x) { + iterator(x, only_once(function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(null); + } + } + })); + }); + }; + async.forEach = async.each; + + async.eachSeries = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + var iterate = function () { + iterator(arr[completed], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(null); + } + else { + iterate(); + } + } + }); + }; + iterate(); + }; + async.forEachSeries = async.eachSeries; + + async.eachLimit = function (arr, limit, iterator, callback) { + var fn = _eachLimit(limit); + fn.apply(null, [arr, iterator, callback]); + }; + async.forEachLimit = async.eachLimit; + + var _eachLimit = function (limit) { + + return function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length || limit <= 0) { + return callback(); + } + var completed = 0; + var started = 0; + var running = 0; + + (function replenish () { + if (completed >= arr.length) { + return callback(); + } + + while (running < limit && started < arr.length) { + started += 1; + running += 1; + iterator(arr[started - 1], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + running -= 1; + if (completed >= arr.length) { + callback(); + } + else { + replenish(); + } + } + }); + } + })(); + }; + }; + + + var doParallel = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.each].concat(args)); + }; + }; + var doParallelLimit = function(limit, fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [_eachLimit(limit)].concat(args)); + }; + }; + var doSeries = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.eachSeries].concat(args)); + }; + }; + + + var _asyncMap = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (err, v) { + results[x.index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + }; + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + async.mapLimit = function (arr, limit, iterator, callback) { + return _mapLimit(limit)(arr, iterator, callback); + }; + + var _mapLimit = function(limit) { + return doParallelLimit(limit, _asyncMap); + }; + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.reduce = function (arr, memo, iterator, callback) { + async.eachSeries(arr, function (x, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + // inject alias + async.inject = async.reduce; + // foldl alias + async.foldl = async.reduce; + + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, function (x) { + return x; + }).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + // foldr alias + async.foldr = async.reduceRight; + + var _filter = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.filter = doParallel(_filter); + async.filterSeries = doSeries(_filter); + // select alias + async.select = async.filter; + async.selectSeries = async.filterSeries; + + var _reject = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (!v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.reject = doParallel(_reject); + async.rejectSeries = doSeries(_reject); + + var _detect = function (eachfn, arr, iterator, main_callback) { + eachfn(arr, function (x, callback) { + iterator(x, function (result) { + if (result) { + main_callback(x); + main_callback = function () {}; + } + else { + callback(); + } + }); + }, function (err) { + main_callback(); + }); + }; + async.detect = doParallel(_detect); + async.detectSeries = doSeries(_detect); + + async.some = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (v) { + main_callback(true); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(false); + }); + }; + // any alias + async.any = async.some; + + async.every = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (!v) { + main_callback(false); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(true); + }); + }; + // all alias + async.all = async.every; + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + var fn = function (left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }; + callback(null, _map(results.sort(fn), function (x) { + return x.value; + })); + } + }); + }; + + async.auto = function (tasks, callback) { + callback = callback || function () {}; + var keys = _keys(tasks); + if (!keys.length) { + return callback(null); + } + + var results = {}; + + var listeners = []; + var addListener = function (fn) { + listeners.unshift(fn); + }; + var removeListener = function (fn) { + for (var i = 0; i < listeners.length; i += 1) { + if (listeners[i] === fn) { + listeners.splice(i, 1); + return; + } + } + }; + var taskComplete = function () { + _each(listeners.slice(0), function (fn) { + fn(); + }); + }; + + addListener(function () { + if (_keys(results).length === keys.length) { + callback(null, results); + callback = function () {}; + } + }); + + _each(keys, function (k) { + var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; + var taskCallback = function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + if (err) { + var safeResults = {}; + _each(_keys(results), function(rkey) { + safeResults[rkey] = results[rkey]; + }); + safeResults[k] = args; + callback(err, safeResults); + // stop subsequent errors hitting callback multiple times + callback = function () {}; + } + else { + results[k] = args; + async.setImmediate(taskComplete); + } + }; + var requires = task.slice(0, Math.abs(task.length - 1)) || []; + var ready = function () { + return _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + }; + if (ready()) { + task[task.length - 1](taskCallback, results); + } + else { + var listener = function () { + if (ready()) { + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + }; + addListener(listener); + } + }); + }; + + async.waterfall = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor !== Array) { + var err = new Error('First argument to waterfall must be an array of functions'); + return callback(err); + } + if (!tasks.length) { + return callback(); + } + var wrapIterator = function (iterator) { + return function (err) { + if (err) { + callback.apply(null, arguments); + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + async.setImmediate(function () { + iterator.apply(null, args); + }); + } + }; + }; + wrapIterator(async.iterator(tasks))(); + }; + + var _parallel = function(eachfn, tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + eachfn.map(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + eachfn.each(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.parallel = function (tasks, callback) { + _parallel({ map: async.map, each: async.each }, tasks, callback); + }; + + async.parallelLimit = function(tasks, limit, callback) { + _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); + }; + + async.series = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.mapSeries(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.eachSeries(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.iterator = function (tasks) { + var makeCallback = function (index) { + var fn = function () { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + }; + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + }; + return makeCallback(0); + }; + + async.apply = function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + return function () { + return fn.apply( + null, args.concat(Array.prototype.slice.call(arguments)) + ); + }; + }; + + var _concat = function (eachfn, arr, fn, callback) { + var r = []; + eachfn(arr, function (x, cb) { + fn(x, function (err, y) { + r = r.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, r); + }); + }; + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + if (test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.whilst(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doWhilst = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + if (test()) { + async.doWhilst(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.until = function (test, iterator, callback) { + if (!test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.until(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doUntil = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + if (!test()) { + async.doUntil(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.queue = function (worker, concurrency) { + if (concurrency === undefined) { + concurrency = 1; + } + function _insert(q, data, pos, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _each(data, function(task) { + var item = { + data: task, + callback: typeof callback === 'function' ? callback : null + }; + + if (pos) { + q.tasks.unshift(item); + } else { + q.tasks.push(item); + } + + if (q.saturated && q.tasks.length === concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + var workers = 0; + var q = { + tasks: [], + concurrency: concurrency, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + _insert(q, data, false, callback); + }, + unshift: function (data, callback) { + _insert(q, data, true, callback); + }, + process: function () { + if (workers < q.concurrency && q.tasks.length) { + var task = q.tasks.shift(); + if (q.empty && q.tasks.length === 0) { + q.empty(); + } + workers += 1; + var next = function () { + workers -= 1; + if (task.callback) { + task.callback.apply(task, arguments); + } + if (q.drain && q.tasks.length + workers === 0) { + q.drain(); + } + q.process(); + }; + var cb = only_once(next); + worker(task.data, cb); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + } + }; + return q; + }; + + async.cargo = function (worker, payload) { + var working = false, + tasks = []; + + var cargo = { + tasks: tasks, + payload: payload, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _each(data, function(task) { + tasks.push({ + data: task, + callback: typeof callback === 'function' ? callback : null + }); + if (cargo.saturated && tasks.length === payload) { + cargo.saturated(); + } + }); + async.setImmediate(cargo.process); + }, + process: function process() { + if (working) return; + if (tasks.length === 0) { + if(cargo.drain) cargo.drain(); + return; + } + + var ts = typeof payload === 'number' + ? tasks.splice(0, payload) + : tasks.splice(0); + + var ds = _map(ts, function (task) { + return task.data; + }); + + if(cargo.empty) cargo.empty(); + working = true; + worker(ds, function () { + working = false; + + var args = arguments; + _each(ts, function (data) { + if (data.callback) { + data.callback.apply(null, args); + } + }); + + process(); + }); + }, + length: function () { + return tasks.length; + }, + running: function () { + return working; + } + }; + return cargo; + }; + + var _console_fn = function (name) { + return function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + fn.apply(null, args.concat([function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (typeof console !== 'undefined') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _each(args, function (x) { + console[name](x); + }); + } + } + }])); + }; + }; + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + hasher = hasher || function (x) { + return x; + }; + var memoized = function () { + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + var key = hasher.apply(null, args); + if (key in memo) { + callback.apply(null, memo[key]); + } + else if (key in queues) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([function () { + memo[key] = arguments; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, arguments); + } + }])); + } + }; + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + + async.times = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.map(counter, iterator, callback); + }; + + async.timesSeries = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.mapSeries(counter, iterator, callback); + }; + + async.compose = function (/* functions... */) { + var fns = Array.prototype.reverse.call(arguments); + return function () { + var that = this; + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + async.reduce(fns, args, function (newargs, fn, cb) { + fn.apply(that, newargs.concat([function () { + var err = arguments[0]; + var nextargs = Array.prototype.slice.call(arguments, 1); + cb(err, nextargs); + }])) + }, + function (err, results) { + callback.apply(that, [err].concat(results)); + }); + }; + }; + + var _applyEach = function (eachfn, fns /*args...*/) { + var go = function () { + var that = this; + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + return eachfn(fns, function (fn, cb) { + fn.apply(that, args.concat([cb])); + }, + callback); + }; + if (arguments.length > 2) { + var args = Array.prototype.slice.call(arguments, 2); + return go.apply(this, args); + } + else { + return go; + } + }; + async.applyEach = doParallel(_applyEach); + async.applyEachSeries = doSeries(_applyEach); + + async.forever = function (fn, callback) { + function next(err) { + if (err) { + if (callback) { + return callback(err); + } + throw err; + } + fn(next); + } + next(); + }; + + // AMD / RequireJS + if (typeof define !== 'undefined' && define.amd) { + define([], function () { + return async; + }); + } + // Node.js + else if (typeof module !== 'undefined' && module.exports) { + module.exports = async; + } + // included directly via + + + + diff --git a/node_modules/broadway/examples/browser/plugins/helloworld.js b/node_modules/broadway/examples/browser/plugins/helloworld.js new file mode 100644 index 0000000..7c9afbe --- /dev/null +++ b/node_modules/broadway/examples/browser/plugins/helloworld.js @@ -0,0 +1,23 @@ + +window.HelloWorld = {}; + +// +// `exports.attach` gets called by broadway on `app.use` +// +HelloWorld.attach = function (options) { + + this.hello = function (world) { + console.log("Hello "+ world + options.delimiter || "."); + } +}; + +// +// `exports.init` gets called by broadway on `app.init`. +// +HelloWorld.init = function (done) { + + // + // This plugin doesn't require any initialization step. + // + return done(); +}; diff --git a/node_modules/broadway/examples/nodejs/app.js b/node_modules/broadway/examples/nodejs/app.js new file mode 100644 index 0000000..ce89a59 --- /dev/null +++ b/node_modules/broadway/examples/nodejs/app.js @@ -0,0 +1,17 @@ +var broadway = require('../../'), + app = new broadway.App(); + +// Passes the second argument to `helloworld.attach`. +app.use(require("./plugins/helloworld"), { "delimiter": "!" } ); +app.use(broadway.plugins.log, { + logAll: true +}); + +app.init(function (err) { + if (err) { + console.log(err); + } +}); + +app.hello("world"); +app.emit('world:hello', { meta: 'is here' }); diff --git a/node_modules/broadway/examples/nodejs/plugins/helloworld.js b/node_modules/broadway/examples/nodejs/plugins/helloworld.js new file mode 100644 index 0000000..ed0738d --- /dev/null +++ b/node_modules/broadway/examples/nodejs/plugins/helloworld.js @@ -0,0 +1,23 @@ + +var HelloWorld = exports; + +// +// `exports.attach` gets called by broadway on `app.use` +// +HelloWorld.attach = function (options) { + + this.hello = function (world) { + console.log("Hello "+ world + options.delimiter || "."); + } +}; + +// +// `exports.init` gets called by broadway on `app.init`. +// +HelloWorld.init = function (done) { + + // + // This plugin doesn't require any initialization step. + // + return done(); +}; diff --git a/node_modules/broadway/lib/broadway.js b/node_modules/broadway/lib/broadway.js new file mode 100644 index 0000000..fc614e4 --- /dev/null +++ b/node_modules/broadway/lib/broadway.js @@ -0,0 +1,19 @@ +/* + * broadway.js: Top-level include for the broadway module. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var path = require('path'), + utile = require('utile'); + +var broadway = exports; + +broadway.App = require('./broadway/app').App; +broadway.common = require('./broadway/common'); +broadway.features = require('./broadway/features'); +broadway.formats = require('nconf').formats; +broadway.plugins = utile.requireDirLazy(path.join(__dirname, 'broadway', 'plugins')); + diff --git a/node_modules/broadway/lib/broadway/app.js b/node_modules/broadway/lib/broadway/app.js new file mode 100644 index 0000000..a773df4 --- /dev/null +++ b/node_modules/broadway/lib/broadway/app.js @@ -0,0 +1,225 @@ +/* + * app.js: Core Application object for managing plugins and features in broadway + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var utile = require('utile'), + async = utile.async, + events = require('eventemitter2'), + bootstrapper = require('./bootstrapper'), + common = require('./common'), + features = require('./features'); + +var App = exports.App = function (options) { + // + // Setup options and `App` constants. + // + options = options || {}; + this.root = options.root; + this.delimiter = options.delimiter || '::'; + + // + // Inherit from `EventEmitter2` + // + events.EventEmitter2.call(this, { + delimiter: this.delimiter, + wildcard: true + }); + + // + // Setup other relevant options such as the plugins + // for this instance. + // + this.options = options; + this.env = options.env || process.env['NODE_ENV'] || 'development' + this.plugins = options.plugins || {}; + this.initialized = false; + this.bootstrapper = options.bootstrapper || bootstrapper; + this.initializers = {}; + this.initlist = []; + + // + // Bootstrap this instance + // + this.bootstrapper.bootstrap(this); +}; + +// +// Inherit from `EventEmitter2`. +// +utile.inherits(App, events.EventEmitter2); + +// +// ### function init (options, callback) +// #### @options {Object} **Optional** Additional options to initialize with. +// #### @callback {function} Continuation to respond to when complete. +// Initializes this instance by the following procedure: +// +// 1. Initializes all plugins (starting with `core`). +// 2. Creates all directories in `this.config.directories` (if any). +// 3. Ensures the files in the core directory structure conform to the +// features required by this application. +// +App.prototype.init = function (options, callback) { + if (!callback && typeof options === 'function') { + callback = options; + options = {}; + } + + if (this.initialized) { + return callback(); + } + + var self = this; + options = options || {}; + callback = callback || function () {}; + this.env = options.env || this.env; + this.options = common.mixin({}, this.options, options); + + function onComplete() { + self.initialized = true; + self.emit('init'); + callback(); + } + + function ensureFeatures (err) { + return err + ? onError(err) + : features.ensure(this, onComplete); + } + + function initPlugin(plugin, next) { + if (typeof self.initializers[plugin] === 'function') { + return self.initializers[plugin].call(self, function (err) { + if (err) { + return next(err); + } + + self.emit(['plugin', plugin, 'init']); + self.initializers[plugin] = true; + next(); + }); + } + + next(); + } + + function initPlugins() { + async.forEach(self.initlist, initPlugin, ensureFeatures); + } + + // + // Emit and respond with any errors that may short + // circuit the process. + // + function onError(err) { + self.emit(['error', 'init'], err); + callback(err); + } + + // + // Run the bootstrapper, initialize plugins, and + // ensure features for this instance. + // + this.bootstrapper.init(this, initPlugins); +}; + +// +// ### function use(plugin, callback) +// Attachs the plugin with the specific name to this `App` instance. +// +App.prototype.use = function (plugin, options, callback) { + options = options || {}; + + if (typeof plugin === 'undefined') { + console.log('Cannot load invalid plugin!'); + return callback && callback(new Error('Invalid plugin')); + } + + var name = plugin.name, + self = this; + + // If the plugin doesn't have a name, use itself as an identifier for the plugins hash. + if (!name) { + name = common.uuid(); + } + + if (this.plugins[name]) { + return callback && callback(); + } + + // + // Setup state on this instance for the specified plugin + // + this.plugins[name] = plugin; + this.options[name] = common.mixin({}, options, this.options[name] || {}); + + // + // Attach the specified plugin to this instance, extending + // the `App` with new functionality. + // + if (this.plugins[name].attach && options.attach !== false) { + this.plugins[name].attach.call(this, options); + } + + // + // Setup the initializer only if `options.init` is + // not false. This allows for some plugins to be lazy-loaded + // + if (options.init === false) { + return callback && callback(); + } + + if (!this.initialized) { + this.initializers[name] = plugin.init || true; + this.initlist.push(name); + return callback && callback(); + } + else if (plugin.init) { + plugin.init.call(this, function (err) { + var args = err + ? [['plugin', name, 'error'], err] + : [['plugin', name, 'init']]; + + self.emit.apply(self, args); + return callback && (err ? callback(err) : callback()); + }); + } +}; + +// +// ### function remove(name) +// Detaches the plugin with the specific name from this `App` instance. +// +App.prototype.remove = function (name) { + // if this is a plugin object set the name to the plugins name + if (name.name) { + name = name.name; + } + + if (this.plugins[name] && this.plugins[name].detach) { + this.plugins[name].detach.call(this); + } + + delete this.plugins[name]; + delete this.options[name]; + delete this.initializers[name]; + + var init = this.initlist.indexOf(name); + + if (init !== -1) { + this.initlist.splice(1, init); + } +} + +// +// ### function inspect () +// Inspects the modules and features used by the current +// application directory structure +// +App.prototype.inspect = function () { + +}; diff --git a/node_modules/broadway/lib/broadway/bootstrapper.js b/node_modules/broadway/lib/broadway/bootstrapper.js new file mode 100644 index 0000000..e3336d0 --- /dev/null +++ b/node_modules/broadway/lib/broadway/bootstrapper.js @@ -0,0 +1,84 @@ +/* + * bootstrapper.js: Default logic for bootstrapping broadway applications. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var broadway = require('../broadway'); + +// +// ### bootstrap (app, callback) +// #### @app {broadway.App} Application to bootstrap +// #### @callback {function} Continuation to respond to when complete. +// Bootstraps the specified `app`. +// +exports.bootstrap = function (app) { + app.options['config'] = app.options['config'] || {}; + app.options['config'].init = false; + app.use(broadway.plugins.config); + + // + // Remove initializers run by the bootstrapper. + // + delete app.initializers['config']; + app.initlist.pop(); + + // + // Set the current environment in the config + // + app.config.set('env', app.env); +}; + +// +// ### bootstrap (app, callback) +// #### @app {broadway.App} Application to bootstrap +// #### @callback {function} Continuation to respond to when complete. +// Runs the initialization step of the bootstrapping process +// for the specified `app`. +// +exports.init = function (app, callback) { + broadway.plugins.config.init.call(app, function (err) { + if (err) { + return callback(err); + } + + if (app.config.get('handleExceptions')) { + app.use(broadway.plugins.exceptions, app.options['exceptions'] || {}); + } + + app.use(broadway.plugins.directories, app.options['directories'] || {}); + app.use(broadway.plugins.log, app.options['log'] || {}); + + // + // Ensure the `directories` and `log` plugins initialize before + // any other plugins. Since we cannot depend on ordering (if they were + // manually added) splice the specific indexes + // + var log = app.initlist.indexOf('log'); + app.initlist.unshift.apply( + app.initlist, + app.initlist.splice(log) + ); + + var directories = app.initlist.indexOf('directories'); + app.initlist.unshift.apply( + app.initlist, + app.initlist.splice(directories) + ); + + // + // Put the godot plugin before the log if it exists + // + var godot = app.initlist.indexOf('godot'); + if(~godot) { + app.initlist.unshift.apply( + app.initlist, + app.initlist.splice(godot) + ); + } + + callback(); + }); +}; diff --git a/node_modules/broadway/lib/broadway/browser.js b/node_modules/broadway/lib/broadway/browser.js new file mode 100644 index 0000000..9ea14cf --- /dev/null +++ b/node_modules/broadway/lib/broadway/browser.js @@ -0,0 +1,75 @@ + +/* + * browser.js: Browser specific functionality for broadway. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var id = 0; + +var common = { + mixin: function (target) { + var objs = Array.prototype.slice.call(arguments, 1); + objs.forEach(function (o) { + Object.keys(o).forEach(function (attr) { + var getter = o.__lookupGetter__(attr); + if (!getter) { + target[attr] = o[attr]; + } + else { + target.__defineGetter__(attr, getter); + } + }); + }); + + return target; + }, + uuid: function () { + return String(id++); + } +}; + +var App = exports.App = function (options) { + // + // Setup options and `App` constants. + // + var self = this; + options = options || {}; + this.root = options.root; + this.delimiter = options.delimiter || '::'; + + // + // Inherit from `EventEmitter2` + // + exports.EventEmitter2.call(this, { + delimiter: this.delimiter, + wildcard: true + }); + + // + // Setup other relevant options such as the plugins + // for this instance. + // + this.options = options; + this.plugins = options.plugins || {}; + this.initialized = false; + this.bootstrapper = { init: function (app, func) {} }; + this.initializers = {}; +}; + +var inherit = function (ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); +} + +inherit(exports.App, exports.EventEmitter2); + diff --git a/node_modules/broadway/lib/broadway/common/directories.js b/node_modules/broadway/lib/broadway/common/directories.js new file mode 100644 index 0000000..46a437f --- /dev/null +++ b/node_modules/broadway/lib/broadway/common/directories.js @@ -0,0 +1,78 @@ +/* + * app.js: Common utility functions for working with directories + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var utile = require('utile'), + async = utile.async, + mkdirp = utile.mkdirp, + rimraf = utile.rimraf; + +var directories = exports; + +// +// ### function create (dirs, callback) +// #### @dirs {Object} Directories to create +// #### @callback {function} Continuation to respond to when complete +// Creates all of the specified `directories` in the current environment. +// +directories.create = function (dirs, callback) { + function createDir(dir, next) { + mkdirp(dir, 0755, function () { + next(null, dir); + }); + } + + if (!dirs) { + return callback(); + } + + async.mapSeries(Object.keys(dirs).map(function (key) { + return dirs[key] + }), createDir, callback); +}; + +// +// ### function remove (dirs, callback) +// #### @dirs {Object} Directories to remove +// #### @callback {function} Continuation to respond to when complete +// Removes all of the specified `directories` in the current environment. +// +directories.remove = function (dirs, callback) { + function removeDir (dir, next) { + rimraf(dir, function () { + next(null, dir); + }); + } + + if (!dirs) { + return callback(); + } + + async.mapSeries(Object.keys(dirs).map(function (key) { + return dirs[key] + }), removeDir, callback); +}; + +// +// ### function normalize (root, dirs) +// #### @keys {Object} Set of keys to normalize upon. +// #### @dirs {Object} Set of directories to normalize. +// Normalizes the specified `dirs` against the relative +// `root` of the application. +// +directories.normalize = function (keys, dirs) { + var normalized = {}; + + Object.keys(dirs).forEach(function (key) { + normalized[key] = dirs[key]; + Object.keys(keys).forEach(function (constant) { + normalized[key] = normalized[key].replace(constant, keys[constant]); + }); + }); + + return normalized; +}; diff --git a/node_modules/broadway/lib/broadway/common/index.js b/node_modules/broadway/lib/broadway/common/index.js new file mode 100644 index 0000000..81d38d9 --- /dev/null +++ b/node_modules/broadway/lib/broadway/common/index.js @@ -0,0 +1,18 @@ +/* + * common.js: Top-level include for the `common` module. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var common = module.exports = require('utile'); + +common.directories = require('./directories'); + +// A naive shared "unique ID" generator for cases where `plugin.name` is +// undefined. +var id = 0; +common.uuid = function () { + return String(id++); +} diff --git a/node_modules/broadway/lib/broadway/features/index.js b/node_modules/broadway/lib/broadway/features/index.js new file mode 100644 index 0000000..ae50e4a --- /dev/null +++ b/node_modules/broadway/lib/broadway/features/index.js @@ -0,0 +1,48 @@ +/* + * index.js: Top-level include for the features module. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +exports.ensure = function (app, callback) { + return callback(); +} + +exports.all = [ + { + name: 'Entry Point', + test: function (target, name) { + return typeof target.start === 'function' || + typeof target.createServer === 'function'; + }, + allExports: ['start', 'createServer', 'init', 'getRoutes'] + }, + { + name: 'Resource', + test: function (target, name) { + var methods = ['create', 'get', 'update', 'destroy'], + resource = target[capitalize(name)]; + + if (typeof resource !== 'function') { + return false; + } + + for (var i = 0; i < methods.length; i++) { + if (typeof resource[method] !== 'function') { + return false; + } + } + }, + allExports: ['addRoutes', 'init'] + }, + { + name: 'Configurator', + exports: ['config'], + }, + { + name: 'Serve Files', + exports: 'serve' + } +]; \ No newline at end of file diff --git a/node_modules/broadway/lib/broadway/plugins/config.js b/node_modules/broadway/lib/broadway/plugins/config.js new file mode 100644 index 0000000..9f9e0c4 --- /dev/null +++ b/node_modules/broadway/lib/broadway/plugins/config.js @@ -0,0 +1,46 @@ +/* + * config.js: Default configuration management plugin which attachs nconf to App instances + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var nconf = require('nconf'); + +// +// ### Name this plugin +// +exports.name = 'config'; + +// +// ### function attach (options) +// #### @options {Object} Options for this plugin +// Extends `this` (the application) with configuration functionality +// from `nconf`. +// +exports.attach = function (options) { + options = options || {}; + this.config = new nconf.Provider(options); + + // + // Setup a default store + // + this.config.use('literal'); + this.config.stores.literal.readOnly = false; +}; + +// +// ### function init (done) +// #### @done {function} Continuation to respond to when complete. +// Initalizes the `nconf.Provider` associated with this instance. +// +exports.init = function (done) { + // + // Remark: There should be code here for automated remote + // seeding and loading + // + this.config.load(function (err) { + return err ? done(err) : done(); + }); +}; \ No newline at end of file diff --git a/node_modules/broadway/lib/broadway/plugins/directories.js b/node_modules/broadway/lib/broadway/plugins/directories.js new file mode 100644 index 0000000..331f8b2 --- /dev/null +++ b/node_modules/broadway/lib/broadway/plugins/directories.js @@ -0,0 +1,49 @@ +/* + * directories.js: Plugin for creating directories for a required for a broadway App. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var common = require('../common'); + +// +// ### Name this plugin +// +exports.name = 'directories'; + +// +// ### function attach (options) +// #### @options {Object} Options for this plugin +// #### @done {function} Continuation to respond to when complete. +// Prepopulates the directory structure of `this` (the application). +// +exports.attach = function (options) { + options = options || {}; + + if (this.config) { + // + // Merge options with any pre-existing application config. + // + options = common.mixin({}, options, this.config.get('directories') || {}); + } + + options = common.directories.normalize({'#ROOT': this.root}, options); + this.options['directories'] = options; + + if (this.config) { + this.config.merge('directories', options); + } +}; + +// +// ### function init (done) +// #### @done {function} Continuation to respond to when complete. +// Creates the directories associated with this instance. +// +exports.init = function (done) { + common.directories.create(this.options['directories'], function (err) { + return err ? done(err) : done(); + }); +}; diff --git a/node_modules/broadway/lib/broadway/plugins/exceptions.js b/node_modules/broadway/lib/broadway/plugins/exceptions.js new file mode 100644 index 0000000..883d394 --- /dev/null +++ b/node_modules/broadway/lib/broadway/plugins/exceptions.js @@ -0,0 +1,70 @@ +/* + * exceptions.js: Plugin responsible for logging all uncaughtExceptions in a flatiron App. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var winston = require('winston'), + common = require('../common'); + +var exceptions = exports; + +// +// ### Setup default state for the exceptions plugin +// +exceptions.name = 'exceptions'; +exceptions.initalized = false; + +var defaultConfig = exceptions.defaultConfig = { + console: { + colorize: false, + json: true, + level: 'silly' + } +}; + +// +// ### function attach (options) +// #### @options {Object} Options for this plugin +// Extends `this` the application with exception handling +// functionality from `winston`. +// +exceptions.attach = function (options) { + options = options || {}; + + if (this.config) { + options = common.mixin({}, options, this.config.get('exceptions') || {}); + } + + if (exceptions.initalized) { + return; + } + + var exceptionHandlers = []; + + // + // Create the exceptionHandlers defaulting to Console and Loggly. + // + exceptionHandlers.push(new winston.transports.Console(options.console || defaultConfig.console)); + + Object.keys(options).forEach(function (name) { + if (name === 'console') { + return; + } + + exceptionHandlers.push(new (winston.transports[common.capitalize(name)])(options[name])); + }); + + // + // Update the state of the plugin with the logger. + // + exceptions.logger = new winston.Logger({ exceptionHandlers: exceptionHandlers }); + exceptions.initalized = true; + + // + // Have the logger handle uncaught exceptions. + // + exceptions.logger.handleExceptions(); +}; \ No newline at end of file diff --git a/node_modules/broadway/lib/broadway/plugins/inspect.js b/node_modules/broadway/lib/broadway/plugins/inspect.js new file mode 100644 index 0000000..47bf803 --- /dev/null +++ b/node_modules/broadway/lib/broadway/plugins/inspect.js @@ -0,0 +1,40 @@ +/* + * inspect.js: Plugin responsible for attaching inspection behavior using `cliff` and `eyes`. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +// +// ### Name this plugin +// +exports.name = 'inspect'; + +// +// ### function init (done) +// #### @done {function} Continuation to respond to when complete. +// Attaches inspection behavior through `cliff` and `eyes`. +// +exports.init = function (done) { + var namespace = 'default', + app = this; + + if (app.options['inspect'] && app.options['inspect'].namespace) { + namespace = app.options['inspect'].namespace; + } + + app.inspect = require('cliff'); + app.inspect.logger = app.log.get('namespace'); + done(); +}; + +// +// ### function detact() +// Removes inspection behavior exposed by this plugin. +// +exports.detach = function () { + if (this.inspect) { + delete this.inspect; + } +}; \ No newline at end of file diff --git a/node_modules/broadway/lib/broadway/plugins/log.js b/node_modules/broadway/lib/broadway/plugins/log.js new file mode 100644 index 0000000..e2f1c23 --- /dev/null +++ b/node_modules/broadway/lib/broadway/plugins/log.js @@ -0,0 +1,227 @@ +/* + * log.js: Default logging plugin which attachs winston to App instances + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var winston = require('winston'), + common = require('../common'); + +var log = exports; + +// +// ### Setup default state for the exceptions plugin +// +log.name = 'log'; +log.ignore = ['broadway']; + +// +// ### function attach (options) +// #### @options {Object} Options for this plugin +// Extends `this` (the application) with logging functionality from `winston`. +// +log.attach = function (options) { + options = options || {}; + + var app = this, + namespaces, + logAll, + level, + oldGodot, + service; + + if (this.config) { + // + // Merge options with any pre-existing application config. + // + options = common.mixin({}, options, this.config.get('log') || {}); + } + + // + // Setup namespaces and then remove them from + // `options` so they are not caught by `winston`. + // + namespaces = options.namespaces || {}; + delete options.namespaces; + + // + // Setup logAll and then remove them from + // `options` so they are not caught by `winston`. + // + logAll = options.logAll || false; + if (options.logAll) { + delete options.logAll; + } + + // + // Setup level and then remove them from + // `options` so they are not caught by `winston`. + // + level = options.level || false; + if (options.level) { + delete options.level; + } + + // + // Make proper godot options for the winston plugin if it exists + // + if (this.godot && options.godot) { + oldGodot = options.godot; + service = this.config.get('service') + || options.service + || oldGodot.service + || 'app'; + options.godot = { + godot: this.godot, + service: service + '/logs', + handleExceptions: oldGodot.handleExceptions === false ? false : true + }; + } + + // + // Hoist up relevant logging functions onto the app + // if requested. + // + this.log = new winston.Container(options); + this.log.namespaces = namespaces; + this.log.get('default').extend(this.log); + + // + // Set the default console loglevel to options.level + // + this.log.get('default').transports.console.level = level || 'info'; + + Object.defineProperty(this.log, 'logAll', { + get: function () { + return this._logAll; + }, + set: function (val) { + if (val === this._logAll) { + // + // If the value is identical return + // + return; + } + + if (val) { + app.onAny(log.logEvent); + app.off(['log'], log.logEvent); + app.off(['log', '*'], log.logEvent); + app.off(['log', '*', '*'], log.logEvent); + } + else { + app.offAny(log.logEvent); + app.on(['log'], log.logEvent); + app.on(['log', '*'], log.logEvent); + app.on(['log', '*', '*'], log.logEvent); + } + + this._logAll = val; + } + }); + + // + // Listen to relevant `app` events and + // log them appropriately. + // + this.log.logAll = logAll; + + // + // Add any namespaced containers to this App instance. + // + Object.keys(this.log.namespaces).forEach(function (namespace) { + app.log.add(app.log.namespaces[namespace]); + }); +}; + +// +// ### function logEvent ([level], msg, meta) +// #### @msg {string} Message to log +// #### @meta {Object} **Optional** Metadata to log +// Logs the specified `msg` and `meta` according to +// the following conditions: +// +// #### `log` events +// 1. `log` - Logs to the default logger and level. +// 2. `log::[level]` - Logs to the default logger. +// 3. `log::[level]::[namespace]` - Logs to a namespaced logger. +// +// ### `[namespaced]` events +// If `app.log.logAll` is set, then find a logger at `namespace`, +// otherwise the default logger is used. +// +// 1. `[namespace]::**(level, msg, meta)` - Logs the event as the +// message to the logger for the specified namespace and level. +// 2. `[namespace]::[level]::**(msg, meta)` - Logs the event and +// the message to the logger for the specified namespace and level. +// +log.logEvent = function (/* level, msg, meta */) { + var parts = Array.isArray(this.event) ? this.event : this.event.split(this.delimiter), + ev = parts[0], + namespace, + logger, + level, + meta, + msg; + + if (log.ignore.indexOf(ev) !== -1) { + return; + } + + // + // Determine the `namespace` to log the event to + // + if (ev === 'log') { + namespace = parts[2] || 'default'; + logger = this.log.get('default'); + } + else if (this.log.logAll) { + namespace = this.log.namespaces[ev] ? this.log.namespaces[ev] : 'default'; + logger = this.log.get(namespace); + } + else { + return; + } + + // + // Parse arguments now that we have the logger. + // + Array.prototype.slice.call(arguments).forEach(function (a) { + switch (typeof a) { + case 'object': { + meta = a; + break; + } + case 'string': { + if (logger[a]) { + level = a; + } + else { + msg = a; + } + } + } + }); + + if (ev === 'log') { + level = parts[1] || level || 'info'; + } + else if (this.log.logAll) { + if (logger[parts[1]]) { + level = parts[1]; + parts.splice(1, 1); + } + } + + if (level in logger.levels === false) { + level = 'info'; + } + + parts = parts.join(this.delimiter); + meta = meta || {}; + msg = msg || parts; + logger.log(level, msg, meta); + this.emit(['broadway', 'logged'], level, msg, meta, parts); +}; diff --git a/node_modules/broadway/package.json b/node_modules/broadway/package.json new file mode 100644 index 0000000..34f0c3d --- /dev/null +++ b/node_modules/broadway/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + "broadway@~0.3.6", + "/home/mywebsite/node_modules/forever-monitor" + ] + ], + "_from": "broadway@>=0.3.6 <0.4.0", + "_id": "broadway@0.3.6", + "_inCache": true, + "_installable": true, + "_location": "/broadway", + "_npmUser": { + "email": "jcrugzz@gmail.com", + "name": "jcrugzz" + }, + "_npmVersion": "1.4.23", + "_phantomChildren": {}, + "_requested": { + "name": "broadway", + "raw": "broadway@~0.3.6", + "rawSpec": "~0.3.6", + "scope": null, + "spec": ">=0.3.6 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/forever-monitor" + ], + "_resolved": "https://registry.npmjs.org/broadway/-/broadway-0.3.6.tgz", + "_shasum": "7dbef068b954b7907925fd544963b578a902ba7a", + "_shrinkwrap": null, + "_spec": "broadway@~0.3.6", + "_where": "/home/mywebsite/node_modules/forever-monitor", + "author": { + "email": "info@nodejitsu.com", + "name": "Nodejitsu Inc." + }, + "bugs": { + "url": "https://github.com/flatiron/broadway/issues" + }, + "dependencies": { + "cliff": "0.1.9", + "eventemitter2": "0.4.14", + "nconf": "0.6.9", + "utile": "0.2.1", + "winston": "0.8.0" + }, + "description": "Lightweight application extensibility and composition with a twist of feature reflection.", + "devDependencies": { + "codesurgeon": "0.3.x", + "uglify-js": "1.0.6", + "vows": "0.7.x" + }, + "directories": {}, + "dist": { + "shasum": "7dbef068b954b7907925fd544963b578a902ba7a", + "tarball": "http://registry.npmjs.org/broadway/-/broadway-0.3.6.tgz" + }, + "engines": { + "node": ">= 0.6.4" + }, + "gitHead": "d293e467b2364b2432259f8c21df0c6bf1206762", + "homepage": "https://github.com/flatiron/broadway", + "main": "./lib/broadway", + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + { + "name": "mmalecki", + "email": "me@mmalecki.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + } + ], + "name": "broadway", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/flatiron/broadway.git" + }, + "scripts": { + "test": "vows test/**/*-test.js --spec" + }, + "version": "0.3.6" +} diff --git a/node_modules/broadway/test/common/directories-test.js b/node_modules/broadway/test/common/directories-test.js new file mode 100644 index 0000000..165dca4 --- /dev/null +++ b/node_modules/broadway/test/common/directories-test.js @@ -0,0 +1,60 @@ +/* + * directories-test.js: Tests for working with directories in broadway. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var assert = require('assert'), + fs = require('fs'), + path = require('path'), + vows = require('vows'), + broadway = require('../../lib/broadway'); + +var fixturesDir = path.join(__dirname, '..', 'fixtures'), + emptyAppDir = path.join(fixturesDir, 'empty-app'), + emptyAppFile = path.join(fixturesDir, 'sample-app.json'), + appConfig = JSON.parse(fs.readFileSync(emptyAppFile, 'utf8')), + directories = appConfig.directories; + +vows.describe('broadway/common/directories').addBatch({ + "When using broadway.common.directories": { + "it should have the correct methods defined": function () { + assert.isObject(broadway.common.directories); + assert.isFunction(broadway.common.directories.create); + assert.isFunction(broadway.common.directories.remove); + }, + "the normalize() method should correctly modify a set of directories": function () { + directories = broadway.common.directories.normalize({'#ROOT': emptyAppDir}, directories); + + Object.keys(directories).forEach(function (key) { + assert.isTrue(directories[key].indexOf(emptyAppDir) !== -1); + }); + }, + "the create() method": { + topic: function () { + broadway.common.directories.create(directories, this.callback); + }, + "should create the specified directories": function (err, dirs) { + assert.isTrue(!err); + + dirs.forEach(function (dir) { + assert.isTrue((fs.existsSync || path.existsSync)(dir)); + }); + }, + "the destroy() method": { + topic: function () { + broadway.common.directories.remove(directories, this.callback); + }, + "should remove the specified directories": function (err, dirs) { + assert.isTrue(!err); + + dirs.forEach(function (dir) { + assert.isFalse((fs.existsSync || path.existsSync)(dir)); + }); + } + } + } + } +}).export(module); diff --git a/node_modules/broadway/test/core/app-init-test.js b/node_modules/broadway/test/core/app-init-test.js new file mode 100644 index 0000000..de3a0f9 --- /dev/null +++ b/node_modules/broadway/test/core/app-init-test.js @@ -0,0 +1,100 @@ +/* + * app-test.js: Tests for core App methods and configuration. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var events = require('eventemitter2'), + vows = require('vows'), + assert = require('../helpers/assert'), + broadway = require('../../lib/broadway'); + +vows.describe('broadway/app').addBatch({ + "An initialized instance of broadway.App with three plugins": { + topic: function () { + var app = new broadway.App(), + that = this, + three; + + that.init = []; + + three = { + name: 'three', + init: function (cb) { + process.nextTick(function () { + that.init.push('three'); + cb(); + }) + } + }; + + // First plugin. Includes an init step. + app.use({ + attach: function () { + this.place = 'rackspace'; + }, + + init: function (cb) { + var self = this; + + // a nextTick isn't technically necessary, but it does make this + // purely async. + process.nextTick(function () { + that.init.push('one'); + self.letsGo = function () { + return 'Let\'s go to '+self.place+'!'; + } + + cb(); + }); + } + }); + + // Second plugin. Only involves an "attach". + app.use({ + attach: function () { + this.oneup = function (n) { + n++; + return n; + } + } + }); + + // Third pluging. Only involves an "init". + app.use(three); + + // Attempt to use it again. This should not invoke `init()` twice + app.use(three); + + // Remove the plugin and use it again. This should not invoke `init()` twice + app.remove(three); + app.use(three); + + // Removing a plugin which was never added should not affect the initlist + app.remove({ + name: 'foo' + }); + + app.init(function (err) { + that.callback(err, app); + }); + }, + "shouldn't throw an error": function (err, app) { + assert.ok(!err); + }, + "should have all its methods attached/defined": function (err, app) { + assert.ok(app.place); + assert.isFunction(app.oneup); + assert.isFunction(app.letsGo); + assert.equal(2, app.oneup(1)); + assert.equal(app.letsGo(), 'Let\'s go to rackspace!'); + + // + // This is intentional. The second plugin does not invoke `init`. + // + assert.deepEqual(this.init, ['one', 'three']); + }, + } +}).export(module); diff --git a/node_modules/broadway/test/core/app-test.js b/node_modules/broadway/test/core/app-test.js new file mode 100644 index 0000000..b985eaa --- /dev/null +++ b/node_modules/broadway/test/core/app-test.js @@ -0,0 +1,73 @@ +/* + * app-test.js: Tests for core App methods and configuration. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var events = require('eventemitter2'), + vows = require('vows'), + assert = require('../helpers/assert'), + broadway = require('../../lib/broadway'); + +vows.describe('broadway/app').addBatch({ + "An instance of broadway.App": { + topic: new broadway.App(), + "should have the correct properties and methods": function (app) { + // + // Instance + // + assert.isObject(app); + assert.instanceOf(app, events.EventEmitter2); + assert.instanceOf(app, broadway.App); + + // + // Properties + // + assert.isObject(app.plugins); + assert.isObject(app.initializers); + assert.isFalse(!!app.initialized); + + // + // Methods + // + assert.isFunction(app.init); + assert.isFunction(app.use); + assert.isFunction(app.remove); + assert.isFunction(app.inspect); + }, + "the init() method": { + topic: function (app) { + this.app = app; + app.init(this.callback); + }, + "should correctly setup the application state": function () { + assert.isTrue(this.app.initialized); + assert.isTrue(this.app.initializers['log']); + + assert.plugins.has.config(this.app); + assert.plugins.has.log(this.app); + } + }, + "the detach() method": { + topic: function (app) { + app.use({ + name: "foo", + attach: function () { + this.attached = true; + }, + detach: function () { + this.detached = true; + } + }); + app.remove("foo"); + return app; + }, + "should correctly remove a plugin": function (app) { + assert.isTrue(app.detached); + assert.equal(undefined, app.plugins["foo"]); + } + } + } +}).export(module); diff --git a/node_modules/broadway/test/core/broadway-test.js b/node_modules/broadway/test/core/broadway-test.js new file mode 100644 index 0000000..d69bc6f --- /dev/null +++ b/node_modules/broadway/test/core/broadway-test.js @@ -0,0 +1,26 @@ +/* + * broadway-test.js: Tests for core App methods and configuration. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var assert = require('assert'), + events = require('eventemitter2'), + vows = require('vows'), + broadway = require('../../lib/broadway'); + +vows.describe('broadway').addBatch({ + "The broadway module": { + "should have the appropriate properties and methods defined": function () { + assert.isFunction(broadway.App); + assert.isObject(broadway.common); + assert.isObject(broadway.features); + assert.isObject(broadway.plugins); + assert.isObject(broadway.plugins.log); + assert.isObject(broadway.plugins.config); + assert.isObject(broadway.plugins.exceptions); + } + } +}).export(module); \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/d/d/t b/node_modules/broadway/test/fixtures/.gitkeep similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/d/d/t rename to node_modules/broadway/test/fixtures/.gitkeep diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/d/t b/node_modules/broadway/test/fixtures/empty-app/.gitkeep similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/d/t rename to node_modules/broadway/test/fixtures/empty-app/.gitkeep diff --git a/node_modules/broadway/test/fixtures/sample-app.json b/node_modules/broadway/test/fixtures/sample-app.json new file mode 100644 index 0000000..24545f9 --- /dev/null +++ b/node_modules/broadway/test/fixtures/sample-app.json @@ -0,0 +1,8 @@ +{ + "directories": { + "app": "#ROOT/app", + "config": "#ROOT/config", + "lib": "#ROOT/lib", + "test": "#ROOT/test" + } +} \ No newline at end of file diff --git a/node_modules/broadway/test/fixtures/sample-app/app/index.js b/node_modules/broadway/test/fixtures/sample-app/app/index.js new file mode 100644 index 0000000..7daf464 --- /dev/null +++ b/node_modules/broadway/test/fixtures/sample-app/app/index.js @@ -0,0 +1,2 @@ + +var broadway = require("../../../") \ No newline at end of file diff --git a/node_modules/broadway/test/fixtures/sample-app/config/topics.json b/node_modules/broadway/test/fixtures/sample-app/config/topics.json new file mode 100644 index 0000000..9a6f6fb --- /dev/null +++ b/node_modules/broadway/test/fixtures/sample-app/config/topics.json @@ -0,0 +1,5 @@ +{ + "topics": [ + + ] +} \ No newline at end of file diff --git a/node_modules/broadway/test/helpers/assert.js b/node_modules/broadway/test/helpers/assert.js new file mode 100644 index 0000000..23c3184 --- /dev/null +++ b/node_modules/broadway/test/helpers/assert.js @@ -0,0 +1,107 @@ +/* + * assert.js: Assertion helpers for broadway tests + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var assert = module.exports = require('assert'), + fs = require('fs'), + path = require('path'), + nconf = require('nconf'), + vows = require('vows'); + +// +// ### Assertion helpers for working with `broadway.App` objects. +// +assert.app = {}; + +// +// ### Assertion helpers for working with `broadway.plugins`. +// +assert.plugins = {}; + +// +// ### Assert that an application has various plugins. +// +assert.plugins.has = { + config: function (app, config) { + assert.instanceOf(app.config, nconf.Provider); + if (config) { + // + // TODO: Assert that all configuration has been loaded + // + } + }, + exceptions: function (app) { + + }, + directories: function (app) { + if (app.options['directories']) { + Object.keys(app.options['directories']).forEach(function (key) { + assert.isTrue((fs.existsSync || path.existsSync)(app.options['directories'][key])); + }); + } + }, + log: function (app) { + assert.isObject(app.log); + + // + // TODO: Assert winston.extend methods + // + } +}; + +// +// ### Assert that an application doesn't have various plugins +// +assert.plugins.notHas = { + config: function (app) { + assert.isTrue(!app.config); + }, + exceptions: function (app) { + + }, + directories: function (app) { + assert.isTrue(!app.config.get('directories')) + }, + log: function (app) { + assert.isTrue(!app.log); + // + // TODO: Assert winston.extend methods + // + } +}; + +assert.log = {}; + +assert.log.levelMsgMeta = function (err, level, msg, meta) { + assert.equal(level, this.event[1]); + assert.equal(msg, this.event[2]); + assert.equal(meta, this.event[3]); +}; + +assert.log.msgMeta = function (err, level, msg, meta) { + assert.equal(level, this.event[0].split('::')[1] || 'info'); + assert.equal(msg, this.event[1]); + assert.equal(meta, this.event[2]); +}; + +assert.log.levelMeta = function (err, level, msg, meta) { + assert.equal(level, this.event[1]); + assert.equal(msg, this.event[0]); + assert.deepEqual(meta, this.event[2]); +}; + +assert.log.levelMsg = function (err, level, msg, meta) { + assert.equal(level, this.event[1]); + assert.equal(msg, this.event[2]); +}; + +assert.log.metaOnly = function (err, level, msg, meta, event) { + assert.equal(level, 'info'); + assert.equal(msg, this.event[0]); + assert.equal(meta, this.event[1]); + assert.equal(event, this.event[0]); +}; diff --git a/node_modules/broadway/test/helpers/helpers.js b/node_modules/broadway/test/helpers/helpers.js new file mode 100644 index 0000000..9dbdea4 --- /dev/null +++ b/node_modules/broadway/test/helpers/helpers.js @@ -0,0 +1,24 @@ +/* + * helpers.js: Test helpers for using broadway. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var events = require('eventemitter2'), + broadway = require('../../lib/broadway'); + +var helpers = exports; + +helpers.findApp = function () { + return Array.prototype.slice.call(arguments).filter(function (arg) { + return arg instanceof events.EventEmitter2; + })[0]; +}; + +helpers.mockApp = function () { + var mock = new events.EventEmitter2({ delimiter: '::', wildcard: true }); + mock.options = {}; + return mock; +}; \ No newline at end of file diff --git a/node_modules/broadway/test/helpers/macros.js b/node_modules/broadway/test/helpers/macros.js new file mode 100644 index 0000000..8e5e855 --- /dev/null +++ b/node_modules/broadway/test/helpers/macros.js @@ -0,0 +1,74 @@ +/* + * macros.js: Test macros for using broadway and vows + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var events = require('eventemitter2'), + assert = require('./assert'), + helpers = require('./helpers'), + broadway = require('../../lib/broadway'); + +var macros = exports; + +macros.shouldExtend = function (app, plugin, vows) { + if (arguments.length === 1) { + plugin = app; + app = vows = null; + } + else if (arguments.length === 2) { + app = helpers.mockApp(); + vows = plugin; + plugin = app; + } + + var context = { + topic: function () { + app = app || helpers.mockApp(); + broadway.plugins[plugin].attach.call(app, app.options[plugin] || {}); + + if (broadway.plugins[plugin].init) { + return broadway.plugins[plugin].init.call(app, this.callback.bind(this, null, app)); + } + + this.callback(null, app); + }, + "should add the appropriate properties and methods": function (_, app) { + assert.plugins.has[plugin](app); + } + } + + return extendContext(context, vows); +}; + +macros.shouldLogEvent = function (app, event, vow) { + return { + topic: function () { + app = app || helpers.findApp.apply(null, arguments); + var logger = app.log.get('default'); + + this.event = event; + app.once('broadway::logged', this.callback.bind(this, null)); + app.emit.apply(app, event); + }, + "should log the appropriate info": vow + }; +}; + +function extendContext (context, vows) { + if (vows) { + if (vows.topic) { + console.log('Cannot include topic at top-level of nested vows:'); + console.dir(vows, 'vows'); + process.exit(1); + } + + Object.keys(vows).forEach(function (key) { + context[key] = vows[key]; + }); + } + + return context; +} \ No newline at end of file diff --git a/node_modules/broadway/test/plugins/config-test.js b/node_modules/broadway/test/plugins/config-test.js new file mode 100644 index 0000000..81307ea --- /dev/null +++ b/node_modules/broadway/test/plugins/config-test.js @@ -0,0 +1,19 @@ +/* + * config-test.js: Tests for the broadway config plugin + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var vows = require('vows'), + events = require('eventemitter2'), + assert = require('../helpers/assert'), + macros = require('../helpers/macros'), + broadway = require('../../lib/broadway'); + +vows.describe('broadway/plugins/config').addBatch({ + "Using the config plugin": { + "extending an application": macros.shouldExtend('config') + } +}).export(module); \ No newline at end of file diff --git a/node_modules/broadway/test/plugins/directories-test.js b/node_modules/broadway/test/plugins/directories-test.js new file mode 100644 index 0000000..72833f4 --- /dev/null +++ b/node_modules/broadway/test/plugins/directories-test.js @@ -0,0 +1,28 @@ +/* + * directories-test.js: Tests for working with directories in broadway. + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var assert = require('assert'), + fs = require('fs'), + path = require('path'), + vows = require('vows'), + broadway = require('../../lib/broadway'), + macros = require('../helpers/macros'); + +var fixturesDir = path.join(__dirname, '..', 'fixtures'), + emptyAppDir = path.join(fixturesDir, 'empty-app'), + emptyAppFile = path.join(fixturesDir, 'sample-app.json'), + appConfig = JSON.parse(fs.readFileSync(emptyAppFile, 'utf8'));; + +vows.describe('broadway/plugins/directories').addBatch({ + "Using the config plugin": { + "extending an application": macros.shouldExtend(new broadway.App({ + root: emptyAppDir, + directories: appConfig.directories + }), 'directories', {}) + } +}).export(module); \ No newline at end of file diff --git a/node_modules/broadway/test/plugins/log-test.js b/node_modules/broadway/test/plugins/log-test.js new file mode 100644 index 0000000..7e2ac3e --- /dev/null +++ b/node_modules/broadway/test/plugins/log-test.js @@ -0,0 +1,69 @@ +/* + * log-test.js: Tests for the broadway logger plugin + * + * (C) 2011, Nodejitsu Inc. + * MIT LICENSE + * + */ + +var vows = require('vows'), + events = require('eventemitter2'), + assert = require('../helpers/assert'), + helpers = require('../helpers/helpers'), + macros = require('../helpers/macros'), + broadway = require('../../lib/broadway'); + +var app = helpers.mockApp(); +app.options = { + log: { + logAll: true, + namespaces: { + 'apps': 'foo' + } + } +}; + +vows.describe('broadway/plugins/log').addBatch({ + "Using the log plugin": { + "to extend an application": macros.shouldExtend(app, 'log', { + "when the application emits log::# events": macros.shouldLogEvent(app, [ + 'log::warn', + 'some warn message', + { foo: 'bar' } + ], assert.log.msgMeta) + }), + "when the application emits log::#::# events": macros.shouldLogEvent(app, [ + 'log::warn::some-category', + 'some warn message', + { foo: 'bar' } + ], assert.log.msgMeta), + "when the application emits log events with": { + "message and meta": macros.shouldLogEvent(app, [ + 'log', + 'some info message', + { foo: 'bar' }, + ], assert.log.msgMeta), + "level and message": macros.shouldLogEvent(app, [ + 'log', + 'silly', + 'some silly message', + ], assert.log.levelMsg), + "level and meta": macros.shouldLogEvent(app, [ + 'log', + 'info', + { foo: 'bar' }, + ], assert.log.levelMeta) + }, + "when the application emits namespaced events with": { + "level and meta": macros.shouldLogEvent(app, [ + 'apps::start', + 'info', + { foo: 'bar' }, + ], assert.log.levelMeta), + "meta only": macros.shouldLogEvent(app, [ + 'apps::start', + { foo: 'bar' }, + ], assert.log.metaOnly) + } + } +}).export(module); \ No newline at end of file diff --git a/node_modules/chokidar/CHANGELOG.md b/node_modules/chokidar/CHANGELOG.md new file mode 100644 index 0000000..d7b0344 --- /dev/null +++ b/node_modules/chokidar/CHANGELOG.md @@ -0,0 +1,240 @@ +# Chokidar 1.4.2 (Dec 30, 2015) +* Now correctly emitting `stats` with `awaitWriteFinish` option. + +# Chokidar 1.4.1 (Dec 9, 2015) +* The watcher could now be correctly subclassed with ES6 class syntax. + +# Chokidar 1.4.0 (3 December 2015) +* Add `.getWatched()` method, exposing all file system entries being watched +* Apply `awaitWriteFinish` methodology to `change` events (in addition to `add`) +* Fix handling of symlinks within glob paths (#293) +* Fix `addDir` and `unlinkDir` events under globs (#337, #401) +* Fix issues with `.unwatch()` (#374, #403) + +# Chokidar 1.3.0 (18 November 2015) +* Improve `awaitWriteFinish` option behavior +* Fix some `cwd` option behavior on Windows +* `awaitWriteFinish` and `cwd` are now compatible +* Fix some race conditions. +* #379: Recreating deleted directory doesn't trigger event +* When adding a previously-deleted file, emit 'add', not 'change' + +# Chokidar 1.2.0 (1 October 2015) +* Allow nested arrays of paths to be provided to `.watch()` and `.add()` +* Add `awaitWriteFinish` option + +# Chokidar 1.1.0 (23 September 2015) +* Dependency updates including fsevents@1.0.0, improving installation + +# Chokidar 1.0.6 (18 September 2015) +* Fix issue with `.unwatch()` method and relative paths + +# Chokidar 1.0.5 (20 July 2015) +* Fix regression with regexes/fns using in `ignored` + +# Chokidar 1.0.4 (15 July 2015) +* Fix bug with `ignored` files/globs while `cwd` option is set + +# Chokidar 1.0.3 (4 June 2015) +* Fix race issue with `alwaysStat` option and removed files + +# Chokidar 1.0.2 (30 May 2015) +* Fix bug with absolute paths and ENAMETOOLONG error + +# Chokidar 1.0.1 (8 April 2015) +* Fix bug with `.close()` method in `fs.watch` mode with `persistent: false` option + +# Chokidar 1.0.0 (7 April 2015) +* Glob support! Use globs in `watch`, `add`, and `unwatch` methods +* Comprehensive symlink support +* New `unwatch` method to turn off watching of previously watched paths +* More flexible `ignored` option allowing regex, function, glob, or array courtesy of [anymatch](https://github.com/es128/anymatch) +* New `cwd` option to set base dir from which relative paths are derived +* New `depth` option for limiting recursion +* New `alwaysStat` option to ensure [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) gets passed with every add/change event +* New `ready` event emitted when initial fs tree scan is done and watcher is ready for changes +* New `raw` event exposing data and events from the lower-level watch modules +* New `followSymlinks` option to impact whether symlinks' targets or the symlink files themselves are watched +* New `atomic` option for normalizing artifacts from text editors that use atomic write methods +* Ensured watcher's stability with lots of bugfixes. + +# Chokidar 0.12.6 (6 January 2015) +* Fix bug which breaks `persistent: false` mode when change events occur + +# Chokidar 0.12.5 (17 December 2014) +* Fix bug with matching parent path detection for fsevents instance sharing +* Fix bug with ignored watch path in nodefs modes + +# Chokidar 0.12.4 (14 December 2014) +* Fix bug in `fs.watch` mode that caused watcher to leak into `cwd` +* Fix bug preventing ready event when there are symlinks to ignored paths + +# Chokidar 0.12.3 (13 December 2014) +* Fix handling of special files such as named pipes and sockets + +# Chokidar 0.12.2 (12 December 2014) +* Fix recursive symlink handling and some other path resolution problems + +# Chokidar 0.12.1 (10 December 2014) +* Fix a case where file symlinks were not followed properly + +# Chokidar 0.12.0 (8 December 2014) +* Symlink support + * Add `followSymlinks` option, which defaults to `true` +* Change default watch mode on Linux to non-polling `fs.watch` +* Add `atomic` option to normalize events from editors using atomic writes + * Particularly Vim and Sublime +* Add `raw` event which exposes data from the underlying watch method + +# Chokidar 0.11.1 (19 November 2014) +* Fix a bug where an error is thrown when `fs.watch` instantiation fails + +# Chokidar 0.11.0 (16 November 2014) +* Add a `ready` event, which is emitted after initial file scan completes +* Fix issue with options keys passed in defined as `undefined` +* Rename some internal `FSWatcher` properties to indicate they're private + +# Chokidar 0.10.9 (15 November 2014) +* Fix some leftover issues from adding watcher reuse + +# Chokidar 0.10.8 (14 November 2014) +* Remove accidentally committed/published `console.log` statement. +* Sry 'bout that :crying_cat_face: + +# Chokidar 0.10.7 (14 November 2014) +* Apply watcher reuse methodology to `fs.watch` and `fs.watchFile` as well + +# Chokidar 0.10.6 (12 November 2014) +* More efficient creation/reuse of FSEvents instances to avoid system limits +* Reduce simultaneous FSEvents instances allowed in a process +* Handle errors thrown by `fs.watch` upon invocation + +# Chokidar 0.10.5 (6 November 2014) +* Limit number of simultaneous FSEvents instances (fall back to other methods) +* Prevent some cases of EMFILE errors during initialization +* Fix ignored files emitting events in some fsevents-mode circumstances + +# Chokidar 0.10.4 (5 November 2014) +* Bump fsevents dependency to ~0.3.1 + * Should resolve build warnings and `npm rebuild` on non-Macs + +# Chokidar 0.10.3 (28 October 2014) +* Fix removed dir emitting as `unlink` instead of `unlinkDir` +* Fix issues with file changing to dir or vice versa (gh-165) +* Fix handling of `ignored` option in fsevents mode + +# Chokidar 0.10.2 (23 October 2014) +* Improve individual file watching +* Fix fsevents keeping process alive when `persistent: false` + +# Chokidar 0.10.1 (19 October 2014) +* Improve handling of text editor atomic writes + +# Chokidar 0.10.0 (18 October 2014) +* Many stability and consistency improvements +* Resolve many cases of duplicate or wrong events +* Correct for fsevents inconsistencies +* Standardize handling of errors and relative paths +* Fix issues with watching `./` + +# Chokidar 0.9.0 (25 September 2014) +* Updated fsevents to 0.3 +* Update per-system defaults +* Fix issues with closing chokidar instance +* Fix duplicate change events on win32 + +# Chokidar 0.8.2 (26 March 2014) +* Fixed npm issues related to fsevents dep. +* Updated fsevents to 0.2. + +# Chokidar 0.8.1 (16 December 2013) +* Optional deps are now truly optional on windows and + linux. +* Rewritten in JS, again. +* Fixed some FSEvents-related bugs. + +# Chokidar 0.8.0 (29 November 2013) +* Added ultra-fast low-CPU OS X file watching with FSEvents. + It is enabled by default. +* Added `addDir` and `unlinkDir` events. +* Polling is now disabled by default on all platforms. + +# Chokidar 0.7.1 (18 November 2013) +* `Watcher#close` now also removes all event listeners. + +# Chokidar 0.7.0 (22 October 2013) +* When `options.ignored` is two-argument function, it will + also be called after stating the FS, with `stats` argument. +* `unlink` is no longer emitted on directories. + +# Chokidar 0.6.3 (12 August 2013) +* Added `usePolling` option (default: `true`). + When `false`, chokidar will use `fs.watch` as backend. + `fs.watch` is much faster, but not like super reliable. + +# Chokidar 0.6.2 (19 March 2013) +* Fixed watching initially empty directories with `ignoreInitial` option. + +# Chokidar 0.6.1 (19 March 2013) +* Added node.js 0.10 support. + +# Chokidar 0.6.0 (10 March 2013) +* File attributes (stat()) are now passed to `add` and `change` events + as second arguments. +* Changed default polling interval for binary files to 300ms. + +# Chokidar 0.5.3 (13 January 2013) +* Removed emitting of `change` events before `unlink`. + +# Chokidar 0.5.2 (13 January 2013) +* Removed postinstall script to prevent various npm bugs. + +# Chokidar 0.5.1 (6 January 2013) +* When starting to watch non-existing paths, chokidar will no longer throw +ENOENT error. +* Fixed bug with absolute path. + +# Chokidar 0.5.0 (9 December 2012) +* Added a bunch of new options: + * `ignoreInitial` that allows to ignore initial `add` events. + * `ignorePermissionErrors` that allows to ignore ENOENT etc perm errors. + * `interval` and `binaryInterval` that allow to change default + fs polling intervals. + +# Chokidar 0.4.0 (26 July 2012) +* Added `all` event that receives two args (event name and path) that +combines `add`, `change` and `unlink` events. +* Switched to `fs.watchFile` on node.js 0.8 on windows. +* Files are now correctly unwatched after unlink. + +# Chokidar 0.3.0 (24 June 2012) +* `unlink` event are no longer emitted for directories, for consistency +with `add`. + +# Chokidar 0.2.6 (8 June 2012) +* Prevented creating of duplicate 'add' events. + +# Chokidar 0.2.5 (8 June 2012) +* Fixed a bug when new files in new directories hadn't been added. + +# Chokidar 0.2.4 (7 June 2012) +* Fixed a bug when unlinked files emitted events after unlink. + +# Chokidar 0.2.3 (12 May 2012) +* Fixed watching of files on windows. + +# Chokidar 0.2.2 (4 May 2012) +* Fixed watcher signature. + +# Chokidar 0.2.1 (4 May 2012) +* Fixed invalid API bug when using `watch()`. + +# Chokidar 0.2.0 (4 May 2012) +* Rewritten in js. + +# Chokidar 0.1.1 (26 April 2012) +* Changed api to `chokidar.watch()`. +* Fixed compilation on windows. + +# Chokidar 0.1.0 (20 April 2012) +* Initial release. diff --git a/node_modules/chokidar/README.md b/node_modules/chokidar/README.md new file mode 100644 index 0000000..5fd9d6f --- /dev/null +++ b/node_modules/chokidar/README.md @@ -0,0 +1,285 @@ +# Chokidar [![Mac/Linux Build Status](https://img.shields.io/travis/paulmillr/chokidar/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/paulmillr/chokidar) [![Windows Build status](https://img.shields.io/appveyor/ci/es128/chokidar/master.svg?label=Windows)](https://ci.appveyor.com/project/es128/chokidar/branch/master) [![Coverage Status](https://coveralls.io/repos/paulmillr/chokidar/badge.svg)](https://coveralls.io/r/paulmillr/chokidar) [![Join the chat at https://gitter.im/paulmillr/chokidar](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/paulmillr/chokidar?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +> A neat wrapper around node.js fs.watch / fs.watchFile / fsevents. + +[![NPM](https://nodei.co/npm-dl/chokidar.png)](https://nodei.co/npm/chokidar/) +[![NPM](https://nodei.co/npm/chokidar.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/chokidar/) + +#### [See what's new in v1.0](https://github.com/paulmillr/chokidar/blob/master/CHANGELOG.md#chokidar-100-7-april-2015) + +## Why? +Node.js `fs.watch`: + +* Doesn't report filenames on OS X. +* Doesn't report events at all when using editors like Sublime on OS X. +* Often reports events twice. +* Emits most changes as `rename`. +* Has [a lot of other issues](https://github.com/joyent/node/search?q=fs.watch&type=Issues) +* Does not provide an easy way to recursively watch file trees. + +Node.js `fs.watchFile`: + +* Almost as bad at event handling. +* Also does not provide any recursive watching. +* Results in high CPU utilization. + +Chokidar resolves these problems. + +Initially made for [brunch](http://brunch.io) (an ultra-swift web app build tool), it is now used in +[gulp](https://github.com/gulpjs/gulp/), +[karma](http://karma-runner.github.io), +[PM2](https://github.com/Unitech/PM2), +[browserify](http://browserify.org/), +[webpack](http://webpack.github.io/), +[BrowserSync](http://www.browsersync.io/), +[Microsoft's Visual Studio Code](https://github.com/microsoft/vscode), +and [many others](https://www.npmjs.org/browse/depended/chokidar/). +It has proven itself in production environments. + +## How? +Chokidar does still rely on the Node.js core `fs` module, but when using +`fs.watch` and `fs.watchFile` for watching, it normalizes the events it +receives, often checking for truth by getting file stats and/or dir contents. + +On Mac OS X, chokidar by default uses a native extension exposing the Darwin +`FSEvents` API. This provides very efficient recursive watching compared with +implementations like `kqueue` available on most \*nix platforms. Chokidar still +does have to do some work to normalize the events received that way as well. + +On other platforms, the `fs.watch`-based implementation is the default, which +avoids polling and keeps CPU usage down. Be advised that chokidar will initiate +watchers recursively for everything within scope of the paths that have been +specified, so be judicious about not wasting system resources by watching much +more than needed. + +## Getting started +Install with npm: + + npm install chokidar --save + +Then `require` and use it in your code: + +```javascript +var chokidar = require('chokidar'); + +// One-liner for current directory, ignores .dotfiles +chokidar.watch('.', {ignored: /[\/\\]\./}).on('all', (event, path) => { + console.log(event, path); +}); +``` + +```javascript +// Example of a more typical implementation structure: + +// Initialize watcher. +var watcher = chokidar.watch('file, dir, glob, or array', { + ignored: /[\/\\]\./, + persistent: true +}); + +// Something to use when events are received. +var log = console.log.bind(console); +// Add event listeners. +watcher + .on('add', path => log(`File ${path} has been added`)) + .on('change', path => log(`File ${path} has been changed`)) + .on('unlink', path => log(`File ${path} has been removed`)); + +// More possible events. +watcher + .on('addDir', path => log(`Directory ${path} has been added`)) + .on('unlinkDir', path => log(`Directory ${path} has been removed`)) + .on('error', error => log(`Watcher error: ${error}`)) + .on('ready', () => log('Initial scan complete. Ready for changes')) + .on('raw', (event, path, details) => { + log('Raw event info:', event, path, details); + }); + +// 'add', 'addDir' and 'change' events also receive stat() results as second +// argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats +watcher.on('change', (path, stats) => { + if (stats) console.log(`File ${path} changed size to ${stats.size}`); +}); + +// Watch new files. +watcher.add('new-file'); +watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); + +// Get list of actual paths being watched on the filesystem +var watchedPaths = watcher.getWatched(); + +// Un-watch some files. +watcher.unwatch('new-file*'); + +// Stop watching. +watcher.close(); + +// Full list of options. See below for descriptions. (do not use this example) +chokidar.watch('file', { + persistent: true, + + ignored: '*.txt', + ignoreInitial: false, + followSymlinks: true, + cwd: '.', + + usePolling: true, + interval: 100, + binaryInterval: 300, + alwaysStat: false, + depth: 99, + awaitWriteFinish: { + stabilityThreshold: 2000, + pollInterval: 100 + }, + + ignorePermissionErrors: false, + atomic: true +}); + +``` + +## API + +`chokidar.watch(paths, [options])` + +* `paths` (string or array of strings). Paths to files, dirs to be watched +recursively, or glob patterns. +* `options` (object) Options object as defined below: + +#### Persistence + +* `persistent` (default: `true`). Indicates whether the process +should continue to run as long as files are being watched. If set to +`false` when using `fsevents` to watch, no more events will be emitted +after `ready`, even if the process continues to run. + +#### Path filtering + +* `ignored` ([anymatch](https://github.com/es128/anymatch)-compatible definition) +Defines files/paths to be ignored. The whole relative or absolute path is +tested, not just filename. If a function with two arguments is provided, it +gets called twice per path - once with a single argument (the path), second +time with two arguments (the path and the +[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) +object of that path). +* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while +instantiating the watching as chokidar discovers these file paths (before the `ready` event). +* `followSymlinks` (default: `true`). When `false`, only the +symlinks themselves will be watched for changes instead of following +the link references and bubbling events through the link's path. +* `cwd` (no default). The base directory from which watch `paths` are to be +derived. Paths emitted with events will be relative to this. + +#### Performance + +* `usePolling` (default: `false`). +Whether to use fs.watchFile (backed by polling), or fs.watch. If polling +leads to high CPU utilization, consider setting this to `false`. It is +typically necessary to **set this to `true` to successfully watch files over +a network**, and it may be necessary to successfully watch files in other +non-standard situations. Setting to `true` explicitly on OS X overrides the +`useFsEvents` default. +* _Polling-specific settings_ (effective when `usePolling: true`) + * `interval` (default: `100`). Interval of file system polling. + * `binaryInterval` (default: `300`). Interval of file system + polling for binary files. + ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) +* `useFsEvents` (default: `true` on OS X). Whether to use the +`fsevents` watching interface if available. When set to `true` explicitly +and `fsevents` is available this supercedes the `usePolling` setting. When +set to `false` on OS X, `usePolling: true` becomes the default. +* `alwaysStat` (default: `false`). If relying upon the +[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) +object that may get passed with `add`, `addDir`, and `change` events, set +this to `true` to ensure it is provided even in cases where it wasn't +already available from the underlying watch events. +* `depth` (default: `undefined`). If set, limits how many levels of +subdirectories will be traversed. +* `awaitWriteFinish` (default: `false`). +By default, the `add` event will fire when a file first appear on disk, before +the entire file has been written. Furthermore, in some cases some `change` +events will be emitted while the file is being written. In some cases, +especially when watching for large files there will be a need to wait for the +write operation to finish before responding to a file creation or modification. +Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size, +holding its `add` and `change` events until the size does not change for a +configurable amount of time. The appropriate duration setting is heavily +dependent on the OS and hardware. For accurate detection this parameter should +be relatively high, making file watching much less responsive. +Use with caution. + * *`options.awaitWriteFinish` can be set to an object in order to adjust + timing params:* + * `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in + milliseconds for a file size to remain constant before emitting its event. + * `awaitWriteFinish.pollInterval` (default: 100). File size polling interval. + +#### Errors +* `ignorePermissionErrors` (default: `false`). Indicates whether to watch files +that don't have read permissions if possible. If watching fails due to `EPERM` +or `EACCES` with this set to `true`, the errors will be suppressed silently. +* `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`). +Automatically filters out artifacts that occur when using editors that use +"atomic writes" instead of writing directly to the source file. + +### Methods & Events + +`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`: + +* `.add(path / paths)`: Add files, directories, or glob patterns for tracking. +Takes an array of strings or just one string. +* `.on(event, callback)`: Listen for an FS event. +Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`, +`raw`, `error`. +Additionally `all` is available which gets emitted with the underlying event +name and path for every event other than `ready`, `raw`, and `error`. +* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns. +Takes an array of strings or just one string. +* `.close()`: Removes all listeners from watched files. +* `.getWatched()`: Returns an object representing all the paths on the file +system being watched by this `FSWatcher` instance. The object's keys are all the +directories (using absolute paths unless the `cwd` option was used), and the +values are arrays of the names of the items contained in each directory. + +## CLI + +If you need a CLI interface for your file watching, check out +[chokidar-cli](https://github.com/kimmobrunfeldt/chokidar-cli), allowing you to +execute a command on each change, or get a stdio stream of change events. + +## Install Troubleshooting + +* `npm WARN optional dep failed, continuing fsevents@n.n.n` + * This message is normal part of how `npm` handles optional dependencies and is + not indicative of a problem. Even if accompanied by other related error messages, + Chokidar should function properly. + +* `ERR! stack Error: Python executable "python" is v3.4.1, which is not supported by gyp.` + * You should be able to resolve this by installing python 2.7 and running: + `npm config set python python2.7` + +* `gyp ERR! stack Error: not found: make` + * On Mac, install the XCode command-line tools + +## License +The MIT license. + +Copyright (c) 2012 - 2015 Paul Miller [paulmillr.com](http://paulmillr.com) & Elan Shanker + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/chokidar/index.js b/node_modules/chokidar/index.js new file mode 100755 index 0000000..3b94331 --- /dev/null +++ b/node_modules/chokidar/index.js @@ -0,0 +1,686 @@ +'use strict'; +var EventEmitter = require('events').EventEmitter; +var fs = require('fs'); +var sysPath = require('path'); +var asyncEach = require('async-each'); +var anymatch = require('anymatch'); +var globParent = require('glob-parent'); +var isGlob = require('is-glob'); +var isAbsolute = require('path-is-absolute'); +var inherits = require('inherits'); + +var NodeFsHandler = require('./lib/nodefs-handler'); +var FsEventsHandler = require('./lib/fsevents-handler'); + +var arrify = function(value) { + if (value == null) return []; + return Array.isArray(value) ? value : [value]; +}; + +var flatten = function(list, result) { + if (result == null) result = []; + list.forEach(function(item) { + if (Array.isArray(item)) { + flatten(item, result); + } else { + result.push(item); + } + }); + return result; +}; + +// Little isString util for use in Array#every. +var isString = function(thing) { + return typeof thing === 'string'; +}; + +// Public: Main class. +// Watches files & directories for changes. +// +// * _opts - object, chokidar options hash +// +// Emitted events: +// `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` +// +// Examples +// +// var watcher = new FSWatcher() +// .add(directories) +// .on('add', function(path) {console.log('File', path, 'was added');}) +// .on('change', function(path) {console.log('File', path, 'was changed');}) +// .on('unlink', function(path) {console.log('File', path, 'was removed');}) +// .on('all', function(event, path) {console.log(path, ' emitted ', event);}) +// +function FSWatcher(_opts) { + EventEmitter.call(this); + var opts = {}; + // in case _opts that is passed in is a frozen object + if (_opts) for (var opt in _opts) opts[opt] = _opts[opt]; + this._watched = Object.create(null); + this._closers = Object.create(null); + this._ignoredPaths = Object.create(null); + Object.defineProperty(this, '_globIgnored', { + get: function() { return Object.keys(this._ignoredPaths); } + }); + this.closed = false; + this._throttled = Object.create(null); + this._symlinkPaths = Object.create(null); + + function undef(key) { + return opts[key] === undefined; + } + + // Set up default options. + if (undef('persistent')) opts.persistent = true; + if (undef('ignoreInitial')) opts.ignoreInitial = false; + if (undef('ignorePermissionErrors')) opts.ignorePermissionErrors = false; + if (undef('interval')) opts.interval = 100; + if (undef('binaryInterval')) opts.binaryInterval = 300; + this.enableBinaryInterval = opts.binaryInterval !== opts.interval; + + // Enable fsevents on OS X when polling isn't explicitly enabled. + if (undef('useFsEvents')) opts.useFsEvents = !opts.usePolling; + + // If we can't use fsevents, ensure the options reflect it's disabled. + if (!FsEventsHandler.canUse()) opts.useFsEvents = false; + + // Use polling on Mac if not using fsevents. + // Other platforms use non-polling fs.watch. + if (undef('usePolling') && !opts.useFsEvents) { + opts.usePolling = process.platform === 'darwin'; + } + + // Editor atomic write normalization enabled by default with fs.watch + if (undef('atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents; + if (opts.atomic) this._pendingUnlinks = Object.create(null); + + if (undef('followSymlinks')) opts.followSymlinks = true; + + if (undef('awaitWriteFinish')) opts.awaitWriteFinish = false; + if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {}; + var awf = opts.awaitWriteFinish; + if (awf) { + if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000; + if (!awf.pollInterval) awf.pollInterval = 100; + + this._pendingWrites = Object.create(null); + } + if (opts.ignored) opts.ignored = arrify(opts.ignored); + + this._isntIgnored = function(path, stat) { + return !this._isIgnored(path, stat); + }.bind(this); + + var readyCalls = 0; + this._emitReady = function() { + if (++readyCalls >= this._readyCount) { + this._emitReady = Function.prototype; + this._readyEmitted = true; + // use process.nextTick to allow time for listener to be bound + process.nextTick(this.emit.bind(this, 'ready')); + } + }.bind(this); + + this.options = opts; + + // You’re frozen when your heart’s not open. + Object.freeze(opts); +} + +inherits(FSWatcher, EventEmitter); + +// Common helpers +// -------------- + +// Private method: Normalize and emit events +// +// * event - string, type of event +// * path - string, file or directory path +// * val[1..3] - arguments to be passed with event +// +// Returns the error if defined, otherwise the value of the +// FSWatcher instance's `closed` flag +FSWatcher.prototype._emit = function(event, path, val1, val2, val3) { + if (this.options.cwd) path = sysPath.relative(this.options.cwd, path); + var args = [event, path]; + if (val3 !== undefined) args.push(val1, val2, val3); + else if (val2 !== undefined) args.push(val1, val2); + else if (val1 !== undefined) args.push(val1); + + var awf = this.options.awaitWriteFinish; + if (awf && this._pendingWrites[path]) return this; + + if (this.options.atomic) { + if (event === 'unlink') { + this._pendingUnlinks[path] = args; + setTimeout(function() { + Object.keys(this._pendingUnlinks).forEach(function(path) { + this.emit.apply(this, this._pendingUnlinks[path]); + this.emit.apply(this, ['all'].concat(this._pendingUnlinks[path])); + delete this._pendingUnlinks[path]; + }.bind(this)); + }.bind(this), 100); + return this; + } else if (event === 'add' && this._pendingUnlinks[path]) { + event = args[0] = 'change'; + delete this._pendingUnlinks[path]; + } + } + + var emitEvent = function() { + this.emit.apply(this, args); + if (event !== 'error') this.emit.apply(this, ['all'].concat(args)); + }.bind(this); + + if (awf && (event === 'add' || event === 'change') && this._readyEmitted) { + var awfEmit = function(err, stats) { + if (err) { + event = args[0] = 'error'; + args[1] = err; + emitEvent(); + } else if (stats) { + // if stats doesn't exist the file must have been deleted + if (args.length > 2) { + args[2] = stats; + } else { + args.push(stats); + } + emitEvent(); + } + }; + + this._awaitWriteFinish(path, awf.stabilityThreshold, awfEmit); + return this; + } + + if (event === 'change') { + if (!this._throttle('change', path, 50)) return this; + } + + if ( + this.options.alwaysStat && val1 === undefined && + (event === 'add' || event === 'addDir' || event === 'change') + ) { + fs.stat(path, function(error, stats) { + // Suppress event when fs.stat fails, to avoid sending undefined 'stat' + if (error || !stats) return; + + args.push(stats); + emitEvent(); + }); + } else { + emitEvent(); + } + + return this; +}; + +// Private method: Common handler for errors +// +// * error - object, Error instance +// +// Returns the error if defined, otherwise the value of the +// FSWatcher instance's `closed` flag +FSWatcher.prototype._handleError = function(error) { + var code = error && error.code; + var ipe = this.options.ignorePermissionErrors; + if (error && + code !== 'ENOENT' && + code !== 'ENOTDIR' && + (!ipe || (code !== 'EPERM' && code !== 'EACCES')) + ) this.emit('error', error); + return error || this.closed; +}; + +// Private method: Helper utility for throttling +// +// * action - string, type of action being throttled +// * path - string, path being acted upon +// * timeout - int, duration of time to suppress duplicate actions +// +// Returns throttle tracking object or false if action should be suppressed +FSWatcher.prototype._throttle = function(action, path, timeout) { + if (!(action in this._throttled)) { + this._throttled[action] = Object.create(null); + } + var throttled = this._throttled[action]; + if (path in throttled) return false; + function clear() { + delete throttled[path]; + clearTimeout(timeoutObject); + } + var timeoutObject = setTimeout(clear, timeout); + throttled[path] = {timeoutObject: timeoutObject, clear: clear}; + return throttled[path]; +}; + +// Private method: Awaits write operation to finish +// +// * path - string, path being acted upon +// * threshold - int, time in milliseconds a file size must be fixed before +// acknowledgeing write operation is finished +// * awfEmit - function, to be called when ready for event to be emitted +// Polls a newly created file for size variations. When files size does not +// change for 'threshold' milliseconds calls callback. +FSWatcher.prototype._awaitWriteFinish = function(path, threshold, awfEmit) { + var timeoutHandler; + + var fullPath = path; + if (this.options.cwd && !isAbsolute(path)) { + fullPath = sysPath.join(this.options.cwd, path); + } + + var now = new Date(); + + var awaitWriteFinish = (function (prevStat) { + fs.stat(fullPath, function(err, curStat) { + if (err) { + if (err.code !== 'ENOENT') awfEmit(err); + return; + } + + var now = new Date(); + + if (prevStat && curStat.size != prevStat.size) { + this._pendingWrites[path].lastChange = now; + } + + if (now - this._pendingWrites[path].lastChange >= threshold) { + delete this._pendingWrites[path]; + awfEmit(null, curStat); + } else { + timeoutHandler = setTimeout( + awaitWriteFinish.bind(this, curStat), + this.options.awaitWriteFinish.pollInterval + ); + } + }.bind(this)); + }.bind(this)); + + if (!(path in this._pendingWrites)) { + this._pendingWrites[path] = { + lastChange: now, + cancelWait: function() { + delete this._pendingWrites[path]; + clearTimeout(timeoutHandler); + }.bind(this) + }; + timeoutHandler = setTimeout( + awaitWriteFinish.bind(this), + this.options.awaitWriteFinish.pollInterval + ); + } +}; + +// Private method: Determines whether user has asked to ignore this path +// +// * path - string, path to file or directory +// * stats - object, result of fs.stat +// +// Returns boolean +var dotRe = /\..*\.(sw[px])$|\~$|\.subl.*\.tmp/; +FSWatcher.prototype._isIgnored = function(path, stats) { + if (this.options.atomic && dotRe.test(path)) return true; + + if (!this._userIgnored) { + var cwd = this.options.cwd; + var ignored = this.options.ignored; + if (cwd && ignored) { + ignored = ignored.map(function (path) { + if (typeof path !== 'string') return path; + return isAbsolute(path) ? path : sysPath.join(cwd, path); + }); + } + var paths = arrify(ignored) + .filter(function(path) { + return typeof path === 'string' && !isGlob(path); + }).map(function(path) { + return path + '/**'; + }); + this._userIgnored = anymatch( + this._globIgnored.concat(ignored).concat(paths) + ); + } + + return this._userIgnored([path, stats]); +}; + +// Private method: Provides a set of common helpers and properties relating to +// symlink and glob handling +// +// * path - string, file, directory, or glob pattern being watched +// * depth - int, at any depth > 0, this isn't a glob +// +// Returns object containing helpers for this path +var replacerRe = /^\.[\/\\]/; +FSWatcher.prototype._getWatchHelpers = function(path, depth) { + path = path.replace(replacerRe, ''); + var watchPath = depth || !isGlob(path) ? path : globParent(path); + var fullWatchPath = sysPath.resolve(watchPath); + var hasGlob = watchPath !== path; + var globFilter = hasGlob ? anymatch(path) : false; + var follow = this.options.followSymlinks; + var globSymlink = hasGlob && follow ? null : false; + + var checkGlobSymlink = function(entry) { + // only need to resolve once + // first entry should always have entry.parentDir === '' + if (globSymlink == null) { + globSymlink = entry.fullParentDir === fullWatchPath ? false : { + realPath: entry.fullParentDir, + linkPath: fullWatchPath + }; + } + + if (globSymlink) { + return entry.fullPath.replace(globSymlink.realPath, globSymlink.linkPath); + } + + return entry.fullPath; + }; + + var entryPath = function(entry) { + return sysPath.join(watchPath, + sysPath.relative(watchPath, checkGlobSymlink(entry)) + ); + }; + + var filterPath = function(entry) { + var resolvedPath = entryPath(entry); + return (!hasGlob || globFilter(resolvedPath)) && + this._isntIgnored(resolvedPath, entry.stat) && + (this.options.ignorePermissionErrors || + this._hasReadPermissions(entry.stat)); + }.bind(this); + + var getDirParts = function(path) { + if (!hasGlob) return false; + var parts = sysPath.relative(watchPath, path).split(/[\/\\]/); + return parts; + }; + + var dirParts = getDirParts(path); + if (dirParts && dirParts.length > 1) dirParts.pop(); + var unmatchedGlob; + + var filterDir = function(entry) { + if (hasGlob) { + var entryParts = getDirParts(checkGlobSymlink(entry)); + var globstar = false; + unmatchedGlob = !dirParts.every(function(part, i) { + if (part === '**') globstar = true; + return globstar || !entryParts[i] || anymatch(part, entryParts[i]); + }); + } + return !unmatchedGlob && this._isntIgnored(entryPath(entry), entry.stat); + }.bind(this); + + return { + followSymlinks: follow, + statMethod: follow ? 'stat' : 'lstat', + path: path, + watchPath: watchPath, + entryPath: entryPath, + hasGlob: hasGlob, + globFilter: globFilter, + filterPath: filterPath, + filterDir: filterDir + }; +}; + +// Directory helpers +// ----------------- + +// Private method: Provides directory tracking objects +// +// * directory - string, path of the directory +// +// Returns the directory's tracking object +FSWatcher.prototype._getWatchedDir = function(directory) { + var dir = sysPath.resolve(directory); + var watcherRemove = this._remove.bind(this); + if (!(dir in this._watched)) this._watched[dir] = { + _items: Object.create(null), + add: function(item) { + if (item !== '.') this._items[item] = true; + }, + remove: function(item) { + delete this._items[item]; + if (!this.children().length) { + fs.readdir(dir, function(err) { + if (err) watcherRemove(sysPath.dirname(dir), sysPath.basename(dir)); + }); + } + }, + has: function(item) {return item in this._items;}, + children: function() {return Object.keys(this._items);} + }; + return this._watched[dir]; +}; + +// File helpers +// ------------ + +// Private method: Check for read permissions +// Based on this answer on SO: http://stackoverflow.com/a/11781404/1358405 +// +// * stats - object, result of fs.stat +// +// Returns boolean +FSWatcher.prototype._hasReadPermissions = function(stats) { + return Boolean(4 & parseInt(((stats && stats.mode) & 0x1ff).toString(8)[0], 10)); +}; + +// Private method: Handles emitting unlink events for +// files and directories, and via recursion, for +// files and directories within directories that are unlinked +// +// * directory - string, directory within which the following item is located +// * item - string, base path of item/directory +// +// Returns nothing +FSWatcher.prototype._remove = function(directory, item) { + // if what is being deleted is a directory, get that directory's paths + // for recursive deleting and cleaning of watched object + // if it is not a directory, nestedDirectoryChildren will be empty array + var path = sysPath.join(directory, item); + var fullPath = sysPath.resolve(path); + var isDirectory = this._watched[path] || this._watched[fullPath]; + + // prevent duplicate handling in case of arriving here nearly simultaneously + // via multiple paths (such as _handleFile and _handleDir) + if (!this._throttle('remove', path, 100)) return; + + // if the only watched file is removed, watch for its return + var watchedDirs = Object.keys(this._watched); + if (!isDirectory && !this.options.useFsEvents && watchedDirs.length === 1) { + this.add(directory, item, true); + } + + // This will create a new entry in the watched object in either case + // so we got to do the directory check beforehand + var nestedDirectoryChildren = this._getWatchedDir(path).children(); + + // Recursively remove children directories / files. + nestedDirectoryChildren.forEach(function(nestedItem) { + this._remove(path, nestedItem); + }, this); + + // Check if item was on the watched list and remove it + var parent = this._getWatchedDir(directory); + var wasTracked = parent.has(item); + parent.remove(item); + + // If we wait for this file to be fully written, cancel the wait. + if (this.options.awaitWriteFinish && this._pendingWrites[path]) { + this._pendingWrites[path].cancelWait(); + return; + } + + // The Entry will either be a directory that just got removed + // or a bogus entry to a file, in either case we have to remove it + delete this._watched[path]; + delete this._watched[fullPath]; + var eventName = isDirectory ? 'unlinkDir' : 'unlink'; + if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); + + // Avoid conflicts if we later create another file with the same name + if (!this.options.useFsEvents) { + this._closePath(path); + } +}; + +FSWatcher.prototype._closePath = function(path) { + if (!this._closers[path]) return; + this._closers[path](); + delete this._closers[path]; + this._getWatchedDir(sysPath.dirname(path)).remove(sysPath.basename(path)); +} + +// Public method: Adds paths to be watched on an existing FSWatcher instance + +// * paths - string or array of strings, file/directory paths and/or globs +// * _origAdd - private boolean, for handling non-existent paths to be watched +// * _internal - private boolean, indicates a non-user add + +// Returns an instance of FSWatcher for chaining. +FSWatcher.prototype.add = function(paths, _origAdd, _internal) { + var cwd = this.options.cwd; + this.closed = false; + paths = flatten(arrify(paths)); + + if (!paths.every(isString)) { + throw new TypeError('Non-string provided as watch path: ' + paths); + } + + if (cwd) paths = paths.map(function(path) { + if (isAbsolute(path)) { + return path; + } else if (path[0] === '!') { + return '!' + sysPath.join(cwd, path.substring(1)); + } else { + return sysPath.join(cwd, path); + } + }); + + // set aside negated glob strings + paths = paths.filter(function(path) { + if (path[0] === '!') { + this._ignoredPaths[path.substring(1)] = true; + } else { + // if a path is being added that was previously ignored, stop ignoring it + delete this._ignoredPaths[path]; + delete this._ignoredPaths[path + '/**']; + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = null; + + return true; + } + }, this); + + if (this.options.useFsEvents && FsEventsHandler.canUse()) { + if (!this._readyCount) this._readyCount = paths.length; + if (this.options.persistent) this._readyCount *= 2; + paths.forEach(this._addToFsEvents, this); + } else { + if (!this._readyCount) this._readyCount = 0; + this._readyCount += paths.length; + asyncEach(paths, function(path, next) { + this._addToNodeFs(path, !_internal, 0, 0, _origAdd, function(err, res) { + if (res) this._emitReady(); + next(err, res); + }.bind(this)); + }.bind(this), function(error, results) { + results.forEach(function(item) { + if (!item) return; + this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item)); + }, this); + }.bind(this)); + } + + return this; +}; + +// Public method: Close watchers or start ignoring events from specified paths. + +// * paths - string or array of strings, file/directory paths and/or globs + +// Returns instance of FSWatcher for chaining. +FSWatcher.prototype.unwatch = function(paths) { + if (this.closed) return this; + paths = flatten(arrify(paths)); + + paths.forEach(function(path) { + // convert to absolute path unless relative path already matches + if (!isAbsolute(path) && !this._closers[path]) { + if (this.options.cwd) path = sysPath.join(this.options.cwd, path); + path = sysPath.resolve(path); + } + + this._closePath(path); + + this._ignoredPaths[path] = true; + if (path in this._watched) { + this._ignoredPaths[path + '/**'] = true; + } + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = null; + }, this); + + return this; +}; + +// Public method: Close watchers and remove all listeners from watched paths. + +// Returns instance of FSWatcher for chaining. +FSWatcher.prototype.close = function() { + if (this.closed) return this; + + this.closed = true; + Object.keys(this._closers).forEach(function(watchPath) { + this._closers[watchPath](); + delete this._closers[watchPath]; + }, this); + this._watched = Object.create(null); + + this.removeAllListeners(); + return this; +}; + +// Public method: Expose list of watched paths + +// Returns object w/ dir paths as keys and arrays of contained paths as values. +FSWatcher.prototype.getWatched = function() { + var watchList = {}; + Object.keys(this._watched).forEach(function(dir) { + var key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; + watchList[key || '.'] = Object.keys(this._watched[dir]._items).sort(); + }.bind(this)); + return watchList; +}; + +// Attach watch handler prototype methods +function importHandler(handler) { + Object.keys(handler.prototype).forEach(function(method) { + FSWatcher.prototype[method] = handler.prototype[method]; + }); +} +importHandler(NodeFsHandler); +if (FsEventsHandler.canUse()) importHandler(FsEventsHandler); + +// Export FSWatcher class +exports.FSWatcher = FSWatcher; + +// Public function: Instantiates watcher with paths to be tracked. + +// * paths - string or array of strings, file/directory paths and/or globs +// * options - object, chokidar options + +// Returns an instance of FSWatcher for chaining. +exports.watch = function(paths, options) { + return new FSWatcher(options).add(paths); +}; diff --git a/node_modules/chokidar/lib/fsevents-handler.js b/node_modules/chokidar/lib/fsevents-handler.js new file mode 100644 index 0000000..9429753 --- /dev/null +++ b/node_modules/chokidar/lib/fsevents-handler.js @@ -0,0 +1,361 @@ +'use strict'; + +var fs = require('fs'); +var sysPath = require('path'); +var readdirp = require('readdirp'); +var fsevents; +try { fsevents = require('fsevents'); } catch (error) {} + +// fsevents instance helper functions + +// object to hold per-process fsevents instances +// (may be shared across chokidar FSWatcher instances) +var FSEventsWatchers = Object.create(null); + +// Private function: Instantiates the fsevents interface + +// * path - string, path to be watched +// * callback - function, called when fsevents is bound and ready + +// Returns new fsevents instance +function createFSEventsInstance(path, callback) { + return (new fsevents(path)).on('fsevent', callback).start(); +} + +// Private function: Instantiates the fsevents interface or binds listeners +// to an existing one covering the same file tree + +// * path - string, path to be watched +// * realPath - string, real path (in case of symlinks) +// * listener - function, called when fsevents emits events +// * rawEmitter - function, passes data to listeners of the 'raw' event + +// Returns close function +function setFSEventsListener(path, realPath, listener, rawEmitter) { + var watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path; + var watchContainer; + + var resolvedPath = sysPath.resolve(path); + var hasSymlink = resolvedPath !== realPath; + function filteredListener(fullPath, flags, info) { + if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath); + if ( + fullPath === resolvedPath || + !fullPath.indexOf(resolvedPath + sysPath.sep) + ) listener(fullPath, flags, info); + } + + // check if there is already a watcher on a parent path + // modifies `watchPath` to the parent path when it finds a match + function watchedParent() { + return Object.keys(FSEventsWatchers).some(function(watchedPath) { + // condition is met when indexOf returns 0 + if (!realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep)) { + watchPath = watchedPath; + return true; + } + }); + } + + if (watchPath in FSEventsWatchers || watchedParent()) { + watchContainer = FSEventsWatchers[watchPath]; + watchContainer.listeners.push(filteredListener); + } else { + watchContainer = FSEventsWatchers[watchPath] = { + listeners: [filteredListener], + rawEmitters: [rawEmitter], + watcher: createFSEventsInstance(watchPath, function(fullPath, flags) { + var info = fsevents.getInfo(fullPath, flags); + watchContainer.listeners.forEach(function(listener) { + listener(fullPath, flags, info); + }); + watchContainer.rawEmitters.forEach(function(emitter) { + emitter(info.event, fullPath, info); + }); + }) + }; + } + var listenerIndex = watchContainer.listeners.length - 1; + + // removes this instance's listeners and closes the underlying fsevents + // instance if there are no more listeners left + return function close() { + delete watchContainer.listeners[listenerIndex]; + delete watchContainer.rawEmitters[listenerIndex]; + if (!Object.keys(watchContainer.listeners).length) { + watchContainer.watcher.stop(); + delete FSEventsWatchers[watchPath]; + } + }; +} + +// returns boolean indicating whether fsevents can be used +function canUse() { + return fsevents && Object.keys(FSEventsWatchers).length < 128; +} + +// determines subdirectory traversal levels from root to path +function depth(path, root) { + var i = 0; + while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++; + return i; +} + +// fake constructor for attaching fsevents-specific prototype methods that +// will be copied to FSWatcher's prototype +function FsEventsHandler() {} + +// Private method: Handle symlinks encountered during directory scan + +// * wathPath - string, file/dir path to be watched with fsevents +// * realPath - string, real path (in case of symlinks) +// * transform - function, path transformer +// * globFilter - function, path filter in case a glob pattern was provided + +// Returns close function for the watcher instance +FsEventsHandler.prototype._watchWithFsEvents = +function(watchPath, realPath, transform, globFilter) { + if (this._isIgnored(watchPath)) return; + var watchCallback = function(fullPath, flags, info) { + if ( + this.options.depth !== undefined && + depth(fullPath, realPath) > this.options.depth + ) return; + var path = transform(sysPath.join( + watchPath, sysPath.relative(watchPath, fullPath) + )); + if (globFilter && !globFilter(path)) return; + // ensure directories are tracked + var parent = sysPath.dirname(path); + var item = sysPath.basename(path); + var watchedDir = this._getWatchedDir( + info.type === 'directory' ? path : parent + ); + var checkIgnored = function(stats) { + if (this._isIgnored(path, stats)) { + this._ignoredPaths[path] = true; + if (stats && stats.isDirectory()) { + this._ignoredPaths[path + '/**/*'] = true; + } + return true; + } else { + delete this._ignoredPaths[path]; + delete this._ignoredPaths[path + '/**/*']; + } + }.bind(this); + + var handleEvent = function(event) { + if (checkIgnored()) return; + + if (event === 'unlink') { + // suppress unlink events on never before seen files + if (info.type === 'directory' || watchedDir.has(item)) { + this._remove(parent, item); + } + } else { + if (event === 'add') { + // track new directories + if (info.type === 'directory') this._getWatchedDir(path); + + if (info.type === 'symlink' && this.options.followSymlinks) { + // push symlinks back to the top of the stack to get handled + var curDepth = this.options.depth === undefined ? + undefined : depth(fullPath, realPath) + 1; + return this._addToFsEvents(path, false, true, curDepth); + } else { + // track new paths + // (other than symlinks being followed, which will be tracked soon) + this._getWatchedDir(parent).add(item); + } + } + var eventName = info.type === 'directory' ? event + 'Dir' : event; + this._emit(eventName, path); + } + }.bind(this); + + function addOrChange() { + handleEvent(watchedDir.has(item) ? 'change' : 'add'); + } + function checkFd() { + fs.open(path, 'r', function(error, fd) { + if (fd) fs.close(fd); + error && error.code !== 'EACCES' ? + handleEvent('unlink') : addOrChange(); + }); + } + // correct for wrong events emitted + var wrongEventFlags = [ + 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912 + ]; + if (wrongEventFlags.indexOf(flags) !== -1 || info.event === 'unknown') { + if (typeof this.options.ignored === 'function') { + fs.stat(path, function(error, stats) { + if (checkIgnored(stats)) return; + stats ? addOrChange() : handleEvent('unlink'); + }); + } else { + checkFd(); + } + } else { + switch (info.event) { + case 'created': + case 'modified': + return addOrChange(); + case 'deleted': + case 'moved': + return checkFd(); + } + } + }.bind(this); + + var closer = setFSEventsListener( + watchPath, + realPath, + watchCallback, + this.emit.bind(this, 'raw') + ); + + this._emitReady(); + return closer; +}; + +// Private method: Handle symlinks encountered during directory scan + +// * linkPath - string, path to symlink +// * fullPath - string, absolute path to the symlink +// * transform - function, pre-existing path transformer +// * curDepth - int, level of subdirectories traversed to where symlink is + +// Returns nothing +FsEventsHandler.prototype._fsEventsSymlink = +function(linkPath, fullPath, transform, curDepth) { + // don't follow the same symlink more than once + if (this._symlinkPaths[fullPath]) return; + else this._symlinkPaths[fullPath] = true; + + this._readyCount++; + + fs.realpath(linkPath, function(error, linkTarget) { + if (this._handleError(error) || this._isIgnored(linkTarget)) { + return this._emitReady(); + } + + this._readyCount++; + + // add the linkTarget for watching with a wrapper for transform + // that causes emitted paths to incorporate the link's path + this._addToFsEvents(linkTarget || linkPath, function(path) { + var dotSlash = '.' + sysPath.sep; + var aliasedPath = linkPath; + if (linkTarget && linkTarget !== dotSlash) { + aliasedPath = path.replace(linkTarget, linkPath); + } else if (path !== dotSlash) { + aliasedPath = sysPath.join(linkPath, path); + } + return transform(aliasedPath); + }, false, curDepth); + }.bind(this)); +}; + +// Private method: Handle added path with fsevents + +// * path - string, file/directory path or glob pattern +// * transform - function, converts working path to what the user expects +// * forceAdd - boolean, ensure add is emitted +// * priorDepth - int, level of subdirectories already traversed + +// Returns nothing +FsEventsHandler.prototype._addToFsEvents = +function(path, transform, forceAdd, priorDepth) { + + // applies transform if provided, otherwise returns same value + var processPath = typeof transform === 'function' ? + transform : function(val) { return val; }; + + var emitAdd = function(newPath, stats) { + var pp = processPath(newPath); + var isDir = stats.isDirectory(); + var dirObj = this._getWatchedDir(sysPath.dirname(pp)); + var base = sysPath.basename(pp); + + // ensure empty dirs get tracked + if (isDir) this._getWatchedDir(pp); + + if (dirObj.has(base)) return; + dirObj.add(base); + + if (!this.options.ignoreInitial || forceAdd === true) { + this._emit(isDir ? 'addDir' : 'add', pp, stats); + } + }.bind(this); + + var wh = this._getWatchHelpers(path); + + // evaluate what is at the path we're being asked to watch + fs[wh.statMethod](wh.watchPath, function(error, stats) { + if (this._handleError(error) || this._isIgnored(wh.watchPath, stats)) { + this._emitReady(); + return this._emitReady(); + } + + if (stats.isDirectory()) { + // emit addDir unless this is a glob parent + if (!wh.globFilter) emitAdd(processPath(path), stats); + + // don't recurse further if it would exceed depth setting + if (priorDepth && priorDepth > this.options.depth) return; + + // scan the contents of the dir + readdirp({ + root: wh.watchPath, + entryType: 'all', + fileFilter: wh.filterPath, + directoryFilter: wh.filterDir, + lstat: true, + depth: this.options.depth - (priorDepth || 0) + }).on('data', function(entry) { + // need to check filterPath on dirs b/c filterDir is less restrictive + if (entry.stat.isDirectory() && !wh.filterPath(entry)) return; + + var joinedPath = sysPath.join(wh.watchPath, entry.path); + var fullPath = entry.fullPath; + + if (wh.followSymlinks && entry.stat.isSymbolicLink()) { + // preserve the current depth here since it can't be derived from + // real paths past the symlink + var curDepth = this.options.depth === undefined ? + undefined : depth(joinedPath, sysPath.resolve(wh.watchPath)) + 1; + + this._fsEventsSymlink(joinedPath, fullPath, processPath, curDepth); + } else { + emitAdd(joinedPath, entry.stat); + } + }.bind(this)).on('end', this._emitReady); + } else { + emitAdd(wh.watchPath, stats); + this._emitReady(); + } + }.bind(this)); + + if (this.options.persistent) { + var initWatch = function(error, realPath) { + var closer = this._watchWithFsEvents( + wh.watchPath, + sysPath.resolve(realPath || wh.watchPath), + processPath, + wh.globFilter + ); + if (closer) this._closers[path] = closer; + }.bind(this); + + if (typeof transform === 'function') { + // realpath has already been resolved + initWatch(); + } else { + fs.realpath(wh.watchPath, initWatch); + } + } +}; + +module.exports = FsEventsHandler; +module.exports.canUse = canUse; diff --git a/node_modules/chokidar/lib/nodefs-handler.js b/node_modules/chokidar/lib/nodefs-handler.js new file mode 100644 index 0000000..9d05b6f --- /dev/null +++ b/node_modules/chokidar/lib/nodefs-handler.js @@ -0,0 +1,481 @@ +'use strict'; + +var fs = require('fs'); +var sysPath = require('path'); +var readdirp = require('readdirp'); +var isBinaryPath = require('is-binary-path'); + +// fs.watch helpers + +// object to hold per-process fs.watch instances +// (may be shared across chokidar FSWatcher instances) +var FsWatchInstances = Object.create(null); + +// Private function: Instantiates the fs.watch interface + +// * path - string, path to be watched +// * options - object, options to be passed to fs.watch +// * listener - function, main event handler +// * errHandler - function, handler which emits info about errors +// * emitRaw - function, handler which emits raw event data + +// Returns new fsevents instance +function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { + var handleEvent = function(rawEvent, evPath) { + listener(path); + emitRaw(rawEvent, evPath, {watchedPath: path}); + + // emit based on events occuring for files from a directory's watcher in + // case the file's watcher misses it (and rely on throttling to de-dupe) + if (evPath && path !== evPath) { + fsWatchBroadcast( + sysPath.resolve(path, evPath), 'listeners', sysPath.join(path, evPath) + ); + } + }; + try { + return fs.watch(path, options, handleEvent); + } catch (error) { + errHandler(error); + } +} + +// Private function: Helper for passing fs.watch event data to a +// collection of listeners + +// * fullPath - string, absolute path bound to the fs.watch instance +// * type - string, listener type +// * val[1..3] - arguments to be passed to listeners + +// Returns nothing +function fsWatchBroadcast(fullPath, type, val1, val2, val3) { + if (!FsWatchInstances[fullPath]) return; + FsWatchInstances[fullPath][type].forEach(function(listener) { + listener(val1, val2, val3); + }); +} + +// Private function: Instantiates the fs.watch interface or binds listeners +// to an existing one covering the same file system entry + +// * path - string, path to be watched +// * fullPath - string, absolute path +// * options - object, options to be passed to fs.watch +// * handlers - object, container for event listener functions + +// Returns close function +function setFsWatchListener(path, fullPath, options, handlers) { + var listener = handlers.listener; + var errHandler = handlers.errHandler; + var rawEmitter = handlers.rawEmitter; + var container = FsWatchInstances[fullPath]; + var watcher; + if (!options.persistent) { + watcher = createFsWatchInstance( + path, options, listener, errHandler, rawEmitter + ); + return watcher.close.bind(watcher); + } + if (!container) { + watcher = createFsWatchInstance( + path, + options, + fsWatchBroadcast.bind(null, fullPath, 'listeners'), + errHandler, // no need to use broadcast here + fsWatchBroadcast.bind(null, fullPath, 'rawEmitters') + ); + if (!watcher) return; + var broadcastErr = fsWatchBroadcast.bind(null, fullPath, 'errHandlers'); + watcher.on('error', function(error) { + // Workaround for https://github.com/joyent/node/issues/4337 + if (process.platform === 'win32' && error.code === 'EPERM') { + fs.open(path, 'r', function(err, fd) { + if (fd) fs.close(fd); + if (!err) broadcastErr(error); + }); + } else { + broadcastErr(error); + } + }); + container = FsWatchInstances[fullPath] = { + listeners: [listener], + errHandlers: [errHandler], + rawEmitters: [rawEmitter], + watcher: watcher + }; + } else { + container.listeners.push(listener); + container.errHandlers.push(errHandler); + container.rawEmitters.push(rawEmitter); + } + var listenerIndex = container.listeners.length - 1; + + // removes this instance's listeners and closes the underlying fs.watch + // instance if there are no more listeners left + return function close() { + delete container.listeners[listenerIndex]; + delete container.errHandlers[listenerIndex]; + delete container.rawEmitters[listenerIndex]; + if (!Object.keys(container.listeners).length) { + container.watcher.close(); + delete FsWatchInstances[fullPath]; + } + }; +} + +// fs.watchFile helpers + +// object to hold per-process fs.watchFile instances +// (may be shared across chokidar FSWatcher instances) +var FsWatchFileInstances = Object.create(null); + +// Private function: Instantiates the fs.watchFile interface or binds listeners +// to an existing one covering the same file system entry + +// * path - string, path to be watched +// * fullPath - string, absolute path +// * options - object, options to be passed to fs.watchFile +// * handlers - object, container for event listener functions + +// Returns close function +function setFsWatchFileListener(path, fullPath, options, handlers) { + var listener = handlers.listener; + var rawEmitter = handlers.rawEmitter; + var container = FsWatchFileInstances[fullPath]; + var listeners = []; + var rawEmitters = []; + if ( + container && ( + container.options.persistent < options.persistent || + container.options.interval > options.interval + ) + ) { + // "Upgrade" the watcher to persistence or a quicker interval. + // This creates some unlikely edge case issues if the user mixes + // settings in a very weird way, but solving for those cases + // doesn't seem worthwhile for the added complexity. + listeners = container.listeners; + rawEmitters = container.rawEmitters; + fs.unwatchFile(fullPath); + container = false; + } + if (!container) { + listeners.push(listener); + rawEmitters.push(rawEmitter); + container = FsWatchFileInstances[fullPath] = { + listeners: listeners, + rawEmitters: rawEmitters, + options: options, + watcher: fs.watchFile(fullPath, options, function(curr, prev) { + container.rawEmitters.forEach(function(rawEmitter) { + rawEmitter('change', fullPath, {curr: curr, prev: prev}); + }); + var currmtime = curr.mtime.getTime(); + if (curr.size !== prev.size || currmtime > prev.mtime.getTime() || currmtime === 0) { + container.listeners.forEach(function(listener) { + listener(path, curr); + }); + } + }) + }; + } else { + container.listeners.push(listener); + container.rawEmitters.push(rawEmitter); + } + var listenerIndex = container.listeners.length - 1; + + // removes this instance's listeners and closes the underlying fs.watchFile + // instance if there are no more listeners left + return function close() { + delete container.listeners[listenerIndex]; + delete container.rawEmitters[listenerIndex]; + if (!Object.keys(container.listeners).length) { + fs.unwatchFile(fullPath); + delete FsWatchFileInstances[fullPath]; + } + }; +} + +// fake constructor for attaching nodefs-specific prototype methods that +// will be copied to FSWatcher's prototype +function NodeFsHandler() {} + +// Private method: Watch file for changes with fs.watchFile or fs.watch. + +// * path - string, path to file or directory. +// * listener - function, to be executed on fs change. + +// Returns close function for the watcher instance +NodeFsHandler.prototype._watchWithNodeFs = +function(path, listener) { + var directory = sysPath.dirname(path); + var basename = sysPath.basename(path); + var parent = this._getWatchedDir(directory); + parent.add(basename); + var absolutePath = sysPath.resolve(path); + var options = {persistent: this.options.persistent}; + if (!listener) listener = Function.prototype; // empty function + + var closer; + if (this.options.usePolling) { + options.interval = this.enableBinaryInterval && isBinaryPath(basename) ? + this.options.binaryInterval : this.options.interval; + closer = setFsWatchFileListener(path, absolutePath, options, { + listener: listener, + rawEmitter: this.emit.bind(this, 'raw') + }); + } else { + closer = setFsWatchListener(path, absolutePath, options, { + listener: listener, + errHandler: this._handleError.bind(this), + rawEmitter: this.emit.bind(this, 'raw') + }); + } + return closer; +}; + +// Private method: Watch a file and emit add event if warranted + +// * file - string, the file's path +// * stats - object, result of fs.stat +// * initialAdd - boolean, was the file added at watch instantiation? +// * callback - function, called when done processing as a newly seen file + +// Returns close function for the watcher instance +NodeFsHandler.prototype._handleFile = +function(file, stats, initialAdd, callback) { + var dirname = sysPath.dirname(file); + var basename = sysPath.basename(file); + var parent = this._getWatchedDir(dirname); + + // if the file is already being watched, do nothing + if (parent.has(basename)) return callback(); + + // kick off the watcher + var closer = this._watchWithNodeFs(file, function(path, newStats) { + if (!this._throttle('watch', file, 5)) return; + if (!newStats || newStats && newStats.mtime.getTime() === 0) { + fs.stat(file, function(error, newStats) { + // Fix issues where mtime is null but file is still present + if (error) { + this._remove(dirname, basename); + } else { + this._emit('change', file, newStats); + } + }.bind(this)); + // add is about to be emitted if file not already tracked in parent + } else if (parent.has(basename)) { + this._emit('change', file, newStats); + } + }.bind(this)); + + // emit an add event if we're supposed to + if (!(initialAdd && this.options.ignoreInitial)) { + if (!this._throttle('add', file, 0)) return; + this._emit('add', file, stats); + } + + if (callback) callback(); + return closer; +}; + +// Private method: Handle symlinks encountered while reading a dir + +// * entry - object, entry object returned by readdirp +// * directory - string, path of the directory being read +// * path - string, path of this item +// * item - string, basename of this item + +// Returns true if no more processing is needed for this entry. +NodeFsHandler.prototype._handleSymlink = +function(entry, directory, path, item) { + var full = entry.fullPath; + var dir = this._getWatchedDir(directory); + + if (!this.options.followSymlinks) { + // watch symlink directly (don't follow) and detect changes + this._readyCount++; + fs.realpath(path, function(error, linkPath) { + if (dir.has(item)) { + if (this._symlinkPaths[full] !== linkPath) { + this._symlinkPaths[full] = linkPath; + this._emit('change', path, entry.stat); + } + } else { + dir.add(item); + this._symlinkPaths[full] = linkPath; + this._emit('add', path, entry.stat); + } + this._emitReady(); + }.bind(this)); + return true; + } + + // don't follow the same symlink more than once + if (this._symlinkPaths[full]) return true; + else this._symlinkPaths[full] = true; +}; + +// Private method: Read directory to add / remove files from `@watched` list +// and re-read it on change. + +// * dir - string, fs path. +// * stats - object, result of fs.stat +// * initialAdd - boolean, was the file added at watch instantiation? +// * depth - int, depth relative to user-supplied path +// * target - string, child path actually targeted for watch +// * wh - object, common watch helpers for this path +// * callback - function, called when dir scan is complete + +// Returns close function for the watcher instance +NodeFsHandler.prototype._handleDir = +function(dir, stats, initialAdd, depth, target, wh, callback) { + var parentDir = this._getWatchedDir(sysPath.dirname(dir)); + var tracked = parentDir.has(sysPath.basename(dir)); + if (!(initialAdd && this.options.ignoreInitial) && !target && !tracked) { + if (!wh.hasGlob || wh.globFilter(dir)) this._emit('addDir', dir, stats); + } + + // ensure dir is tracked (harmless if redundant) + parentDir.add(sysPath.basename(dir)); + this._getWatchedDir(dir); + + var read = function(directory, initialAdd, done) { + // Normalize the directory name on Windows + directory = sysPath.join(directory, ''); + + if (!wh.hasGlob) { + var throttler = this._throttle('readdir', directory, 1000); + if (!throttler) return; + } + + var previous = this._getWatchedDir(wh.path); + var current = []; + + readdirp({ + root: directory, + entryType: 'all', + fileFilter: wh.filterPath, + directoryFilter: wh.filterDir, + depth: 0, + lstat: true + }).on('data', function(entry) { + var item = entry.path; + var path = sysPath.join(directory, item); + current.push(item); + + if (entry.stat.isSymbolicLink() && + this._handleSymlink(entry, directory, path, item)) return; + + // Files that present in current directory snapshot + // but absent in previous are added to watch list and + // emit `add` event. + if (item === target || !target && !previous.has(item)) { + this._readyCount++; + + // ensure relativeness of path is preserved in case of watcher reuse + path = sysPath.join(dir, sysPath.relative(dir, path)); + + this._addToNodeFs(path, initialAdd, wh, depth + 1); + } + }.bind(this)).on('end', function() { + if (throttler) throttler.clear(); + if (done) done(); + + // Files that absent in current directory snapshot + // but present in previous emit `remove` event + // and are removed from @watched[directory]. + previous.children().filter(function(item) { + return item !== directory && + current.indexOf(item) === -1 && + // in case of intersecting globs; + // a path may have been filtered out of this readdir, but + // shouldn't be removed because it matches a different glob + (!wh.hasGlob || wh.filterPath({ + fullPath: sysPath.resolve(directory, item) + })); + }).forEach(function(item) { + this._remove(directory, item); + }, this); + }.bind(this)).on('error', this._handleError.bind(this)); + }.bind(this); + + var closer; + + if (this.options.depth == null || depth <= this.options.depth) { + if (!target) read(dir, initialAdd, callback); + closer = this._watchWithNodeFs(dir, function(dirPath, stats) { + // if current directory is removed, do nothing + if (stats && stats.mtime.getTime() === 0) return; + + read(dirPath, false); + }); + } else { + callback(); + } + return closer; +}; + +// Private method: Handle added file, directory, or glob pattern. +// Delegates call to _handleFile / _handleDir after checks. + +// * path - string, path to file or directory. +// * initialAdd - boolean, was the file added at watch instantiation? +// * depth - int, depth relative to user-supplied path +// * target - string, child path actually targeted for watch +// * callback - function, indicates whether the path was found or not + +// Returns nothing +NodeFsHandler.prototype._addToNodeFs = +function(path, initialAdd, priorWh, depth, target, callback) { + if (!callback) callback = Function.prototype; + var ready = this._emitReady; + if (this._isIgnored(path) || this.closed) { + ready(); + return callback(null, false); + } + + var wh = this._getWatchHelpers(path, depth); + if (!wh.hasGlob && priorWh) { + wh.hasGlob = priorWh.hasGlob; + wh.globFilter = priorWh.globFilter; + wh.filterPath = priorWh.filterPath; + wh.filterDir = priorWh.filterDir; + } + + // evaluate what is at the path we're being asked to watch + fs[wh.statMethod](wh.watchPath, function(error, stats) { + if (this._handleError(error)) return callback(null, path); + if (this._isIgnored(wh.watchPath, stats)) { + ready(); + return callback(null, false); + } + + var initDir = function(dir, target) { + return this._handleDir(dir, stats, initialAdd, depth, target, wh, ready); + }.bind(this); + + var closer; + if (stats.isDirectory()) { + closer = initDir(wh.watchPath, target); + } else if (stats.isSymbolicLink()) { + var parent = sysPath.dirname(wh.watchPath); + this._getWatchedDir(parent).add(wh.watchPath); + this._emit('add', wh.watchPath, stats); + closer = initDir(parent, path); + + // preserve this symlink's target path + fs.realpath(path, function(error, targetPath) { + this._symlinkPaths[sysPath.resolve(path)] = targetPath; + ready(); + }.bind(this)); + } else { + closer = this._handleFile(wh.watchPath, stats, initialAdd, ready); + } + + if (closer) this._closers[path] = closer; + callback(null, false); + }.bind(this)); +}; + +module.exports = NodeFsHandler; diff --git a/node_modules/chokidar/package.json b/node_modules/chokidar/package.json new file mode 100644 index 0000000..244de7b --- /dev/null +++ b/node_modules/chokidar/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + "chokidar@^1.0.1", + "/home/mywebsite/node_modules/forever-monitor" + ] + ], + "_from": "chokidar@>=1.0.1 <2.0.0", + "_id": "chokidar@1.4.2", + "_inCache": true, + "_installable": true, + "_location": "/chokidar", + "_nodeVersion": "5.1.1", + "_npmUser": { + "email": "paul@paulmillr.com", + "name": "paulmillr" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "chokidar", + "raw": "chokidar@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/forever-monitor" + ], + "_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.4.2.tgz", + "_shasum": "3eaea6c2898fa7208184a453d4889a9addf567d2", + "_shrinkwrap": null, + "_spec": "chokidar@^1.0.1", + "_where": "/home/mywebsite/node_modules/forever-monitor", + "author": { + "name": "Paul Miller", + "url": "http://paulmillr.com" + }, + "bugs": { + "url": "http://github.com/paulmillr/chokidar/issues" + }, + "dependencies": { + "anymatch": "^1.3.0", + "async-each": "^0.1.6", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + }, + "description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.", + "devDependencies": { + "chai": "^3.2.0", + "coveralls": "^2.11.2", + "istanbul": "^0.3.20", + "mocha": "^2.0.0", + "rimraf": "^2.4.3", + "sinon": "^1.10.3", + "sinon-chai": "^2.6.0" + }, + "directories": {}, + "dist": { + "shasum": "3eaea6c2898fa7208184a453d4889a9addf567d2", + "tarball": "http://registry.npmjs.org/chokidar/-/chokidar-1.4.2.tgz" + }, + "files": [ + "index.js", + "lib/" + ], + "gitHead": "1df57f2631849db749ce56c4125e050937c82106", + "homepage": "https://github.com/paulmillr/chokidar", + "keywords": [ + "file", + "fs", + "fsevents", + "watch", + "watchFile", + "watcher", + "watching" + ], + "license": "MIT", + "maintainers": [ + { + "name": "paulmillr", + "email": "paul@paulmillr.com" + }, + { + "name": "es128", + "email": "elan.shanker+npm@gmail.com" + } + ], + "name": "chokidar", + "optionalDependencies": { + "fsevents": "^1.0.0" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/paulmillr/chokidar.git" + }, + "scripts": { + "ci-test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls", + "test": "istanbul test node_modules/mocha/bin/_mocha" + }, + "version": "1.4.2" +} diff --git a/node_modules/cliff/.npmignore b/node_modules/cliff/.npmignore new file mode 100644 index 0000000..5171c54 --- /dev/null +++ b/node_modules/cliff/.npmignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/node_modules/cliff/LICENSE b/node_modules/cliff/LICENSE new file mode 100644 index 0000000..56217ca --- /dev/null +++ b/node_modules/cliff/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Nodejitsu Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/cliff/README.md b/node_modules/cliff/README.md new file mode 100644 index 0000000..a0f0cd8 --- /dev/null +++ b/node_modules/cliff/README.md @@ -0,0 +1,227 @@ +# cliff + +CLI output formatting tools: "Your CLI Formatting Friend". + +## Installation + +### Installing npm (node package manager) +``` + curl http://npmjs.org/install.sh | sh +``` + +### Installing cliff +``` + [sudo] npm install cliff +``` + +## Usage +There are a number of methods available in Cliff for common logging tasks in command-line tools. If you're looking for more usage, checkout the [examples in this repository][3]: + +1. Logging rows of data +2. Inspecting Objects + +### Logging rows of data + +**cliff.stringifyRows(rows[, colors])** + +Takes a set of Arrays and row headers and returns properly formatted and padded rows. Here's a sample: + +``` js + var cliff = require('../lib/cliff'); + + var rows = [ + ['Name', 'Flavor', 'Dessert'], + ['Alice', 'cherry', 'yogurt'], + ['Bob', 'carmel', 'apples'], + ['Joe', 'chocolate', 'cake'], + ['Nick', 'vanilla', 'ice cream'] + ]; + + console.log(cliff.stringifyRows(rows, ['red', 'blue', 'green'])); +``` + +![output from string-rows.js][string-rows] + +**cliff.putRows(level, rows[, colors])** + +The `putRows` method is a simple helper that takes a set of Arrays and row headers and logs properly formatted and padded rows (logs `stringifyRows` to [winston][0]). Here's a quick sample: + +``` js + var cliff = require('../lib/cliff'); + + var rows = [ + ['Name', 'Flavor', 'Dessert'], + ['Alice', 'cherry', 'yogurt'], + ['Bob', 'carmel', 'apples'], + ['Joe', 'chocolate', 'cake'], + ['Nick', 'vanilla', 'ice cream'] + ]; + + cliff.putRows('data', rows, ['red', 'blue', 'green']); +``` + +The resulting output on the command-line would be: + +![output from put-rows.js][put-rows] + +**cliff.stringifyObjectRows(objs, properties[, colors])** +*used to be: cliff.rowifyObjects(objs, properties, colors)* + +Takes a set of Objects and the properties to extract from them and returns properly formatted and padded rows. Here's a sample: + +``` js + var cliff = require('../lib/cliff'); + + var objs = [], obj = { + name: "bazz", + address: "1234 Nowhere Dr.", + }; + + for (var i = 0; i < 10; i++) { + objs.push({ + name: obj.name, + address: obj.address, + id: Math.random().toString() + }); + } + + console.log(cliff.stringifyObjectRows(objs, ['id', 'name', 'address'], ['red', 'blue', 'green'])); +``` + +![output from string-object-rows.js][string-object-rows] + +**cliff.putObjectRows(level, objs, properties[, colors])** + +Takes a set of Objects and the properties to extract from them and it will log to the console. (it prints `stringifyObjectRows` with [winston][0]). Here's a sample: + +``` js + var cliff = require('../lib/cliff'); + + var objs = [], obj = { + name: "bazz", + address: "1234 Nowhere Dr.", + }; + + for (var i = 0; i < 10; i++) { + objs.push({ + name: obj.name, + address: obj.address, + id: Math.random().toString() + }); + } + + cliff.putObjectRows('data', objs, ['id', 'name', 'address']); +``` + +![output from string-object-rows.js][string-object-rows] + +**Colors Parameter** + +The `colors` parameter is an array that colors the first row. It uses the [colors.js][2]. You can use any of those. + +``` js + var cliff = require('../lib/cliff'); + + var rows = [ + ['Name', 'Flavor', 'Dessert'], + ['Alice'.grey, 'cherry'.cyan, 'yogurt'.yellow], + ['Bob'.magenta, 'carmel'.rainbow, 'apples'.white], + ['Joe'.italic, 'chocolate'.underline, 'cake'.inverse], + ['Nick'.bold, 'vanilla', 'ice cream'] + ]; + + cliff.putRows('data', rows, ['red', 'blue', 'green']); +``` + +The resulting output on the command-line would be: + +![output from puts-rows-colors.js][put-rows-colors] + +### Inspecting Objects + +**cliff.inspect(obj)** + +The `inspect` method is a lightweight wrapper to a pre-configured [eyes][1] inspector. If you wish to change the coloring of objects that are logged using `cliff` you only need to override `cliff.inspect` with a new [eyes][1] inspector. Here is how to use it: + +``` js + var cliff = require('../lib/cliff'); + + console.log(cliff.inspect({ + literal: "bazz", + arr: [ + "one", + 2, + ], + obj: { + host: "localhost", + port: 5984, + auth: { + username: "admin", + password: "password" + } + } + })); +``` + +![output from inspect.js][inspect] + +**cliff.putObject(obj, [rewriters, padding])** + +The `putObject` method is a simple helper function for prefixing and styling inspected object output from [eyes][1]. Here's a quick sample: + +``` js +var cliff = require('cliff'); + +cliff.putObject({ + literal: "bazz", + arr: [ + "one", + 2, + ], + obj: { + host: "localhost", + port: 5984, + auth: { + username: "admin", + password: "password" + } + } +}); +``` + +The resulting output on the command-line would be: + +![output from put-object.js][put-object] + +## Run Tests + +All of the cliff tests are written in [vows][4], and cover all of the use cases described above. + +``` + npm test +``` + +## Motivation + +Cliff is the swiss army knife of CLI formatting tools. It is based on highly flexible and powerful libraries: + +* [winston][0]: A multi-transport async logging library for node.js +* [eyes][1]: A customizable value inspector for node.js +* [colors][2]: Get colors in your node.js console like what + + +#### Author: [Charlie Robbins](http://twitter.com/indexzero) + +[0]: http://github.com/indexzero/winston +[1]: http://github.com/cloudhead/eyes.js +[2]: http://github.com/marak/colors.js +[3]: http://github.com/flatiron/cliff/tree/master/examples +[4]: http://vowsjs.org + +[inspect]: https://github.com/flatiron/cliff/raw/master/assets/inspect.png +[put-object-rows]: https://github.com/flatiron/cliff/raw/master/assets/put-object-rows.png +[put-object]: https://github.com/flatiron/cliff/raw/master/assets/put-object.png +[put-rows-colors]: https://github.com/flatiron/cliff/raw/master/assets/put-rows-colors.png +[put-rows]: https://github.com/flatiron/cliff/raw/master/assets/put-rows.png +[string-object-rows]: https://github.com/flatiron/cliff/raw/master/assets/string-object-rows.png +[string-rows]: https://github.com/flatiron/cliff/raw/master/assets/string-rows.png \ No newline at end of file diff --git a/node_modules/cliff/assets/inspect.png b/node_modules/cliff/assets/inspect.png new file mode 100755 index 0000000000000000000000000000000000000000..15f0eb081a204be8846f79050d1e8835d8c099fc GIT binary patch literal 27533 zcmV*wKtI2UP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>DYa&TRK~#8N?VWdg zQ}zD;fB%1#(ZwDLv`I(W?A<2mUP;plg)&<<2#5?t5tSjLECEqKmR<$Da`k$}ffuj$ zDl)_Y3b;6IY_RNDXRCv5}oTQ?%Dut(tK_w>{Hw`A=-*apsw9?&-3J;@Q<^!Fr(y4{NCo05F6!q6^CTYH58ZQug%$Mi3WPq92UlJ|oz1Dn#=Ud+}(X%w-g8aoKyI;I+# zHdDt``L;CdRN&utH-=B(|M3!5b5C-`Hr>MG+EKP-{)1`Arr=c{*H0&qx%VV{1MllU z2_3RAKv;lsDTIwHs$0B&%FA0yyD2#EicwN&ac!OQ^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H4}n3EY7?4v7{LssoF|Drd%2fAeY@&jTyYEdNCU@#Ji4)4X+ z3TH)4Z!`5~%t$N8sVye?r856cecuibuKa!GYrlY?siXM$vXO{y9@I}#0Ai#G8FT)BWAp_6#&f^Wbb#9aV zf@yS(0Zq86KP;PslHW&a8aUkMR^`U{d99}}|3F?4hXQ@b9P(+IjYWJ5lqA^0geoEA zK964M2yNNcgl5llE1QRIBM}vvQwo$J;e5j%%tV2Tr$AD7KeG_frB*$P)$6{#|TVEeQkY~BVUMSO?T;dWN|%>6vjT{wD$DH-6|Luv47^&_WAclJytLBY`!Ms-0g zQnrk^G3hTdXMZ@dcLPwo_+$vbz-+h$xs>g`BEmEeIyk`NJb!2b{qbSOxtT|uL2_BJ z6pmwvuw4v;!JJ*3)~aFcQ1;Ll1VYpa5S8+B;fqK6hggS4&xrgtf(H4@W%LJo2?~o|_XTqTN^_l{Sk$7sPi(7-aX|!b8BQV@y_JN-U*6>j2zh}nE zIwL@em4bfkzWtV+GQ_@68c7sN12zbIR{yvALAlR5)bG{~aY}x_%BK1fOVuG$$5Sin znJuvpVeCmc;k0KbIj;bFA%vQ%TqC#`&^c^i`_2drMFrs}Gr%Zw4he0UVOGuRKv2yW zR=89vHSF8{_lk(=$VhiWK)nerCjwoxU4CB#Oio`G`1vPH=$qGXa_SeO!4;o3nBSN^ zc>}*y8Xc@%uR5@?#e*}i0{KldB_5O5JCi_4}Hw-4I9&DBn4S?bwfA}6-+0`f0*o!dT? zhcMmZ$FQ#bvoZi|eX@haGO~G9H3K&Fb(`U!Jm&?M2dl=TAQ~*k!TK|S=Y(E65-wwQ WQFlsmZo)6L056r_JS|f+4gNp=_R7ov literal 0 HcmV?d00001 diff --git a/node_modules/cliff/assets/put-object-rows.png b/node_modules/cliff/assets/put-object-rows.png new file mode 100755 index 0000000000000000000000000000000000000000..044270f3aba943c6186400478851e65dcbacf5df GIT binary patch literal 54871 zcmV)PK()V#P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vF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4AfmLTh$!_+9_IpX z0VJYWJB|9*JSjFF5>dXf$-j2@CEuO3O8NBe!*bhRUF(sF5Ic%8{}xM7Vb~zI>@>b( zos0|jv>~DhxB(09QmV3abPo}%0Y^ct4OA25>D4iaC>AX(jp~3e$*ruK5ZPZ@S$U-gQWfHf|4Zv-EIgr21VNuwnoX|zEk4FEss)S^BhX~1a+NZ4qNA9uiy z*dr*8ef85=;5QZOVVlYD|5;UlQXO0(i1>1E{}3*B=%g2*KOnsX zg#M0^UZke@#$PR*H@>rdr*B;ShMC|*lQ8j$--vu_&p=!44G)MW?1MmG5XL0>dGLZ z6e1!@^V&f~;qs)K)}|3r!bX&Z&0DxNha=S{@8wm>>_86k2_TjXg2a-sJ_*r#&cl6g z93)-P$tSyL#FeV@cjb1&+;{B^i{Jk1pok4Qp<4MeE-`2f( zfFz&5!+Zo48L)TeFFPv-Z#{S*0g_&Ro_+iUrYM&jKH>_nSJ`~1d-#sf6QN5dTU}i; zb!h~$mrg`EcPIkvv6$avRYrD${I+b34Vd1i;K0Oj{($r%anJ%HO4R%5oAxUF2NY~4 zh$xpgxJ4N)K6vVW;%+7p#cp7G<3_{$Z(li^n*#SU6VY$TOq+8b=N-7UiHHJk0IA+H z5fSCj$mrQNXI23s3L>ABJWxEqi6|KgNJLRUL>u2$B`dwRc8dGPg5JKN2U21-Zy4P) z@9s5|m#*+FGT&N?p1mqL3X%V$WfzhD#yiu#ljwZ5dU~ zS>MU4-VC&@lKXm`h@yIu(nnu6A7KXa|D;OT^|aqY3A{ib#Wb&YrRL*=nr>;;f zuVc0xBl%@3uj52pjBlj&FV#9!Br7Gi19{z%8(j2Nw6zE98Eb)q6Z_1*=SAMFFl^>S94NNiGCK`A!~O*EE2$- z{Ffkw^?8%7hK@lKshxCv`aw{`(B4V&C&vE+yIL!?V0eP<00000NkvXXu0mjfQ2zyR literal 0 HcmV?d00001 diff --git a/node_modules/cliff/assets/put-object.png b/node_modules/cliff/assets/put-object.png new file mode 100755 index 0000000000000000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5cE4xJR^jojBl;J}?$jNvnwWe?^>v)&%YA5hZ%EqxZ=@ZcwA+dnk77+}8k6l`2`0b$1 z2Z`~U>ZXbV=9bnQU$v&jQ1jl^PMtv*ByEZ!ROyE@k54zYOLs* z?G?%i*)q(4Tnb0HO93jZ9Mm@mlPqAc*JIB#hb-Vy2Lf*o=4c8TKmM7_{#A@@(C<8R z_%s*|2byt;U{tvrhnj6iw3Ta=8~)u@gp#nQ3P-8fq&~^G>n{=dELidq*vA!x%bv(0 zvi1SFgRV zyoN0-CH_N=9WAqH780vgD|d-9h=hb2zt`Z}lijgNyOVm`);jn9r$ld7yaw#&TB1kt zHpj{_hac%W&4FCpZ&Ll9yqk>f;3Hw|8Dr1tZDY-u& zFDP+yeDYiaYEUey?V{P*h~nJ-9;m+U(ka2n7+iXK zH+!2_*CEZ{(E`bl9-U@nX5lMr+cr=b0s-fLqc|C<1G~Op?Gq`v)8wzb Q!9XurNhOJDF_Xam2l4uhX#fBK literal 0 HcmV?d00001 diff --git a/node_modules/cliff/assets/put-rows-colors.png b/node_modules/cliff/assets/put-rows-colors.png new file mode 100755 index 0000000000000000000000000000000000000000..93252ff5c7fb63a5071f2f4d9e74d6f412f66416 GIT binary patch literal 23408 zcmV)@K!LxBP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>DTLno(K~#8N?VSgB zQ&k(sDafXKQ_3ndqdU3TX`6Jfbhnfay4kbry~~mfWp6|U0Vm=BK}Gg(px{6O{aA_$ z2o%A7=iHT>joA*G$IbKk=c>d-$|Hz@_!6~RdCp#DsrH2VkF zK&jzDxr*5nK8>%{eV-ftkriQce|Y%Aa$%^6OFIWj(W4nlzNcHxcSlar*w6{5!8(D= zI}=ux!V^KngVll#^f=8;@Et(EG5F3?#O)ZdVW*}ukIHxOvnfpL4yZTZNyO9fUF3+< zc0gX7)H_8K4xEPKyTQsqN_hPrfP}X;-(BN#!1E5xlLM?{3x+=5u`|Ky-XCCmN5wnT>0JMzGMX^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9Yh1R!Cg~V7iTHzqu)8gjwSDdyq!Dm5B4GDKR=<@ z#?wTfjoG7MpABPtchA^%Rqp|S{13!^d4oP4go@Yi?}0dg9a7r<9@S`n4@>y2PkE0_ z!~0x{w{Hb`jg$9&aRu#javk(JNpVHF>=r(72Bm+<%8_aA#&<;psFaiU9;M8KG2ne*!S`pUxvN&C>eatBggc%o-xSIVlj7ZK zaBo;=hN;w@@p^gIP!&4$39u?O`n719N{Ip!65hO`W7xjdCUfAboM{&;9%W@HZ(yc} zZm#EUa=a;1p1Gz?LscjP(#Z<@U7u;nlf5jOs3UJ3vP0!=P}SWU&Wz=iP3tiOiv{5S XO%6Pj?-oeN00000NkvXXu0mjf4~sq8 literal 0 HcmV?d00001 diff --git a/node_modules/cliff/assets/put-rows.png b/node_modules/cliff/assets/put-rows.png new file mode 100755 index 0000000000000000000000000000000000000000..6f045d735b30352ac3e05aff89fb79288bfdfd47 GIT binary patch literal 21809 zcmV)-K!?AHP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>DRK`g}K~#8N?VSgB z6xH6wMXv<~Qb~fLmt;3R+jp~@>?R?-H&RIlLMQa1^w6Y9GxR2?2KJl-%lJ2RWy{PO`W1jqUGDDjEx;3;g$aEMxZHssNYCn64UD_)%*(#|>YG5uo$B=9bF4R7Z|oWagpdN_DVnGbKNL%ko4 zlskgY84e$*qsZqm^|-Y2j2Rg)=4XIi(Tu}^MR9yFgeHJ5lgz}mqzPOC$=ML< zk{=YYVaSS4;@k5{b%}jqihBABEXE~COeS24?QnRNWk$$sLr-s2JiQy7llg>?>NlW7@Rpv3`*J>RuNlIFZ%YcjtCu>f;pXo-B7sDlIM23WKxKVvz zL`U;p#r^s=T&eIVUAb=QU{60=;1WgaR_RJR&xH8`pij%E_@rj|{3|fS!)QE? z5fi|aDGVo1HUKUix~I)LGH^f-c`MKQ!leO-b@4bgHpc{}t#RoTnGW9Xz)S_8B*tIn zNZe18^(}@=G7Oj4dx3*B=-ad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!c=y_XQ)0rsRH(M^Zele literal 0 HcmV?d00001 diff --git a/node_modules/cliff/assets/string-object-rows.png b/node_modules/cliff/assets/string-object-rows.png new file mode 100755 index 0000000000000000000000000000000000000000..0d383a263680899b151662d85f7623c4a4f0c473 GIT binary patch literal 53234 zcmV*1KzP52P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D&xc7wK~#8N?7atA z6j$H(f4|TB{_pbKQL2DFRoGoRY=x!w4$`ZIA_^*C*H{xl!PqrwVoy<{MpH~QO^u1Y zMUz-!@4YK1?EjRR*_qjy-PvUqFq-RJx$toI% zuhiMf+2<9G;roiScC>T$^cm{9 z^m*-idpBj993c^ zy$il>KecJ{KuH3S4VpXvVE})$pgagu2>aN~83!tttcmL?;gb_m3?%+xYbuuQ#e3h^^bD}9#<(XB|FhxGX=x5RN@fvlFoz^`E8hB8gZ?|e z#NWHk$qZW_yfdrMG#s3e;9zD+poi?XT>15yz1H(SP{$%&CSNWH*<-s#9=fjOt z`b2bS33-4zp(77;Z2&*3dK52Nv8ckuqdD3T6!Gzm`rX4`x3s{RK_2{i6fIe?u)@XN z9P(ha#Xz?(ko92Yk}%T;*a4OAxTdDN=6&Ej^)IiC9(qj&evcEcwSitj`j@agFzp6x zLp0BBklIG1)gBl)FjEC&K-a}&5qTh7Oia%b*Cf;fK6xHsG4By`UBf#s+!GiRI)h(muyZKyFqQRi_4k`o`2V+W-Kb5 zzi;r2m8qUSa-;sJw0ov;T1@QI-Q=OE{P0 zjy9MZXD1@3L(U~)0>+YgsV zJHeQQqI*vI@UI7c2(GwyVC~15DkVJV9Wx3R9;jTnDAG|ZcgpJvUORVIxC31VBz}sy z;QeN}dXU249-tiC>)jvVh30s;y(II#MMlh^7sjrY(0 zu&~O_(||}gaI9CoQMBRGqu)lws-eJmrj0!K_}Ujkdboj~Q%XMCb?jCH5WQPx4=fp# z*%?f_hNk`W;QH>Je?Dlq_|v?KkN>#)?9MN<^1-b-L`^^1aAC!Vn-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GzXkLM@4?Uqg3uKQ$^44B2iKZo{E6EFb zGxTyBG$o^R=dZRVGj;MR64UVsHw9SP642Sn%a**3Yu=iwoq5zycBb<`*bX#obH@PL zq#ZxqDhDw}_u<<{Fo zgcWE?JJgMa_4z2h$&2R7sBVMdRjuZ?gQ9sQE}pIP_T2eveeNpN-Uep!;>qO<hvQ6raJ5T?YEDq?o=gIvYeQn|L@18cvTmOD`bKS_)F76_UdC!06M6B(bk#@)S^_$Ux)~%dL-IOAIr4eer{US^ z_{MgAua>FX;OjpsqnoF9bBAD<5Wgi4C+~&%fV^q*u08w$kk@D8v5Ip8{l)mSMZLpU zU;XlgO=WGLTj>CIflv!-P-G$?sJK6J}kaqFL>M<1wkm9e-DD7jpn zyr`d75S;imNbFwir}Gj)?)e+l$3c@>H2V0|{K>{UxZ*9KqYHmD`9qen52 zS3O~!SlG?A;yvKw`cj8~!rN2b8wDO`#_iD6cT z)GoeEG~V&l(x1NMrM5KS_Dg*;7r&y4=7m|kUW>26uaVS#UiJ#x#*g|-!g>aP#R}6~E!S!qFrC_fjdb{2D`Yxk^_VSd+NR;C&#mdrl7>J%?6V-~B6> zKlyH8Yf@P|h9?mTND1Su`(8!a6Ofea1-e`tv7m zeZkjY)5fo&`9MoSWX=CJg^)>V)0+XvOPiZ8zUF0IU=Y{5>YFmdL1&}ZC=X= 0.4.0" + }, + "gitHead": "66462b3de5ddab850675e8e6ac077645d0bfc425", + "homepage": "https://github.com/flatiron/cliff", + "keywords": [ + "cli", + "logging", + "tools", + "winston" + ], + "main": "./lib/cliff", + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + } + ], + "name": "cliff", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/flatiron/cliff.git" + }, + "scripts": { + "test": "vows test/*-test.js --spec" + }, + "version": "0.1.9" +} diff --git a/node_modules/cliff/test/cliff-test.js b/node_modules/cliff/test/cliff-test.js new file mode 100644 index 0000000..17c5952 --- /dev/null +++ b/node_modules/cliff/test/cliff-test.js @@ -0,0 +1,79 @@ +/* + * log-test.js: Tests for cliff. + * + * (C) 2010, Nodejitsu Inc. + * + */ + +var assert = require('assert'), + vows = require('vows'), + eyes = require('eyes'), + cliff = require('../lib/cliff'); + +vows.describe('cliff').addBatch({ + "When using cliff module": { + "the columnMajor() method": { + "should respond with rows in column major form": function () { + var columns, rows = [ + ["1a", "2a", "3a", "4a"], + ["1b", "2b", "3b", "4b"], + ["1c", "2c", "3c", "4c"] + ]; + + columns = cliff.columnMajor(rows); + for (var i = 0; i < columns.length; i++) { + columns[i].forEach(function (val) { + assert.isTrue(val.indexOf(i + 1) !== -1); + }); + } + } + }, + "the arrayLengths() method": { + "with a set of strings": { + "should respond with a list of the longest elements": function () { + var lengths, rows = [ + ["1a", "2a", "3a", "4a"], + ["1b", "2bb", "3b", "4b"], + ["1c", "2c", "3ccc", "4c"], + ["1d", "2d", "3dd", "4dddd"] + ]; + + lengths = cliff.arrayLengths(rows); + assert.equal(lengths[0], 2); + assert.equal(lengths[1], 3); + assert.equal(lengths[2], 4); + assert.equal(lengths[3], 5); + } + }, + "with a set of numbers and strings": { + "should respond with a list of the longest elements": function () { + var lengths, rows = [ + [11, "2a", "3a", "4a"], + ["1b", 222, "3b", "4b"], + ["1c", "2c", 3333, "4c"], + ["1d", "2d", "3dd", 44444] + ]; + + lengths = cliff.arrayLengths(rows); + assert.equal(lengths[0], 2); + assert.equal(lengths[1], 3); + assert.equal(lengths[2], 4); + assert.equal(lengths[3], 5); + } + } + }, + "the stringifyRows() method": { + "should calculate padding correctly for numbers": function() { + var rows = [ + ['a', 'b'], + [12345, 1] + ]; + + assert.equal( + cliff.stringifyRows(rows), + 'a b \n12345 1 ' + ); + } + } + } +}).export(module); \ No newline at end of file diff --git a/node_modules/colors/MIT-LICENSE.txt b/node_modules/colors/MIT-LICENSE.txt new file mode 100644 index 0000000..7dca107 --- /dev/null +++ b/node_modules/colors/MIT-LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2010 + +Marak Squires +Alexis Sellier (cloudhead) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/colors/ReadMe.md b/node_modules/colors/ReadMe.md new file mode 100644 index 0000000..0eda52d --- /dev/null +++ b/node_modules/colors/ReadMe.md @@ -0,0 +1,77 @@ +# colors.js - get color and style in your node.js console ( and browser ) like what + + + + +## Installation + + npm install colors + +## colors and styles! + +- bold +- italic +- underline +- inverse +- yellow +- cyan +- white +- magenta +- green +- red +- grey +- blue +- rainbow +- zebra +- random + +## Usage + +``` js +var colors = require('./colors'); + +console.log('hello'.green); // outputs green text +console.log('i like cake and pies'.underline.red) // outputs red underlined text +console.log('inverse the color'.inverse); // inverses the color +console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces) +``` + +# Creating Custom themes + +```js + +var colors = require('colors'); + +colors.setTheme({ + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}); + +// outputs red text +console.log("this is an error".error); + +// outputs yellow text +console.log("this is a warning".warn); +``` + + +### Contributors + +Marak (Marak Squires) +Alexis Sellier (cloudhead) +mmalecki (Maciej Małecki) +nicoreed (Nico Reed) +morganrallen (Morgan Allen) +JustinCampbell (Justin Campbell) +ded (Dustin Diaz) + + +#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded) diff --git a/node_modules/colors/colors.js b/node_modules/colors/colors.js new file mode 100644 index 0000000..7a537d8 --- /dev/null +++ b/node_modules/colors/colors.js @@ -0,0 +1,342 @@ +/* +colors.js + +Copyright (c) 2010 + +Marak Squires +Alexis Sellier (cloudhead) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +var isHeadless = false; + +if (typeof module !== 'undefined') { + isHeadless = true; +} + +if (!isHeadless) { + var exports = {}; + var module = {}; + var colors = exports; + exports.mode = "browser"; +} else { + exports.mode = "console"; +} + +// +// Prototypes the string object to have additional method calls that add terminal colors +// +var addProperty = function (color, func) { + exports[color] = function (str) { + return func.apply(str); + }; + String.prototype.__defineGetter__(color, func); +}; + +function stylize(str, style) { + + var styles; + + if (exports.mode === 'console') { + styles = { + //styles + 'bold' : ['\x1B[1m', '\x1B[22m'], + 'italic' : ['\x1B[3m', '\x1B[23m'], + 'underline' : ['\x1B[4m', '\x1B[24m'], + 'inverse' : ['\x1B[7m', '\x1B[27m'], + 'strikethrough' : ['\x1B[9m', '\x1B[29m'], + //text colors + //grayscale + 'white' : ['\x1B[37m', '\x1B[39m'], + 'grey' : ['\x1B[90m', '\x1B[39m'], + 'black' : ['\x1B[30m', '\x1B[39m'], + //colors + 'blue' : ['\x1B[34m', '\x1B[39m'], + 'cyan' : ['\x1B[36m', '\x1B[39m'], + 'green' : ['\x1B[32m', '\x1B[39m'], + 'magenta' : ['\x1B[35m', '\x1B[39m'], + 'red' : ['\x1B[31m', '\x1B[39m'], + 'yellow' : ['\x1B[33m', '\x1B[39m'], + //background colors + //grayscale + 'whiteBG' : ['\x1B[47m', '\x1B[49m'], + 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'], + 'blackBG' : ['\x1B[40m', '\x1B[49m'], + //colors + 'blueBG' : ['\x1B[44m', '\x1B[49m'], + 'cyanBG' : ['\x1B[46m', '\x1B[49m'], + 'greenBG' : ['\x1B[42m', '\x1B[49m'], + 'magentaBG' : ['\x1B[45m', '\x1B[49m'], + 'redBG' : ['\x1B[41m', '\x1B[49m'], + 'yellowBG' : ['\x1B[43m', '\x1B[49m'] + }; + } else if (exports.mode === 'browser') { + styles = { + //styles + 'bold' : ['', ''], + 'italic' : ['', ''], + 'underline' : ['', ''], + 'inverse' : ['', ''], + 'strikethrough' : ['', ''], + //text colors + //grayscale + 'white' : ['', ''], + 'grey' : ['', ''], + 'black' : ['', ''], + //colors + 'blue' : ['', ''], + 'cyan' : ['', ''], + 'green' : ['', ''], + 'magenta' : ['', ''], + 'red' : ['', ''], + 'yellow' : ['', ''], + //background colors + //grayscale + 'whiteBG' : ['', ''], + 'greyBG' : ['', ''], + 'blackBG' : ['', ''], + //colors + 'blueBG' : ['', ''], + 'cyanBG' : ['', ''], + 'greenBG' : ['', ''], + 'magentaBG' : ['', ''], + 'redBG' : ['', ''], + 'yellowBG' : ['', ''] + }; + } else if (exports.mode === 'none') { + return str + ''; + } else { + console.log('unsupported mode, try "browser", "console" or "none"'); + } + return styles[style][0] + str + styles[style][1]; +} + +function applyTheme(theme) { + + // + // Remark: This is a list of methods that exist + // on String that you should not overwrite. + // + var stringPrototypeBlacklist = [ + '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', + 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', + 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', + 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight' + ]; + + Object.keys(theme).forEach(function (prop) { + if (stringPrototypeBlacklist.indexOf(prop) !== -1) { + console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name'); + } + else { + if (typeof(theme[prop]) === 'string') { + addProperty(prop, function () { + return exports[theme[prop]](this); + }); + } + else { + addProperty(prop, function () { + var ret = this; + for (var t = 0; t < theme[prop].length; t++) { + ret = exports[theme[prop][t]](ret); + } + return ret; + }); + } + } + }); +} + + +// +// Iterate through all default styles and colors +// +var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG']; +x.forEach(function (style) { + + // __defineGetter__ at the least works in more browsers + // http://robertnyman.com/javascript/javascript-getters-setters.html + // Object.defineProperty only works in Chrome + addProperty(style, function () { + return stylize(this, style); + }); +}); + +function sequencer(map) { + return function () { + if (!isHeadless) { + return this.replace(/( )/, '$1'); + } + var exploded = this.split(""), i = 0; + exploded = exploded.map(map); + return exploded.join(""); + }; +} + +var rainbowMap = (function () { + var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV + return function (letter, i, exploded) { + if (letter === " ") { + return letter; + } else { + return stylize(letter, rainbowColors[i++ % rainbowColors.length]); + } + }; +})(); + +exports.themes = {}; + +exports.addSequencer = function (name, map) { + addProperty(name, sequencer(map)); +}; + +exports.addSequencer('rainbow', rainbowMap); +exports.addSequencer('zebra', function (letter, i, exploded) { + return i % 2 === 0 ? letter : letter.inverse; +}); + +exports.setTheme = function (theme) { + if (typeof theme === 'string') { + try { + exports.themes[theme] = require(theme); + applyTheme(exports.themes[theme]); + return exports.themes[theme]; + } catch (err) { + console.log(err); + return err; + } + } else { + applyTheme(theme); + } +}; + + +addProperty('stripColors', function () { + return ("" + this).replace(/\x1B\[\d+m/g, ''); +}); + +// please no +function zalgo(text, options) { + var soul = { + "up" : [ + '̍', '̎', '̄', '̅', + '̿', '̑', '̆', '̐', + '͒', '͗', '͑', '̇', + '̈', '̊', '͂', '̓', + '̈', '͊', '͋', '͌', + '̃', '̂', '̌', '͐', + '̀', '́', '̋', '̏', + '̒', '̓', '̔', '̽', + '̉', 'ͣ', 'ͤ', 'ͥ', + 'ͦ', 'ͧ', 'ͨ', 'ͩ', + 'ͪ', 'ͫ', 'ͬ', 'ͭ', + 'ͮ', 'ͯ', '̾', '͛', + '͆', '̚' + ], + "down" : [ + '̖', '̗', '̘', '̙', + '̜', '̝', '̞', '̟', + '̠', '̤', '̥', '̦', + '̩', '̪', '̫', '̬', + '̭', '̮', '̯', '̰', + '̱', '̲', '̳', '̹', + '̺', '̻', '̼', 'ͅ', + '͇', '͈', '͉', '͍', + '͎', '͓', '͔', '͕', + '͖', '͙', '͚', '̣' + ], + "mid" : [ + '̕', '̛', '̀', '́', + '͘', '̡', '̢', '̧', + '̨', '̴', '̵', '̶', + '͜', '͝', '͞', + '͟', '͠', '͢', '̸', + '̷', '͡', ' ҉' + ] + }, + all = [].concat(soul.up, soul.down, soul.mid), + zalgo = {}; + + function randomNumber(range) { + var r = Math.floor(Math.random() * range); + return r; + } + + function is_char(character) { + var bool = false; + all.filter(function (i) { + bool = (i === character); + }); + return bool; + } + + function heComes(text, options) { + var result = '', counts, l; + options = options || {}; + options["up"] = options["up"] || true; + options["mid"] = options["mid"] || true; + options["down"] = options["down"] || true; + options["size"] = options["size"] || "maxi"; + text = text.split(''); + for (l in text) { + if (is_char(l)) { + continue; + } + result = result + text[l]; + counts = {"up" : 0, "down" : 0, "mid" : 0}; + switch (options.size) { + case 'mini': + counts.up = randomNumber(8); + counts.min = randomNumber(2); + counts.down = randomNumber(8); + break; + case 'maxi': + counts.up = randomNumber(16) + 3; + counts.min = randomNumber(4) + 1; + counts.down = randomNumber(64) + 3; + break; + default: + counts.up = randomNumber(8) + 1; + counts.mid = randomNumber(6) / 2; + counts.down = randomNumber(8) + 1; + break; + } + + var arr = ["up", "mid", "down"]; + for (var d in arr) { + var index = arr[d]; + for (var i = 0 ; i <= counts[index]; i++) { + if (options[index]) { + result = result + soul[index][randomNumber(soul[index].length)]; + } + } + } + } + return result; + } + return heComes(text); +} + + +// don't summon zalgo +addProperty('zalgo', function () { + return zalgo(this); +}); diff --git a/node_modules/colors/example.html b/node_modules/colors/example.html new file mode 100644 index 0000000..7a2ae60 --- /dev/null +++ b/node_modules/colors/example.html @@ -0,0 +1,76 @@ + + + + + Colors Example + + + + + + \ No newline at end of file diff --git a/node_modules/colors/example.js b/node_modules/colors/example.js new file mode 100644 index 0000000..b1e03a4 --- /dev/null +++ b/node_modules/colors/example.js @@ -0,0 +1,77 @@ +var colors = require('./colors'); + +//colors.mode = "browser"; + +var test = colors.red("hopefully colorless output"); +console.log('Rainbows are fun!'.rainbow); +console.log('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported +console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported +//console.log('zalgo time!'.zalgo); +console.log(test.stripColors); +console.log("a".grey + " b".black); +console.log("Zebras are so fun!".zebra); +console.log('background color attack!'.black.whiteBG) + +// +// Remark: .strikethrough may not work with Mac OS Terminal App +// +console.log("This is " + "not".strikethrough + " fun."); +console.log(colors.rainbow('Rainbows are fun!')); +console.log(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported +console.log(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported +//console.log(colors.zalgo('zalgo time!')); +console.log(colors.stripColors(test)); +console.log(colors.grey("a") + colors.black(" b")); + +colors.addSequencer("america", function(letter, i, exploded) { + if(letter === " ") return letter; + switch(i%3) { + case 0: return letter.red; + case 1: return letter.white; + case 2: return letter.blue; + } +}); + +colors.addSequencer("random", (function() { + var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; + + return function(letter, i, exploded) { + return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]]; + }; +})()); + +console.log("AMERICA! F--K YEAH!".america); +console.log("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random); + +// +// Custom themes +// + +// Load theme with JSON literal +colors.setTheme({ + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}); + +// outputs red text +console.log("this is an error".error); + +// outputs yellow text +console.log("this is a warning".warn); + +// outputs grey text +console.log("this is an input".input); + +// Load a theme from file +colors.setTheme('./themes/winston-dark.js'); + +console.log("this is an input".input); + diff --git a/node_modules/colors/package.json b/node_modules/colors/package.json new file mode 100644 index 0000000..f56d9d1 --- /dev/null +++ b/node_modules/colors/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "colors@0.x.x", + "/home/mywebsite/node_modules/cliff" + ] + ], + "_from": "colors@>=0.0.0 <1.0.0", + "_id": "colors@0.6.2", + "_inCache": true, + "_installable": true, + "_location": "/colors", + "_npmUser": { + "email": "marak.squires@gmail.com", + "name": "marak" + }, + "_npmVersion": "1.2.30", + "_phantomChildren": {}, + "_requested": { + "name": "colors", + "raw": "colors@0.x.x", + "rawSpec": "0.x.x", + "scope": null, + "spec": ">=0.0.0 <1.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cliff", + "/winston" + ], + "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "_shasum": "2423fe6678ac0c5dae8852e5d0e5be08c997abcc", + "_shrinkwrap": null, + "_spec": "colors@0.x.x", + "_where": "/home/mywebsite/node_modules/cliff", + "author": { + "name": "Marak Squires" + }, + "bugs": { + "url": "https://github.com/Marak/colors.js/issues" + }, + "dependencies": {}, + "description": "get colors in your node.js console like what", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "2423fe6678ac0c5dae8852e5d0e5be08c997abcc", + "tarball": "http://registry.npmjs.org/colors/-/colors-0.6.2.tgz" + }, + "engines": { + "node": ">=0.1.90" + }, + "homepage": "https://github.com/Marak/colors.js", + "keywords": [ + "ansi", + "colors", + "terminal" + ], + "main": "colors", + "maintainers": [ + { + "name": "marak", + "email": "marak.squires@gmail.com" + } + ], + "name": "colors", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Marak/colors.js.git" + }, + "version": "0.6.2" +} diff --git a/node_modules/colors/test.js b/node_modules/colors/test.js new file mode 100644 index 0000000..c32417d --- /dev/null +++ b/node_modules/colors/test.js @@ -0,0 +1,70 @@ +var assert = require('assert'), + colors = require('./colors'); + +var s = 'string'; + +function a(s, code) { + return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m'; +} + +function aE(s, color, code) { + assert.equal(s[color], a(s, code)); + assert.equal(colors[color](s), a(s, code)); + assert.equal(s[color], colors[color](s)); + assert.equal(s[color].stripColors, s); + assert.equal(s[color].stripColors, colors.stripColors(s)); +} + +function h(s, color) { + return '' + s + ''; +} + +var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow']; +var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']); + +colors.mode = 'console'; +assert.equal(s.bold, '\x1B[1m' + s + '\x1B[22m'); +assert.equal(s.italic, '\x1B[3m' + s + '\x1B[23m'); +assert.equal(s.underline, '\x1B[4m' + s + '\x1B[24m'); +assert.equal(s.strikethrough, '\x1B[9m' + s + '\x1B[29m'); +assert.equal(s.inverse, '\x1B[7m' + s + '\x1B[27m'); +assert.ok(s.rainbow); +aE(s, 'white', 37); +aE(s, 'grey', 90); +aE(s, 'black', 30); +aE(s, 'blue', 34); +aE(s, 'cyan', 36); +aE(s, 'green', 32); +aE(s, 'magenta', 35); +aE(s, 'red', 31); +aE(s, 'yellow', 33); +assert.equal(s, 'string'); + +colors.setTheme({error:'red'}); + +assert.equal(typeof("astring".red),'string'); +assert.equal(typeof("astring".error),'string'); + +colors.mode = 'browser'; +assert.equal(s.bold, '' + s + ''); +assert.equal(s.italic, '' + s + ''); +assert.equal(s.underline, '' + s + ''); +assert.equal(s.strikethrough, '' + s + ''); +assert.equal(s.inverse, '' + s + ''); +assert.ok(s.rainbow); +stylesColors.forEach(function (color) { + assert.equal(s[color], h(s, color)); + assert.equal(colors[color](s), h(s, color)); +}); + +assert.equal(typeof("astring".red),'string'); +assert.equal(typeof("astring".error),'string'); + +colors.mode = 'none'; +stylesAll.forEach(function (style) { + assert.equal(s[style], s); + assert.equal(colors[style](s), s); +}); + +assert.equal(typeof("astring".red),'string'); +assert.equal(typeof("astring".error),'string'); diff --git a/node_modules/colors/themes/winston-dark.js b/node_modules/colors/themes/winston-dark.js new file mode 100644 index 0000000..49a905b --- /dev/null +++ b/node_modules/colors/themes/winston-dark.js @@ -0,0 +1,12 @@ +module['exports'] = { + silly: 'rainbow', + input: 'black', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}; \ No newline at end of file diff --git a/node_modules/colors/themes/winston-light.js b/node_modules/colors/themes/winston-light.js new file mode 100644 index 0000000..571972c --- /dev/null +++ b/node_modules/colors/themes/winston-light.js @@ -0,0 +1,12 @@ +module['exports'] = { + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}; \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/.travis.yml b/node_modules/concat-map/.travis.yml similarity index 60% rename from node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/.travis.yml rename to node_modules/concat-map/.travis.yml index fca8ef0..f1d0f13 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/.travis.yml +++ b/node_modules/concat-map/.travis.yml @@ -1,4 +1,4 @@ language: node_js node_js: - - 0.10 - - 0.11 + - 0.4 + - 0.6 diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/LICENSE b/node_modules/concat-map/LICENSE similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/LICENSE rename to node_modules/concat-map/LICENSE diff --git a/node_modules/concat-map/README.markdown b/node_modules/concat-map/README.markdown new file mode 100644 index 0000000..408f70a --- /dev/null +++ b/node_modules/concat-map/README.markdown @@ -0,0 +1,62 @@ +concat-map +========== + +Concatenative mapdashery. + +[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) + +[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) + +example +======= + +``` js +var concatMap = require('concat-map'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); +``` + +*** + +``` +[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] +``` + +methods +======= + +``` js +var concatMap = require('concat-map') +``` + +concatMap(xs, fn) +----------------- + +Return an array of concatenated elements by calling `fn(x, i)` for each element +`x` and each index `i` in the array `xs`. + +When `fn(x, i)` returns an array, its result will be concatenated with the +result array. If `fn(x, i)` returns anything else, that value will be pushed +onto the end of the result array. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install concat-map +``` + +license +======= + +MIT + +notes +===== + +This module was written while sitting high above the ground in a tree. diff --git a/node_modules/concat-map/example/map.js b/node_modules/concat-map/example/map.js new file mode 100644 index 0000000..3365621 --- /dev/null +++ b/node_modules/concat-map/example/map.js @@ -0,0 +1,6 @@ +var concatMap = require('../'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); diff --git a/node_modules/concat-map/index.js b/node_modules/concat-map/index.js new file mode 100644 index 0000000..b29a781 --- /dev/null +++ b/node_modules/concat-map/index.js @@ -0,0 +1,13 @@ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json new file mode 100644 index 0000000..9f8a4f5 --- /dev/null +++ b/node_modules/concat-map/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + "concat-map@0.0.1", + "/home/mywebsite/node_modules/brace-expansion" + ] + ], + "_from": "concat-map@0.0.1", + "_id": "concat-map@0.0.1", + "_inCache": true, + "_installable": true, + "_location": "/concat-map", + "_npmUser": { + "email": "mail@substack.net", + "name": "substack" + }, + "_npmVersion": "1.3.21", + "_phantomChildren": {}, + "_requested": { + "name": "concat-map", + "raw": "concat-map@0.0.1", + "rawSpec": "0.0.1", + "scope": null, + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "_shrinkwrap": null, + "_spec": "concat-map@0.0.1", + "_where": "/home/mywebsite/node_modules/brace-expansion", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-concat-map/issues" + }, + "dependencies": {}, + "description": "concatenative mapdashery", + "devDependencies": { + "tape": "~2.4.0" + }, + "directories": { + "example": "example", + "test": "test" + }, + "dist": { + "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "homepage": "https://github.com/substack/node-concat-map", + "keywords": [ + "concat", + "concatMap", + "functional", + "higher-order", + "map" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "concat-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "browsers": { + "chrome": [ + 10, + 22 + ], + "ff": [ + 10, + 15, + 3.5 + ], + "ie": [ + 6, + 7, + 8, + 9 + ], + "opera": [ + 12 + ], + "safari": [ + 5.1 + ] + }, + "files": "test/*.js" + }, + "version": "0.0.1" +} diff --git a/node_modules/concat-map/test/map.js b/node_modules/concat-map/test/map.js new file mode 100644 index 0000000..fdbd702 --- /dev/null +++ b/node_modules/concat-map/test/map.js @@ -0,0 +1,39 @@ +var concatMap = require('../'); +var test = require('tape'); + +test('empty or not', function (t) { + var xs = [ 1, 2, 3, 4, 5, 6 ]; + var ixes = []; + var ys = concatMap(xs, function (x, ix) { + ixes.push(ix); + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; + }); + t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); + t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); + t.end(); +}); + +test('always something', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('scalars', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : x; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('undefs', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function () {}); + t.same(ys, [ undefined, undefined, undefined, undefined ]); + t.end(); +}); diff --git a/node_modules/core-util-is/LICENSE b/node_modules/core-util-is/LICENSE new file mode 100644 index 0000000..d8d7f94 --- /dev/null +++ b/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/node_modules/core-util-is/README.md b/node_modules/core-util-is/README.md new file mode 100644 index 0000000..5a76b41 --- /dev/null +++ b/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/core-util-is/float.patch b/node_modules/core-util-is/float.patch new file mode 100644 index 0000000..a06d5c0 --- /dev/null +++ b/node_modules/core-util-is/float.patch @@ -0,0 +1,604 @@ +diff --git a/lib/util.js b/lib/util.js +index a03e874..9074e8e 100644 +--- a/lib/util.js ++++ b/lib/util.js +@@ -19,430 +19,6 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-var formatRegExp = /%[sdj%]/g; +-exports.format = function(f) { +- if (!isString(f)) { +- var objects = []; +- for (var i = 0; i < arguments.length; i++) { +- objects.push(inspect(arguments[i])); +- } +- return objects.join(' '); +- } +- +- var i = 1; +- var args = arguments; +- var len = args.length; +- var str = String(f).replace(formatRegExp, function(x) { +- if (x === '%%') return '%'; +- if (i >= len) return x; +- switch (x) { +- case '%s': return String(args[i++]); +- case '%d': return Number(args[i++]); +- case '%j': +- try { +- return JSON.stringify(args[i++]); +- } catch (_) { +- return '[Circular]'; +- } +- default: +- return x; +- } +- }); +- for (var x = args[i]; i < len; x = args[++i]) { +- if (isNull(x) || !isObject(x)) { +- str += ' ' + x; +- } else { +- str += ' ' + inspect(x); +- } +- } +- return str; +-}; +- +- +-// Mark that a method should not be used. +-// Returns a modified function which warns once by default. +-// If --no-deprecation is set, then it is a no-op. +-exports.deprecate = function(fn, msg) { +- // Allow for deprecating things in the process of starting up. +- if (isUndefined(global.process)) { +- return function() { +- return exports.deprecate(fn, msg).apply(this, arguments); +- }; +- } +- +- if (process.noDeprecation === true) { +- return fn; +- } +- +- var warned = false; +- function deprecated() { +- if (!warned) { +- if (process.throwDeprecation) { +- throw new Error(msg); +- } else if (process.traceDeprecation) { +- console.trace(msg); +- } else { +- console.error(msg); +- } +- warned = true; +- } +- return fn.apply(this, arguments); +- } +- +- return deprecated; +-}; +- +- +-var debugs = {}; +-var debugEnviron; +-exports.debuglog = function(set) { +- if (isUndefined(debugEnviron)) +- debugEnviron = process.env.NODE_DEBUG || ''; +- set = set.toUpperCase(); +- if (!debugs[set]) { +- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { +- var pid = process.pid; +- debugs[set] = function() { +- var msg = exports.format.apply(exports, arguments); +- console.error('%s %d: %s', set, pid, msg); +- }; +- } else { +- debugs[set] = function() {}; +- } +- } +- return debugs[set]; +-}; +- +- +-/** +- * Echos the value of a value. Trys to print the value out +- * in the best way possible given the different types. +- * +- * @param {Object} obj The object to print out. +- * @param {Object} opts Optional options object that alters the output. +- */ +-/* legacy: obj, showHidden, depth, colors*/ +-function inspect(obj, opts) { +- // default options +- var ctx = { +- seen: [], +- stylize: stylizeNoColor +- }; +- // legacy... +- if (arguments.length >= 3) ctx.depth = arguments[2]; +- if (arguments.length >= 4) ctx.colors = arguments[3]; +- if (isBoolean(opts)) { +- // legacy... +- ctx.showHidden = opts; +- } else if (opts) { +- // got an "options" object +- exports._extend(ctx, opts); +- } +- // set default options +- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; +- if (isUndefined(ctx.depth)) ctx.depth = 2; +- if (isUndefined(ctx.colors)) ctx.colors = false; +- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; +- if (ctx.colors) ctx.stylize = stylizeWithColor; +- return formatValue(ctx, obj, ctx.depth); +-} +-exports.inspect = inspect; +- +- +-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +-inspect.colors = { +- 'bold' : [1, 22], +- 'italic' : [3, 23], +- 'underline' : [4, 24], +- 'inverse' : [7, 27], +- 'white' : [37, 39], +- 'grey' : [90, 39], +- 'black' : [30, 39], +- 'blue' : [34, 39], +- 'cyan' : [36, 39], +- 'green' : [32, 39], +- 'magenta' : [35, 39], +- 'red' : [31, 39], +- 'yellow' : [33, 39] +-}; +- +-// Don't use 'blue' not visible on cmd.exe +-inspect.styles = { +- 'special': 'cyan', +- 'number': 'yellow', +- 'boolean': 'yellow', +- 'undefined': 'grey', +- 'null': 'bold', +- 'string': 'green', +- 'date': 'magenta', +- // "name": intentionally not styling +- 'regexp': 'red' +-}; +- +- +-function stylizeWithColor(str, styleType) { +- var style = inspect.styles[styleType]; +- +- if (style) { +- return '\u001b[' + inspect.colors[style][0] + 'm' + str + +- '\u001b[' + inspect.colors[style][1] + 'm'; +- } else { +- return str; +- } +-} +- +- +-function stylizeNoColor(str, styleType) { +- return str; +-} +- +- +-function arrayToHash(array) { +- var hash = {}; +- +- array.forEach(function(val, idx) { +- hash[val] = true; +- }); +- +- return hash; +-} +- +- +-function formatValue(ctx, value, recurseTimes) { +- // Provide a hook for user-specified inspect functions. +- // Check that value is an object with an inspect function on it +- if (ctx.customInspect && +- value && +- isFunction(value.inspect) && +- // Filter out the util module, it's inspect function is special +- value.inspect !== exports.inspect && +- // Also filter out any prototype objects using the circular check. +- !(value.constructor && value.constructor.prototype === value)) { +- var ret = value.inspect(recurseTimes, ctx); +- if (!isString(ret)) { +- ret = formatValue(ctx, ret, recurseTimes); +- } +- return ret; +- } +- +- // Primitive types cannot have properties +- var primitive = formatPrimitive(ctx, value); +- if (primitive) { +- return primitive; +- } +- +- // Look up the keys of the object. +- var keys = Object.keys(value); +- var visibleKeys = arrayToHash(keys); +- +- if (ctx.showHidden) { +- keys = Object.getOwnPropertyNames(value); +- } +- +- // Some type of object without properties can be shortcutted. +- if (keys.length === 0) { +- if (isFunction(value)) { +- var name = value.name ? ': ' + value.name : ''; +- return ctx.stylize('[Function' + name + ']', 'special'); +- } +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } +- if (isDate(value)) { +- return ctx.stylize(Date.prototype.toString.call(value), 'date'); +- } +- if (isError(value)) { +- return formatError(value); +- } +- } +- +- var base = '', array = false, braces = ['{', '}']; +- +- // Make Array say that they are Array +- if (isArray(value)) { +- array = true; +- braces = ['[', ']']; +- } +- +- // Make functions say that they are functions +- if (isFunction(value)) { +- var n = value.name ? ': ' + value.name : ''; +- base = ' [Function' + n + ']'; +- } +- +- // Make RegExps say that they are RegExps +- if (isRegExp(value)) { +- base = ' ' + RegExp.prototype.toString.call(value); +- } +- +- // Make dates with properties first say the date +- if (isDate(value)) { +- base = ' ' + Date.prototype.toUTCString.call(value); +- } +- +- // Make error with message first say the error +- if (isError(value)) { +- base = ' ' + formatError(value); +- } +- +- if (keys.length === 0 && (!array || value.length == 0)) { +- return braces[0] + base + braces[1]; +- } +- +- if (recurseTimes < 0) { +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } else { +- return ctx.stylize('[Object]', 'special'); +- } +- } +- +- ctx.seen.push(value); +- +- var output; +- if (array) { +- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); +- } else { +- output = keys.map(function(key) { +- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); +- }); +- } +- +- ctx.seen.pop(); +- +- return reduceToSingleString(output, base, braces); +-} +- +- +-function formatPrimitive(ctx, value) { +- if (isUndefined(value)) +- return ctx.stylize('undefined', 'undefined'); +- if (isString(value)) { +- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') +- .replace(/'/g, "\\'") +- .replace(/\\"/g, '"') + '\''; +- return ctx.stylize(simple, 'string'); +- } +- if (isNumber(value)) { +- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, +- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . +- if (value === 0 && 1 / value < 0) +- return ctx.stylize('-0', 'number'); +- return ctx.stylize('' + value, 'number'); +- } +- if (isBoolean(value)) +- return ctx.stylize('' + value, 'boolean'); +- // For some reason typeof null is "object", so special case here. +- if (isNull(value)) +- return ctx.stylize('null', 'null'); +-} +- +- +-function formatError(value) { +- return '[' + Error.prototype.toString.call(value) + ']'; +-} +- +- +-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { +- var output = []; +- for (var i = 0, l = value.length; i < l; ++i) { +- if (hasOwnProperty(value, String(i))) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- String(i), true)); +- } else { +- output.push(''); +- } +- } +- keys.forEach(function(key) { +- if (!key.match(/^\d+$/)) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- key, true)); +- } +- }); +- return output; +-} +- +- +-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { +- var name, str, desc; +- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; +- if (desc.get) { +- if (desc.set) { +- str = ctx.stylize('[Getter/Setter]', 'special'); +- } else { +- str = ctx.stylize('[Getter]', 'special'); +- } +- } else { +- if (desc.set) { +- str = ctx.stylize('[Setter]', 'special'); +- } +- } +- if (!hasOwnProperty(visibleKeys, key)) { +- name = '[' + key + ']'; +- } +- if (!str) { +- if (ctx.seen.indexOf(desc.value) < 0) { +- if (isNull(recurseTimes)) { +- str = formatValue(ctx, desc.value, null); +- } else { +- str = formatValue(ctx, desc.value, recurseTimes - 1); +- } +- if (str.indexOf('\n') > -1) { +- if (array) { +- str = str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n').substr(2); +- } else { +- str = '\n' + str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n'); +- } +- } +- } else { +- str = ctx.stylize('[Circular]', 'special'); +- } +- } +- if (isUndefined(name)) { +- if (array && key.match(/^\d+$/)) { +- return str; +- } +- name = JSON.stringify('' + key); +- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { +- name = name.substr(1, name.length - 2); +- name = ctx.stylize(name, 'name'); +- } else { +- name = name.replace(/'/g, "\\'") +- .replace(/\\"/g, '"') +- .replace(/(^"|"$)/g, "'"); +- name = ctx.stylize(name, 'string'); +- } +- } +- +- return name + ': ' + str; +-} +- +- +-function reduceToSingleString(output, base, braces) { +- var numLinesEst = 0; +- var length = output.reduce(function(prev, cur) { +- numLinesEst++; +- if (cur.indexOf('\n') >= 0) numLinesEst++; +- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; +- }, 0); +- +- if (length > 60) { +- return braces[0] + +- (base === '' ? '' : base + '\n ') + +- ' ' + +- output.join(',\n ') + +- ' ' + +- braces[1]; +- } +- +- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +-} +- +- + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { +@@ -522,166 +98,10 @@ function isPrimitive(arg) { + exports.isPrimitive = isPrimitive; + + function isBuffer(arg) { +- return arg instanceof Buffer; ++ return Buffer.isBuffer(arg); + } + exports.isBuffer = isBuffer; + + function objectToString(o) { + return Object.prototype.toString.call(o); +-} +- +- +-function pad(n) { +- return n < 10 ? '0' + n.toString(10) : n.toString(10); +-} +- +- +-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', +- 'Oct', 'Nov', 'Dec']; +- +-// 26 Feb 16:19:34 +-function timestamp() { +- var d = new Date(); +- var time = [pad(d.getHours()), +- pad(d.getMinutes()), +- pad(d.getSeconds())].join(':'); +- return [d.getDate(), months[d.getMonth()], time].join(' '); +-} +- +- +-// log is just a thin wrapper to console.log that prepends a timestamp +-exports.log = function() { +- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +-}; +- +- +-/** +- * Inherit the prototype methods from one constructor into another. +- * +- * The Function.prototype.inherits from lang.js rewritten as a standalone +- * function (not on Function.prototype). NOTE: If this file is to be loaded +- * during bootstrapping this function needs to be rewritten using some native +- * functions as prototype setup using normal JavaScript does not work as +- * expected during bootstrapping (see mirror.js in r114903). +- * +- * @param {function} ctor Constructor function which needs to inherit the +- * prototype. +- * @param {function} superCtor Constructor function to inherit prototype from. +- */ +-exports.inherits = function(ctor, superCtor) { +- ctor.super_ = superCtor; +- ctor.prototype = Object.create(superCtor.prototype, { +- constructor: { +- value: ctor, +- enumerable: false, +- writable: true, +- configurable: true +- } +- }); +-}; +- +-exports._extend = function(origin, add) { +- // Don't do anything if add isn't an object +- if (!add || !isObject(add)) return origin; +- +- var keys = Object.keys(add); +- var i = keys.length; +- while (i--) { +- origin[keys[i]] = add[keys[i]]; +- } +- return origin; +-}; +- +-function hasOwnProperty(obj, prop) { +- return Object.prototype.hasOwnProperty.call(obj, prop); +-} +- +- +-// Deprecated old stuff. +- +-exports.p = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- console.error(exports.inspect(arguments[i])); +- } +-}, 'util.p: Use console.error() instead'); +- +- +-exports.exec = exports.deprecate(function() { +- return require('child_process').exec.apply(this, arguments); +-}, 'util.exec is now called `child_process.exec`.'); +- +- +-exports.print = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(String(arguments[i])); +- } +-}, 'util.print: Use console.log instead'); +- +- +-exports.puts = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(arguments[i] + '\n'); +- } +-}, 'util.puts: Use console.log instead'); +- +- +-exports.debug = exports.deprecate(function(x) { +- process.stderr.write('DEBUG: ' + x + '\n'); +-}, 'util.debug: Use console.error instead'); +- +- +-exports.error = exports.deprecate(function(x) { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stderr.write(arguments[i] + '\n'); +- } +-}, 'util.error: Use console.error instead'); +- +- +-exports.pump = exports.deprecate(function(readStream, writeStream, callback) { +- var callbackCalled = false; +- +- function call(a, b, c) { +- if (callback && !callbackCalled) { +- callback(a, b, c); +- callbackCalled = true; +- } +- } +- +- readStream.addListener('data', function(chunk) { +- if (writeStream.write(chunk) === false) readStream.pause(); +- }); +- +- writeStream.addListener('drain', function() { +- readStream.resume(); +- }); +- +- readStream.addListener('end', function() { +- writeStream.end(); +- }); +- +- readStream.addListener('close', function() { +- call(); +- }); +- +- readStream.addListener('error', function(err) { +- writeStream.end(); +- call(err); +- }); +- +- writeStream.addListener('error', function(err) { +- readStream.destroy(); +- call(err); +- }); +-}, 'util.pump(): Use readableStream.pipe() instead'); +- +- +-var uv; +-exports._errnoException = function(err, syscall) { +- if (isUndefined(uv)) uv = process.binding('uv'); +- var errname = uv.errname(err); +- var e = new Error(syscall + ' ' + errname); +- e.code = errname; +- e.errno = errname; +- e.syscall = syscall; +- return e; +-}; ++} \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/util.js b/node_modules/core-util-is/lib/util.js similarity index 88% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/util.js rename to node_modules/core-util-is/lib/util.js index 007fa10..ff4c851 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/util.js +++ b/node_modules/core-util-is/lib/util.js @@ -21,8 +21,12 @@ // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; } exports.isArray = isArray; @@ -62,7 +66,7 @@ function isUndefined(arg) { exports.isUndefined = isUndefined; function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; + return objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; @@ -72,12 +76,12 @@ function isObject(arg) { exports.isObject = isObject; function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; + return objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { - return isObject(e) && objectToString(e) === '[object Error]'; + return (objectToString(e) === '[object Error]' || e instanceof Error); } exports.isError = isError; @@ -96,10 +100,7 @@ function isPrimitive(arg) { } exports.isPrimitive = isPrimitive; -function isBuffer(arg) { - return arg instanceof Buffer; -} -exports.isBuffer = isBuffer; +exports.isBuffer = Buffer.isBuffer; function objectToString(o) { return Object.prototype.toString.call(o); diff --git a/node_modules/core-util-is/package.json b/node_modules/core-util-is/package.json new file mode 100644 index 0000000..b8b306b --- /dev/null +++ b/node_modules/core-util-is/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "core-util-is@~1.0.0", + "/home/mywebsite/node_modules/readable-stream" + ] + ], + "_from": "core-util-is@>=1.0.0 <1.1.0", + "_id": "core-util-is@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/core-util-is", + "_nodeVersion": "4.0.0", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "name": "core-util-is", + "raw": "core-util-is@~1.0.0", + "rawSpec": "~1.0.0", + "scope": null, + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "_shrinkwrap": null, + "_spec": "core-util-is@~1.0.0", + "_where": "/home/mywebsite/node_modules/readable-stream", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "dependencies": {}, + "description": "The `util.is*` functions introduced in Node v0.12.", + "devDependencies": { + "tap": "^2.3.0" + }, + "directories": {}, + "dist": { + "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", + "homepage": "https://github.com/isaacs/core-util-is#readme", + "keywords": [ + "isArray", + "isBuffer", + "isNumber", + "isRegExp", + "isString", + "isThat", + "isThis", + "polyfill", + "util" + ], + "license": "MIT", + "main": "lib/util.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "core-util-is", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is.git" + }, + "scripts": { + "test": "tap test.js" + }, + "version": "1.0.2" +} diff --git a/node_modules/core-util-is/test.js b/node_modules/core-util-is/test.js new file mode 100644 index 0000000..1a490c6 --- /dev/null +++ b/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/cycle/README.md b/node_modules/cycle/README.md new file mode 100644 index 0000000..de9a06d --- /dev/null +++ b/node_modules/cycle/README.md @@ -0,0 +1,49 @@ +Fork of https://github.com/douglascrockford/JSON-js, maintained in npm as `cycle`. + +# Contributors + +* Douglas Crockford +* Nuno Job +* Justin Warkentin + +# JSON in JavaScript + +Douglas Crockford +douglas@crockford.com + +2010-11-18 + + +JSON is a light-weight, language independent, data interchange format. +See http://www.JSON.org/ + +The files in this collection implement JSON encoders/decoders in JavaScript. + +JSON became a built-in feature of JavaScript when the ECMAScript Programming +Language Standard - Fifth Edition was adopted by the ECMA General Assembly +in December 2009. Most of the files in this collection are for applications +that are expected to run in obsolete web browsers. For most purposes, json2.js +is the best choice. + + +json2.js: This file creates a JSON property in the global object, if there +isn't already one, setting its value to an object containing a stringify +method and a parse method. The parse method uses the eval method to do the +parsing, guarding it with several regular expressions to defend against +accidental code execution hazards. On current browsers, this file does nothing, +prefering the built-in JSON object. + +json.js: This file does everything that json2.js does. It also adds a +toJSONString method and a parseJSON method to Object.prototype. Use of this +file is not recommended. + +json_parse.js: This file contains an alternative JSON parse function that +uses recursive descent instead of eval. + +json_parse_state.js: This files contains an alternative JSON parse function that +uses a state machine instead of eval. + +cycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle, +which make it possible to encode cyclical structures and dags in JSON, and to +then recover them. JSONPath is used to represent the links. +http://GOESSNER.net/articles/JsonPath/ diff --git a/node_modules/cycle/cycle.js b/node_modules/cycle/cycle.js new file mode 100644 index 0000000..2e776ad --- /dev/null +++ b/node_modules/cycle/cycle.js @@ -0,0 +1,170 @@ +/* + cycle.js + 2013-02-19 + + Public Domain. + + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html + + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. +*/ + +/*jslint evil: true, regexp: true */ + +/*members $ref, apply, call, decycle, hasOwnProperty, length, prototype, push, + retrocycle, stringify, test, toString +*/ + +var cycle = exports; + +cycle.decycle = function decycle(object) { + 'use strict'; + +// Make a deep copy of an object or array, assuring that there is at most +// one instance of each object or array in the resulting structure. The +// duplicate references (which might be forming cycles) are replaced with +// an object of the form +// {$ref: PATH} +// where the PATH is a JSONPath string that locates the first occurance. +// So, +// var a = []; +// a[0] = a; +// return JSON.stringify(JSON.decycle(a)); +// produces the string '[{"$ref":"$"}]'. + +// JSONPath is used to locate the unique object. $ indicates the top level of +// the object or array. [NUMBER] or [STRING] indicates a child member or +// property. + + var objects = [], // Keep a reference to each unique object or array + paths = []; // Keep the path to each unique object or array + + return (function derez(value, path) { + +// The derez recurses through the object, producing the deep copy. + + var i, // The loop counter + name, // Property name + nu; // The new object or array + +// typeof null === 'object', so go on if this value is really an object but not +// one of the weird builtin objects. + + if (typeof value === 'object' && value !== null && + !(value instanceof Boolean) && + !(value instanceof Date) && + !(value instanceof Number) && + !(value instanceof RegExp) && + !(value instanceof String)) { + +// If the value is an object or array, look to see if we have already +// encountered it. If so, return a $ref/path object. This is a hard way, +// linear search that will get slower as the number of unique objects grows. + + for (i = 0; i < objects.length; i += 1) { + if (objects[i] === value) { + return {$ref: paths[i]}; + } + } + +// Otherwise, accumulate the unique value and its path. + + objects.push(value); + paths.push(path); + +// If it is an array, replicate the array. + + if (Object.prototype.toString.apply(value) === '[object Array]') { + nu = []; + for (i = 0; i < value.length; i += 1) { + nu[i] = derez(value[i], path + '[' + i + ']'); + } + } else { + +// If it is an object, replicate the object. + + nu = {}; + for (name in value) { + if (Object.prototype.hasOwnProperty.call(value, name)) { + nu[name] = derez(value[name], + path + '[' + JSON.stringify(name) + ']'); + } + } + } + return nu; + } + return value; + }(object, '$')); +}; + + +cycle.retrocycle = function retrocycle($) { + 'use strict'; + +// Restore an object that was reduced by decycle. Members whose values are +// objects of the form +// {$ref: PATH} +// are replaced with references to the value found by the PATH. This will +// restore cycles. The object will be mutated. + +// The eval function is used to locate the values described by a PATH. The +// root object is kept in a $ variable. A regular expression is used to +// assure that the PATH is extremely well formed. The regexp contains nested +// * quantifiers. That has been known to have extremely bad performance +// problems on some browsers for very long strings. A PATH is expected to be +// reasonably short. A PATH is allowed to belong to a very restricted subset of +// Goessner's JSONPath. + +// So, +// var s = '[{"$ref":"$"}]'; +// return JSON.retrocycle(JSON.parse(s)); +// produces an array containing a single element which is the array itself. + + var px = + /^\$(?:\[(?:\d+|\"(?:[^\\\"\u0000-\u001f]|\\([\\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*\")\])*$/; + + (function rez(value) { + +// The rez function walks recursively through the object looking for $ref +// properties. When it finds one that has a value that is a path, then it +// replaces the $ref object with a reference to the value that is found by +// the path. + + var i, item, name, path; + + if (value && typeof value === 'object') { + if (Object.prototype.toString.apply(value) === '[object Array]') { + for (i = 0; i < value.length; i += 1) { + item = value[i]; + if (item && typeof item === 'object') { + path = item.$ref; + if (typeof path === 'string' && px.test(path)) { + value[i] = eval(path); + } else { + rez(item); + } + } + } + } else { + for (name in value) { + if (typeof value[name] === 'object') { + item = value[name]; + if (item) { + path = item.$ref; + if (typeof path === 'string' && px.test(path)) { + value[name] = eval(path); + } else { + rez(item); + } + } + } + } + } + } + }($)); + return $; +}; diff --git a/node_modules/cycle/package.json b/node_modules/cycle/package.json new file mode 100644 index 0000000..0760631 --- /dev/null +++ b/node_modules/cycle/package.json @@ -0,0 +1,73 @@ +{ + "_args": [ + [ + "cycle@1.0.x", + "/home/mywebsite/node_modules/winston" + ] + ], + "_from": "cycle@>=1.0.0 <1.1.0", + "_id": "cycle@1.0.3", + "_inCache": true, + "_installable": true, + "_location": "/cycle", + "_npmUser": { + "email": "nunojobpinto@gmail.com", + "name": "dscape" + }, + "_npmVersion": "1.2.32", + "_phantomChildren": {}, + "_requested": { + "name": "cycle", + "raw": "cycle@1.0.x", + "rawSpec": "1.0.x", + "scope": null, + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/winston" + ], + "_resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "_shasum": "21e80b2be8580f98b468f379430662b046c34ad2", + "_shrinkwrap": null, + "_spec": "cycle@1.0.x", + "_where": "/home/mywebsite/node_modules/winston", + "author": "", + "bugs": { + "url": "http://github.com/douglascrockford/JSON-js/issues" + }, + "dependencies": {}, + "description": "decycle your json", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "21e80b2be8580f98b468f379430662b046c34ad2", + "tarball": "http://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "https://github.com/douglascrockford/JSON-js", + "keywords": [ + "cycle", + "json", + "parse", + "stringify" + ], + "main": "./cycle.js", + "maintainers": [ + { + "name": "dscape", + "email": "nunojobpinto@gmail.com" + } + ], + "name": "cycle", + "optionalDependencies": {}, + "readme": "Fork of https://github.com/douglascrockford/JSON-js, maintained in npm as `cycle`.\n\n# Contributors\n\n* Douglas Crockford\n* Nuno Job\n* Justin Warkentin\n\n# JSON in JavaScript\n\nDouglas Crockford\ndouglas@crockford.com\n\n2010-11-18\n\n\nJSON is a light-weight, language independent, data interchange format.\nSee http://www.JSON.org/\n\nThe files in this collection implement JSON encoders/decoders in JavaScript.\n\nJSON became a built-in feature of JavaScript when the ECMAScript Programming\nLanguage Standard - Fifth Edition was adopted by the ECMA General Assembly\nin December 2009. Most of the files in this collection are for applications\nthat are expected to run in obsolete web browsers. For most purposes, json2.js\nis the best choice.\n\n\njson2.js: This file creates a JSON property in the global object, if there\nisn't already one, setting its value to an object containing a stringify\nmethod and a parse method. The parse method uses the eval method to do the\nparsing, guarding it with several regular expressions to defend against\naccidental code execution hazards. On current browsers, this file does nothing,\nprefering the built-in JSON object.\n\njson.js: This file does everything that json2.js does. It also adds a\ntoJSONString method and a parseJSON method to Object.prototype. Use of this\nfile is not recommended.\n\njson_parse.js: This file contains an alternative JSON parse function that\nuses recursive descent instead of eval.\n\njson_parse_state.js: This files contains an alternative JSON parse function that\nuses a state machine instead of eval.\n\ncycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,\nwhich make it possible to encode cyclical structures and dags in JSON, and to\nthen recover them. JSONPath is used to represent the links.\nhttp://GOESSNER.net/articles/JsonPath/\n", + "readmeFilename": "README.md", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/dscape/cycle.git" + }, + "version": "1.0.3" +} diff --git a/node_modules/deep-equal/.travis.yml b/node_modules/deep-equal/.travis.yml new file mode 100644 index 0000000..4af02b3 --- /dev/null +++ b/node_modules/deep-equal/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/node_modules/deep-equal/LICENSE b/node_modules/deep-equal/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/deep-equal/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/deep-equal/example/cmp.js b/node_modules/deep-equal/example/cmp.js new file mode 100644 index 0000000..67014b8 --- /dev/null +++ b/node_modules/deep-equal/example/cmp.js @@ -0,0 +1,11 @@ +var equal = require('../'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); diff --git a/node_modules/deep-equal/index.js b/node_modules/deep-equal/index.js new file mode 100644 index 0000000..0772f8c --- /dev/null +++ b/node_modules/deep-equal/index.js @@ -0,0 +1,94 @@ +var pSlice = Array.prototype.slice; +var objectKeys = require('./lib/keys.js'); +var isArguments = require('./lib/is_arguments.js'); + +var deepEqual = module.exports = function (actual, expected, opts) { + if (!opts) opts = {}; + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + + } else if (actual instanceof Date && expected instanceof Date) { + return actual.getTime() === expected.getTime(); + + // 7.3. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') { + return opts.strict ? actual === expected : actual == expected; + + // 7.4. For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected, opts); + } +} + +function isUndefinedOrNull(value) { + return value === null || value === undefined; +} + +function isBuffer (x) { + if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; + if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { + return false; + } + if (x.length > 0 && typeof x[0] !== 'number') return false; + return true; +} + +function objEquiv(a, b, opts) { + var i, key; + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) + return false; + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + //~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return deepEqual(a, b, opts); + } + if (isBuffer(a)) { + if (!isBuffer(b)) { + return false; + } + if (a.length !== b.length) return false; + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; + } + try { + var ka = objectKeys(a), + kb = objectKeys(b); + } catch (e) {//happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key], opts)) return false; + } + return typeof a === typeof b; +} diff --git a/node_modules/deep-equal/lib/is_arguments.js b/node_modules/deep-equal/lib/is_arguments.js new file mode 100644 index 0000000..1ff150f --- /dev/null +++ b/node_modules/deep-equal/lib/is_arguments.js @@ -0,0 +1,20 @@ +var supportsArgumentsClass = (function(){ + return Object.prototype.toString.call(arguments) +})() == '[object Arguments]'; + +exports = module.exports = supportsArgumentsClass ? supported : unsupported; + +exports.supported = supported; +function supported(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +}; + +exports.unsupported = unsupported; +function unsupported(object){ + return object && + typeof object == 'object' && + typeof object.length == 'number' && + Object.prototype.hasOwnProperty.call(object, 'callee') && + !Object.prototype.propertyIsEnumerable.call(object, 'callee') || + false; +}; diff --git a/node_modules/deep-equal/lib/keys.js b/node_modules/deep-equal/lib/keys.js new file mode 100644 index 0000000..13af263 --- /dev/null +++ b/node_modules/deep-equal/lib/keys.js @@ -0,0 +1,9 @@ +exports = module.exports = typeof Object.keys === 'function' + ? Object.keys : shim; + +exports.shim = shim; +function shim (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +} diff --git a/node_modules/deep-equal/package.json b/node_modules/deep-equal/package.json new file mode 100644 index 0000000..71f5deb --- /dev/null +++ b/node_modules/deep-equal/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + "deep-equal@*", + "/home/mywebsite/node_modules/utile" + ] + ], + "_from": "deep-equal@*", + "_id": "deep-equal@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/deep-equal", + "_nodeVersion": "2.4.0", + "_npmUser": { + "email": "substack@gmail.com", + "name": "substack" + }, + "_npmVersion": "3.2.2", + "_phantomChildren": {}, + "_requested": { + "name": "deep-equal", + "raw": "deep-equal@*", + "rawSpec": "*", + "scope": null, + "spec": "*", + "type": "range" + }, + "_requiredBy": [ + "/utile" + ], + "_resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "_shasum": "f5d260292b660e084eff4cdbc9f08ad3247448b5", + "_shrinkwrap": null, + "_spec": "deep-equal@*", + "_where": "/home/mywebsite/node_modules/utile", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-deep-equal/issues" + }, + "dependencies": {}, + "description": "node's assert.deepEqual algorithm", + "devDependencies": { + "tape": "^3.5.0" + }, + "directories": { + "example": "example", + "lib": ".", + "test": "test" + }, + "dist": { + "shasum": "f5d260292b660e084eff4cdbc9f08ad3247448b5", + "tarball": "http://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz" + }, + "gitHead": "59c511f5aeae19e3dd1de054077a789d7302be34", + "homepage": "https://github.com/substack/node-deep-equal#readme", + "keywords": [ + "compare", + "equal", + "equality" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "deep-equal", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/substack/node-deep-equal.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "browsers": { + "chrome": [ + 10, + 22 + ], + "ff": [ + 10, + 15, + 3.5 + ], + "ie": [ + 6, + 7, + 8, + 9 + ], + "opera": [ + 12 + ], + "safari": [ + 5.1 + ] + }, + "files": "test/*.js" + }, + "version": "1.0.1" +} diff --git a/node_modules/deep-equal/readme.markdown b/node_modules/deep-equal/readme.markdown new file mode 100644 index 0000000..f489c2a --- /dev/null +++ b/node_modules/deep-equal/readme.markdown @@ -0,0 +1,61 @@ +# deep-equal + +Node's `assert.deepEqual() algorithm` as a standalone module. + +This module is around [5 times faster](https://gist.github.com/2790507) +than wrapping `assert.deepEqual()` in a `try/catch`. + +[![browser support](https://ci.testling.com/substack/node-deep-equal.png)](https://ci.testling.com/substack/node-deep-equal) + +[![build status](https://secure.travis-ci.org/substack/node-deep-equal.png)](https://travis-ci.org/substack/node-deep-equal) + +# example + +``` js +var equal = require('deep-equal'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); +``` + +# methods + +``` js +var deepEqual = require('deep-equal') +``` + +## deepEqual(a, b, opts) + +Compare objects `a` and `b`, returning whether they are equal according to a +recursive equality algorithm. + +If `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes. +The default is to use coercive equality (`==`) because that's how +`assert.deepEqual()` works by default. + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install deep-equal +``` + +# test + +With [npm](http://npmjs.org) do: + +``` +npm test +``` + +# license + +MIT. Derived largely from node's assert module. diff --git a/node_modules/deep-equal/test/cmp.js b/node_modules/deep-equal/test/cmp.js new file mode 100644 index 0000000..2aab5f9 --- /dev/null +++ b/node_modules/deep-equal/test/cmp.js @@ -0,0 +1,95 @@ +var test = require('tape'); +var equal = require('../'); +var isArguments = require('../lib/is_arguments.js'); +var objectKeys = require('../lib/keys.js'); + +test('equal', function (t) { + t.ok(equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + )); + t.end(); +}); + +test('not equal', function (t) { + t.notOk(equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + )); + t.end(); +}); + +test('nested nulls', function (t) { + t.ok(equal([ null, null, null ], [ null, null, null ])); + t.end(); +}); + +test('strict equal', function (t) { + t.notOk(equal( + [ { a: 3 }, { b: 4 } ], + [ { a: '3' }, { b: '4' } ], + { strict: true } + )); + t.end(); +}); + +test('non-objects', function (t) { + t.ok(equal(3, 3)); + t.ok(equal('beep', 'beep')); + t.ok(equal('3', 3)); + t.notOk(equal('3', 3, { strict: true })); + t.notOk(equal('3', [3])); + t.end(); +}); + +test('arguments class', function (t) { + t.ok(equal( + (function(){return arguments})(1,2,3), + (function(){return arguments})(1,2,3), + "compares arguments" + )); + t.notOk(equal( + (function(){return arguments})(1,2,3), + [1,2,3], + "differenciates array and arguments" + )); + t.end(); +}); + +test('test the arguments shim', function (t) { + t.ok(isArguments.supported((function(){return arguments})())); + t.notOk(isArguments.supported([1,2,3])); + + t.ok(isArguments.unsupported((function(){return arguments})())); + t.notOk(isArguments.unsupported([1,2,3])); + + t.end(); +}); + +test('test the keys shim', function (t) { + t.deepEqual(objectKeys.shim({ a: 1, b : 2 }), [ 'a', 'b' ]); + t.end(); +}); + +test('dates', function (t) { + var d0 = new Date(1387585278000); + var d1 = new Date('Fri Dec 20 2013 16:21:18 GMT-0800 (PST)'); + t.ok(equal(d0, d1)); + t.end(); +}); + +test('buffers', function (t) { + t.ok(equal(Buffer('xyz'), Buffer('xyz'))); + t.end(); +}); + +test('booleans and arrays', function (t) { + t.notOk(equal(true, [])); + t.end(); +}) + +test('null == undefined', function (t) { + t.ok(equal(null, undefined)) + t.notOk(equal(null, undefined, { strict: true })) + t.end() +}) diff --git a/node_modules/event-stream/.gitmodules b/node_modules/event-stream/.gitmodules new file mode 100644 index 0000000..61594f1 --- /dev/null +++ b/node_modules/event-stream/.gitmodules @@ -0,0 +1,3 @@ +[submodule "test"] + path = test + url = git@github.com:dominictarr/event-stream_tests.git diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/.npmignore b/node_modules/event-stream/.npmignore similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/.npmignore rename to node_modules/event-stream/.npmignore diff --git a/node_modules/event-stream/LICENCE b/node_modules/event-stream/LICENCE new file mode 100644 index 0000000..171dd97 --- /dev/null +++ b/node_modules/event-stream/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/event-stream/examples/pretty.js b/node_modules/event-stream/examples/pretty.js new file mode 100644 index 0000000..af04340 --- /dev/null +++ b/node_modules/event-stream/examples/pretty.js @@ -0,0 +1,25 @@ + +var inspect = require('util').inspect + +if(!module.parent) { + var es = require('..') //load event-stream + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/node_modules/event-stream/index.js b/node_modules/event-stream/index.js new file mode 100644 index 0000000..89eff72 --- /dev/null +++ b/node_modules/event-stream/index.js @@ -0,0 +1,504 @@ +//filter will reemit the data if cb(err,pass) pass is truthy +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + + +var Stream = require('stream').Stream + , es = exports + +es.Stream = Stream //re-export Stream from core + +// writable stream, collects all events into an array +// and calls back when 'end' occurs +// mainly I'm using this to test the other functions + +es.writeArray = function (done) { + if ('function' !== typeof done) + throw new Error('function writeArray (done): done must be function') + + var a = new Stream () + , array = [] + a.write = function (l) { + array.push(l) + } + a.end = function () { + done(null, array) + } + a.writable = true + a.readable = false + return a +} + +//return a Stream that reads the properties of an object +//respecting pause() and resume() + +es.readArray = function (array) { + var stream = new Stream() + , i = 0 + , paused = false + + stream.readable = true + stream.writable = false + + if(!Array.isArray(array)) + throw new Error('event-stream.read expects an array') + + stream.resume = function () { + paused = false + var l = array.length + while(i < l && !paused) { + stream.emit('data', array[i++]) + } + if(i == l) + stream.emit('end'), stream.readible = false + } + process.nextTick(stream.resume) + stream.pause = function () { + paused = true + } + return stream +} + +// +// readable (asyncFunction) +// return a stream that calls an async function while the stream is not paused. +// +// the function must take: (count, callback) {... +// +es.readable = function (func, continueOnError) { + var stream = new Stream() + , i = 0 + , paused = false + , ended = false + , reading = false + + stream.readable = true + stream.writable = false + + if('function' !== typeof func) + throw new Error('event-stream.readable expects async function') + + stream.on('end', function () { ended = true }) + + function get (err, data) { + + if(err) { + stream.emit('error', err) + if(!continueOnError) stream.emit('end') + } else if (arguments.length > 1) + stream.emit('data', data) + + process.nextTick(function () { + if(ended || paused || reading) return + try { + reading = true + func.call(stream, i++, function () { + reading = false + get.apply(null, arguments) + }) + } catch (err) { + stream.emit('error', err) + } + }) + + } + stream.resume = function () { + paused = false + get() + } + process.nextTick(get) + stream.pause = function () { + paused = true + } + return stream +} + + +//create an event stream and apply function to each .write +//emitting each response as data +//unless it's an empty callback + +es.map = function (mapper) { + var stream = new Stream() + , inputs = 0 + , outputs = 0 + , ended = false + , paused = false + stream.writable = true + stream.readable = true + + stream.write = function () { + inputs ++ + var args = [].slice.call(arguments) + , r + , inNext = false + function next (err) { + inNext = true + outputs ++ + var args = [].slice.call(arguments) + if(err) { + args.unshift('error') + return inNext = false, stream.emit.apply(stream, args) + } + args.shift() //drop err + + if (args.length){ + args.unshift('data') + r = stream.emit.apply(stream, args) + } + if(inputs == outputs) { + if(paused) stream.emit('drain') //written all the incoming events + paused = false + if(ended) + stream.end() + } + inNext = false + } + args.push(next) + + try { + //catch sync errors and handle them like async errors + var written = mapper.apply(null,args) + if(written === false) paused = true + return written + } catch (err) { + //if the callback has been called syncronously, and the error + //has occured in an listener, throw it again. + if(inNext) + throw err + next(err) + return true + } + } + + stream.end = function () { + var args = [].slice.call(arguments) + //if end was called with args, write it, + ended = true //write will emit 'end' if ended is true + if(args.length) + return stream.write.apply(emitter, args) + else if (inputs == outputs) //wait for processing + stream.emit('end') + } + + return stream +} + +// +// map sync +// + +es.mapSync = function (sync) { + + return es.map(function () { + var args = [].slice.call(arguments) + , callback = args.pop() + + callback(null, sync.apply(null, args)) + }) +} + +// +// log just print out what is coming through the stream, for debugging +// + +es.log = function (name) { + return es.map(function () { + var args = [].slice.call(arguments) + var cb = args.pop() + if(name) args.slice().unshift(name) + console.error.apply(null, args) + args.unshift(null) + cb.apply(null, args) + }) +} + +// +// combine multiple streams together so that they act as a single stream +// + +es.pipe = es.connect = function () { + + var streams = [].slice.call(arguments) + , first = streams[0] + , last = streams[streams.length - 1] + , thepipe = es.duplex(first, last) + + if(streams.length == 1) + return streams[0] + else if (!streams.length) + throw new Error('connect called with empty args') + + //pipe all the streams together + + function recurse (streams) { + if(streams.length < 2) + return + streams[0].pipe(streams[1]) + recurse(streams.slice(1)) + } + + recurse(streams) + + function onerror () { + var args = [].slice.call(arguments) + args.unshift('error') + thepipe.emit.apply(thepipe, args) + } + + streams.forEach(function (stream) { + stream.on('error', onerror) + }) + + return thepipe +} + +// +// child -- pipe through a child process +// + +es.child = function (child) { + + return es.duplex(child.stdin, child.stdout) + +} + +// +// duplex -- pipe into one stream and out another +// + +es.duplex = function (writer, reader) { + var thepipe = new Stream() + + thepipe.__defineGetter__('writable', function () { return writer.writable }) + thepipe.__defineGetter__('readable', function () { return reader.readable }) + + ;['write', 'end', 'close'].forEach(function (func) { + thepipe[func] = function () { + return writer[func].apply(writer, arguments) + } + }) + + ;['resume', 'pause'].forEach(function (func) { + thepipe[func] = function () { + thepipe.emit(func) + if(reader[func]) + return reader[func].apply(reader, arguments) + else + reader.emit(func) + } + }) + + ;['data', 'close'].forEach(function (event) { + reader.on(event, function () { + var args = [].slice.call(arguments) + args.unshift(event) + thepipe.emit.apply(thepipe, args) + }) + }) + //only emit end once + var ended = false + reader.on('end', function () { + if(ended) return + ended = true + var args = [].slice.call(arguments) + args.unshift('end') + thepipe.emit.apply(thepipe, args) + }) + + return thepipe +} + +es.split = function (matcher) { + var stream = new Stream() + , soFar = '' + + if (!matcher) + matcher = '\n' + + stream.writable = true + stream.write = function (buffer) { + buffer = buffer.toString() + var l = buffer.length + , i = 0 + while (i < l) { + var c = buffer[i].toString() + soFar += c + if (c == matcher) { + var n = soFar; + soFar = '' + this.emit('data', n) + } + i++ + } + } + + stream.end = function () { + stream.emit('data', soFar) + stream.emit('end') + } + + return stream +} + +// +// gate +// +// while the gate is shut(), buffer incoming. +// +// if gate is open() stream like normal. +// +// currently, when opened, this will emit all data unless it is shut again +// if downstream pauses it will still write, i'd like to make it respect pause, +// but i'll need a test case first. + +es.gate = function (shut) { + + var stream = new Stream() + , queue = [] + , ended = false + + shut = (shut === false ? false : true) //default to shut +// console.error('SHUT?', shut) + + stream.writable = true + stream.readable = true + + stream.isShut = function () { return shut } + stream.shut = function () { shut = true } + stream.open = function () { shut = false; maybe() } + + function maybe () { +// console.error('maybe', queue.length, shut) + while(queue.length && !shut) { + var args = queue.shift() + args.unshift('data') + stream.emit.apply(stream, args) + } + stream.emit('drain') + if(ended && !shut) + stream.emit('end') + } + + stream.write = function () { + var args = [].slice.call(arguments) + + queue.push(args) +// console.error(queue) + if (shut) return false //pause up stream pipes + + maybe() + } + + stream.end = function () { + ended = true + if (!queue.length) + stream.emit('end') + } + + return stream +} + +// +// parse +// + +es.parse = function () { + return es.mapSync(function (e){ + return JSON.parse(e.toString()) + }) +} +// +// stringify +// + +es.stringify = function () { + return es.mapSync(function (e){ + return JSON.stringify(e) + '\n' + }) +} + +// +// helper to make your module into a unix pipe +// simply add +// +// if(!module.parent) +// require('event-stream').pipable(asyncFunctionOrStreams) +// +// asyncFunctionOrStreams may be one or more Streams or if it is a function, +// it will be automatically wrapped in es.map +// +// then pipe stuff into from the command line! +// +// curl registry.npmjs.org/event-stream | node hello-pipeable.js | grep whatever +// +// etc! +// +// also, start pipeable running as a server! +// +// > node hello-pipeable.js --port 44444 +// + +var setup = function (args) { + return args.map(function (f) { + var x = f() + if('function' === typeof x) + return es.map(x) + return x + }) +} + +es.pipeable = function () { + var opts = require('optimist').argv + var args = [].slice.call(arguments) + + if(opts.h || opts.help) { + var name = process.argv[1] + console.error([ + 'Usage:', + '', + 'node ' + name + ' [options]', + ' --port PORT turn this stream into a server', + ' --host HOST host of server (localhost is default)', + ' --protocol protocol http|net will require(protocol).createServer(...', + ' --help display this message', + '', + ' if --port is not set, will stream input from stdin', + '', + 'also, pipe from or to files:', + '', + ' node '+name+ ' < file #pipe from file into this stream', + ' node '+name+ ' < infile > outfile #pipe from file into this stream', + '', + ].join('\n')) + + } else if (!opts.port) { + var streams = setup(args) + streams.unshift(es.split()) + //streams.unshift() + streams.push(process.stdout) + var c = es.connect.apply(null, streams) + process.openStdin().pipe(c) //there + return c + + } else { + + opts.host = opts.host || 'localhost' + opts.protocol = opts.protocol || 'http' + + var protocol = require(opts.protocol) + + var server = protocol.createServer(function (instream, outstream) { + var streams = setup(args) + streams.unshift(es.split()) + streams.unshift(instream) + streams.push(outstream || instream) + es.pipe.apply(null, streams) + }) + + server.listen(opts.port, opts.host) + + console.error(process.argv[1] +' is listening for "' + opts.protocol + '" on ' + opts.host + ':' + opts.port) + } +} diff --git a/node_modules/event-stream/node_modules/optimist/.npmignore b/node_modules/event-stream/node_modules/optimist/.npmignore new file mode 100644 index 0000000..bfdb82c --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/.npmignore @@ -0,0 +1,4 @@ +lib-cov/* +*.swp +*.swo +node_modules diff --git a/node_modules/event-stream/node_modules/optimist/LICENSE b/node_modules/event-stream/node_modules/optimist/LICENSE new file mode 100644 index 0000000..432d1ae --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/event-stream/node_modules/optimist/README.markdown b/node_modules/event-stream/node_modules/optimist/README.markdown new file mode 100644 index 0000000..deb493c --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/README.markdown @@ -0,0 +1,474 @@ +optimist +======== + +Optimist is a node.js library for option parsing for people who hate option +parsing. More specifically, this module is for people who like all the --bells +and -whistlz of program usage but think optstrings are a waste of time. + +With optimist, option parsing doesn't have to suck (as much). + +examples +======== + +With Optimist, the options are just a hash! No optstrings attached. +------------------------------------------------------------------- + +xup.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist').argv; + +if (argv.rif - 5 * argv.xup > 7.138) { + console.log('Buy more riffiwobbles'); +} +else { + console.log('Sell the xupptumblers'); +} +```` + +*** + + $ ./xup.js --rif=55 --xup=9.52 + Buy more riffiwobbles + + $ ./xup.js --rif 12 --xup 8.1 + Sell the xupptumblers + +![This one's optimistic.](http://substack.net/images/optimistic.png) + +But wait! There's more! You can do short options: +------------------------------------------------- + +short.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); +```` + +*** + + $ ./short.js -x 10 -y 21 + (10,21) + +And booleans, both long and short (and grouped): +---------------------------------- + +bool.js: + +````javascript +#!/usr/bin/env node +var util = require('util'); +var argv = require('optimist').argv; + +if (argv.s) { + util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); +} +console.log( + (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') +); +```` + +*** + + $ ./bool.js -s + The cat says: meow + + $ ./bool.js -sp + The cat says: meow. + + $ ./bool.js -sp --fr + Le chat dit: miaou. + +And non-hypenated options too! Just use `argv._`! +------------------------------------------------- + +nonopt.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); +console.log(argv._); +```` + +*** + + $ ./nonopt.js -x 6.82 -y 3.35 moo + (6.82,3.35) + [ 'moo' ] + + $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz + (0.54,1.12) + [ 'foo', 'bar', 'baz' ] + +Plus, Optimist comes with .usage() and .demand()! +------------------------------------------------- + +divide.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .usage('Usage: $0 -x [num] -y [num]') + .demand(['x','y']) + .argv; + +console.log(argv.x / argv.y); +```` + +*** + + $ ./divide.js -x 55 -y 11 + 5 + + $ node ./divide.js -x 4.91 -z 2.51 + Usage: node ./divide.js -x [num] -y [num] + + Options: + -x [required] + -y [required] + + Missing required arguments: y + +EVEN MORE HOLY COW +------------------ + +default_singles.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .default('x', 10) + .default('y', 10) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_singles.js -x 5 + 15 + +default_hash.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .default({ x : 10, y : 10 }) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_hash.js -y 7 + 17 + +And if you really want to get all descriptive about it... +--------------------------------------------------------- + +boolean_single.js + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .boolean('v') + .argv +; +console.dir(argv); +```` + +*** + + $ ./boolean_single.js -v foo bar baz + true + [ 'bar', 'baz', 'foo' ] + +boolean_double.js + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .boolean(['x','y','z']) + .argv +; +console.dir([ argv.x, argv.y, argv.z ]); +console.dir(argv._); +```` + +*** + + $ ./boolean_double.js -x -z one two three + [ true, false, true ] + [ 'one', 'two', 'three' ] + +Optimist is here to help... +--------------------------- + +You can describe parameters for help messages and set aliases. Optimist figures +out how to format a handy help string automatically. + +line_count.js + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .demand('f') + .alias('f', 'file') + .describe('f', 'Load a file') + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines); +}); +```` + +*** + + $ node line_count.js + Count the lines in a file. + Usage: node ./line_count.js + + Options: + -f, --file Load a file [required] + + Missing required arguments: f + + $ node line_count.js --file line_count.js + 20 + + $ node line_count.js -f line_count.js + 20 + +methods +======= + +By itself, + +````javascript +require('optimist').argv +````` + +will use `process.argv` array to construct the `argv` object. + +You can pass in the `process.argv` yourself: + +````javascript +require('optimist')([ '-x', '1', '-y', '2' ]).argv +```` + +or use .parse() to do the same thing: + +````javascript +require('optimist').parse([ '-x', '1', '-y', '2' ]) +```` + +The rest of these methods below come in just before the terminating `.argv`. + +.alias(key, alias) +------------------ + +Set key names as equivalent such that updates to a key will propagate to aliases +and vice-versa. + +Optionally `.alias()` can take an object that maps keys to aliases. + +.default(key, value) +-------------------- + +Set `argv[key]` to `value` if no option was specified on `process.argv`. + +Optionally `.default()` can take an object that maps keys to default values. + +.demand(key) +------------ + +If `key` is a string, show the usage information and exit if `key` wasn't +specified in `process.argv`. + +If `key` is a number, demand at least as many non-option arguments, which show +up in `argv._`. + +If `key` is an Array, demand each element. + +.describe(key, desc) +-------------------- + +Describe a `key` for the generated usage information. + +Optionally `.describe()` can take an object that maps keys to descriptions. + +.options(key, opt) +------------------ + +Instead of chaining together `.alias().demand().default()`, you can specify +keys in `opt` for each of the chainable methods. + +For example: + +````javascript +var argv = require('optimist') + .options('f', { + alias : 'file', + default : '/etc/passwd', + }) + .argv +; +```` + +is the same as + +````javascript +var argv = require('optimist') + .alias('f', 'file') + .default('f', '/etc/passwd') + .argv +; +```` + +Optionally `.options()` can take an object that maps keys to `opt` parameters. + +.usage(message) +--------------- + +Set a usage message to show which commands to use. Inside `message`, the string +`$0` will get interpolated to the current script name or node command for the +present script similar to how `$0` works in bash or perl. + +.check(fn) +---------- + +Check that certain conditions are met in the provided arguments. + +If `fn` throws or returns `false`, show the thrown error, usage information, and +exit. + +.boolean(key) +------------- + +Interpret `key` as a boolean. If a non-flag option follows `key` in +`process.argv`, that string won't get set as the value of `key`. + +If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be +`false`. + +If `key` is an Array, interpret all the elements as booleans. + +.string(key) +------------ + +Tell the parser logic not to interpret `key` as a number or boolean. +This can be useful if you need to preserve leading zeros in an input. + +If `key` is an Array, interpret all the elements as strings. + +.wrap(columns) +-------------- + +Format usage output to wrap at `columns` many columns. + +.help() +------- + +Return the generated usage string. + +.showHelp(fn=console.error) +--------------------------- + +Print the usage data using `fn` for printing. + +.parse(args) +------------ + +Parse `args` instead of `process.argv`. Returns the `argv` object. + +.argv +----- + +Get the arguments as a plain old object. + +Arguments without a corresponding flag show up in the `argv._` array. + +The script name or node command is available at `argv.$0` similarly to how `$0` +works in bash or perl. + +parsing tricks +============== + +stop parsing +------------ + +Use `--` to stop parsing flags and stuff the remainder into `argv._`. + + $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 + { _: [ '-c', '3', '-d', '4' ], + '$0': 'node ./examples/reflect.js', + a: 1, + b: 2 } + +negate fields +------------- + +If you want to explicity set a field to false instead of just leaving it +undefined or to override a default you can do `--no-key`. + + $ node examples/reflect.js -a --no-b + { _: [], + '$0': 'node ./examples/reflect.js', + a: true, + b: false } + +numbers +------- + +Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to +one. This way you can just `net.createConnection(argv.port)` and you can add +numbers out of `argv` with `+` without having that mean concatenation, +which is super frustrating. + +duplicates +---------- + +If you specify a flag multiple times it will get turned into an array containing +all the values in order. + + $ node examples/reflect.js -x 5 -x 8 -x 0 + { _: [], + '$0': 'node ./examples/reflect.js', + x: [ 5, 8, 0 ] } + +installation +============ + +With [npm](http://github.com/isaacs/npm), just do: + npm install optimist + +or clone this project on github: + + git clone http://github.com/substack/node-optimist.git + +To run the tests with [expresso](http://github.com/visionmedia/expresso), +just do: + + expresso + +inspired By +=========== + +This module is loosely inspired by Perl's +[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/node_modules/event-stream/node_modules/optimist/examples/bool.js b/node_modules/event-stream/node_modules/optimist/examples/bool.js new file mode 100644 index 0000000..a998fb7 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/bool.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node +var util = require('util'); +var argv = require('optimist').argv; + +if (argv.s) { + util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); +} +console.log( + (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') +); diff --git a/node_modules/event-stream/node_modules/optimist/examples/boolean_double.js b/node_modules/event-stream/node_modules/optimist/examples/boolean_double.js new file mode 100644 index 0000000..a35a7e6 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/boolean_double.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +var argv = require('optimist') + .boolean(['x','y','z']) + .argv +; +console.dir([ argv.x, argv.y, argv.z ]); +console.dir(argv._); diff --git a/node_modules/event-stream/node_modules/optimist/examples/boolean_single.js b/node_modules/event-stream/node_modules/optimist/examples/boolean_single.js new file mode 100644 index 0000000..017bb68 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/boolean_single.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +var argv = require('optimist') + .boolean('v') + .argv +; +console.dir(argv.v); +console.dir(argv._); diff --git a/node_modules/event-stream/node_modules/optimist/examples/default_hash.js b/node_modules/event-stream/node_modules/optimist/examples/default_hash.js new file mode 100644 index 0000000..ade7768 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/default_hash.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var argv = require('optimist') + .default({ x : 10, y : 10 }) + .argv +; + +console.log(argv.x + argv.y); diff --git a/node_modules/event-stream/node_modules/optimist/examples/default_singles.js b/node_modules/event-stream/node_modules/optimist/examples/default_singles.js new file mode 100644 index 0000000..d9b1ff4 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/default_singles.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +var argv = require('optimist') + .default('x', 10) + .default('y', 10) + .argv +; +console.log(argv.x + argv.y); diff --git a/node_modules/event-stream/node_modules/optimist/examples/divide.js b/node_modules/event-stream/node_modules/optimist/examples/divide.js new file mode 100644 index 0000000..5e2ee82 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/divide.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var argv = require('optimist') + .usage('Usage: $0 -x [num] -y [num]') + .demand(['x','y']) + .argv; + +console.log(argv.x / argv.y); diff --git a/node_modules/event-stream/node_modules/optimist/examples/line_count.js b/node_modules/event-stream/node_modules/optimist/examples/line_count.js new file mode 100644 index 0000000..b5f95bf --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/line_count.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .demand('f') + .alias('f', 'file') + .describe('f', 'Load a file') + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines); +}); diff --git a/node_modules/event-stream/node_modules/optimist/examples/line_count_options.js b/node_modules/event-stream/node_modules/optimist/examples/line_count_options.js new file mode 100644 index 0000000..d9ac709 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/line_count_options.js @@ -0,0 +1,29 @@ +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .options({ + file : { + demand : true, + alias : 'f', + description : 'Load a file' + }, + base : { + alias : 'b', + description : 'Numeric base to use for output', + default : 10, + }, + }) + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines.toString(argv.base)); +}); diff --git a/node_modules/event-stream/node_modules/optimist/examples/line_count_wrap.js b/node_modules/event-stream/node_modules/optimist/examples/line_count_wrap.js new file mode 100644 index 0000000..4267511 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/line_count_wrap.js @@ -0,0 +1,29 @@ +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .wrap(80) + .demand('f') + .alias('f', [ 'file', 'filename' ]) + .describe('f', + "Load a file. It's pretty important." + + " Required even. So you'd better specify it." + ) + .alias('b', 'base') + .describe('b', 'Numeric base to display the number of lines in') + .default('b', 10) + .describe('x', 'Super-secret optional parameter which is secret') + .default('x', '') + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines.toString(argv.base)); +}); diff --git a/node_modules/event-stream/node_modules/optimist/examples/nonopt.js b/node_modules/event-stream/node_modules/optimist/examples/nonopt.js new file mode 100644 index 0000000..ee633ee --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/nonopt.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); +console.log(argv._); diff --git a/node_modules/event-stream/node_modules/optimist/examples/reflect.js b/node_modules/event-stream/node_modules/optimist/examples/reflect.js new file mode 100644 index 0000000..816b3e1 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/reflect.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.dir(require('optimist').argv); diff --git a/node_modules/event-stream/node_modules/optimist/examples/short.js b/node_modules/event-stream/node_modules/optimist/examples/short.js new file mode 100644 index 0000000..1db0ad0 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/short.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); diff --git a/node_modules/event-stream/node_modules/optimist/examples/string.js b/node_modules/event-stream/node_modules/optimist/examples/string.js new file mode 100644 index 0000000..a8e5aeb --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/string.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node +var argv = require('optimist') + .string('x', 'y') + .argv +; +console.dir([ argv.x, argv.y ]); + +/* Turns off numeric coercion: + ./node string.js -x 000123 -y 9876 + [ '000123', '9876' ] +*/ diff --git a/node_modules/event-stream/node_modules/optimist/examples/usage-options.js b/node_modules/event-stream/node_modules/optimist/examples/usage-options.js new file mode 100644 index 0000000..b999977 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/usage-options.js @@ -0,0 +1,19 @@ +var optimist = require('./../index'); + +var argv = optimist.usage('This is my awesome program', { + 'about': { + description: 'Provide some details about the author of this program', + required: true, + short: 'a', + }, + 'info': { + description: 'Provide some information about the node.js agains!!!!!!', + boolean: true, + short: 'i' + } +}).argv; + +optimist.showHelp(); + +console.log('\n\nInspecting options'); +console.dir(argv); \ No newline at end of file diff --git a/node_modules/event-stream/node_modules/optimist/examples/xup.js b/node_modules/event-stream/node_modules/optimist/examples/xup.js new file mode 100644 index 0000000..8f6ecd2 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/examples/xup.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node +var argv = require('optimist').argv; + +if (argv.rif - 5 * argv.xup > 7.138) { + console.log('Buy more riffiwobbles'); +} +else { + console.log('Sell the xupptumblers'); +} + diff --git a/node_modules/event-stream/node_modules/optimist/index.js b/node_modules/event-stream/node_modules/optimist/index.js new file mode 100644 index 0000000..070d642 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/index.js @@ -0,0 +1,457 @@ +var path = require('path'); +var wordwrap = require('wordwrap'); + +/* Hack an instance of Argv with process.argv into Argv + so people can do + require('optimist')(['--beeble=1','-z','zizzle']).argv + to parse a list of args and + require('optimist').argv + to get a parsed version of process.argv. +*/ + +var inst = Argv(process.argv.slice(2)); +Object.keys(inst).forEach(function (key) { + Argv[key] = typeof inst[key] == 'function' + ? inst[key].bind(inst) + : inst[key]; +}); + +var exports = module.exports = Argv; +function Argv (args, cwd) { + var self = {}; + if (!cwd) cwd = process.cwd(); + + self.$0 = process.argv + .slice(0,2) + .map(function (x) { + var b = rebase(cwd, x); + return x.match(/^\//) && b.length < x.length + ? b : x + }) + .join(' ') + ; + + if (process.argv[1] == process.env._) { + self.$0 = process.env._.replace( + path.dirname(process.execPath) + '/', '' + ); + } + + var flags = { bools : {}, strings : {} }; + + self.boolean = function (bools) { + if (!Array.isArray(bools)) { + bools = [].slice.call(arguments); + } + + bools.forEach(function (name) { + flags.bools[name] = true; + }); + + return self; + }; + + self.string = function (strings) { + if (!Array.isArray(strings)) { + strings = [].slice.call(arguments); + } + + strings.forEach(function (name) { + flags.strings[name] = true; + }); + + return self; + }; + + var aliases = {}; + self.alias = function (x, y) { + if (typeof x === 'object') { + Object.keys(x).forEach(function (key) { + self.alias(key, x[key]); + }); + } + else if (Array.isArray(y)) { + y.forEach(function (yy) { + self.alias(x, yy); + }); + } + else { + var zs = (aliases[x] || []).concat(aliases[y] || []).concat(x, y); + aliases[x] = zs.filter(function (z) { return z != x }); + aliases[y] = zs.filter(function (z) { return z != y }); + } + + return self; + }; + + var demanded = {}; + self.demand = function (keys) { + if (typeof keys == 'number') { + if (!demanded._) demanded._ = 0; + demanded._ += keys; + } + else if (Array.isArray(keys)) { + keys.forEach(function (key) { + self.demand(key); + }); + } + else { + demanded[keys] = true; + } + + return self; + }; + + var usage; + self.usage = function (msg, opts) { + if (!opts && typeof msg === 'object') { + opts = msg; + msg = null; + } + + usage = msg; + + if (opts) self.options(opts); + + return self; + }; + + function fail (msg) { + self.showHelp(); + if (msg) console.error(msg); + process.exit(1); + } + + var checks = []; + self.check = function (f) { + checks.push(f); + return self; + }; + + var defaults = {}; + self.default = function (key, value) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.default(k, key[k]); + }); + } + else { + defaults[key] = value; + } + + return self; + }; + + var descriptions = {}; + self.describe = function (key, desc) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.describe(k, key[k]); + }); + } + else { + descriptions[key] = desc; + } + return self; + }; + + self.parse = function (args) { + return Argv(args).argv; + }; + + self.option = self.options = function (key, opt) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.options(k, key[k]); + }); + } + else { + if (opt.alias) self.alias(key, opt.alias); + if (opt.demand) self.demand(key); + if (opt.default) self.default(key, opt.default); + + if (opt.boolean || opt.type === 'boolean') { + self.boolean(key); + } + if (opt.string || opt.type === 'string') { + self.string(key); + } + + var desc = opt.describe || opt.description || opt.desc; + if (desc) { + self.describe(key, desc); + } + } + + return self; + }; + + var wrap = null; + self.wrap = function (cols) { + wrap = cols; + return self; + }; + + self.showHelp = function (fn) { + if (!fn) fn = console.error; + fn(self.help()); + }; + + self.help = function () { + var keys = Object.keys( + Object.keys(descriptions) + .concat(Object.keys(demanded)) + .concat(Object.keys(defaults)) + .reduce(function (acc, key) { + if (key !== '_') acc[key] = true; + return acc; + }, {}) + ); + + var help = keys.length ? [ 'Options:' ] : []; + + if (usage) { + help.unshift(usage.replace(/\$0/g, self.$0), ''); + } + + var switches = keys.reduce(function (acc, key) { + acc[key] = [ key ].concat(aliases[key] || []) + .map(function (sw) { + return (sw.length > 1 ? '--' : '-') + sw + }) + .join(', ') + ; + return acc; + }, {}); + + var switchlen = longest(Object.keys(switches).map(function (s) { + return switches[s] || ''; + })); + + var desclen = longest(Object.keys(descriptions).map(function (d) { + return descriptions[d] || ''; + })); + + keys.forEach(function (key) { + var kswitch = switches[key]; + var desc = descriptions[key] || ''; + + if (wrap) { + desc = wordwrap(switchlen + 4, wrap)(desc) + .slice(switchlen + 4) + ; + } + + var spadding = new Array( + Math.max(switchlen - kswitch.length + 3, 0) + ).join(' '); + + var dpadding = new Array( + Math.max(desclen - desc.length + 1, 0) + ).join(' '); + + var type = null; + + if (flags.bools[key]) type = '[boolean]'; + if (flags.strings[key]) type = '[string]'; + + if (!wrap && dpadding.length > 0) { + desc += dpadding; + } + + var prelude = ' ' + kswitch + spadding; + var extra = [ + type, + demanded[key] + ? '[required]' + : null + , + defaults[key] !== undefined + ? '[default: ' + JSON.stringify(defaults[key]) + ']' + : null + , + ].filter(Boolean).join(' '); + + var body = [ desc, extra ].filter(Boolean).join(' '); + + if (wrap) { + var dlines = desc.split('\n'); + var dlen = dlines.slice(-1)[0].length + + (dlines.length === 1 ? prelude.length : 0) + + body = desc + (dlen + extra.length > wrap - 2 + ? '\n' + + new Array(wrap - extra.length + 1).join(' ') + + extra + : new Array(wrap - extra.length - dlen + 1).join(' ') + + extra + ); + } + + help.push(prelude + body); + }); + + help.push(''); + return help.join('\n'); + }; + + Object.defineProperty(self, 'argv', { + get : parseArgs, + enumerable : true, + }); + + function parseArgs () { + var argv = { _ : [], $0 : self.$0 }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] || false); + }); + + function setArg (key, val) { + var num = Number(val); + var value = typeof val !== 'string' || isNaN(num) ? val : num; + if (flags.strings[key]) value = val; + + if (key in argv && !flags.bools[key]) { + if (!Array.isArray(argv[key])) { + argv[key] = [ argv[key] ]; + } + argv[key].push(value); + } + else { + argv[key] = value; + } + + (aliases[key] || []).forEach(function (x) { + argv[x] = argv[key]; + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (arg === '--') { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + else if (arg.match(/^--.+=/)) { + var m = arg.match(/^--([^=]+)=(.*)/); + setArg(m[1], m[2]); + } + else if (arg.match(/^--no-.+/)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (arg.match(/^--.+/)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !next.match(/^-/) + && !flags.bools[key]) { + setArg(key, next); + i++; + } + else if (flags.bools[key] && /true|false/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, true); + } + } + else if (arg.match(/^-[^-]+/)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], true); + } + } + + if (!broken) { + var key = arg.slice(-1)[0]; + + if (args[i+1] && !args[i+1].match(/^-/) + && !flags.bools[key]) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && flags.bools[key] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, true); + } + } + } + else { + var n = Number(arg); + argv._.push(flags.strings['_'] || isNaN(n) ? arg : n); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!(key in argv)) { + argv[key] = defaults[key]; + } + }); + + if (demanded._ && argv._.length < demanded._) { + fail('Not enough non-option arguments: got ' + + argv._.length + ', need at least ' + demanded._ + ); + } + + var missing = []; + Object.keys(demanded).forEach(function (key) { + if (!argv[key]) missing.push(key); + }); + + if (missing.length) { + fail('Missing required arguments: ' + missing.join(', ')); + } + + checks.forEach(function (f) { + try { + if (f(argv) === false) { + fail('Argument check failed: ' + f.toString()); + } + } + catch (err) { + fail(err) + } + }); + + return argv; + } + + function longest (xs) { + return Math.max.apply( + null, + xs.map(function (x) { return x.length }) + ); + } + + return self; +}; + +// rebase an absolute path to a relative one with respect to a base directory +// exported for tests +exports.rebase = rebase; +function rebase (base, dir) { + var ds = path.normalize(dir).split('/').slice(1); + var bs = path.normalize(base).split('/').slice(1); + + for (var i = 0; ds[i] && ds[i] == bs[i]; i++); + ds.splice(0, i); bs.splice(0, i); + + var p = path.normalize( + bs.map(function () { return '..' }).concat(ds).join('/') + ).replace(/\/$/,'').replace(/^$/, '.'); + return p.match(/^[.\/]/) ? p : './' + p; +}; diff --git a/node_modules/event-stream/node_modules/optimist/package.json b/node_modules/event-stream/node_modules/optimist/package.json new file mode 100644 index 0000000..119a8d8 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "optimist@0.2", + "/home/mywebsite/node_modules/event-stream" + ] + ], + "_defaultsLoaded": true, + "_engineSupported": true, + "_from": "optimist@>=0.2.0 <0.3.0", + "_id": "optimist@0.2.8", + "_inCache": true, + "_installable": true, + "_location": "/event-stream/optimist", + "_nodeVersion": "v0.4.12", + "_npmUser": { + "email": "mail@substack.net", + "name": "substack" + }, + "_npmVersion": "1.0.99", + "_phantomChildren": {}, + "_requested": { + "name": "optimist", + "raw": "optimist@0.2", + "rawSpec": "0.2", + "scope": null, + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/event-stream" + ], + "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.2.8.tgz", + "_shasum": "e981ab7e268b457948593b55674c099a815cac31", + "_shrinkwrap": null, + "_spec": "optimist@0.2", + "_where": "/home/mywebsite/node_modules/event-stream", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-optimist/issues" + }, + "dependencies": { + "wordwrap": ">=0.0.1 <0.1.0" + }, + "description": "Light-weight option parsing with an argv hash. No optstrings attached.", + "devDependencies": { + "expresso": "0.7.x", + "hashish": "0.0.x" + }, + "directories": { + "example": "examples", + "lib": ".", + "test": "test" + }, + "dist": { + "shasum": "e981ab7e268b457948593b55674c099a815cac31", + "tarball": "http://registry.npmjs.org/optimist/-/optimist-0.2.8.tgz" + }, + "engine": { + "node": ">=0.4" + }, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/substack/node-optimist#readme", + "keywords": [ + "args", + "argument", + "cli", + "command", + "option", + "parser", + "parsing" + ], + "license": "MIT/X11", + "main": "./index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "optimist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-optimist.git" + }, + "scripts": { + "test": "expresso" + }, + "version": "0.2.8" +} diff --git a/node_modules/event-stream/node_modules/optimist/test/_.js b/node_modules/event-stream/node_modules/optimist/test/_.js new file mode 100644 index 0000000..3d6df6e --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/test/_.js @@ -0,0 +1,66 @@ +var spawn = require('child_process').spawn; +var assert = require('assert'); + +exports.dotSlashEmpty = function () { + testCmd('./bin.js', []); +}; + +exports.dotSlashArgs = function () { + testCmd('./bin.js', [ 'a', 'b', 'c' ]); +}; + +exports.nodeEmpty = function () { + testCmd('node bin.js', []); +}; + +exports.nodeArgs = function () { + testCmd('node bin.js', [ 'x', 'y', 'z' ]); +}; + +exports.whichNodeEmpty = function () { + var which = spawn('which', ['node']); + + which.stdout.on('data', function (buf) { + testCmd(buf.toString().trim() + ' bin.js', []); + }); + + which.stderr.on('data', function (err) { + assert.fail(err.toString()); + }); +}; + +exports.whichNodeArgs = function () { + var which = spawn('which', ['node']); + + which.stdout.on('data', function (buf) { + testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ]); + }); + + which.stderr.on('data', function (err) { + assert.fail(err.toString()); + }); +}; + +function testCmd (cmd, args) { + var to = setTimeout(function () { + assert.fail('Never got stdout data.') + }, 5000); + + var oldDir = process.cwd(); + process.chdir(__dirname + '/_'); + + var cmds = cmd.split(' '); + + var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String))); + process.chdir(oldDir); + + bin.stderr.on('data', function (err) { + assert.fail(err.toString()); + }); + + bin.stdout.on('data', function (buf) { + clearTimeout(to); + var _ = JSON.parse(buf.toString()); + assert.eql(_.map(String), args.map(String)); + }); +} diff --git a/node_modules/event-stream/node_modules/optimist/test/_/argv.js b/node_modules/event-stream/node_modules/optimist/test/_/argv.js new file mode 100644 index 0000000..3d09606 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/test/_/argv.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log(JSON.stringify(process.argv)); diff --git a/node_modules/event-stream/node_modules/optimist/test/_/bin.js b/node_modules/event-stream/node_modules/optimist/test/_/bin.js new file mode 100755 index 0000000..4a18d85 --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/test/_/bin.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node +var argv = require('../../index').argv +console.log(JSON.stringify(argv._)); diff --git a/node_modules/event-stream/node_modules/optimist/test/parse.js b/node_modules/event-stream/node_modules/optimist/test/parse.js new file mode 100644 index 0000000..eed467e --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/test/parse.js @@ -0,0 +1,304 @@ +var optimist = require('../index'); +var assert = require('assert'); +var path = require('path'); + +var localExpresso = path.normalize( + __dirname + '/../node_modules/.bin/expresso' +); + +var expresso = process.argv[1] === localExpresso + ? 'node ./node_modules/.bin/expresso' + : 'expresso' +; + +exports['short boolean'] = function () { + var parse = optimist.parse([ '-b' ]); + assert.eql(parse, { b : true, _ : [], $0 : expresso }); + assert.eql(typeof parse.b, 'boolean'); +}; + +exports['long boolean'] = function () { + assert.eql( + optimist.parse([ '--bool' ]), + { bool : true, _ : [], $0 : expresso } + ); +}; + +exports.bare = function () { + assert.eql( + optimist.parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ], $0 : expresso } + ); +}; + +exports['short group'] = function () { + assert.eql( + optimist.parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [], $0 : expresso } + ); +}; + +exports['short group next'] = function () { + assert.eql( + optimist.parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [], $0 : expresso } + ); +}; + +exports['short capture'] = function () { + assert.eql( + optimist.parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [], $0 : expresso } + ); +}; + +exports['short captures'] = function () { + assert.eql( + optimist.parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [], $0 : expresso } + ); +}; + +exports['long capture sp'] = function () { + assert.eql( + optimist.parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [], $0 : expresso } + ); +}; + +exports['long capture eq'] = function () { + assert.eql( + optimist.parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [], $0 : expresso } + ); +}; + +exports['long captures sp'] = function () { + assert.eql( + optimist.parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [], $0 : expresso } + ); +}; + +exports['long captures eq'] = function () { + assert.eql( + optimist.parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [], $0 : expresso } + ); +}; + +exports['mixed short bool and capture'] = function () { + assert.eql( + optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ], $0 : expresso, + } + ); +}; + +exports['short and long'] = function () { + assert.eql( + optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ], $0 : expresso, + } + ); +}; + +exports.no = function () { + assert.eql( + optimist.parse([ '--no-moo' ]), + { moo : false, _ : [], $0 : expresso } + ); +}; + +exports.multi = function () { + assert.eql( + optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [], $0 : expresso } + ); +}; + +exports.comprehensive = function () { + assert.eql( + optimist.parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ], + $0 : expresso + } + ); +}; + +exports.nums = function () { + var argv = optimist.parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789', + ]); + assert.eql(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ], + $0 : expresso + }); + assert.eql(typeof argv.x, 'number'); + assert.eql(typeof argv.y, 'number'); + assert.eql(typeof argv.z, 'number'); + assert.eql(typeof argv.w, 'string'); + assert.eql(typeof argv.hex, 'number'); + assert.eql(typeof argv._[0], 'number'); +}; + +exports['flag boolean'] = function () { + var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv; + assert.eql(parse, { t : true, _ : [ 'moo' ], $0 : expresso }); + assert.eql(typeof parse.t, 'boolean'); +}; + +exports['flag boolean value'] = function () { + var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true']) + .boolean(['t', 'verbose']).default('verbose', true).argv; + + assert.eql(parse, { + verbose: false, + t: true, + _: ['moo'], + $0 : expresso + }); + + assert.eql(typeof parse.verbose, 'boolean'); + assert.eql(typeof parse.t, 'boolean'); +}; + +exports['flag boolean default false'] = function () { + var parse = optimist(['moo']) + .boolean(['t', 'verbose']) + .default('verbose', false) + .default('t', false).argv; + + assert.eql(parse, { + verbose: false, + t: false, + _: ['moo'], + $0 : expresso + }); + + assert.eql(typeof parse.verbose, 'boolean'); + assert.eql(typeof parse.t, 'boolean'); + +}; + +exports['boolean groups'] = function () { + var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ]) + .boolean(['x','y','z']).argv; + + assert.eql(parse, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ], + $0 : expresso + }); + + assert.eql(typeof parse.x, 'boolean'); + assert.eql(typeof parse.y, 'boolean'); + assert.eql(typeof parse.z, 'boolean'); +}; + +exports.strings = function () { + var s = optimist([ '-s', '0001234' ]).string('s').argv.s; + assert.eql(s, '0001234'); + assert.eql(typeof s, 'string'); + + var x = optimist([ '-x', '56' ]).string('x').argv.x; + assert.eql(x, '56'); + assert.eql(typeof x, 'string'); +}; + +exports.stringArgs = function () { + var s = optimist([ ' ', ' ' ]).string('_').argv._; + assert.eql(s.length, 2); + assert.eql(typeof s[0], 'string'); + assert.eql(s[0], ' '); + assert.eql(typeof s[1], 'string'); + assert.eql(s[1], ' '); +}; + +exports.slashBreak = function () { + assert.eql( + optimist.parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [], $0 : expresso } + ); + assert.eql( + optimist.parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : expresso } + ); +}; + +exports.alias = function () { + var argv = optimist([ '-f', '11', '--zoom', '55' ]) + .alias('z', 'zoom') + .argv + ; + assert.equal(argv.zoom, 55); + assert.equal(argv.z, argv.zoom); + assert.equal(argv.f, 11); +}; + +exports.multiAlias = function () { + var argv = optimist([ '-f', '11', '--zoom', '55' ]) + .alias('z', [ 'zm', 'zoom' ]) + .argv + ; + assert.equal(argv.zoom, 55); + assert.equal(argv.z, argv.zoom); + assert.equal(argv.z, argv.zm); + assert.equal(argv.f, 11); +}; + +exports['boolean default true'] = function () { + var argv = optimist.options({ + sometrue: { + boolean: true, + default: true + } + }).argv; + + assert.equal(argv.sometrue, true); +}; + +exports['boolean default false'] = function () { + var argv = optimist.options({ + somefalse: { + boolean: true, + default: false + } + }).argv; + + assert.equal(argv.somefalse, false); +}; diff --git a/node_modules/event-stream/node_modules/optimist/test/usage.js b/node_modules/event-stream/node_modules/optimist/test/usage.js new file mode 100644 index 0000000..6593b9b --- /dev/null +++ b/node_modules/event-stream/node_modules/optimist/test/usage.js @@ -0,0 +1,256 @@ +var Hash = require('hashish'); +var optimist = require('../index'); +var assert = require('assert'); + +exports.usageFail = function () { + var r = checkUsage(function () { + return optimist('-x 10 -z 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .demand(['x','y']) + .argv; + }); + assert.deepEqual( + r.result, + { x : 10, z : 20, _ : [], $0 : './usage' } + ); + + assert.deepEqual( + r.errors.join('\n').split(/\n+/), + [ + 'Usage: ./usage -x NUM -y NUM', + 'Options:', + ' -x [required]', + ' -y [required]', + 'Missing required arguments: y', + ] + ); + assert.deepEqual(r.logs, []); + assert.ok(r.exit); +}; + +exports.usagePass = function () { + var r = checkUsage(function () { + return optimist('-x 10 -y 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .demand(['x','y']) + .argv; + }); + assert.deepEqual(r, { + result : { x : 10, y : 20, _ : [], $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); +}; + +exports.checkPass = function () { + var r = checkUsage(function () { + return optimist('-x 10 -y 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(function (argv) { + if (!('x' in argv)) throw 'You forgot about -x'; + if (!('y' in argv)) throw 'You forgot about -y'; + }) + .argv; + }); + assert.deepEqual(r, { + result : { x : 10, y : 20, _ : [], $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); +}; + +exports.checkFail = function () { + var r = checkUsage(function () { + return optimist('-x 10 -z 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(function (argv) { + if (!('x' in argv)) throw 'You forgot about -x'; + if (!('y' in argv)) throw 'You forgot about -y'; + }) + .argv; + }); + + assert.deepEqual( + r.result, + { x : 10, z : 20, _ : [], $0 : './usage' } + ); + + assert.deepEqual( + r.errors.join('\n').split(/\n+/), + [ + 'Usage: ./usage -x NUM -y NUM', + 'You forgot about -y' + ] + ); + + assert.deepEqual(r.logs, []); + assert.ok(r.exit); +}; + +exports.checkCondPass = function () { + function checker (argv) { + return 'x' in argv && 'y' in argv; + } + + var r = checkUsage(function () { + return optimist('-x 10 -y 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(checker) + .argv; + }); + assert.deepEqual(r, { + result : { x : 10, y : 20, _ : [], $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); +}; + +exports.checkCondFail = function () { + function checker (argv) { + return 'x' in argv && 'y' in argv; + } + + var r = checkUsage(function () { + return optimist('-x 10 -z 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(checker) + .argv; + }); + + assert.deepEqual( + r.result, + { x : 10, z : 20, _ : [], $0 : './usage' } + ); + + assert.deepEqual( + r.errors.join('\n').split(/\n+/).join('\n'), + 'Usage: ./usage -x NUM -y NUM\n' + + 'Argument check failed: ' + checker.toString() + ); + + assert.deepEqual(r.logs, []); + assert.ok(r.exit); +}; + +exports.countPass = function () { + var r = checkUsage(function () { + return optimist('1 2 3 --moo'.split(' ')) + .usage('Usage: $0 [x] [y] [z] {OPTIONS}') + .demand(3) + .argv; + }); + assert.deepEqual(r, { + result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); +}; + +exports.countFail = function () { + var r = checkUsage(function () { + return optimist('1 2 --moo'.split(' ')) + .usage('Usage: $0 [x] [y] [z] {OPTIONS}') + .demand(3) + .argv; + }); + assert.deepEqual( + r.result, + { _ : [ '1', '2' ], moo : true, $0 : './usage' } + ); + + assert.deepEqual( + r.errors.join('\n').split(/\n+/), + [ + 'Usage: ./usage [x] [y] [z] {OPTIONS}', + 'Not enough non-option arguments: got 2, need at least 3', + ] + ); + + assert.deepEqual(r.logs, []); + assert.ok(r.exit); +}; + +exports.defaultSingles = function () { + var r = checkUsage(function () { + return optimist('--foo 50 --baz 70 --powsy'.split(' ')) + .default('foo', 5) + .default('bar', 6) + .default('baz', 7) + .argv + ; + }); + assert.eql(r.result, { + foo : '50', + bar : 6, + baz : '70', + powsy : true, + _ : [], + $0 : './usage', + }); +}; + +exports.defaultHash = function () { + var r = checkUsage(function () { + return optimist('--foo 50 --baz 70'.split(' ')) + .default({ foo : 10, bar : 20, quux : 30 }) + .argv + ; + }); + assert.eql(r.result, { + foo : '50', + bar : 20, + baz : 70, + quux : 30, + _ : [], + $0 : './usage', + }); +}; + +exports.rebase = function () { + assert.equal( + optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'), + './foo/bar/baz' + ); + assert.equal( + optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'), + '../../..' + ); + assert.equal( + optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'), + '../pow/zoom.txt' + ); +}; + +function checkUsage (f) { + var _process = process; + process = Hash.copy(process); + var exit = false; + process.exit = function () { exit = true }; + process.env = Hash.merge(process.env, { _ : 'node' }); + process.argv = [ './usage' ]; + + var errors = []; + var logs = []; + + console._error = console.error; + console.error = function (msg) { errors.push(msg) }; + console._log = console.log; + console.log = function (msg) { logs.push(msg) }; + + var result = f(); + + process = _process; + console.error = console._error; + console.log = console._log; + + return { + errors : errors, + logs : logs, + exit : exit, + result : result, + }; +}; diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/dist/.keep b/node_modules/event-stream/out similarity index 100% rename from node_modules/jade/node_modules/constantinople/node_modules/acorn/dist/.keep rename to node_modules/event-stream/out diff --git a/node_modules/event-stream/package.json b/node_modules/event-stream/package.json new file mode 100644 index 0000000..80b97e6 --- /dev/null +++ b/node_modules/event-stream/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + "event-stream@~0.5", + "/home/mywebsite/node_modules/ps-tree" + ] + ], + "_defaultsLoaded": true, + "_engineSupported": true, + "_from": "event-stream@>=0.5.0 <0.6.0", + "_id": "event-stream@0.5.3", + "_inCache": true, + "_installable": true, + "_location": "/event-stream", + "_nodeVersion": "v0.4.10", + "_npmUser": { + "email": "dominic.tarr@gmail.com", + "name": "dominictarr" + }, + "_npmVersion": "1.0.101", + "_phantomChildren": { + "wordwrap": "0.0.3" + }, + "_requested": { + "name": "event-stream", + "raw": "event-stream@~0.5", + "rawSpec": "~0.5", + "scope": null, + "spec": ">=0.5.0 <0.6.0", + "type": "range" + }, + "_requiredBy": [ + "/ps-tree" + ], + "_resolved": "https://registry.npmjs.org/event-stream/-/event-stream-0.5.3.tgz", + "_shasum": "b77b9309f7107addfeab63f0c0eafd8db0bd8c1c", + "_shrinkwrap": null, + "_spec": "event-stream@~0.5", + "_where": "/home/mywebsite/node_modules/ps-tree", + "author": { + "email": "dominic.tarr@gmail.com", + "name": "Dominic Tarr", + "url": "http://bit.ly/dominictarr" + }, + "bugs": { + "url": "https://github.com/dominictarr/event-stream/issues" + }, + "dependencies": { + "optimist": "0.2" + }, + "description": "construct pipes of streams of events", + "devDependencies": { + "asynct": "1", + "d-utils": "2.3", + "it-is": "1" + }, + "directories": {}, + "dist": { + "shasum": "b77b9309f7107addfeab63f0c0eafd8db0bd8c1c", + "tarball": "http://registry.npmjs.org/event-stream/-/event-stream-0.5.3.tgz" + }, + "engines": { + "node": "*" + }, + "homepage": "http://github.com/dominictarr/event-stream", + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "name": "event-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/event-stream.git" + }, + "version": "0.5.3" +} diff --git a/node_modules/event-stream/readme.markdown b/node_modules/event-stream/readme.markdown new file mode 100644 index 0000000..f442488 --- /dev/null +++ b/node_modules/event-stream/readme.markdown @@ -0,0 +1,358 @@ +# EventStream + +[Streams](http://nodejs.org/api/streams.html "Stream") are nodes best and most misunderstood idea, and +_EventStream_ is a toolkit to make creating and working with streams easy. + +Normally, streams are only used of IO, +but in event stream we send all kinds of objects down the pipe. +If your application's input and output are streams, +shouldn't the throughput be a stream too? + +The *EventStream* functions resemble the array functions, +because Streams are like Arrays, but laid out in time, rather than in memory. + +All the `event-stream` functions return instances of `Stream`. + +Stream API docs: [nodejs.org/api/streams](http://nodejs.org/api/streams.html "Stream") + +NOTE: I shall use the term "through stream" to refer to a stream that is writable and readable. + +###[simple example](https://github.com/dominictarr/event-stream/blob/master/examples/pretty.js): + +``` js + +//pretty.js + +if(!module.parent) { + var es = require('event-stream') + es.connect( //connect streams together with `pipe` + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + callback(null + , inspect(JSON.parse(data))) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } +``` +run it ... + +``` bash +curl -sS registry.npmjs.org/event-stream | node pretty.js +``` + +[test are in event-stream_tests](https://github.com/dominictarr/event-stream_tests) + +[node Stream documentation](http://nodejs.org/api/streams.html) + +##map (asyncFunction) + +Create a through stream from an asyncronous function. + +``` js +var es = require('event-stream') + +es.map(function (data, callback) { + //transform data + // ... + callback(null, data) +}) + +``` + +Each map MUST call the callback. It may callback with data, with an error or with no arguments, + + * `callback()` drop this data. + this makes the map work like `filter`, + note:`callback(null,null)` is not the same, and will emit `null` + + * `callback(null, newData)` turn data into newData + + * `callback(error)` emit an error for this item. + +>Note: if a callback is not called, `map` will think that it is still being processed, +>every call must be answered or the stream will not know when to end. +> +>Also, if the callback is called more than once, every call but the first will be ignored. + +##readable (asyncFunction) + +create a readable stream (that respects pause) from an async function. +while the stream is not paused, +the function will be polled with `(count, callback)`, +and `this` will be the readable stream. + +``` js + +es.readable(function (count, callback) { + if(streamHasEnded) + return this.emit('end') + + //... + + this.emit('data', data) //use this way to emit multiple chunks per call. + + callback() // you MUST always call the callback eventually. + // the function will not be called again until you do this. +}) +``` +you can also pass the data and the error to the callback. +you may only call the callback once. +calling the same callback more than once will have no effect. + +##readArray (array) + +Create a readable stream from an Array. + +Just emit each item as a data event, respecting `pause` and `resume`. + +``` js + var es = require('event-stream') + , reader = es.readArray([1,2,3]) + + reader.pipe(...) +``` + +## writeArray (callback) + +create a writeable stream from a callback, +all `data` events are stored in an array, which is passed to the callback when the stream ends. + +``` js + var es = require('event-stream') + , reader = es.readArray([1, 2, 3]) + , writer = es.writeArray(function (err, array){ + //array deepEqual [1, 2, 3] + }) + + reader.pipe(writer) +``` + +## split () + +Break up a stream and reassemble it so that each line is a chunk. + +Example, read every line in a file ... + +``` js + es.connect( + fs.createReadStream(file, {flags: 'r'}), + es.split(), + es.map(function (line, cb) { + //do something with the line + cb(null, line) + }) + ) + +``` + +## connect (stream1,...,streamN) + +Connect multiple Streams together into one stream. +`connect` will return a Stream. This stream will write to the first stream, +and will emit data from the last stream. + +Listening for 'error' will recieve errors from all streams inside the pipe. + +``` js + + es.connect( //connect streams together with `pipe` + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + callback(null + , inspect(JSON.parse(data))) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) +``` + +## gate (isShut=true) + +If the gate is `shut`, buffer the stream. +All calls to write will return false (pause upstream), +and end will not be sent downstream. + +If the gate is open, let the stream through. + +Named `shut` instead of close, because close is already kinda meaningful with streams. + +Gate is useful for holding off processing a stream until some resource (i.e. a database, or network connection) is ready. + +``` js + + var gate = es.gate() + + gate.open() //allow the gate to stream + + gate.close() //buffer the stream, also do not allow 'end' + +``` + +## duplex + +Takes a writable stream and a readable stream and makes them appear as a readable writable stream. + +It is assumed that the two streams are connected to each other in some way. + +(This is used by `connect` and `child`.) + +``` js + var grep = cp.exec('grep Stream') + + es.duplex(grep.stdin, grep.stdout) +``` + +## child (child_process) + +Create a through stream from a child process ... + +``` js + var cp = require('child_process') + + es.child(cp.exec('grep Stream')) // a through stream + +``` + +## pipeable (streamCreatorFunction,...) + +The arguments to pipable must be functions that return +instances of Stream or async functions. +(If a function is returned, it will be turned into a Stream +with `es.map`.) + +Here is the first example rewritten to use `pipeable`. + +``` js +//examples/pretty_pipeable.js +var inspect = require('util').inspect + +if(!module.parent) + require('event-stream').pipeable(function () { + return function (data, callback) { + try { + data = JSON.parse(data) + } catch (err) {} //pass non JSON straight through! + callback(null, inspect(data)) + } + }) + }) +``` + +``` bash + +curl -sS registry.npmjs.org/event-stream | node pipeable_pretty.js + +## or, turn the pipe into a server! + +node pipeable_pretty.js --port 4646 + +curl -sS registry.npmjs.org/event-stream | curl -sSNT- localhost:4646 + +``` +## compatible modules: + + * https://github.com/felixge/node-growing-file + stream changes on file that is being appended to. just like `tail -f` + + * https://github.com/isaacs/sax-js + streaming xml parser + + * https://github.com/mikeal/request + make http requests. request() returns a through stream! + + * https://github.com/TooTallNate/node-throttle + throttle streams on a bytes per second basis (binary streams only, of course) + + * https://github.com/mikeal/morestreams + buffer input until connected to a pipe. + + * https://github.com/TooTallNate/node-gzip-stack + compress and decompress raw streams. + + * https://github.com/Floby/node-json-streams + parse json without buffering it first + + * https://github.com/floby/node-tokenizer + tokenizer + + * https://github.com/floby/node-parser + general mechanisms for custom parsers + + * https://github.com/dodo/node-bufferstream + buffer streams until you say (written in C) + + * https://github.com/tim-smart/node-filter + `filter` pipeable string.replace + + +## almost compatible modules: (1+ these issues) + + * https://github.com/fictorial/json-line-protocol/issues/1 + line reader + + * https://github.com/jahewson/node-byline/issues/1 + line reader + + * https://github.com/AvianFlu/ntwitter/issues/3 + twitter client + + * https://github.com/swdyh/node-chirpstream/issues/1 + twitter client + + * https://github.com/polotek/evented-twitter/issues/22 + twitter client + + + \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/test/.npmignore b/node_modules/event-stream/test/.npmignore similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/test/.npmignore rename to node_modules/event-stream/test/.npmignore diff --git a/node_modules/event-stream/test/package.json b/node_modules/event-stream/test/package.json new file mode 100644 index 0000000..8a8df99 --- /dev/null +++ b/node_modules/event-stream/test/package.json @@ -0,0 +1,11 @@ +{ "name": "event-stream_tests/" +, "version": "0.0.0" +, "description": "" +, "homepage": "http://github.com/dominictarr/event-stream_tests/" +, "repository": + { "type": "git" + , "url": "https://github.com/dominictarr/event-stream_tests/.git" } +, "dependencies": {} +, "devDependencies": {} +, "author": "Dominic Tarr (http://bit.ly/dominictarr)" +, "scripts": { "test": "meta-test test/*.js" } } \ No newline at end of file diff --git a/node_modules/event-stream/test/pipe.async.js b/node_modules/event-stream/test/pipe.async.js new file mode 100644 index 0000000..fb59c14 --- /dev/null +++ b/node_modules/event-stream/test/pipe.async.js @@ -0,0 +1,54 @@ +var es = require('event-stream') + , it = require('it-is').style('colour') + , d = require('d-utils') + +function makeExamplePipe() { + + return es.pipe( + es.map(function (data, callback) { + callback(null, data * 2) + }), + es.map(function (data, callback) { + d.delay(callback)(null, data) + }), + es.map(function (data, callback) { + callback(null, data + 2) + })) +} + +exports['simple pipe'] = function (test) { + + var pipe = makeExamplePipe() + + pipe.on('data', function (data) { + it(data).equal(18) + test.done() + }) + + pipe.write(8) + +} + +exports['read array then map'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + , first = es.readArray(readThis) + , read = [] + , pipe = + es.pipe( + first, + es.map(function (data, callback) { + callback(null, {data: data}) + }), + es.map(function (data, callback) { + callback(null, {data: data}) + }), + es.writeArray(function (err, array) { + it(array).deepEqual(d.map(readThis, function (data) { + return {data: {data: data}} + })) + test.done() + }) + ) + +} \ No newline at end of file diff --git a/node_modules/event-stream/test/readArray.asynct.js b/node_modules/event-stream/test/readArray.asynct.js new file mode 100644 index 0000000..a690194 --- /dev/null +++ b/node_modules/event-stream/test/readArray.asynct.js @@ -0,0 +1,88 @@ + +var es = require('event-stream') + , it = require('it-is').style('colour') + , d = require('d-utils') + +function readStream(stream, pauseAt, done) { + if(!done) done = pauseAt, pauseAt = -1 + var array = [] + stream.on('data', function (data) { + array.push(data) + if(!--pauseAt ) + stream.pause(), done(null, array) + }) + stream.on('error', done) + stream.on('end', function (data) { + done(null, array) + }) + +} + +exports ['read an array'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + + var reader = es.readArray(readThis) + + var writer = es.writeArray(function (err, array){ + if(err) throw err //unpossible + it(array).deepEqual(readThis) + test.done() + }) + + reader.pipe(writer) +} + +exports ['read an array and pause it.'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + + var reader = es.readArray(readThis) + + readStream(reader, 10, function (err, data) { + if(err) throw err + it(data).deepEqual([3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) + readStream(reader, 10, function (err, data) { + it(data).deepEqual([33, 36, 39, 42, 45, 48, 51, 54, 57, 60]) + test.done() + }) + reader.resume() + }) + +} + +exports ['reader is readable, but not writeable'] = function (test) { + var reader = es.readArray([1]) + it(reader).has({ + readable: true, + writable: false + }) + + test.done() +} + + +exports ['read one item per tick'] = function (test) { + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + var drains = 0 + var reader = es.readArray(readThis) + var tickMapper = es.map(function (data,callback) { + process.nextTick(function () { + callback(null, data) + }) + //since tickMapper is returning false + //pipe should pause the writer until a drain occurs + return false + }) + reader.pipe(tickMapper) + readStream(tickMapper, function (err, array) { + it(array).deepEqual(readThis) + it(array.length).deepEqual(readThis.length) + it(drains).equal(readThis.length) + test.done() + }) + tickMapper.on('drain', function () { + drains ++ + }) + +} \ No newline at end of file diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/src/loose/acorn_loose.js b/node_modules/event-stream/test/readme.markdown similarity index 100% rename from node_modules/jade/node_modules/constantinople/node_modules/acorn/src/loose/acorn_loose.js rename to node_modules/event-stream/test/readme.markdown diff --git a/node_modules/event-stream/test/simple-map.asynct.js b/node_modules/event-stream/test/simple-map.asynct.js new file mode 100644 index 0000000..9d9f293 --- /dev/null +++ b/node_modules/event-stream/test/simple-map.asynct.js @@ -0,0 +1,96 @@ + +var es = require('event-stream') + , it = require('it-is') + +function writeArray(array, stream) { + + array.forEach( function (j) { + stream.write(j) + }) + stream.end() + +} + +function readStream(stream, done) { + + var array = [] + stream.on('data', function (data) { + array.push(data) + }) + stream.on('error', done) + stream.on('end', function (data) { + done(null, array) + }) + +} + +exports ['simple map applied to a stream'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + + var doubler = es.map(function (data, cb) { + cb(null, data * 2) + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 2 + })) + test.done() + }) + + writeArray(input, doubler) + +} + +exports['pipe two maps together'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + function dd (data, cb) { + cb(null, data * 2) + } + var doubler1 = es.map(dd), doubler2 = es.map(dd) + + doubler1.pipe(doubler2) + + readStream(doubler2, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 4 + })) + test.done() + }) + + writeArray(input, doubler1) + +} + +//next: +// +// test pause, resume and drian. +// + +// then make a pipe joiner: +// +// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) +// +// will return a single stream that write goes to the first + +exports ['map will not call end until the callback'] = function (test) { + + var ticker = es.map(function (data, cb) { + process.nextTick(function () { + cb(null, data * 2) + }) + }) + ticker.write('x') + + ticker.end() + ticker.end() + ticker.end() + + ticker.on('end', function () { + test.done() + }) +} \ No newline at end of file diff --git a/node_modules/event-stream/test/split.asynct.js b/node_modules/event-stream/test/split.asynct.js new file mode 100644 index 0000000..a517399 --- /dev/null +++ b/node_modules/event-stream/test/split.asynct.js @@ -0,0 +1,34 @@ +var es = require('event-stream') + , it = require('it-is').style('colour') + , d = require('d-utils') + , join = require('path').join + , fs = require('fs') + , Stream = require('stream').Stream + +exports ['pipeable'] = function (test) { + var readme = join(__dirname, 'readme.markdown') + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = es.split() + , actual = [] + , ended = false + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + it(actual[k]).like(v) + }) + + test.done() + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} diff --git a/node_modules/event-stream/test/writeArray.asynct.js b/node_modules/event-stream/test/writeArray.asynct.js new file mode 100644 index 0000000..f9108cc --- /dev/null +++ b/node_modules/event-stream/test/writeArray.asynct.js @@ -0,0 +1,31 @@ + +var es = require('event-stream') + , it = require('it-is').style('colour') + , d = require('d-utils') + + +exports ['write an array'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + + var writer = es.writeArray(function (err, array){ + if(err) throw err //unpossible + it(array).deepEqual(readThis) + test.done() + }) + + d.each(readThis, writer.write.bind(writer)) + writer.end() + +} + + +exports ['writer is writable, but not readable'] = function (test) { + var reader = es.writeArray(function () {}) + it(reader).has({ + readable: false, + writable: true + }) + + test.done() +} \ No newline at end of file diff --git a/node_modules/eventemitter2/README.md b/node_modules/eventemitter2/README.md new file mode 100644 index 0000000..e1f6edd --- /dev/null +++ b/node_modules/eventemitter2/README.md @@ -0,0 +1,248 @@ +[![build-status](https://www.codeship.io/projects/3ad58940-4c7d-0131-15d5-5a8cd3f550f8/status)](https://www.codeship.io/projects/11259) + +# SYNOPSIS + +EventEmitter2 is an implementation of the EventEmitter found in Node.js + +# DESCRIPTION + +### FEATURES + - Namespaces/Wildcards. + - Times To Listen (TTL), extends the `once` concept with `many`. + - Browser environment compatibility. + - Demonstrates good performance in benchmarks + +``` +EventEmitterHeatUp x 3,728,965 ops/sec \302\2610.68% (60 runs sampled) +EventEmitter x 2,822,904 ops/sec \302\2610.74% (63 runs sampled) +EventEmitter2 x 7,251,227 ops/sec \302\2610.55% (58 runs sampled) +EventEmitter2 (wild) x 3,220,268 ops/sec \302\2610.44% (65 runs sampled) +Fastest is EventEmitter2 +``` + +### Differences (Non breaking, compatible with existing EventEmitter) + + - The constructor takes a configuration object. + +```javascript + var EventEmitter2 = require('eventemitter2').EventEmitter2; + var server = new EventEmitter2({ + + // + // use wildcards. + // + wildcard: true, + + // + // the delimiter used to segment namespaces, defaults to `.`. + // + delimiter: '::', + + // + // if you want to emit the newListener event set to true. + // + newListener: false, + + // + // max listeners that can be assigned to an event, default 10. + // + maxListeners: 20 + }); +``` + + - Getting the actual event that fired. + +```javascript + server.on('foo.*', function(value1, value2) { + console.log(this.event, value1, value2); + }); +``` + + - Fire an event N times and then remove it, an extension of the `once` concept. + +```javascript + server.many('foo', 4, function() { + console.log('hello'); + }); +``` + + - Pass in a namespaced event as an array rather than a delimited string. + +```javascript + server.many(['foo', 'bar', 'bazz'], function() { + console.log('hello'); + }); +``` + + +# API + +When an `EventEmitter` instance experiences an error, the typical action is +to emit an `error` event. Error events are treated as a special case. +If there is no listener for it, then the default action is to print a stack +trace and exit the program. + +All EventEmitters emit the event `newListener` when new listeners are +added. + + +**Namespaces** with **Wildcards** +To use namespaces/wildcards, pass the `wildcard` option into the EventEmitter +constructor. When namespaces/wildcards are enabled, events can either be +strings (`foo.bar`) separated by a delimiter or arrays (`['foo', 'bar']`). The +delimiter is also configurable as a constructor option. + +An event name passed to any event emitter method can contain a wild card (the +`*` character). If the event name is a string, a wildcard may appear as `foo.*`. +If the event name is an array, the wildcard may appear as `['foo', '*']`. + +If either of the above described events were passed to the `on` method, +subsequent emits such as the following would be observed... + +```javascript + emitter.emit('foo.bazz'); + emitter.emit(['foo', 'bar']); +``` + + +### emitter.addListener(event, listener) +### emitter.on(event, listener) + +Adds a listener to the end of the listeners array for the specified event. + +```javascript + server.on('data', function(value1, value2, value3, ...) { + console.log('The event was raised!'); + }); +``` + +```javascript + server.on('data', function(value) { + console.log('The event was raised!'); + }); +``` + +### emitter.onAny(listener) + +Adds a listener that will be fired when any event is emitted. + +```javascript + server.onAny(function(value) { + console.log('All events trigger this.'); + }); +``` + +### emitter.offAny(listener) + +Removes the listener that will be fired when any event is emitted. + +```javascript + server.offAny(function(value) { + console.log('The event was raised!'); + }); +``` + +#### emitter.once(event, listener) + +Adds a **one time** listener for the event. The listener is invoked +only the first time the event is fired, after which it is removed. + +```javascript + server.once('get', function (value) { + console.log('Ah, we have our first value!'); + }); +``` + +### emitter.many(event, timesToListen, listener) + +Adds a listener that will execute **n times** for the event before being +removed. The listener is invoked only the first **n times** the event is +fired, after which it is removed. + +```javascript + server.many('get', 4, function (value) { + console.log('This event will be listened to exactly four times.'); + }); +``` + + +### emitter.removeListener(event, listener) +### emitter.off(event, listener) + +Remove a listener from the listener array for the specified event. +**Caution**: changes array indices in the listener array behind the listener. + +```javascript + var callback = function(value) { + console.log('someone connected!'); + }; + server.on('get', callback); + // ... + server.removeListener('get', callback); +``` + + +### emitter.removeAllListeners([event]) + +Removes all listeners, or those of the specified event. + + +### emitter.setMaxListeners(n) + +By default EventEmitters will print a warning if more than 10 listeners +are added to it. This is a useful default which helps finding memory leaks. +Obviously not all Emitters should be limited to 10. This function allows +that to be increased. Set to zero for unlimited. + + +### emitter.listeners(event) + +Returns an array of listeners for the specified event. This array can be +manipulated, e.g. to remove listeners. + +```javascript + server.on('get', function(value) { + console.log('someone connected!'); + }); + console.log(server.listeners('get')); // [ [Function] ] +``` + +### emitter.listenersAny() + +Returns an array of listeners that are listening for any event that is +specified. This array can be manipulated, e.g. to remove listeners. + +```javascript + server.onAny(function(value) { + console.log('someone connected!'); + }); + console.log(server.listenersAny()[0]); // [ [Function] ] +``` + +### emitter.emit(event, [arg1], [arg2], [...]) + +Execute each of the listeners that may be listening for the specified event +name in order with the list of arguments. + +# LICENSE + +(The MIT License) + +Copyright (c) 2011 hij1nx + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the 'Software'), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/eventemitter2/index.js b/node_modules/eventemitter2/index.js new file mode 100644 index 0000000..6f583b5 --- /dev/null +++ b/node_modules/eventemitter2/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/eventemitter2'); diff --git a/node_modules/eventemitter2/lib/eventemitter2.js b/node_modules/eventemitter2/lib/eventemitter2.js new file mode 100644 index 0000000..bde69e8 --- /dev/null +++ b/node_modules/eventemitter2/lib/eventemitter2.js @@ -0,0 +1,573 @@ +/*! + * EventEmitter2 + * https://github.com/hij1nx/EventEmitter2 + * + * Copyright (c) 2013 hij1nx + * Licensed under the MIT license. + */ +;!function(undefined) { + + var isArray = Array.isArray ? Array.isArray : function _isArray(obj) { + return Object.prototype.toString.call(obj) === "[object Array]"; + }; + var defaultMaxListeners = 10; + + function init() { + this._events = {}; + if (this._conf) { + configure.call(this, this._conf); + } + } + + function configure(conf) { + if (conf) { + + this._conf = conf; + + conf.delimiter && (this.delimiter = conf.delimiter); + conf.maxListeners && (this._events.maxListeners = conf.maxListeners); + conf.wildcard && (this.wildcard = conf.wildcard); + conf.newListener && (this.newListener = conf.newListener); + + if (this.wildcard) { + this.listenerTree = {}; + } + } + } + + function EventEmitter(conf) { + this._events = {}; + this.newListener = false; + configure.call(this, conf); + } + + // + // Attention, function return type now is array, always ! + // It has zero elements if no any matches found and one or more + // elements (leafs) if there are matches + // + function searchListenerTree(handlers, type, tree, i) { + if (!tree) { + return []; + } + var listeners=[], leaf, len, branch, xTree, xxTree, isolatedBranch, endReached, + typeLength = type.length, currentType = type[i], nextType = type[i+1]; + if (i === typeLength && tree._listeners) { + // + // If at the end of the event(s) list and the tree has listeners + // invoke those listeners. + // + if (typeof tree._listeners === 'function') { + handlers && handlers.push(tree._listeners); + return [tree]; + } else { + for (leaf = 0, len = tree._listeners.length; leaf < len; leaf++) { + handlers && handlers.push(tree._listeners[leaf]); + } + return [tree]; + } + } + + if ((currentType === '*' || currentType === '**') || tree[currentType]) { + // + // If the event emitted is '*' at this part + // or there is a concrete match at this patch + // + if (currentType === '*') { + for (branch in tree) { + if (branch !== '_listeners' && tree.hasOwnProperty(branch)) { + listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i+1)); + } + } + return listeners; + } else if(currentType === '**') { + endReached = (i+1 === typeLength || (i+2 === typeLength && nextType === '*')); + if(endReached && tree._listeners) { + // The next element has a _listeners, add it to the handlers. + listeners = listeners.concat(searchListenerTree(handlers, type, tree, typeLength)); + } + + for (branch in tree) { + if (branch !== '_listeners' && tree.hasOwnProperty(branch)) { + if(branch === '*' || branch === '**') { + if(tree[branch]._listeners && !endReached) { + listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], typeLength)); + } + listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i)); + } else if(branch === nextType) { + listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i+2)); + } else { + // No match on this one, shift into the tree but not in the type array. + listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i)); + } + } + } + return listeners; + } + + listeners = listeners.concat(searchListenerTree(handlers, type, tree[currentType], i+1)); + } + + xTree = tree['*']; + if (xTree) { + // + // If the listener tree will allow any match for this part, + // then recursively explore all branches of the tree + // + searchListenerTree(handlers, type, xTree, i+1); + } + + xxTree = tree['**']; + if(xxTree) { + if(i < typeLength) { + if(xxTree._listeners) { + // If we have a listener on a '**', it will catch all, so add its handler. + searchListenerTree(handlers, type, xxTree, typeLength); + } + + // Build arrays of matching next branches and others. + for(branch in xxTree) { + if(branch !== '_listeners' && xxTree.hasOwnProperty(branch)) { + if(branch === nextType) { + // We know the next element will match, so jump twice. + searchListenerTree(handlers, type, xxTree[branch], i+2); + } else if(branch === currentType) { + // Current node matches, move into the tree. + searchListenerTree(handlers, type, xxTree[branch], i+1); + } else { + isolatedBranch = {}; + isolatedBranch[branch] = xxTree[branch]; + searchListenerTree(handlers, type, { '**': isolatedBranch }, i+1); + } + } + } + } else if(xxTree._listeners) { + // We have reached the end and still on a '**' + searchListenerTree(handlers, type, xxTree, typeLength); + } else if(xxTree['*'] && xxTree['*']._listeners) { + searchListenerTree(handlers, type, xxTree['*'], typeLength); + } + } + + return listeners; + } + + function growListenerTree(type, listener) { + + type = typeof type === 'string' ? type.split(this.delimiter) : type.slice(); + + // + // Looks for two consecutive '**', if so, don't add the event at all. + // + for(var i = 0, len = type.length; i+1 < len; i++) { + if(type[i] === '**' && type[i+1] === '**') { + return; + } + } + + var tree = this.listenerTree; + var name = type.shift(); + + while (name) { + + if (!tree[name]) { + tree[name] = {}; + } + + tree = tree[name]; + + if (type.length === 0) { + + if (!tree._listeners) { + tree._listeners = listener; + } + else if(typeof tree._listeners === 'function') { + tree._listeners = [tree._listeners, listener]; + } + else if (isArray(tree._listeners)) { + + tree._listeners.push(listener); + + if (!tree._listeners.warned) { + + var m = defaultMaxListeners; + + if (typeof this._events.maxListeners !== 'undefined') { + m = this._events.maxListeners; + } + + if (m > 0 && tree._listeners.length > m) { + + tree._listeners.warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + tree._listeners.length); + console.trace(); + } + } + } + return true; + } + name = type.shift(); + } + return true; + } + + // By default EventEmitters will print a warning if more than + // 10 listeners are added to it. This is a useful default which + // helps finding memory leaks. + // + // Obviously not all Emitters should be limited to 10. This function allows + // that to be increased. Set to zero for unlimited. + + EventEmitter.prototype.delimiter = '.'; + + EventEmitter.prototype.setMaxListeners = function(n) { + this._events || init.call(this); + this._events.maxListeners = n; + if (!this._conf) this._conf = {}; + this._conf.maxListeners = n; + }; + + EventEmitter.prototype.event = ''; + + EventEmitter.prototype.once = function(event, fn) { + this.many(event, 1, fn); + return this; + }; + + EventEmitter.prototype.many = function(event, ttl, fn) { + var self = this; + + if (typeof fn !== 'function') { + throw new Error('many only accepts instances of Function'); + } + + function listener() { + if (--ttl === 0) { + self.off(event, listener); + } + fn.apply(this, arguments); + } + + listener._origin = fn; + + this.on(event, listener); + + return self; + }; + + EventEmitter.prototype.emit = function() { + + this._events || init.call(this); + + var type = arguments[0]; + + if (type === 'newListener' && !this.newListener) { + if (!this._events.newListener) { return false; } + } + + // Loop through the *_all* functions and invoke them. + if (this._all) { + var l = arguments.length; + var args = new Array(l - 1); + for (var i = 1; i < l; i++) args[i - 1] = arguments[i]; + for (i = 0, l = this._all.length; i < l; i++) { + this.event = type; + this._all[i].apply(this, args); + } + } + + // If there is no 'error' event listener then throw. + if (type === 'error') { + + if (!this._all && + !this._events.error && + !(this.wildcard && this.listenerTree.error)) { + + if (arguments[1] instanceof Error) { + throw arguments[1]; // Unhandled 'error' event + } else { + throw new Error("Uncaught, unspecified 'error' event."); + } + return false; + } + } + + var handler; + + if(this.wildcard) { + handler = []; + var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice(); + searchListenerTree.call(this, handler, ns, this.listenerTree, 0); + } + else { + handler = this._events[type]; + } + + if (typeof handler === 'function') { + this.event = type; + if (arguments.length === 1) { + handler.call(this); + } + else if (arguments.length > 1) + switch (arguments.length) { + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower + default: + var l = arguments.length; + var args = new Array(l - 1); + for (var i = 1; i < l; i++) args[i - 1] = arguments[i]; + handler.apply(this, args); + } + return true; + } + else if (handler) { + var l = arguments.length; + var args = new Array(l - 1); + for (var i = 1; i < l; i++) args[i - 1] = arguments[i]; + + var listeners = handler.slice(); + for (var i = 0, l = listeners.length; i < l; i++) { + this.event = type; + listeners[i].apply(this, args); + } + return (listeners.length > 0) || !!this._all; + } + else { + return !!this._all; + } + + }; + + EventEmitter.prototype.on = function(type, listener) { + + if (typeof type === 'function') { + this.onAny(type); + return this; + } + + if (typeof listener !== 'function') { + throw new Error('on only accepts instances of Function'); + } + this._events || init.call(this); + + // To avoid recursion in the case that type == "newListeners"! Before + // adding it to the listeners, first emit "newListeners". + this.emit('newListener', type, listener); + + if(this.wildcard) { + growListenerTree.call(this, type, listener); + return this; + } + + if (!this._events[type]) { + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + } + else if(typeof this._events[type] === 'function') { + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + } + else if (isArray(this._events[type])) { + // If we've already got an array, just append. + this._events[type].push(listener); + + // Check for listener leak + if (!this._events[type].warned) { + + var m = defaultMaxListeners; + + if (typeof this._events.maxListeners !== 'undefined') { + m = this._events.maxListeners; + } + + if (m > 0 && this._events[type].length > m) { + + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + console.trace(); + } + } + } + return this; + }; + + EventEmitter.prototype.onAny = function(fn) { + + if (typeof fn !== 'function') { + throw new Error('onAny only accepts instances of Function'); + } + + if(!this._all) { + this._all = []; + } + + // Add the function to the event listener collection. + this._all.push(fn); + return this; + }; + + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + EventEmitter.prototype.off = function(type, listener) { + if (typeof listener !== 'function') { + throw new Error('removeListener only takes instances of Function'); + } + + var handlers,leafs=[]; + + if(this.wildcard) { + var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice(); + leafs = searchListenerTree.call(this, null, ns, this.listenerTree, 0); + } + else { + // does not use listeners(), so no side effect of creating _events[type] + if (!this._events[type]) return this; + handlers = this._events[type]; + leafs.push({_listeners:handlers}); + } + + for (var iLeaf=0; iLeaf 0) { + fns = this._all; + for(i = 0, l = fns.length; i < l; i++) { + if(fn === fns[i]) { + fns.splice(i, 1); + return this; + } + } + } else { + this._all = []; + } + return this; + }; + + EventEmitter.prototype.removeListener = EventEmitter.prototype.off; + + EventEmitter.prototype.removeAllListeners = function(type) { + if (arguments.length === 0) { + !this._events || init.call(this); + return this; + } + + if(this.wildcard) { + var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice(); + var leafs = searchListenerTree.call(this, null, ns, this.listenerTree, 0); + + for (var iLeaf=0; iLeaf= 0.2.2", + "nodeunit": "*" + }, + "directories": {}, + "dist": { + "shasum": "8f61b75cde012b2e9eb284d4545583b5643b61ab", + "tarball": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz" + }, + "files": [ + "index.js", + "lib/eventemitter2.js" + ], + "homepage": "https://github.com/hij1nx/EventEmitter2", + "keywords": [ + "emitter", + "event", + "eventemitter", + "events" + ], + "license": "MIT", + "main": "./lib/eventemitter2.js", + "maintainers": [ + { + "name": "hij1nx", + "email": "hij1nx@me.com" + }, + { + "name": "jasonkuhrt", + "email": "jasonkuhrt@me.com" + } + ], + "name": "eventemitter2", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/hij1nx/EventEmitter2.git" + }, + "scripts": { + "benchmark": "node test/perf/benchmark.js", + "test": "nodeunit test/simple/ && nodeunit test/wildcardEvents/" + }, + "version": "0.4.14" +} diff --git a/node_modules/expand-brackets/LICENSE b/node_modules/expand-brackets/LICENSE new file mode 100644 index 0000000..33754da --- /dev/null +++ b/node_modules/expand-brackets/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/expand-brackets/README.md b/node_modules/expand-brackets/README.md new file mode 100644 index 0000000..7eea4ed --- /dev/null +++ b/node_modules/expand-brackets/README.md @@ -0,0 +1,89 @@ +# expand-brackets [![NPM version](https://badge.fury.io/js/expand-brackets.svg)](http://badge.fury.io/js/expand-brackets) + +> Expand POSIX bracket expressions (character classes) in glob patterns. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i expand-brackets --save +``` + +## Usage + +```js +var brackets = require('expand-brackets'); + +brackets('[![:lower:]]'); +//=> '[^a-z]' +``` + +## .isMatch + +Return true if the given string matches the bracket expression: + +```js +brackets.isMatch('A', '[![:lower:]]'); +//=> true + +brackets.isMatch('a', '[![:lower:]]'); +//=> false +``` + +## .makeRe + +Make a regular expression from a bracket expression: + +```js +brackets.makeRe('[![:lower:]]'); +//=> /[^a-z]/ +``` + +The following named POSIX bracket expressions are supported: + +* `[:alnum:]`: Alphanumeric characters (`a-zA-Z0-9]`) +* `[:alpha:]`: Alphabetic characters (`a-zA-Z]`) +* `[:blank:]`: Space and tab (`[ t]`) +* `[:digit:]`: Digits (`[0-9]`) +* `[:lower:]`: Lowercase letters (`[a-z]`) +* `[:punct:]`: Punctuation and symbols. (`[!"#$%&'()*+, -./:;<=>?@ [\]^_``{|}~]`) +* `[:upper:]`: Uppercase letters (`[A-Z]`) +* `[:word:]`: Word characters (letters, numbers and underscores) (`[A-Za-z0-9_]`) +* `[:xdigit:]`: Hexadecimal digits (`[A-Fa-f0-9]`) + +Collating sequences are not supported. + +## Related projects + +* [extglob](https://github.com/jonschlinkert/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://github.com/jonschlinkert/extglob) +* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. +* [is-extglob](https://github.com/jonschlinkert/is-extglob): Returns true if a string has an extglob. +* [is-posix-bracket](https://github.com/jonschlinkert/is-posix-bracket): Returns true if the given string is a POSIX bracket expression (POSIX character class). +* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://github.com/jonschlinkert/micromatch) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/expand-brackets/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 01, 2015._ \ No newline at end of file diff --git a/node_modules/expand-brackets/index.js b/node_modules/expand-brackets/index.js new file mode 100644 index 0000000..0207042 --- /dev/null +++ b/node_modules/expand-brackets/index.js @@ -0,0 +1,157 @@ +/*! + * expand-brackets + * + * Copyright (c) 2015 Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +/** + * POSIX character classes + */ + +var POSIX = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E', + punct: '!"#$%&\'()\\*+,-./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9', +}; + +/** + * Expose `brackets` + */ + +module.exports = brackets; + +function brackets(str) { + var negated = false; + if (str.indexOf('[^') !== -1) { + negated = true; + str = str.split('[^').join('['); + } + if (str.indexOf('[!') !== -1) { + negated = true; + str = str.split('[!').join('['); + } + + var a = str.split('['); + var b = str.split(']'); + var imbalanced = a.length !== b.length; + + var parts = str.split(/(?::\]\[:|\[?\[:|:\]\]?)/); + var len = parts.length, i = 0; + var end = '', beg = ''; + var res = []; + + // start at the end (innermost) first + while (len--) { + var inner = parts[i++]; + if (inner === '^[!' || inner === '[!') { + inner = ''; + negated = true; + } + + var prefix = negated ? '^' : ''; + var ch = POSIX[inner]; + + if (ch) { + res.push('[' + prefix + ch + ']'); + } else if (inner) { + if (/^\[?\w-\w\]?$/.test(inner)) { + if (i === parts.length) { + res.push('[' + prefix + inner); + } else if (i === 1) { + res.push(prefix + inner + ']'); + } else { + res.push(prefix + inner); + } + } else { + if (i === 1) { + beg += inner; + } else if (i === parts.length) { + end += inner; + } else { + res.push('[' + prefix + inner + ']'); + } + } + } + } + + var result = res.join('|'); + var rlen = res.length || 1; + if (rlen > 1) { + result = '(?:' + result + ')'; + rlen = 1; + } + if (beg) { + rlen++; + if (beg.charAt(0) === '[') { + if (imbalanced) { + beg = '\\[' + beg.slice(1); + } else { + beg += ']'; + } + } + result = beg + result; + } + if (end) { + rlen++; + if (end.slice(-1) === ']') { + if (imbalanced) { + end = end.slice(0, end.length - 1) + '\\]'; + } else { + end = '[' + end; + } + } + result += end; + } + + if (rlen > 1) { + result = result.split('][').join(']|['); + if (result.indexOf('|') !== -1 && !/\(\?/.test(result)) { + result = '(?:' + result + ')'; + } + } + + result = result.replace(/\[+=|=\]+/g, '\\b'); + return result; +} + +brackets.makeRe = function (pattern) { + try { + return new RegExp(brackets(pattern)); + } catch (err) {} +}; + +brackets.isMatch = function (str, pattern) { + try { + return brackets.makeRe(pattern).test(str); + } catch (err) { + return false; + } +}; + +brackets.match = function (arr, pattern) { + var len = arr.length, i = 0; + var res = arr.slice(); + + var re = brackets.makeRe(pattern); + while (i < len) { + var ele = arr[i++]; + if (!re.test(ele)) { + continue; + } + res.splice(i, 1); + } + return res; +}; diff --git a/node_modules/expand-brackets/package.json b/node_modules/expand-brackets/package.json new file mode 100644 index 0000000..1074069 --- /dev/null +++ b/node_modules/expand-brackets/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "expand-brackets@^0.1.4", + "/home/mywebsite/node_modules/micromatch" + ] + ], + "_from": "expand-brackets@>=0.1.4 <0.2.0", + "_id": "expand-brackets@0.1.4", + "_inCache": true, + "_installable": true, + "_location": "/expand-brackets", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "expand-brackets", + "raw": "expand-brackets@^0.1.4", + "rawSpec": "^0.1.4", + "scope": null, + "spec": ">=0.1.4 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.4.tgz", + "_shasum": "797b9e484101205f418cecaec6312c132f51e2ae", + "_shrinkwrap": null, + "_spec": "expand-brackets@^0.1.4", + "_where": "/home/mywebsite/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/expand-brackets/issues" + }, + "dependencies": {}, + "description": "Expand POSIX bracket expressions (character classes) in glob patterns.", + "devDependencies": { + "mocha": "^2.2.5", + "should": "^7.0.2" + }, + "directories": {}, + "dist": { + "shasum": "797b9e484101205f418cecaec6312c132f51e2ae", + "tarball": "http://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.4.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "38475d3e4973b8496812e39983d2945a78d0ade3", + "homepage": "https://github.com/jonschlinkert/expand-brackets", + "keywords": [ + "bracket", + "character class", + "expression", + "posix" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "es128", + "email": "elan.shanker+npm@gmail.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "expand-brackets", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/expand-brackets.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "extglob", + "is-extglob", + "is-glob", + "is-posix-bracket", + "micromatch" + ] + } + }, + "version": "0.1.4" +} diff --git a/node_modules/expand-range/LICENSE b/node_modules/expand-range/LICENSE new file mode 100755 index 0000000..5a9956a --- /dev/null +++ b/node_modules/expand-range/LICENSE @@ -0,0 +1,24 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/expand-range/README.md b/node_modules/expand-range/README.md new file mode 100755 index 0000000..b34f0f3 --- /dev/null +++ b/node_modules/expand-range/README.md @@ -0,0 +1,107 @@ +# expand-range [![NPM version](https://badge.fury.io/js/expand-range.svg)](http://badge.fury.io/js/expand-range) + +> Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. + +## Install with [npm](npmjs.org) + +```bash +npm i expand-range --save +``` + +Wraps [fill-range] to do range expansion using `..` separated strings. See [fill-range] for the full list of options and features. + + +## Example usage + +```js +var expand = require('expand-range'); +``` + +**Params** + +```js +expand(start, stop, increment); +``` + + - `start`: the number or letter to start with + - `end`: the number or letter to end with + - `increment`: optionally pass the increment to use. works for letters or numbers + +**Examples** + +```js +expand('a..e') +//=> ['a', 'b', 'c', 'd', 'e'] + +expand('a..e..2') +//=> ['a', 'c', 'e'] + +expand('A..E..2') +//=> ['A', 'C', 'E'] + +expand('1..3') +//=> ['1', '2', '3'] + +expand('0..-5') +//=> [ '0', '-1', '-2', '-3', '-4', '-5' ] + +expand('-9..9..3') +//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ]) + +expand('-1..-10..-2') +//=> [ '-1', '-3', '-5', '-7', '-9' ] + +expand('1..10..2') +//=> [ '1', '3', '5', '7', '9' ] +``` + + +### Custom function + +Optionally pass a custom function as the second argument: + +```js +expand('a..e', function (val, isNumber, pad, i) { + if (!isNumber) { + return String.fromCharCode(val) + i; + } + return val; +}); +//=> ['a0', 'b1', 'c2', 'd3', 'e4'] +``` + +## Related + +- [micromatch]: wildcard/glob matcher for javascript. a faster alternative to minimatch. +- [fill-range]: the library this depends on for core functionality +- [braces]: this library is used in braces, a fast Brash-like brace expansion lib. + +## Run tests + +Install dev dependencies + +```bash +npm i -d && npm test +``` + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/expand-range/issues). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb](https://github.com/assemble/verb) on January 30, 2015._ + +[fill-range]: https://github.com/jonschlinkert/fill-range +[micromatch]: https://github.com/jonschlinkert/micromatch +[braces]: https://github.com/jonschlinkert/braces \ No newline at end of file diff --git a/node_modules/expand-range/index.js b/node_modules/expand-range/index.js new file mode 100755 index 0000000..ac1a44e --- /dev/null +++ b/node_modules/expand-range/index.js @@ -0,0 +1,43 @@ +/*! + * expand-range + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +var fill = require('fill-range'); + +module.exports = function expandRange(str, options, fn) { + if (typeof str !== 'string') { + throw new TypeError('expand-range expects a string.'); + } + + if (typeof options === 'function') { + fn = options; + options = {}; + } + + if (typeof options === 'boolean') { + options = {}; + options.makeRe = true; + } + + // create arguments to pass to fill-range + var opts = options || {}; + var args = str.split('..'); + var len = args.length; + if (len > 3) { return str; } + + // if only one argument, it can't expand so return it + if (len === 1) { return args; } + + // if `true`, tell fill-range to regexify the string + if (typeof fn === 'boolean' && fn === true) { + opts.makeRe = true; + } + + args.push(opts); + return fill.apply(fill, args.concat(fn)); +}; diff --git a/node_modules/expand-range/package.json b/node_modules/expand-range/package.json new file mode 100644 index 0000000..4a888c8 --- /dev/null +++ b/node_modules/expand-range/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + "expand-range@^1.8.1", + "/home/mywebsite/node_modules/braces" + ] + ], + "_from": "expand-range@>=1.8.1 <2.0.0", + "_id": "expand-range@1.8.1", + "_inCache": true, + "_installable": true, + "_location": "/expand-range", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "expand-range", + "raw": "expand-range@^1.8.1", + "rawSpec": "^1.8.1", + "scope": null, + "spec": ">=1.8.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/braces" + ], + "_resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.1.tgz", + "_shasum": "acbd63e56efd9139722b755f099b9db5ac1f33f6", + "_shrinkwrap": null, + "_spec": "expand-range@^1.8.1", + "_where": "/home/mywebsite/node_modules/braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/expand-range/issues" + }, + "dependencies": { + "fill-range": "^2.1.0" + }, + "description": "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.", + "devDependencies": { + "benchmarked": "^0.1.1", + "brace-expansion": "^1.1.0", + "glob": "^4.3.2", + "minimatch": "^2.0.1", + "mocha": "*", + "should": "^4.1.0" + }, + "directories": {}, + "dist": { + "shasum": "acbd63e56efd9139722b755f099b9db5ac1f33f6", + "tarball": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "de01a2ae06e6fe9c69812595c439870cca71839f", + "homepage": "https://github.com/jonschlinkert/expand-range", + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "expand", + "expansion", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "sh" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/expand-range/blob/master/LICENSE-MIT" + }, + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "expand-range", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/expand-range.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "1.8.1" +} diff --git a/node_modules/extglob/LICENSE b/node_modules/extglob/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/extglob/README.md b/node_modules/extglob/README.md new file mode 100644 index 0000000..6664406 --- /dev/null +++ b/node_modules/extglob/README.md @@ -0,0 +1,88 @@ +# extglob [![NPM version](https://badge.fury.io/js/extglob.svg)](http://badge.fury.io/js/extglob) [![Build Status](https://travis-ci.org/jonschlinkert/extglob.svg)](https://travis-ci.org/jonschlinkert/extglob) + +> Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i extglob --save +``` + +Used by [micromatch](https://github.com/jonschlinkert/micromatch). + +**Features** + +* Convert an extglob string to a regex-compatible string. **Only converts extglobs**, to handle full globs use [micromatch](https://github.com/jonschlinkert/micromatch). +* Pass `{regex: true}` to return a regex +* Handles nested patterns +* More complete (and correct) support than [minimatch](https://github.com/isaacs/minimatch) + +## Usage + +```js +var extglob = require('extglob'); + +extglob('?(z)'); +//=> '(?:z)?' +extglob('*(z)'); +//=> '(?:z)*' +extglob('+(z)'); +//=> '(?:z)+' +extglob('@(z)'); +//=> '(?:z)' +extglob('!(z)'); +//=> '(?!^(?:(?!z)[^/]*?)).*$' +``` + +**Optionally return regex** + +```js +extglob('!(z)', {regex: true}); +//=> /(?!^(?:(?!z)[^/]*?)).*$/ +``` + +## Extglob patterns + +To learn more about how extglobs work, see the docs for [Bash pattern matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html): + +* `?(pattern)`: Match zero or one occurrence of the given pattern. +* `*(pattern)`: Match zero or more occurrences of the given pattern. +* `+(pattern)`: Match one or more occurrences of the given pattern. +* `@(pattern)`: Match one of the given pattern. +* `!(pattern)`: Match anything except one of the given pattern. + +## Related + +* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) +* [expand-brackets](https://github.com/jonschlinkert/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. +* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) +* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://github.com/jonschlinkert/fill-range) +* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://github.com/jonschlinkert/micromatch) + +## Run tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/extglob/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 01, 2015._ \ No newline at end of file diff --git a/node_modules/extglob/index.js b/node_modules/extglob/index.js new file mode 100644 index 0000000..2e774d4 --- /dev/null +++ b/node_modules/extglob/index.js @@ -0,0 +1,178 @@ +/*! + * extglob + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Module dependencies + */ + +var isExtglob = require('is-extglob'); +var re, cache = {}; + +/** + * Expose `extglob` + */ + +module.exports = extglob; + +/** + * Convert the given extglob `string` to a regex-compatible + * string. + * + * ```js + * var extglob = require('extglob'); + * extglob('!(a?(b))'); + * //=> '(?!a(?:b)?)[^/]*?' + * ``` + * + * @param {String} `str` The string to convert. + * @param {Object} `options` + * @option {Boolean} [options] `esc` If `false` special characters will not be escaped. Defaults to `true`. + * @option {Boolean} [options] `regex` If `true` a regular expression is returned instead of a string. + * @return {String} + * @api public + */ + + +function extglob(str, opts) { + opts = opts || {}; + var o = {}, i = 0; + + // fix common character reversals + // '*!(.js)' => '*.!(js)' + str = str.replace(/!\(([^\w*()])/g, '$1!('); + + // support file extension negation + str = str.replace(/([*\/])\.!\([*]\)/g, function (m, ch) { + if (ch === '/') { + return escape('\\/[^.]+'); + } + return escape('[^.]+'); + }); + + // create a unique key for caching by + // combining the string and options + var key = str + + String(!!opts.regex) + + String(!!opts.contains) + + String(!!opts.escape); + + if (cache.hasOwnProperty(key)) { + return cache[key]; + } + + if (!(re instanceof RegExp)) { + re = regex(); + } + + opts.negate = false; + var m; + + while (m = re.exec(str)) { + var prefix = m[1]; + var inner = m[3]; + if (prefix === '!') { + opts.negate = true; + } + + var id = '__EXTGLOB_' + (i++) + '__'; + // use the prefix of the _last_ (outtermost) pattern + o[id] = wrap(inner, prefix, opts.escape); + str = str.split(m[0]).join(id); + } + + var keys = Object.keys(o); + var len = keys.length; + + // we have to loop again to allow us to convert + // patterns in reverse order (starting with the + // innermost/last pattern first) + while (len--) { + var prop = keys[len]; + str = str.split(prop).join(o[prop]); + } + + var result = opts.regex + ? toRegex(str, opts.contains, opts.negate) + : str; + + result = result.split('.').join('\\.'); + + // cache the result and return it + return (cache[key] = result); +} + +/** + * Convert `string` to a regex string. + * + * @param {String} `str` + * @param {String} `prefix` Character that determines how to wrap the string. + * @param {Boolean} `esc` If `false` special characters will not be escaped. Defaults to `true`. + * @return {String} + */ + +function wrap(inner, prefix, esc) { + if (esc) inner = escape(inner); + + switch (prefix) { + case '!': + return '(?!' + inner + ')[^/]' + (esc ? '%%%~' : '*?'); + case '@': + return '(?:' + inner + ')'; + case '+': + return '(?:' + inner + ')+'; + case '*': + return '(?:' + inner + ')' + (esc ? '%%' : '*') + case '?': + return '(?:' + inner + '|)'; + default: + return inner; + } +} + +function escape(str) { + str = str.split('*').join('[^/]%%%~'); + str = str.split('.').join('\\.'); + return str; +} + +/** + * extglob regex. + */ + +function regex() { + return /(\\?[@?!+*$]\\?)(\(([^()]*?)\))/; +} + +/** + * Negation regex + */ + +function negate(str) { + return '(?!^' + str + ').*$'; +} + +/** + * Create the regex to do the matching. If + * the leading character in the `pattern` is `!` + * a negation regex is returned. + * + * @param {String} `pattern` + * @param {Boolean} `contains` Allow loose matching. + * @param {Boolean} `isNegated` True if the pattern is a negation pattern. + */ + +function toRegex(pattern, contains, isNegated) { + var prefix = contains ? '^' : ''; + var after = contains ? '$' : ''; + pattern = ('(?:' + pattern + ')' + after); + if (isNegated) { + pattern = prefix + negate(pattern); + } + return new RegExp(prefix + pattern); +} diff --git a/node_modules/extglob/package.json b/node_modules/extglob/package.json new file mode 100644 index 0000000..fd9e73f --- /dev/null +++ b/node_modules/extglob/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "extglob@^0.3.1", + "/home/mywebsite/node_modules/micromatch" + ] + ], + "_from": "extglob@>=0.3.1 <0.4.0", + "_id": "extglob@0.3.1", + "_inCache": true, + "_installable": true, + "_location": "/extglob", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "extglob", + "raw": "extglob@^0.3.1", + "rawSpec": "^0.3.1", + "scope": null, + "spec": ">=0.3.1 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.1.tgz", + "_shasum": "4f31241c0dddc90ac8c729cb6d7c872dee77c8f5", + "_shrinkwrap": null, + "_spec": "extglob@^0.3.1", + "_where": "/home/mywebsite/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/extglob/issues" + }, + "dependencies": { + "ansi-green": "^0.1.1", + "is-extglob": "^1.0.0", + "success-symbol": "^0.1.0" + }, + "description": "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.", + "devDependencies": { + "micromatch": "^2.1.6", + "minimatch": "^2.0.1", + "minimist": "^1.1.0", + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "4f31241c0dddc90ac8c729cb6d7c872dee77c8f5", + "tarball": "http://registry.npmjs.org/extglob/-/extglob-0.3.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7466402011f262f316a3206b6bdce83a57ca3a23", + "homepage": "https://github.com/jonschlinkert/extglob", + "keywords": [ + "bash", + "extended", + "extglob", + "glob", + "ksh", + "match", + "wildcard" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "extglob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/extglob.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "braces", + "expand-brackets", + "expand-range", + "fill-range", + "micromatch" + ] + } + }, + "version": "0.3.1" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/LICENSE b/node_modules/eyes/LICENSE similarity index 83% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/LICENSE rename to node_modules/eyes/LICENSE index 9cd87e5..a1edd93 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/LICENSE +++ b/node_modules/eyes/LICENSE @@ -1,6 +1,4 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +Copyright (c) 2009 cloudhead Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/node_modules/eyes/Makefile b/node_modules/eyes/Makefile new file mode 100644 index 0000000..a121dea --- /dev/null +++ b/node_modules/eyes/Makefile @@ -0,0 +1,4 @@ +test: + @@node test/eyes-test.js + +.PHONY: test diff --git a/node_modules/eyes/README.md b/node_modules/eyes/README.md new file mode 100644 index 0000000..c4f6f76 --- /dev/null +++ b/node_modules/eyes/README.md @@ -0,0 +1,73 @@ +eyes +==== + +a customizable value inspector for Node.js + +synopsis +-------- + +I was tired of looking at cluttered output in the console -- something needed to be done, +`sys.inspect()` didn't display regexps correctly, and was too verbose, and I had an hour or two to spare. +So I decided to have some fun. _eyes_ were born. + +![eyes-ss](http://dl.dropbox.com/u/251849/eyes-js-ss.gif) + +_example of the output of a user-customized eyes.js inspector_ + +*eyes* also deals with circular objects in an intelligent way, and can pretty-print object literals. + +usage +----- + + var inspect = require('eyes').inspector({styles: {all: 'magenta'}}); + + inspect(something); // inspect with the settings passed to `inspector` + +or + + var eyes = require('eyes'); + + eyes.inspect(something); // inspect with the default settings + +you can pass a _label_ to `inspect()`, to keep track of your inspections: + + eyes.inspect(something, "a random value"); + +If you want to return the output of eyes without printing it, you can set it up this way: + + var inspect = require('eyes').inspector({ stream: null }); + + sys.puts(inspect({ something: 42 })); + +customization +------------- + +These are the default styles and settings used by _eyes_. + + styles: { // Styles applied to stdout + all: 'cyan', // Overall style applied to everything + label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]` + other: 'inverted', // Objects which don't have a literal representation, such as functions + key: 'bold', // The keys in object literals, like 'a' in `{a: 1}` + special: 'grey', // null, undefined... + string: 'green', + number: 'magenta', + bool: 'blue', // true false + regexp: 'green', // /\d+/ + }, + + pretty: true, // Indent object literals + hideFunctions: false, // Don't output functions at all + stream: process.stdout, // Stream to write to, or null + maxLength: 2048 // Truncate output if longer + +You can overwrite them with your own, by passing a similar object to `inspector()` or `inspect()`. + + var inspect = require('eyes').inspector({ + styles: { + all: 'magenta', + special: 'bold' + }, + maxLength: 512 + }); + diff --git a/node_modules/eyes/lib/eyes.js b/node_modules/eyes/lib/eyes.js new file mode 100644 index 0000000..10d964b --- /dev/null +++ b/node_modules/eyes/lib/eyes.js @@ -0,0 +1,236 @@ +// +// Eyes.js - a customizable value inspector for Node.js +// +// usage: +// +// var inspect = require('eyes').inspector({styles: {all: 'magenta'}}); +// inspect(something); // inspect with the settings passed to `inspector` +// +// or +// +// var eyes = require('eyes'); +// eyes.inspect(something); // inspect with the default settings +// +var eyes = exports, + stack = []; + +eyes.defaults = { + styles: { // Styles applied to stdout + all: 'cyan', // Overall style applied to everything + label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]` + other: 'inverted', // Objects which don't have a literal representation, such as functions + key: 'bold', // The keys in object literals, like 'a' in `{a: 1}` + special: 'grey', // null, undefined... + string: 'green', + number: 'magenta', + bool: 'blue', // true false + regexp: 'green', // /\d+/ + }, + pretty: true, // Indent object literals + hideFunctions: false, + showHidden: false, + stream: process.stdout, + maxLength: 2048 // Truncate output if longer +}; + +// Return a curried inspect() function, with the `options` argument filled in. +eyes.inspector = function (options) { + var that = this; + return function (obj, label, opts) { + return that.inspect.call(that, obj, label, + merge(options || {}, opts || {})); + }; +}; + +// If we have a `stream` defined, use it to print a styled string, +// if not, we just return the stringified object. +eyes.inspect = function (obj, label, options) { + options = merge(this.defaults, options || {}); + + if (options.stream) { + return this.print(stringify(obj, options), label, options); + } else { + return stringify(obj, options) + (options.styles ? '\033[39m' : ''); + } +}; + +// Output using the 'stream', and an optional label +// Loop through `str`, and truncate it after `options.maxLength` has been reached. +// Because escape sequences are, at this point embeded within +// the output string, we can't measure the length of the string +// in a useful way, without separating what is an escape sequence, +// versus a printable character (`c`). So we resort to counting the +// length manually. +eyes.print = function (str, label, options) { + for (var c = 0, i = 0; i < str.length; i++) { + if (str.charAt(i) === '\033') { i += 4 } // `4` because '\033[25m'.length + 1 == 5 + else if (c === options.maxLength) { + str = str.slice(0, i - 1) + '…'; + break; + } else { c++ } + } + return options.stream.write.call(options.stream, (label ? + this.stylize(label, options.styles.label, options.styles) + ': ' : '') + + this.stylize(str, options.styles.all, options.styles) + '\033[0m' + "\n"); +}; + +// Apply a style to a string, eventually, +// I'd like this to support passing multiple +// styles. +eyes.stylize = function (str, style, styles) { + var codes = { + 'bold' : [1, 22], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'cyan' : [36, 39], + 'magenta' : [35, 39], + 'blue' : [34, 39], + 'yellow' : [33, 39], + 'green' : [32, 39], + 'red' : [31, 39], + 'grey' : [90, 39] + }, endCode; + + if (style && codes[style]) { + endCode = (codes[style][1] === 39 && styles.all) ? codes[styles.all][0] + : codes[style][1]; + return '\033[' + codes[style][0] + 'm' + str + + '\033[' + endCode + 'm'; + } else { return str } +}; + +// Convert any object to a string, ready for output. +// When an 'array' or an 'object' are encountered, they are +// passed to specialized functions, which can then recursively call +// stringify(). +function stringify(obj, options) { + var that = this, stylize = function (str, style) { + return eyes.stylize(str, options.styles[style], options.styles) + }, index, result; + + if ((index = stack.indexOf(obj)) !== -1) { + return stylize(new(Array)(stack.length - index + 1).join('.'), 'special'); + } + stack.push(obj); + + result = (function (obj) { + switch (typeOf(obj)) { + case "string" : obj = stringifyString(obj.indexOf("'") === -1 ? "'" + obj + "'" + : '"' + obj + '"'); + return stylize(obj, 'string'); + case "regexp" : return stylize('/' + obj.source + '/', 'regexp'); + case "number" : return stylize(obj + '', 'number'); + case "function" : return options.stream ? stylize("Function", 'other') : '[Function]'; + case "null" : return stylize("null", 'special'); + case "undefined": return stylize("undefined", 'special'); + case "boolean" : return stylize(obj + '', 'bool'); + case "date" : return stylize(obj.toUTCString()); + case "array" : return stringifyArray(obj, options, stack.length); + case "object" : return stringifyObject(obj, options, stack.length); + } + })(obj); + + stack.pop(); + return result; +}; + +// Escape invisible characters in a string +function stringifyString (str, options) { + return str.replace(/\\/g, '\\\\') + .replace(/\n/g, '\\n') + .replace(/[\u0001-\u001F]/g, function (match) { + return '\\0' + match[0].charCodeAt(0).toString(8); + }); +} + +// Convert an array to a string, such as [1, 2, 3]. +// This function calls stringify() for each of the elements +// in the array. +function stringifyArray(ary, options, level) { + var out = []; + var pretty = options.pretty && (ary.length > 4 || ary.some(function (o) { + return (o !== null && typeof(o) === 'object' && Object.keys(o).length > 0) || + (Array.isArray(o) && o.length > 0); + })); + var ws = pretty ? '\n' + new(Array)(level * 4 + 1).join(' ') : ' '; + + for (var i = 0; i < ary.length; i++) { + out.push(stringify(ary[i], options)); + } + + if (out.length === 0) { + return '[]'; + } else { + return '[' + ws + + out.join(',' + (pretty ? ws : ' ')) + + (pretty ? ws.slice(0, -4) : ws) + + ']'; + } +}; + +// Convert an object to a string, such as {a: 1}. +// This function calls stringify() for each of its values, +// and does not output functions or prototype values. +function stringifyObject(obj, options, level) { + var out = []; + var pretty = options.pretty && (Object.keys(obj).length > 2 || + Object.keys(obj).some(function (k) { return typeof(obj[k]) === 'object' })); + var ws = pretty ? '\n' + new(Array)(level * 4 + 1).join(' ') : ' '; + + var keys = options.showHidden ? Object.keys(obj) : Object.getOwnPropertyNames(obj); + keys.forEach(function (k) { + if (Object.prototype.hasOwnProperty.call(obj, k) + && !(obj[k] instanceof Function && options.hideFunctions)) { + out.push(eyes.stylize(k, options.styles.key, options.styles) + ': ' + + stringify(obj[k], options)); + } + }); + + if (out.length === 0) { + return '{}'; + } else { + return "{" + ws + + out.join(',' + (pretty ? ws : ' ')) + + (pretty ? ws.slice(0, -4) : ws) + + "}"; + } +}; + +// A better `typeof` +function typeOf(value) { + var s = typeof(value), + types = [Object, Array, String, RegExp, Number, Function, Boolean, Date]; + + if (s === 'object' || s === 'function') { + if (value) { + types.forEach(function (t) { + if (value instanceof t) { s = t.name.toLowerCase() } + }); + } else { s = 'null' } + } + return s; +} + +function merge(/* variable args */) { + var objs = Array.prototype.slice.call(arguments); + var target = {}; + + objs.forEach(function (o) { + Object.keys(o).forEach(function (k) { + if (k === 'styles') { + if (! o.styles) { + target.styles = false; + } else { + target.styles = {} + for (var s in o.styles) { + target.styles[s] = o.styles[s]; + } + } + } else { + target[k] = o[k]; + } + }); + }); + return target; +} + diff --git a/node_modules/eyes/package.json b/node_modules/eyes/package.json new file mode 100644 index 0000000..b20c390 --- /dev/null +++ b/node_modules/eyes/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "eyes@0.1.x", + "/home/mywebsite/node_modules/cliff" + ] + ], + "_from": "eyes@>=0.1.0 <0.2.0", + "_id": "eyes@0.1.8", + "_inCache": true, + "_installable": true, + "_location": "/eyes", + "_npmUser": { + "email": "charlie.robbins@gmail.com", + "name": "indexzero" + }, + "_npmVersion": "1.1.53", + "_phantomChildren": {}, + "_requested": { + "name": "eyes", + "raw": "eyes@0.1.x", + "rawSpec": "0.1.x", + "scope": null, + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/cliff", + "/winston" + ], + "_resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "_shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "_shrinkwrap": null, + "_spec": "eyes@0.1.x", + "_where": "/home/mywebsite/node_modules/cliff", + "author": { + "email": "self@cloudhead.net", + "name": "Alexis Sellier" + }, + "contributors": [ + { + "name": "Charlie Robbins", + "email": "charlie@nodejitsu.com" + } + ], + "dependencies": {}, + "description": "a customizable value inspector", + "devDependencies": {}, + "directories": { + "lib": "./lib", + "test": "./test" + }, + "dist": { + "shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "tarball": "http://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + }, + "engines": { + "node": "> 0.1.90" + }, + "keywords": [ + "debug", + "inspect", + "inspector", + "print" + ], + "licenses": [ + "MIT" + ], + "main": "./lib/eyes", + "maintainers": [ + { + "name": "cloudhead", + "email": "self@cloudhead.net" + }, + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], + "name": "eyes", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "scripts": { + "test": "node test/*-test.js" + }, + "url": "http://github.com/cloudhead/eyes.js", + "version": "0.1.8" +} diff --git a/node_modules/eyes/test/eyes-test.js b/node_modules/eyes/test/eyes-test.js new file mode 100644 index 0000000..1f9606a --- /dev/null +++ b/node_modules/eyes/test/eyes-test.js @@ -0,0 +1,56 @@ +var util = require('util'); +var eyes = require('../lib/eyes'); + +eyes.inspect({ + number: 42, + string: "John Galt", + regexp: /[a-z]+/, + array: [99, 168, 'x', {}], + func: function () {}, + bool: false, + nil: null, + undef: undefined, + object: {attr: []} +}, "native types"); + +eyes.inspect({ + number: new(Number)(42), + string: new(String)("John Galt"), + regexp: new(RegExp)(/[a-z]+/), + array: new(Array)(99, 168, 'x', {}), + bool: new(Boolean)(false), + object: new(Object)({attr: []}), + date: new(Date) +}, "wrapped types"); + +var obj = {}; +obj.that = { self: obj }; +obj.self = obj; + +eyes.inspect(obj, "circular object"); +eyes.inspect({hello: 'moto'}, "small object"); +eyes.inspect({hello: new(Array)(6) }, "big object"); +eyes.inspect(["hello 'world'", 'hello "world"'], "quotes"); +eyes.inspect({ + recommendations: [{ + id: 'a7a6576c2c822c8e2bd81a27e41437d8', + key: [ 'spree', 3.764316258020699 ], + value: { + _id: 'a7a6576c2c822c8e2bd81a27e41437d8', + _rev: '1-2e2d2f7fd858c4a5984bcf809d22ed98', + type: 'domain', + domain: 'spree', + weight: 3.764316258020699, + product_id: 30 + } + }] +}, 'complex'); + +eyes.inspect([null], "null in array"); + +var inspect = eyes.inspector({ stream: null }); + +util.puts(inspect('something', "something")); +util.puts(inspect("something else")); + +util.puts(inspect(["no color"], null, { styles: false })); diff --git a/node_modules/filename-regex/README.md b/node_modules/filename-regex/README.md new file mode 100644 index 0000000..d001e7a --- /dev/null +++ b/node_modules/filename-regex/README.md @@ -0,0 +1,51 @@ +# filename-regex [![NPM version](https://badge.fury.io/js/filename-regex.svg)](http://badge.fury.io/js/filename-regex) + +> Regular expression for matching file names, with or without extension. + + +## Install with [npm](npmjs.org) + +```bash +npm i filename-regex --save +``` + +## Usage + +```js +var regex = require('filename-regex'); + +'a/b/c/d.min.js'.match(regex()); +//=> match[0] = 'd.min.js' + +'a/b/c/.dotfile'.match(regex()); +//=> match[0] = '.dotfile' +``` + + +## Run tests + +Install dev dependencies: + +```bash +npm i -d && npm test +``` + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/regexps/filename-regex/issues) + + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb](https://github.com/assemble/verb) on January 24, 2015._ diff --git a/node_modules/filename-regex/index.js b/node_modules/filename-regex/index.js new file mode 100644 index 0000000..bb1888b --- /dev/null +++ b/node_modules/filename-regex/index.js @@ -0,0 +1,10 @@ +/*! + * filename-regex + * + * Copyright (c) 2014-2015, Jon Schlinkert + * Licensed under the MIT license. + */ + +module.exports = function filenameRegex() { + return /([^\\\/]+)$/; +}; diff --git a/node_modules/filename-regex/package.json b/node_modules/filename-regex/package.json new file mode 100644 index 0000000..2a2154e --- /dev/null +++ b/node_modules/filename-regex/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + "filename-regex@^2.0.0", + "/home/mywebsite/node_modules/micromatch" + ] + ], + "_from": "filename-regex@>=2.0.0 <3.0.0", + "_id": "filename-regex@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/filename-regex", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "name": "filename-regex", + "raw": "filename-regex@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz", + "_shasum": "996e3e80479b98b9897f15a8a58b3d084e926775", + "_shrinkwrap": null, + "_spec": "filename-regex@^2.0.0", + "_where": "/home/mywebsite/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/regexps/filename-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching file names, with or without extension.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "996e3e80479b98b9897f15a8a58b3d084e926775", + "tarball": "http://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "aa0f2933322d38cf547ff4c8ced882fbd8422866", + "homepage": "https://github.com/regexps/filename-regex", + "keywords": [ + "basename", + "file", + "filename", + "filepath", + "match", + "name", + "path", + "regex", + "regexp", + "regular expression" + ], + "license": { + "type": "MIT", + "url": "https://github.com/regexps/filename-regex/blob/master/LICENSE-MIT" + }, + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "filename-regex", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/regexps/filename-regex.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "2.0.0" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob/LICENSE b/node_modules/fill-range/LICENSE old mode 100644 new mode 100755 similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob/LICENSE rename to node_modules/fill-range/LICENSE diff --git a/node_modules/fill-range/README.md b/node_modules/fill-range/README.md new file mode 100755 index 0000000..c69694a --- /dev/null +++ b/node_modules/fill-range/README.md @@ -0,0 +1,290 @@ +# fill-range [![NPM version](https://badge.fury.io/js/fill-range.svg)](http://badge.fury.io/js/fill-range) [![Build Status](https://travis-ci.org/jonschlinkert/fill-range.svg)](https://travis-ci.org/jonschlinkert/fill-range) + +> Fill in a range of numbers or letters, optionally passing an increment or multiplier to use. + +## Install with [npm](npmjs.org) + +```bash +npm i fill-range --save +``` + + + +- [Usage](#usage) + * [Invalid ranges](#invalid-ranges) + * [Custom function](#custom-function) + * [Special characters](#special-characters) + + [plus](#plus) + + [pipe and tilde](#pipe-and-tilde) + + [angle bracket](#angle-bracket) + + [question mark](#question-mark) +- [Other useful libs](#other-useful-libs) +- [Running tests](#running-tests) +- [Contributing](#contributing) +- [Author](#author) +- [License](#license) + +_(Table of contents generated by [verb])_ + + + +## Usage + +```js +var range = require('fill-range'); + +range('a', 'e'); +//=> ['a', 'b', 'c', 'd', 'e'] +``` + +**Params** + +```js +range(start, stop, step, options, fn); +``` + + - `start`: **{String|Number}** the number or letter to start with + - `end`: **{String|Number}** the number or letter to end with + - `step`: **{String|Number}** optionally pass the step to use. works for letters or numbers. + - `options`: **{Object}**: + + `makeRe`: return a regex-compatible string (still returned as an array for consistency) + + `step`: pass the step on the options as an alternative to passing it as an argument + + `silent`: `true` by default, set to false to throw errors for invalid ranges. + - `fn`: **{Function}** optionally [pass a function](#custom-function) to modify each character + + +**Examples** + +```js +range(1, 3) +//=> ['1', '2', '3'] + +range('1', '3') +//=> ['1', '2', '3'] + +range('0', '-5') +//=> [ '0', '-1', '-2', '-3', '-4', '-5' ] + +range(-9, 9, 3) +//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ]) + +range('-1', '-10', '-2') +//=> [ '-1', '-3', '-5', '-7', '-9' ] + +range('1', '10', '2') +//=> [ '1', '3', '5', '7', '9' ] + +range('a', 'e') +//=> ['a', 'b', 'c', 'd', 'e'] + +range('a', 'e', 2) +//=> ['a', 'c', 'e'] + +range('A', 'E', 2) +//=> ['A', 'C', 'E'] +``` + +### Invalid ranges + +When an invalid range is passed, `null` is returned. + +```js +range('1.1', '2'); +//=> null + +range('a', '2'); +//=> null + +range(1, 10, 'foo'); +//=> null +``` + +If you want errors to be throw, pass `silent: false` on the options: + + +### Custom function + +Optionally pass a custom function as the third or fourth argument: + +```js +range('a', 'e', function (val, isNumber, pad, i) { + if (!isNumber) { + return String.fromCharCode(val) + i; + } + return val; +}); +//=> ['a0', 'b1', 'c2', 'd3', 'e4'] +``` + +### Special characters + +A special character may be passed as the third arg instead of a step increment. These characters can be pretty useful for brace expansion, creating file paths, test fixtures and similar use case. + +```js +range('a', 'z', SPECIAL_CHARACTER_HERE); +``` + +**Supported characters** + + - `+`: repeat the given string `n` times + - `|`: create a regex-ready string, instead of an array + - `>`: join values to single array element + - `?`: randomize the given pattern using [randomatic] + +#### plus + +Character: _(`+`)_ + +Repeat the first argument the number of times passed on the second argument. + +**Examples:** + +```js +range('a', 3, '+'); +//=> ['a', 'a', 'a'] + +range('abc', 2, '+'); +//=> ['abc', 'abc'] +``` + +#### pipe and tilde + +Characters: _(`|` and `~`)_ + +Creates a regex-capable string (either a logical `or` or a character class) from the expanded arguments. + +**Examples:** + +```js +range('a', 'c', '|'); +//=> ['(a|b|c)' + +range('a', 'c', '~'); +//=> ['[a-c]' + +range('a', 'z', '|5'); +//=> ['(a|f|k|p|u|z)' +``` + +**Automatic separator correction** + +To avoid this error: + +> `Range out of order in character class` + +Fill-range detects invalid sequences and uses the correct syntax. For example: + +**invalid** (regex) + +If you pass these: + +```js +range('a', 'z', '~5'); +// which would result in this +//=> ['[a-f-k-p-u-z]'] + +range('10', '20', '~'); +// which would result in this +//=> ['[10-20]'] +``` + +**valid** (regex) + +fill-range corrects them to this: + +```js +range('a', 'z', '~5'); +//=> ['(a|f|k|p|u|z)' + +range('10', '20', '~'); +//=> ['(10-20)' +``` + +#### angle bracket + +Character: _(`>`)_ + +Joins all values in the returned array to a single value. + +**Examples:** + +```js +range('a', 'e', '>'); +//=> ['abcde'] + +range('5', '8', '>'); +//=> ['5678'] + +range('2', '20', '2>'); +//=> ['2468101214161820'] +``` + + +#### question mark + +Character: _(`?`)_ + +Uses [randomatic] to generate randomized alpha, numeric, or alpha-numeric patterns based on the provided arguments. + +**Examples:** + +_(actual results would obviously be randomized)_ + +Generate a 5-character, uppercase, alphabetical string: + +```js +range('A', 5, '?'); +//=> ['NSHAK'] +``` + +Generate a 5-digit random number: + +```js +range('0', 5, '?'); +//=> ['36583'] +``` + +Generate a 10-character alpha-numeric string: + +```js +range('A0', 10, '?'); +//=> ['5YJD60VQNN'] +``` + +See the [randomatic] repo for all available options and or to create issues or feature requests related to randomization. + +## Other useful libs + * [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`. + * [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. + * [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. + * [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. + +## Running tests +Install dev dependencies: + +```bash +npm i -d && npm test +``` + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/fill-range/issues) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014-2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 07, 2015._ + +[randomatic]: https://github.com/jonschlinkert/randomatic +[expand-range]: https://github.com/jonschlinkert/expand-range +[micromatch]: https://github.com/jonschlinkert/micromatch +[braces]: https://github.com/jonschlinkert/braces \ No newline at end of file diff --git a/node_modules/fill-range/index.js b/node_modules/fill-range/index.js new file mode 100644 index 0000000..5657051 --- /dev/null +++ b/node_modules/fill-range/index.js @@ -0,0 +1,408 @@ +/*! + * fill-range + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); +var isNumber = require('is-number'); +var randomize = require('randomatic'); +var repeatStr = require('repeat-string'); +var repeat = require('repeat-element'); + +/** + * Expose `fillRange` + */ + +module.exports = fillRange; + +/** + * Return a range of numbers or letters. + * + * @param {String} `a` Start of the range + * @param {String} `b` End of the range + * @param {String} `step` Increment or decrement to use. + * @param {Function} `fn` Custom function to modify each element in the range. + * @return {Array} + */ + +function fillRange(a, b, step, options, fn) { + if (a == null || b == null) { + throw new Error('fill-range expects the first and second args to be strings.'); + } + + if (typeof step === 'function') { + fn = step; options = {}; step = null; + } + + if (typeof options === 'function') { + fn = options; options = {}; + } + + if (isObject(step)) { + options = step; step = ''; + } + + var expand, regex = false, sep = ''; + var opts = options || {}; + + if (typeof opts.silent === 'undefined') { + opts.silent = true; + } + + step = step || opts.step; + + // store a ref to unmodified arg + var origA = a, origB = b; + + b = (b.toString() === '-0') ? 0 : b; + + if (opts.optimize || opts.makeRe) { + step = step ? (step += '~') : step; + expand = true; + regex = true; + sep = '~'; + } + + // handle special step characters + if (typeof step === 'string') { + var match = stepRe().exec(step); + + if (match) { + var i = match.index; + var m = match[0]; + + // repeat string + if (m === '+') { + return repeat(a, b); + + // randomize a, `b` times + } else if (m === '?') { + return [randomize(a, b)]; + + // expand right, no regex reduction + } else if (m === '>') { + step = step.substr(0, i) + step.substr(i + 1); + expand = true; + + // expand to an array, or if valid create a reduced + // string for a regex logic `or` + } else if (m === '|') { + step = step.substr(0, i) + step.substr(i + 1); + expand = true; + regex = true; + sep = m; + + // expand to an array, or if valid create a reduced + // string for a regex range + } else if (m === '~') { + step = step.substr(0, i) + step.substr(i + 1); + expand = true; + regex = true; + sep = m; + } + } else if (!isNumber(step)) { + if (!opts.silent) { + throw new TypeError('fill-range: invalid step.'); + } + return null; + } + } + + if (/[.&*()[\]^%$#@!]/.test(a) || /[.&*()[\]^%$#@!]/.test(b)) { + if (!opts.silent) { + throw new RangeError('fill-range: invalid range arguments.'); + } + return null; + } + + // has neither a letter nor number, or has both letters and numbers + // this needs to be after the step logic + if (!noAlphaNum(a) || !noAlphaNum(b) || hasBoth(a) || hasBoth(b)) { + if (!opts.silent) { + throw new RangeError('fill-range: invalid range arguments.'); + } + return null; + } + + // validate arguments + var isNumA = isNumber(zeros(a)); + var isNumB = isNumber(zeros(b)); + + if ((!isNumA && isNumB) || (isNumA && !isNumB)) { + if (!opts.silent) { + throw new TypeError('fill-range: first range argument is incompatible with second.'); + } + return null; + } + + // by this point both are the same, so we + // can use A to check going forward. + var isNum = isNumA; + var num = formatStep(step); + + // is the range alphabetical? or numeric? + if (isNum) { + // if numeric, coerce to an integer + a = +a; b = +b; + } else { + // otherwise, get the charCode to expand alpha ranges + a = a.charCodeAt(0); + b = b.charCodeAt(0); + } + + // is the pattern descending? + var isDescending = a > b; + + // don't create a character class if the args are < 0 + if (a < 0 || b < 0) { + expand = false; + regex = false; + } + + // detect padding + var padding = isPadded(origA, origB); + var res, pad, arr = []; + var ii = 0; + + // character classes, ranges and logical `or` + if (regex) { + if (shouldExpand(a, b, num, isNum, padding, opts)) { + // make sure the correct separator is used + if (sep === '|' || sep === '~') { + sep = detectSeparator(a, b, num, isNum, isDescending); + } + return wrap([origA, origB], sep, opts); + } + } + + while (isDescending ? (a >= b) : (a <= b)) { + if (padding && isNum) { + pad = padding(a); + } + + // custom function + if (typeof fn === 'function') { + res = fn(a, isNum, pad, ii++); + + // letters + } else if (!isNum) { + if (regex && isInvalidChar(a)) { + res = null; + } else { + res = String.fromCharCode(a); + } + + // numbers + } else { + res = formatPadding(a, pad); + } + + // add result to the array, filtering any nulled values + if (res !== null) arr.push(res); + + // increment or decrement + if (isDescending) { + a -= num; + } else { + a += num; + } + } + + // now that the array is expanded, we need to handle regex + // character classes, ranges or logical `or` that wasn't + // already handled before the loop + if ((regex || expand) && !opts.noexpand) { + // make sure the correct separator is used + if (sep === '|' || sep === '~') { + sep = detectSeparator(a, b, num, isNum, isDescending); + } + if (arr.length === 1 || a < 0 || b < 0) { return arr; } + return wrap(arr, sep, opts); + } + + return arr; +} + +/** + * Wrap the string with the correct regex + * syntax. + */ + +function wrap(arr, sep, opts) { + if (sep === '~') { sep = '-'; } + var str = arr.join(sep); + var pre = opts && opts.regexPrefix; + + // regex logical `or` + if (sep === '|') { + str = pre ? pre + str : str; + str = '(' + str + ')'; + } + + // regex character class + if (sep === '-') { + str = (pre && pre === '^') + ? pre + str + : str; + str = '[' + str + ']'; + } + return [str]; +} + +/** + * Check for invalid characters + */ + +function isCharClass(a, b, step, isNum, isDescending) { + if (isDescending) { return false; } + if (isNum) { return a <= 9 && b <= 9; } + if (a < b) { return step === 1; } + return false; +} + +/** + * Detect the correct separator to use + */ + +function shouldExpand(a, b, num, isNum, padding, opts) { + if (isNum && (a > 9 || b > 9)) { return false; } + return !padding && num === 1 && a < b; +} + +/** + * Detect the correct separator to use + */ + +function detectSeparator(a, b, step, isNum, isDescending) { + var isChar = isCharClass(a, b, step, isNum, isDescending); + if (!isChar) { + return '|'; + } + return '~'; +} + +/** + * Correctly format the step based on type + */ + +function formatStep(step) { + return Math.abs(step >> 0) || 1; +} + +/** + * Format padding, taking leading `-` into account + */ + +function formatPadding(ch, pad) { + var res = pad ? pad + ch : ch; + if (pad && ch.toString().charAt(0) === '-') { + res = '-' + pad + ch.toString().substr(1); + } + return res.toString(); +} + +/** + * Check for invalid characters + */ + +function isInvalidChar(str) { + var ch = toStr(str); + return ch === '\\' + || ch === '[' + || ch === ']' + || ch === '^' + || ch === '(' + || ch === ')' + || ch === '`'; +} + +/** + * Convert to a string from a charCode + */ + +function toStr(ch) { + return String.fromCharCode(ch); +} + + +/** + * Step regex + */ + +function stepRe() { + return /\?|>|\||\+|\~/g; +} + +/** + * Return true if `val` has either a letter + * or a number + */ + +function noAlphaNum(val) { + return /[a-z0-9]/i.test(val); +} + +/** + * Return true if `val` has both a letter and + * a number (invalid) + */ + +function hasBoth(val) { + return /[a-z][0-9]|[0-9][a-z]/i.test(val); +} + +/** + * Normalize zeros for checks + */ + +function zeros(val) { + if (/^-*0+$/.test(val.toString())) { + return '0'; + } + return val; +} + +/** + * Return true if `val` has leading zeros, + * or a similar valid pattern. + */ + +function hasZeros(val) { + return /[^.]\.|^-*0+[0-9]/.test(val); +} + +/** + * If the string is padded, returns a curried function with + * the a cached padding string, or `false` if no padding. + * + * @param {*} `origA` String or number. + * @return {String|Boolean} + */ + +function isPadded(origA, origB) { + if (hasZeros(origA) || hasZeros(origB)) { + var alen = length(origA); + var blen = length(origB); + + var len = alen >= blen + ? alen + : blen; + + return function (a) { + return repeatStr('0', len - length(a)); + }; + } + return false; +} + +/** + * Get the string length of `val` + */ + +function length(val) { + return val.toString().length; +} diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json new file mode 100644 index 0000000..f3b514c --- /dev/null +++ b/node_modules/fill-range/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + "fill-range@^2.1.0", + "/home/mywebsite/node_modules/expand-range" + ] + ], + "_from": "fill-range@>=2.1.0 <3.0.0", + "_id": "fill-range@2.2.3", + "_inCache": true, + "_installable": true, + "_location": "/fill-range", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "fill-range", + "raw": "fill-range@^2.1.0", + "rawSpec": "^2.1.0", + "scope": null, + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/expand-range" + ], + "_resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "_shasum": "50b77dfd7e469bc7492470963699fe7a8485a723", + "_shrinkwrap": null, + "_spec": "fill-range@^2.1.0", + "_where": "/home/mywebsite/node_modules/expand-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/fill-range/issues" + }, + "dependencies": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + }, + "description": "Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.", + "devDependencies": { + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "50b77dfd7e469bc7492470963699fe7a8485a723", + "tarball": "http://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "6cb50d5c679d9e6d9e8ad97bb2efd63a8c8da610", + "homepage": "https://github.com/jonschlinkert/fill-range", + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "expand", + "expansion", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "sh" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + }, + { + "name": "es128", + "email": "elan.shanker+npm@gmail.com" + } + ], + "name": "fill-range", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/fill-range.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "braces", + "expand-range", + "is-glob", + "micromatch" + ] + } + }, + "version": "2.2.3" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob/LICENSE b/node_modules/for-in/LICENSE similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob/LICENSE rename to node_modules/for-in/LICENSE diff --git a/node_modules/for-in/README.md b/node_modules/for-in/README.md new file mode 100644 index 0000000..e96af5e --- /dev/null +++ b/node_modules/for-in/README.md @@ -0,0 +1,52 @@ +# for-in [![NPM version](https://badge.fury.io/js/for-in.svg)](http://badge.fury.io/js/for-in) + +> Iterate over the own and inherited enumerable properties of an objecte, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js + +## Install +#### Install with [npm](npmjs.org): + +```bash +npm i for-in --save +``` + +## Run tests + +```bash +npm test +``` + +## Usage + +```js +var forIn = require('for-in'); + +var obj = {a: 'foo', b: 'bar', c: 'baz'}; +var values = []; +var keys = []; + +forIn(obj, function (value, key, o) { + keys.push(key); + values.push(value); +}); + +console.log(keys); +//=> ['a', 'b', 'c']; + +console.log(values); +//=> ['foo', 'bar', 'baz']; +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014 Jon Schlinkert, contributors. +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 20, 2014._ \ No newline at end of file diff --git a/node_modules/for-in/index.js b/node_modules/for-in/index.js new file mode 100644 index 0000000..bc7e452 --- /dev/null +++ b/node_modules/for-in/index.js @@ -0,0 +1,16 @@ +/*! + * for-in + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function forIn(o, fn, thisArg) { + for (var key in o) { + if (fn.call(thisArg, o[key], key, o) === false) { + break; + } + } +}; \ No newline at end of file diff --git a/node_modules/for-in/package.json b/node_modules/for-in/package.json new file mode 100644 index 0000000..dd3b95a --- /dev/null +++ b/node_modules/for-in/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "for-in@^0.1.4", + "/home/mywebsite/node_modules/for-own" + ] + ], + "_from": "for-in@>=0.1.4 <0.2.0", + "_id": "for-in@0.1.4", + "_inCache": true, + "_installable": true, + "_location": "/for-in", + "_nodeVersion": "1.6.2", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.7.1", + "_phantomChildren": {}, + "_requested": { + "name": "for-in", + "raw": "for-in@^0.1.4", + "rawSpec": "^0.1.4", + "scope": null, + "spec": ">=0.1.4 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/for-own" + ], + "_resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.4.tgz", + "_shasum": "9f5cf7b4ffc7e1ae6591a4e97b177aa59d70fb2e", + "_shrinkwrap": null, + "_spec": "for-in@^0.1.4", + "_where": "/home/mywebsite/node_modules/for-own", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/for-in/issues" + }, + "dependencies": {}, + "description": "Iterate over the own and inherited enumerable properties of an objecte, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js", + "devDependencies": { + "mocha": "*", + "should": "^4.0.4" + }, + "directories": {}, + "dist": { + "shasum": "9f5cf7b4ffc7e1ae6591a4e97b177aa59d70fb2e", + "tarball": "http://registry.npmjs.org/for-in/-/for-in-0.1.4.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "fb09612d3e4137486c652a328888872eba5c1548", + "homepage": "https://github.com/jonschlinkert/for-in", + "keywords": [ + "for-in", + "for-own", + "has", + "has-own", + "hasOwn", + "key", + "keys", + "object", + "own", + "value" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/for-in/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "for-in", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/for-in.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.4" +} diff --git a/node_modules/for-own/LICENSE b/node_modules/for-own/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/for-own/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/for-own/README.md b/node_modules/for-own/README.md new file mode 100644 index 0000000..c9cf429 --- /dev/null +++ b/node_modules/for-own/README.md @@ -0,0 +1,52 @@ +# for-own [![NPM version](https://badge.fury.io/js/for-own.svg)](http://badge.fury.io/js/for-own) + +> Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. + +## Install +#### Install with [npm](npmjs.org): + +```bash +npm i for-own --save +``` + +## Run tests + +```bash +npm test +``` + +## Usage + +```js +var forOwn = require('for-own'); + +var obj = {a: 'foo', b: 'bar', c: 'baz'}; +var values = []; +var keys = []; + +forOwn(obj, function (value, key, o) { + keys.push(key); + values.push(value); +}); + +console.log(keys); +//=> ['a', 'b', 'c']; + +console.log(values); +//=> ['foo', 'bar', 'baz']; +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014 Jon Schlinkert, contributors. +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 20, 2014._ \ No newline at end of file diff --git a/node_modules/for-own/index.js b/node_modules/for-own/index.js new file mode 100644 index 0000000..966294b --- /dev/null +++ b/node_modules/for-own/index.js @@ -0,0 +1,19 @@ +/*! + * for-own + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var forIn = require('for-in'); +var hasOwn = Object.prototype.hasOwnProperty; + +module.exports = function forOwn(o, fn, thisArg) { + forIn(o, function (val, key) { + if (hasOwn.call(o, key)) { + return fn.call(thisArg, o[key], key, o); + } + }); +}; diff --git a/node_modules/for-own/package.json b/node_modules/for-own/package.json new file mode 100644 index 0000000..2a55e4e --- /dev/null +++ b/node_modules/for-own/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "for-own@^0.1.3", + "/home/mywebsite/node_modules/object.omit" + ] + ], + "_from": "for-own@>=0.1.3 <0.2.0", + "_id": "for-own@0.1.3", + "_inCache": true, + "_installable": true, + "_location": "/for-own", + "_nodeVersion": "1.6.2", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.7.1", + "_phantomChildren": {}, + "_requested": { + "name": "for-own", + "raw": "for-own@^0.1.3", + "rawSpec": "^0.1.3", + "scope": null, + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/object.omit" + ], + "_resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.3.tgz", + "_shasum": "606444cde77c2f0a11088169e2e354eaf56e74fe", + "_shrinkwrap": null, + "_spec": "for-own@^0.1.3", + "_where": "/home/mywebsite/node_modules/object.omit", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/for-own/issues" + }, + "dependencies": { + "for-in": "^0.1.4" + }, + "description": "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.", + "devDependencies": { + "mocha": "*", + "should": "^5.2.0" + }, + "directories": {}, + "dist": { + "shasum": "606444cde77c2f0a11088169e2e354eaf56e74fe", + "tarball": "http://registry.npmjs.org/for-own/-/for-own-0.1.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "43c5291f22b71297e1b5855236fcc35ac9ce51e4", + "homepage": "https://github.com/jonschlinkert/for-own", + "keywords": [ + "for-in", + "for-own", + "has", + "has-own", + "hasOwn", + "key", + "keys", + "object", + "own", + "value" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/for-own/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "for-own", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/for-own.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.3" +} diff --git a/node_modules/forever/.npmignore b/node_modules/forever/.npmignore index 2dc564d..9dca4ab 100644 --- a/node_modules/forever/.npmignore +++ b/node_modules/forever/.npmignore @@ -1,7 +1,8 @@ +.DS_Store test/*.log node_modules/ node_modules/* npm-debug.log .*.sw[op] test/fixtures/*.log -.idea \ No newline at end of file +.idea diff --git a/node_modules/forever/.travis.yml b/node_modules/forever/.travis.yml index 42d2b93..e1f0c0b 100644 --- a/node_modules/forever/.travis.yml +++ b/node_modules/forever/.travis.yml @@ -1,12 +1,17 @@ +sudo: false language: node_js node_js: - 0.8 - - 0.10 + - "0.10" + - 0.12 before_install: - curl --location http://git.io/1OcIZA | bash -s branches: only: - master +matrix: + allow_failures: + - node_js: 0.8 notifications: email: - travis@nodejitsu.com diff --git a/node_modules/forever/CHANGELOG.md b/node_modules/forever/CHANGELOG.md index 1dcaadb..9d34ee5 100644 --- a/node_modules/forever/CHANGELOG.md +++ b/node_modules/forever/CHANGELOG.md @@ -1,700 +1,701 @@ +0.14.2 / Tue, 30 Jun 2015 +========================= + * [804b5b1](https://github.com/foreverjs/forever/commit/804b5b1) [dist] Version bump. 0.14.2 (`indexzero`) + * [1e4953d](https://github.com/foreverjs/forever/commit/1e4953d) [fix] Do not break tests. (`indexzero`) + * [310edd2](https://github.com/foreverjs/forever/commit/310edd2) fixes #699 (`Mike van Rossum`) + * [19f7909](https://github.com/foreverjs/forever/commit/19f7909) Add license attribute (`Gilad Peleg`) + * [36fbaf1](https://github.com/foreverjs/forever/commit/36fbaf1) isNaN() doesn't check if the value is numeric; it only checks if it is equal to NaN. In particular it won't catch null. (`Craig R. Hughes`) + * [31c2f16](https://github.com/foreverjs/forever/commit/31c2f16) Remove overwhelm, highlight forever start in doc (`Doug Carroll`) + * [19a0de8](https://github.com/foreverjs/forever/commit/19a0de8) Update CHANGELOG.md. (`XhmikosR`) + +v0.14.1 / Wed, 4 Feb 2015 +========================= + * [509eaf2](https://github.com/foreverjs/forever/commit/509eaf2) [dist] Version bump. 0.14.1 (`indexzero`) + * [e5296a2](https://github.com/foreverjs/forever/commit/e5296a2) [minor] Small style change. (`indexzero`) + * [c33f56e](https://github.com/foreverjs/forever/commit/c33f56e) fix critical bugs @v0.14.0 (`Tjatse`) + * [545be49](https://github.com/foreverjs/forever/commit/545be49) [doc] Add docs badge to README (`René Föhring`) + * [14bbf8c](https://github.com/foreverjs/forever/commit/14bbf8c) Fix links in readme (`jomo`) + +v0.14.0 / Tue, 30 Dec 2014 +========================== + * [477c460](https://github.com/foreverjs/forever/commit/477c460) [dist] Version bump. 0.14.0 (`indexzero`) + * [b1158de](https://github.com/foreverjs/forever/commit/b1158de) Fixed typos. (`Sean Hussey`) + * [cdfa701](https://github.com/foreverjs/forever/commit/cdfa701) [refactor] Tidy the logic for handling data back from monitor processes [fix text] Assert the correct things in test/core/stopbypid-peaceful-test.js [dist minor] Correct file headers in some test files [dist minor] s/if(/if (/, s/){/) {/, and other minor whitespace (`indexzero`) + * [b678eb7](https://github.com/foreverjs/forever/commit/b678eb7) test cases for `stop peaceful` (`Tjatse`) + * [c3baf77](https://github.com/foreverjs/forever/commit/c3baf77) if target is not a number, it could only be a script path, otherwise it is pid|uid|index|id (`Tjatse`) + * [5c7ba63](https://github.com/foreverjs/forever/commit/5c7ba63) clean codes, and improve`findBy` performance (`Tjatse`) + * [2c394ab](https://github.com/foreverjs/forever/commit/2c394ab) `forever stopbypid` is deprecated now, using `forever stop ` instead. (`Tjatse`) + * [d506771](https://github.com/foreverjs/forever/commit/d506771) [fix] handle monitor error, and make `forever stopall` peaceful (`Tjatse`) + * [ab8bcb8](https://github.com/foreverjs/forever/commit/ab8bcb8) ignore .idea on MAC (`Tjatse`) + * [1308a96](https://github.com/foreverjs/forever/commit/1308a96) [ci] try and fix build (`Jarrett Cruger`) + * [68502f1](https://github.com/foreverjs/forever/commit/68502f1) fix missing parameter (`peecky`) + * [b85f8e2](https://github.com/foreverjs/forever/commit/b85f8e2) [dist fix] Added CHANGELOG.md again. Fixes #630. (`indexzero`) + v0.13.0 / Tue, 4 Nov 2014 ========================= - * [8707877] [dist] Version bump. 0.13.0 (`indexzero`) - * [3865596] [dist] Up-to-date linting with JSHint. Fixes #419. (`indexzero`) - * [1d863ba] Renaming stoppid -> stopbypid (`Anthony Akentiev`) - * [4adf834] Little bug fix: comparing integers (`Anthony Akentiev`) - * [c29de4b] README updated (`Anthony Akentiev`) - * [54194df] stoppid command added to stop running under forever process by PID (`Anthony Akentiev`) - * [c568f89] [minor] Some small style changes to new(er) tests. (`indexzero`) - * [8e4f1fb] code 0 should be treated as a Number too. (`Tjatse`) - * [663e49a] wait more... (`Tjatse`) - * [1f184e8] test case for start/stop peaceful (`Tjatse`) - * [8f7dfba] [fix] relative script file should works fine, both with `start` or `stop`. (`Tjatse`) - * [84cf5ad] Add --workingDir option to specify the CWD of the process in which SCRIPT is run (`Myk Willis`) - * [cb72aed] [dist] Update several dependencies to latest. (`indexzero`) + * [8707877](https://github.com/foreverjs/forever/commit/8707877) [dist] Version bump. 0.13.0 (`indexzero`) + * [3865596](https://github.com/foreverjs/forever/commit/3865596) [dist] Up-to-date linting with JSHint. Fixes #419. (`indexzero`) + * [1d863ba](https://github.com/foreverjs/forever/commit/1d863ba) Renaming stoppid -> stopbypid (`Anthony Akentiev`) + * [4adf834](https://github.com/foreverjs/forever/commit/4adf834) Little bug fix: comparing integers (`Anthony Akentiev`) + * [c29de4b](https://github.com/foreverjs/forever/commit/c29de4b) README updated (`Anthony Akentiev`) + * [54194df](https://github.com/foreverjs/forever/commit/54194df) stoppid command added to stop running under forever process by PID (`Anthony Akentiev`) + * [c568f89](https://github.com/foreverjs/forever/commit/c568f89) [minor] Some small style changes to new(er) tests. (`indexzero`) + * [8e4f1fb](https://github.com/foreverjs/forever/commit/8e4f1fb) code 0 should be treated as a Number too. (`Tjatse`) + * [663e49a](https://github.com/foreverjs/forever/commit/663e49a) wait more... (`Tjatse`) + * [1f184e8](https://github.com/foreverjs/forever/commit/1f184e8) test case for start/stop peaceful (`Tjatse`) + * [8f7dfba](https://github.com/foreverjs/forever/commit/8f7dfba) [fix] relative script file should works fine, both with `start` or `stop`. (`Tjatse`) + * [84cf5ad](https://github.com/foreverjs/forever/commit/84cf5ad) Add --workingDir option to specify the CWD of the process in which SCRIPT is run (`Myk Willis`) + * [cb72aed](https://github.com/foreverjs/forever/commit/cb72aed) [dist] Update several dependencies to latest. (`indexzero`) v0.12.0 / Thu, 30 Oct 2014 ========================== - * [b01eabb] [dist] Version bump. 0.12.0 (`indexzero`) - * [9b6c8f7] [dist] Assign things to the author and the contributors. (`indexzero`) - * [af8d228] fixes EACCESS error with .sock (UNIX domain sockets) on Windows. Uses named pipes instead. (`Miroslav Mocek`) - * [eecf6a2] improved error handling (`Kevin "Schmidty" Smith`) - * [6707a40] improved error handling (`Kevin "Schmidty" Smith`) - * [a2320aa] [minor] Do not check for a variable twice. (`indexzero`) - * [283f210] [refactor] Update to `forever-monitor@1.4.0` and do not use the deprecated `.options` option. You can see why it is deprecated. (`indexzero`) - * [73359e8] [doc] Make note that the new root is actually NOT the default since it looks like it could be. (`indexzero`) - * [a74e87c] [fix] inherits configuration from parent process when using `startDaemon` method. - make variable names camelCasing (`Tjatse`) - * [1f9b7f7] Test case of startDaemon() method - configuration inheritance issue. (`Tjatse`) - * [1102d11] [fix] inherits configuration from parent process when using `startDaemon` method. (`Tjatse`) - * [521d91a] Merge pull request #607 from ramen-dev/zero-status-code (`Charlie Robbins`) - * [487fc54] An 'error' on stopall is not actually an error (`Ryan Angilly`) - * [250a4f8] [fix doc] More documentation around `forever.startServer`. Fixes #566. (`indexzero`) - * [dfed754] [fix] Set `forever.root` and `forever.config.get(root)` for symmetry. (`indexzero`) - * [9eeeeb1] [fix doc] Update documentation. Fixes #594. (`indexzero`) - * [35f477f] [fix] Update documentation for `forever.list`. Fixes #598. (`indexzero`) - * [c21f55d] [doc fix] Document FOREVER_ROOT environment variable. Properly respect -p. Fixes #548. Fixes #541. Fixes #568. (`indexzero`) - * [0f227e5] [dist] Remove `foreverd` from scripts. Fixes #581. (`indexzero`) - * [5fb6329] [dist breaking api] Remove `forever.service`. Fixes #372. (`indexzero`) - * [938bf33] [fix] Properly boolean-ize `--killTree`. Fixes #579. (`indexzero`) - * [45f321c] [fix] Actually support the documented `--uid` or `-u` CLI option. Fixes #424. (`indexzero`) - * [3a40761] Added uid information to help usage as per README (`brianmarco`) - * [fefce03] fixed wrong usage for option fifo (`lulurun`) - * [a216e76] checks proc.running and writes STOPPED instead of uptime if stopped (`smoodiver`) - * [55141c8] Adds id parameter as outlined in https://github.com/nodejitsu/forever/issues/461. (`Jackson Gariety`) - * [99ee565] [dist] Bump to `forever-monitor@1.3.0` (`indexzero`) - * [99cddb5] [dist] Added .jshintrc (`indexzero`) - * [b8282d1] Merge pull request #577 from Mithgol/patch-1 (`Arnout Kazemier`) - * [16b1013] use SVG to display Travis CI build testing status (`Mithgol`) - * [d60d50d] Merge pull request #553 from andrewmartin/master (`Jarrett Cruger`) - * [b4a8135] fixing a small typo in the 'e.g.' portion of request, whoops. (`Andrew Martin`) - * [a248968] updating docs with the uid flag (`Andrew Martin`) - * [f730407] [dist] v0.11.1 (`Julian Duque`) - * [09c4362] Merge pull request #533 from Kontakter/master (`Julian Duque`) - * [23a217c] Fix remark from @julianduque (`Ignat Kolesnichenko`) - * [8fd4699] Merge pull request #520 from kevinkhill/feature1 (`Julian Duque`) - * [8dc2dee] Merge pull request #538 from dandv/patch-1 (`Charlie Robbins`) - * [7b20f0f] Slightly better English for the 'restarting' messages (`Dan Dascalescu`) - * [af83c0e] Allow to get logFile and pidFile from config (`Ignat Kolesnichenko`) - * [2cb60e8] Update cli.js (`Kevin Hill`) + * [b01eabb](https://github.com/foreverjs/forever/commit/b01eabb) [dist] Version bump. 0.12.0 (`indexzero`) + * [9b6c8f7](https://github.com/foreverjs/forever/commit/9b6c8f7) [dist] Assign things to the author and the contributors. (`indexzero`) + * [af8d228](https://github.com/foreverjs/forever/commit/af8d228) fixes EACCESS error with .sock (UNIX domain sockets) on Windows. Uses named pipes instead. (`Miroslav Mocek`) + * [eecf6a2](https://github.com/foreverjs/forever/commit/eecf6a2) improved error handling (`Kevin "Schmidty" Smith`) + * [6707a40](https://github.com/foreverjs/forever/commit/6707a40) improved error handling (`Kevin "Schmidty" Smith`) + * [a2320aa](https://github.com/foreverjs/forever/commit/a2320aa) [minor] Do not check for a variable twice. (`indexzero`) + * [283f210](https://github.com/foreverjs/forever/commit/283f210) [refactor] Update to `forever-monitor@1.4.0` and do not use the deprecated `.options` option. You can see why it is deprecated. (`indexzero`) + * [73359e8](https://github.com/foreverjs/forever/commit/73359e8) [doc] Make note that the new root is actually NOT the default since it looks like it could be. (`indexzero`) + * [a74e87c](https://github.com/foreverjs/forever/commit/a74e87c) [fix] inherits configuration from parent process when using `startDaemon` method. - make variable names camelCasing (`Tjatse`) + * [1f9b7f7](https://github.com/foreverjs/forever/commit/1f9b7f7) Test case of startDaemon() method - configuration inheritance issue. (`Tjatse`) + * [1102d11](https://github.com/foreverjs/forever/commit/1102d11) [fix] inherits configuration from parent process when using `startDaemon` method. (`Tjatse`) + * [487fc54](https://github.com/foreverjs/forever/commit/487fc54) An 'error' on stopall is not actually an error (`Ryan Angilly`) + * [250a4f8](https://github.com/foreverjs/forever/commit/250a4f8) [fix doc] More documentation around `forever.startServer`. Fixes #566. (`indexzero`) + * [dfed754](https://github.com/foreverjs/forever/commit/dfed754) [fix] Set `forever.root` and `forever.config.get(root)` for symmetry. (`indexzero`) + * [9eeeeb1](https://github.com/foreverjs/forever/commit/9eeeeb1) [fix doc] Update documentation. Fixes #594. (`indexzero`) + * [35f477f](https://github.com/foreverjs/forever/commit/35f477f) [fix] Update documentation for `forever.list`. Fixes #598. (`indexzero`) + * [c21f55d](https://github.com/foreverjs/forever/commit/c21f55d) [doc fix] Document FOREVER_ROOT environment variable. Properly respect -p. Fixes #548. Fixes #541. Fixes #568. (`indexzero`) + * [0f227e5](https://github.com/foreverjs/forever/commit/0f227e5) [dist] Remove `foreverd` from scripts. Fixes #581. (`indexzero`) + * [5fb6329](https://github.com/foreverjs/forever/commit/5fb6329) [dist breaking api] Remove `forever.service`. Fixes #372. (`indexzero`) + * [938bf33](https://github.com/foreverjs/forever/commit/938bf33) [fix] Properly boolean-ize `--killTree`. Fixes #579. (`indexzero`) + * [45f321c](https://github.com/foreverjs/forever/commit/45f321c) [fix] Actually support the documented `--uid` or `-u` CLI option. Fixes #424. (`indexzero`) + * [3a40761](https://github.com/foreverjs/forever/commit/3a40761) Added uid information to help usage as per README (`brianmarco`) + * [fefce03](https://github.com/foreverjs/forever/commit/fefce03) fixed wrong usage for option fifo (`lulurun`) + * [a216e76](https://github.com/foreverjs/forever/commit/a216e76) checks proc.running and writes STOPPED instead of uptime if stopped (`smoodiver`) + * [55141c8](https://github.com/foreverjs/forever/commit/55141c8) Adds id parameter as outlined in https://github.com/nodejitsu/forever/issues/461. (`Jackson Gariety`) + * [99ee565](https://github.com/foreverjs/forever/commit/99ee565) [dist] Bump to `forever-monitor@1.3.0` (`indexzero`) + * [99cddb5](https://github.com/foreverjs/forever/commit/99cddb5) [dist] Added .jshintrc (`indexzero`) + * [16b1013](https://github.com/foreverjs/forever/commit/16b1013) use SVG to display Travis CI build testing status (`Mithgol`) + * [b4a8135](https://github.com/foreverjs/forever/commit/b4a8135) fixing a small typo in the 'e.g.' portion of request, whoops. (`Andrew Martin`) + * [a248968](https://github.com/foreverjs/forever/commit/a248968) updating docs with the uid flag (`Andrew Martin`) + * [f730407](https://github.com/foreverjs/forever/commit/f730407) [dist] v0.11.1 (`Julian Duque`) + * [23a217c](https://github.com/foreverjs/forever/commit/23a217c) Fix remark from @julianduque (`Ignat Kolesnichenko`) + * [7b20f0f](https://github.com/foreverjs/forever/commit/7b20f0f) Slightly better English for the 'restarting' messages (`Dan Dascalescu`) + * [af83c0e](https://github.com/foreverjs/forever/commit/af83c0e) Allow to get logFile and pidFile from config (`Ignat Kolesnichenko`) + * [2cb60e8](https://github.com/foreverjs/forever/commit/2cb60e8) Update cli.js (`Kevin Hill`) v0.11.0 / Thu, 10 Apr 2014 ========================== - * [09d8403] [dist] Version bump. 0.11.0 (`Jarrett Cruger`) - * [dd08616] Merge pull request #531 from jeromew/patch-1 (`Jarrett Cruger`) - * [5e15626] FIX: added FOREVER_ROOT variable (`srossross`) - * [3cbabf4] "forever start" hangs with node 0.11.9 (`jeromew`) - * [b873164] Merge pull request #516 from meritt/patch-1 (`Julian Duque`) - * [7ff651b] Delete CHANGELOG.md (`Alexey Simonenko`) - * [786271f] [dist] v0.10.11 (`Julian Duque`) - * [7f4e4e9] [dist] Bump dependencies (`Julian Duque`) - * [4822fec] [fix] Trying to avoid the non-determinism in tests (`Julian Duque`) - * [2e75aa1] [fix] Add --killSignal to help (`Julian Duque`) - * [b2b49d1] [minor] Change order of option in help (`Julian Duque`) - * [45800aa] Merge pull request #457 from jmav/patch-1 (`Julian Duque`) - * [88071a2] Merge pull request #423 from kbackowski/fix_watch_ignore_pattern_array (`Julian Duque`) - * [b0ec661] [dist] v0.10.10 (`Julian Duque`) - * [f356fe1] Merge branch 'master' of https://github.com/nodejitsu/forever (`Julian Duque`) - * [2db62a6] Merge branch 'alternative' of https://github.com/chester1000/forever into chester1000-alternative (`Julian Duque`) - * [8b7c92b] Merge pull request #498 from askhogan/patch-2 (`Julian Duque`) - * [c3199b8] Merge branch 'master' of https://github.com/jillix/forever into jillix-master (`Julian Duque`) - * [bc48ca6] [fix] Make vows happy (`Julian Duque`) - * [2df789d] Updated timespan to 2.1.0 (`Gabriel Petrovay`) - * [70ab37e] Add --watchIgnore and colors (`Patrick Hogan`) - * [a7d419c] Update README.md (`Jure`) - * [2ba3158] Fixed watchIgnorePatterns assignment (`kbackowski`) - * [acf59a7] Proper Revert "[fix] Make `-v|--version` work. Fixes #303." (`Maurycy Damian Wasilewski`) + * [09d8403](https://github.com/foreverjs/forever/commit/09d8403) [dist] Version bump. 0.11.0 (`Jarrett Cruger`) + * [5e15626](https://github.com/foreverjs/forever/commit/5e15626) FIX: added FOREVER_ROOT variable (`srossross`) + * [3cbabf4](https://github.com/foreverjs/forever/commit/3cbabf4) "forever start" hangs with node 0.11.9 (`jeromew`) + * [7ff651b](https://github.com/foreverjs/forever/commit/7ff651b) Delete CHANGELOG.md (`Alexey Simonenko`) + * [786271f](https://github.com/foreverjs/forever/commit/786271f) [dist] v0.10.11 (`Julian Duque`) + * [7f4e4e9](https://github.com/foreverjs/forever/commit/7f4e4e9) [dist] Bump dependencies (`Julian Duque`) + * [4822fec](https://github.com/foreverjs/forever/commit/4822fec) [fix] Trying to avoid the non-determinism in tests (`Julian Duque`) + * [2e75aa1](https://github.com/foreverjs/forever/commit/2e75aa1) [fix] Add --killSignal to help (`Julian Duque`) + * [b2b49d1](https://github.com/foreverjs/forever/commit/b2b49d1) [minor] Change order of option in help (`Julian Duque`) + * [b0ec661](https://github.com/foreverjs/forever/commit/b0ec661) [dist] v0.10.10 (`Julian Duque`) + * [bc48ca6](https://github.com/foreverjs/forever/commit/bc48ca6) [fix] Make vows happy (`Julian Duque`) + * [2df789d](https://github.com/foreverjs/forever/commit/2df789d) Updated timespan to 2.1.0 (`Gabriel Petrovay`) + * [70ab37e](https://github.com/foreverjs/forever/commit/70ab37e) Add --watchIgnore and colors (`Patrick Hogan`) + * [a7d419c](https://github.com/foreverjs/forever/commit/a7d419c) Update README.md (`Jure`) + * [2ba3158](https://github.com/foreverjs/forever/commit/2ba3158) Fixed watchIgnorePatterns assignment (`kbackowski`) + * [acf59a7](https://github.com/foreverjs/forever/commit/acf59a7) Proper Revert "[fix] Make `-v|--version` work. Fixes #303." (`Maurycy Damian Wasilewski`) v0.10.9 / Tue, 15 Oct 2013 ========================== - * [bc55bbf] [dist] Bump version to 0.10.9 (`Maciej Małecki`) - * [b4b0541] [dist] Use `forever-monitor@1.2.3` (`Maciej Małecki`) + * [bc55bbf](https://github.com/foreverjs/forever/commit/bc55bbf) [dist] Bump version to 0.10.9 (`Maciej Małecki`) + * [b4b0541](https://github.com/foreverjs/forever/commit/b4b0541) [dist] Use `forever-monitor@1.2.3` (`Maciej Małecki`) v0.10.8 / Fri, 10 May 2013 ========================== - * [a4289d1] [dist] Bump version to 0.10.8 (`Maciej Małecki`) - * [8afad64] [ui dist] Output info about process being killed by signal (`Maciej Małecki`) + * [a4289d1](https://github.com/foreverjs/forever/commit/a4289d1) [dist] Bump version to 0.10.8 (`Maciej Małecki`) + * [8afad64](https://github.com/foreverjs/forever/commit/8afad64) [ui dist] Output info about process being killed by signal (`Maciej Małecki`) v0.10.7 / Sat, 27 Apr 2013 ========================== - * [22a3923] [dist] Version bump. 0.10.7 (`indexzero`) - * [6440b4e] [fix] remove duplicate option (`Julian Duque`) + * [22a3923](https://github.com/foreverjs/forever/commit/22a3923) [dist] Version bump. 0.10.7 (`indexzero`) + * [6440b4e](https://github.com/foreverjs/forever/commit/6440b4e) [fix] remove duplicate option (`Julian Duque`) v0.10.6 / Sun, 21 Apr 2013 ========================== - * [e8c48d4] [dist] Version bump. 0.10.6 (`indexzero`) + * [e8c48d4](https://github.com/foreverjs/forever/commit/e8c48d4) [dist] Version bump. 0.10.6 (`indexzero`) v0.10.5 / Sun, 21 Apr 2013 ========================== - * [a9d7aa1] [dist] Version bump. 0.10.5 (`indexzero`) - * [02b44b1] Merge pull request #390 from yyx990803/cli-restartall-fix (`Charlie Robbins`) - * [1a1ba32] [fix] Make `-v|--version` work. Fixes #303. (`indexzero`) - * [10fa40f] [fix dist] Bump to `nssocket@0.10.0` to support `node@0.10.x`. Update travis to test it. Fixes #370. Fixes #400. (`indexzero`) - * [bd42888] [fix] Manually merge #405. Fixes #405. (`indexzero`) - * [d3675fa] process exit on error (`Noah H. Smith`) - * [b641a4a] [minor] Style compliance for #403. Fixes #403. (`indexzero`) - * [477082b] add the --watchIgnore option to be able to ignore files or directories when --watch is enabled (`Stéphane Gully`) - * [5fa39ce] [fix] Return `monitor` from `.startDaemon()`. Fixes #387. Fixes #389. (`indexzero`) - * [bda8604] [fix] Manually merge `plain-feature` because of trailing space noise. Fixes #381. [dist] Bump dependencies (`indexzero`) - * [6047462] [fix] Added the default `dir` column which outputs the sourceDir from `forever-monitor`. Fixes #367. (`indexzero`) - * [9cbe4cb] [fix dist] Update to the latest `forever-monitor`. Fixes #361. (`indexzero`) - * [055c483] [fix] Warn users if `--minUptime` or `--spinSleepTime` are not specified. Fixes #344. (`indexzero`) - * [1e4b2f6] added and cli options for streaming log output, updated README.md and tests to reflect changes (`John Lancaster`) - * [94f61f5] removed trailing whitespace from lib/forever.js and lib/forever/cli.js ☠ (`John Lancaster`) - * [1ec1a16] Merge pull request #395 from vanthome/patch-2 (`Nathan Zadoks`) - * [352947e] Update package.json (`Thomas`) - * [dc1c3f9] Merge pull request #352 from ingmr/master (`Charlie Robbins`) - * [e442ea9] add no process error handling to cli.restartAll (`Evan You`) - * [3b3d04b] Merge pull request #380 from nodejitsu/timestamp-logs (`Charlie Robbins`) - * [2e52eaa] Merge pull request #345 from jazzzz/fix-index-parsing (`Julian Duque`) - * [c4d2274] Merge pull request #360 from filipovskii/master (`Julian Duque`) - * [d3ff4bd] Add timestamp support to forever log (`Julian Duque`) - * [9b2b451] Merge pull request #362 from estliberitas/master (`Charlie Robbins`) - * [b999bc2] Support exit signal customization (comes from another commit to forever-monitor) (`Alexander Makarenko`) - * [3feef60] Use `path` option as forever root if given. (`filipovskii_off`) - * [6ee6f9a] Merge pull request #333 from fb55/master (`Charlie Robbins`) - * [3496b64] use process.env.USERPROFILE as alternative to process.env.HOME (for windows) (`ingmr`) - * [2b2ebbc] Fix uids mistakenly taken for an id (`Jazz`) - * [e52b063] wrapped fs.unlinkSync in try-catch-block (`Felix Böhm`) - * [094ebd4] Merge pull request #340 from fb55/patch-1 (`Maciej Małecki`) - * [33dc125] added a helpful error message (`Felix Böhm`) - * [f69eb4d] Updated flatiron dependency to 0.2.8 (`Ian Babrou`) - * [4e7fa8f] pid variable not use. (`Thomas Tourlourat`) - * [5b7f30b] don't remove log files (`Felix Böhm`) - * [a73eb5a] remove pid- & logfiles on `exit` and `stop` (`Felix Böhm`) - * [70a6acd] [api] Accept --killTree from CLI (`indexzero`) - * [d3aedc9] Merge pull request #330 from bramstein/patch-1 (`Charlie Robbins`) - * [777256f] Update lib/forever.js (`Bram Stein`) + * [a9d7aa1](https://github.com/foreverjs/forever/commit/a9d7aa1) [dist] Version bump. 0.10.5 (`indexzero`) + * [1a1ba32](https://github.com/foreverjs/forever/commit/1a1ba32) [fix] Make `-v|--version` work. Fixes #303. (`indexzero`) + * [10fa40f](https://github.com/foreverjs/forever/commit/10fa40f) [fix dist] Bump to `nssocket@0.10.0` to support `node@0.10.x`. Update travis to test it. Fixes #370. Fixes #400. (`indexzero`) + * [bd42888](https://github.com/foreverjs/forever/commit/bd42888) [fix] Manually merge #405. Fixes #405. (`indexzero`) + * [d3675fa](https://github.com/foreverjs/forever/commit/d3675fa) process exit on error (`Noah H. Smith`) + * [b641a4a](https://github.com/foreverjs/forever/commit/b641a4a) [minor] Style compliance for #403. Fixes #403. (`indexzero`) + * [477082b](https://github.com/foreverjs/forever/commit/477082b) add the --watchIgnore option to be able to ignore files or directories when --watch is enabled (`Stéphane Gully`) + * [5fa39ce](https://github.com/foreverjs/forever/commit/5fa39ce) [fix] Return `monitor` from `.startDaemon()`. Fixes #387. Fixes #389. (`indexzero`) + * [bda8604](https://github.com/foreverjs/forever/commit/bda8604) [fix] Manually merge `plain-feature` because of trailing space noise. Fixes #381. [dist] Bump dependencies (`indexzero`) + * [6047462](https://github.com/foreverjs/forever/commit/6047462) [fix] Added the default `dir` column which outputs the sourceDir from `forever-monitor`. Fixes #367. (`indexzero`) + * [9cbe4cb](https://github.com/foreverjs/forever/commit/9cbe4cb) [fix dist] Update to the latest `forever-monitor`. Fixes #361. (`indexzero`) + * [055c483](https://github.com/foreverjs/forever/commit/055c483) [fix] Warn users if `--minUptime` or `--spinSleepTime` are not specified. Fixes #344. (`indexzero`) + * [1e4b2f6](https://github.com/foreverjs/forever/commit/1e4b2f6) added and cli options for streaming log output, updated README.md and tests to reflect changes (`John Lancaster`) + * [94f61f5](https://github.com/foreverjs/forever/commit/94f61f5) removed trailing whitespace from lib/forever.js and lib/forever/cli.js ☠ (`John Lancaster`) + * [352947e](https://github.com/foreverjs/forever/commit/352947e) Update package.json (`Thomas`) + * [e442ea9](https://github.com/foreverjs/forever/commit/e442ea9) add no process error handling to cli.restartAll (`Evan You`) + * [d3ff4bd](https://github.com/foreverjs/forever/commit/d3ff4bd) Add timestamp support to forever log (`Julian Duque`) + * [b999bc2](https://github.com/foreverjs/forever/commit/b999bc2) Support exit signal customization (comes from another commit to forever-monitor) (`Alexander Makarenko`) + * [3feef60](https://github.com/foreverjs/forever/commit/3feef60) Use `path` option as forever root if given. (`filipovskii_off`) + * [3496b64](https://github.com/foreverjs/forever/commit/3496b64) use process.env.USERPROFILE as alternative to process.env.HOME (for windows) (`ingmr`) + * [2b2ebbc](https://github.com/foreverjs/forever/commit/2b2ebbc) Fix uids mistakenly taken for an id (`Jazz`) + * [e52b063](https://github.com/foreverjs/forever/commit/e52b063) wrapped fs.unlinkSync in try-catch-block (`Felix Böhm`) + * [33dc125](https://github.com/foreverjs/forever/commit/33dc125) added a helpful error message (`Felix Böhm`) + * [f69eb4d](https://github.com/foreverjs/forever/commit/f69eb4d) Updated flatiron dependency to 0.2.8 (`Ian Babrou`) + * [4e7fa8f](https://github.com/foreverjs/forever/commit/4e7fa8f) pid variable not use. (`Thomas Tourlourat`) + * [5b7f30b](https://github.com/foreverjs/forever/commit/5b7f30b) don't remove log files (`Felix Böhm`) + * [a73eb5a](https://github.com/foreverjs/forever/commit/a73eb5a) remove pid- & logfiles on `exit` and `stop` (`Felix Böhm`) + * [70a6acd](https://github.com/foreverjs/forever/commit/70a6acd) [api] Accept --killTree from CLI (`indexzero`) + * [777256f](https://github.com/foreverjs/forever/commit/777256f) Update lib/forever.js (`Bram Stein`) v0.10.1 / Sun, 8 Jul 2012 ========================= - * [4ed446f] [dist] Version bump. 0.10.1 (`indexzero`) - * [df802d0] [dist] Bump forever-monitor version (`indexzero`) + * [4ed446f](https://github.com/foreverjs/forever/commit/4ed446f) [dist] Version bump. 0.10.1 (`indexzero`) + * [df802d0](https://github.com/foreverjs/forever/commit/df802d0) [dist] Bump forever-monitor version (`indexzero`) v0.10.0 / Sun, 8 Jul 2012 ========================= - * [c8afac3] [dist] Version bump. 0.10.0 (`indexzero`) - * [c2baf66] [minor] Prefer no spaces when declaring Array instances (`indexzero`) - * [9823d13] [fix] Ensure pidFile is written to disk (and updated on restart) by bin/monitor (`indexzero`) - * [1dfe0d0] [dist] Update dependencies to hard versions (`indexzero`) - * [6921e6c] [refactor minor] Final integrations for `forever-monitor@1.0.1` (`indexzero`) - * [f27cdaa] [doc] Remove documenetation specific to `forever-monitor` (`indexzero`) - * [d9e5faa] [fix] Remove require for unused `ps-tree` (`indexzero`) - * [14e5bda] [dist] Only support node@0.8.x (`indexzero`) - * [91bda36] [refactor] Examples are now in `forever-monitor` (`indexzero`) - * [c1f1e6f] [dist] Remove outdated docco docs (`indexzero`) - * [b5ce548] [refactor] Finish refactor of core Monitor functionality into `forever-monitor` (`indexzero`) - * [5225d68] [refactor] Moved test/core/check-process-test.js into `forever-monitor` (`indexzero`) - * [b46c4c0] [refactor] Remove all code in `forever-monitor` (`indexzero`) - * [a5343df] [fix] Use process.execPath for spawning. (`Charlie McConnell`) - * [4ed1beb] [fix] Use process.execPath instead of a hashbang. (`Charlie McConnell`) - * [4f72f8c] [fix] Fix bad require path. (`Charlie McConnell`) - * [665e1ec] [test] Temporary: prevent test failure from deprecation warning in core. (`Charlie McConnell`) - * [1e8d7ca] [refactor] Remove unused fork-shim (`Charlie McConnell`) - * [a1e8f21] [test] Only test on node 0.8.x (`Charlie McConnell`) - * [b7c303a] [refactor] Implement silent fork via spawn stdio options. (`Charlie McConnell`) - * [4fed919] [refactor] Refactor to remove daemon.node (`Charlie McConnell`) - * [485a18b] [dist] Remove microtime dependency (`Charlie McConnell`) - * [45a7e51] [dist] Remove `node-fork` dependency (`Maciej Małecki`) - * [ba6b76d] [test] Remove test for `forkShim` option (`Maciej Małecki`) - * [16d1419] [refactor api] Start using native fork (`Maciej Małecki`) - * [d000278] [docs] Add Travis CI badge to README. (`Charlie McConnell`) - * [2e2d18a] [test] Add .travis.yml for Travis CI. (`Charlie McConnell`) + * [c8afac3](https://github.com/foreverjs/forever/commit/c8afac3) [dist] Version bump. 0.10.0 (`indexzero`) + * [c2baf66](https://github.com/foreverjs/forever/commit/c2baf66) [minor] Prefer no spaces when declaring Array instances (`indexzero`) + * [9823d13](https://github.com/foreverjs/forever/commit/9823d13) [fix] Ensure pidFile is written to disk (and updated on restart) by bin/monitor (`indexzero`) + * [1dfe0d0](https://github.com/foreverjs/forever/commit/1dfe0d0) [dist] Update dependencies to hard versions (`indexzero`) + * [6921e6c](https://github.com/foreverjs/forever/commit/6921e6c) [refactor minor] Final integrations for `forever-monitor@1.0.1` (`indexzero`) + * [f27cdaa](https://github.com/foreverjs/forever/commit/f27cdaa) [doc] Remove documenetation specific to `forever-monitor` (`indexzero`) + * [d9e5faa](https://github.com/foreverjs/forever/commit/d9e5faa) [fix] Remove require for unused `ps-tree` (`indexzero`) + * [14e5bda](https://github.com/foreverjs/forever/commit/14e5bda) [dist] Only support node@0.8.x (`indexzero`) + * [91bda36](https://github.com/foreverjs/forever/commit/91bda36) [refactor] Examples are now in `forever-monitor` (`indexzero`) + * [c1f1e6f](https://github.com/foreverjs/forever/commit/c1f1e6f) [dist] Remove outdated docco docs (`indexzero`) + * [b5ce548](https://github.com/foreverjs/forever/commit/b5ce548) [refactor] Finish refactor of core Monitor functionality into `forever-monitor` (`indexzero`) + * [5225d68](https://github.com/foreverjs/forever/commit/5225d68) [refactor] Moved test/core/check-process-test.js into `forever-monitor` (`indexzero`) + * [b46c4c0](https://github.com/foreverjs/forever/commit/b46c4c0) [refactor] Remove all code in `forever-monitor` (`indexzero`) + * [a5343df](https://github.com/foreverjs/forever/commit/a5343df) [fix] Use process.execPath for spawning. (`Charlie McConnell`) + * [4ed1beb](https://github.com/foreverjs/forever/commit/4ed1beb) [fix] Use process.execPath instead of a hashbang. (`Charlie McConnell`) + * [4f72f8c](https://github.com/foreverjs/forever/commit/4f72f8c) [fix] Fix bad require path. (`Charlie McConnell`) + * [665e1ec](https://github.com/foreverjs/forever/commit/665e1ec) [test] Temporary: prevent test failure from deprecation warning in core. (`Charlie McConnell`) + * [1e8d7ca](https://github.com/foreverjs/forever/commit/1e8d7ca) [refactor] Remove unused fork-shim (`Charlie McConnell`) + * [a1e8f21](https://github.com/foreverjs/forever/commit/a1e8f21) [test] Only test on node 0.8.x (`Charlie McConnell`) + * [b7c303a](https://github.com/foreverjs/forever/commit/b7c303a) [refactor] Implement silent fork via spawn stdio options. (`Charlie McConnell`) + * [4fed919](https://github.com/foreverjs/forever/commit/4fed919) [refactor] Refactor to remove daemon.node (`Charlie McConnell`) + * [485a18b](https://github.com/foreverjs/forever/commit/485a18b) [dist] Remove microtime dependency (`Charlie McConnell`) + * [45a7e51](https://github.com/foreverjs/forever/commit/45a7e51) [dist] Remove `node-fork` dependency (`Maciej Małecki`) + * [ba6b76d](https://github.com/foreverjs/forever/commit/ba6b76d) [test] Remove test for `forkShim` option (`Maciej Małecki`) + * [16d1419](https://github.com/foreverjs/forever/commit/16d1419) [refactor api] Start using native fork (`Maciej Małecki`) + * [d000278](https://github.com/foreverjs/forever/commit/d000278) [docs] Add Travis CI badge to README. (`Charlie McConnell`) + * [2e2d18a](https://github.com/foreverjs/forever/commit/2e2d18a) [test] Add .travis.yml for Travis CI. (`Charlie McConnell`) v0.9.2 / Mon, 11 Jun 2012 ========================= - * [02abd44] [dist] Version bump v0.9.2 (`Charlie McConnell`) - * [95d3e1a] [minor] Remove unused argument. (`Charlie McConnell`) - * [44490e6] [test fix] Add missing .foreverignore test fixture. (`Charlie McConnell`) - * [4245e54] [fix] Update startOrRestart to fix bugs. (`Christian Howe`) - * [6a9a268] Merge pull request #290 from fedot/patch-1 (`Marak Squires`) - * [592a1eb] Added `watchDirectory` to the list of options in README (to fulfill #271) (`Fedot Praslov`) - * [cf5e5be] [dist] Use daemon.node v0.5.x (`Charlie McConnell`) - * [13ef52f] [dist] Fix maintainers field (`Christian Howe`) + * [02abd44](https://github.com/foreverjs/forever/commit/02abd44) [dist] Version bump v0.9.2 (`Charlie McConnell`) + * [95d3e1a](https://github.com/foreverjs/forever/commit/95d3e1a) [minor] Remove unused argument. (`Charlie McConnell`) + * [44490e6](https://github.com/foreverjs/forever/commit/44490e6) [test fix] Add missing .foreverignore test fixture. (`Charlie McConnell`) + * [4245e54](https://github.com/foreverjs/forever/commit/4245e54) [fix] Update startOrRestart to fix bugs. (`Christian Howe`) + * [592a1eb](https://github.com/foreverjs/forever/commit/592a1eb) Added `watchDirectory` to the list of options in README (to fulfill #271) (`Fedot Praslov`) + * [cf5e5be](https://github.com/foreverjs/forever/commit/cf5e5be) [dist] Use daemon.node v0.5.x (`Charlie McConnell`) + * [13ef52f](https://github.com/foreverjs/forever/commit/13ef52f) [dist] Fix maintainers field (`Christian Howe`) v0.9.1 / Sat, 5 May 2012 ======================== - * [75bfdab] [dist] Version bump v0.9.1 (`Charlie McConnell`) - * [4116f85] [fix] Pass argv options properly. (`Charlie McConnell`) - * [44c2337] closes #164 and #235 fix wrong usage of matchBase option of minimatch, use relative to watchDirectory path fore matching (`Oleg Slobodskoi`) - * [2a7c477] Added watchDirectory to command line options (`Fedot Praslov`) - * [8af6803] [fix] Revert bad options commit. (`Charlie McConnell`) - * [5d21f97] [fix] Fix unhandled `error` event in `forever stopall` (`Maciej Małecki`) - * [49c2c47] [fix] Correct function name (`Maciej Małecki`) - * [f3b119b] [dist] Version bump v0.9.0 (`Charlie McConnell`) - * [b4798d8] [test fix] Make logger test more consistent. (`Charlie McConnell`) - * [4848f90] [test] Add test fixture for producing logging output. (`Charlie McConnell`) - * [73b10be] [test] New logging test for the new logging plugin. (`Charlie McConnell`) - * [8ec0bce] [fix] Restore stdout and stderr events, fix semantics of silent option. (`Charlie McConnell`) - * [0b80e4d] Minor wording fix (`Andrew Radev`) - * [9c787df] Stop or restart a process by its uid (`Andrew Radev`) - * [af5b8c2] [fix] cli pidFile text (`Bradley Meck`) - * [1ad16b0] [pull-request] #244, from @michaelcdillon (`Bradley Meck`) - * [ea5317c] [doc] Remove unused `forever` option from docs (`Maciej Małecki`) - * [8474c9c] [api] forkShim option should allow a string to say which module to use when shimming (rather than the one currently used by this process) (`Bradley Meck`) - * [2f93ba4] [fix] Destroy log file streams in a more intelligent way. (`Charlie McConnell`) - * [89f3614] [fix] Logging now survives child process restarts. (`Charlie McConnell`) - * [2d7d462] [minor] Dont use optimist directly (`Joshua Holbrook`) - * [cda371d] [fix] Pass argvOptions to app.config.argv as well. (`Joshua Holbrook`) - * [8529281] [refactor] Remove logging code from monitor. (`Charlie McConnell`) - * [70ae4f4] [refactor] Replace logging plugin. (`Charlie McConnell`) - * [a6a1675] [fix] Remove duplicate alias. (`Charlie McConnell`) - * [dd1508b] [fix] s/appendLog/append/g to make --append work. (`Charlie McConnell`) - * [298ec73] [fix] Restore optional logfile destination functionality. (`Charlie McConnell`) - * [a0c9ac5] [fix] Restore self.warn method on monitor instance. (`Charlie McConnell`) - * [114e378] [dist] Update package.json to use fork of daemon.node. (`Charlie McConnell`) - * [8186994] [fix] Alter logging paths to reduce memory leakage and prevent stdio issues. (`Charlie McConnell`) - * [5c8fcc5] [fix] Update forever.startDaemon to use adjusted daemon.node api. (`Charlie McConnell`) - * [f44d5f4] Fix worker crash from bad socket client (`Felix Geisendörfer`) - * [b093bfc] [fix api] Expose `checkFile` and fix logical condition (`Maciej Małecki`) - * [e154a50] [fix] Pass options.argv instead of options (cli.js, line 188) (`Joshua Holbrook`) - * [5aa16c3] [dist] v0.8.5 (`Bradley Meck`) - * [157ce7b] [fix] use env `bash` rather than bin/sh (`Bradley Meck`) - * [205e6f3] [fix] EACCESS should still go to next() in `forever list` (`Bradley Meck`) + * [75bfdab](https://github.com/foreverjs/forever/commit/75bfdab) [dist] Version bump v0.9.1 (`Charlie McConnell`) + * [4116f85](https://github.com/foreverjs/forever/commit/4116f85) [fix] Pass argv options properly. (`Charlie McConnell`) + * [44c2337](https://github.com/foreverjs/forever/commit/44c2337) closes #164 and #235 fix wrong usage of matchBase option of minimatch, use relative to watchDirectory path fore matching (`Oleg Slobodskoi`) + * [2a7c477](https://github.com/foreverjs/forever/commit/2a7c477) Added watchDirectory to command line options (`Fedot Praslov`) + * [8af6803](https://github.com/foreverjs/forever/commit/8af6803) [fix] Revert bad options commit. (`Charlie McConnell`) + * [5d21f97](https://github.com/foreverjs/forever/commit/5d21f97) [fix] Fix unhandled `error` event in `forever stopall` (`Maciej Małecki`) + * [49c2c47](https://github.com/foreverjs/forever/commit/49c2c47) [fix] Correct function name (`Maciej Małecki`) + * [f3b119b](https://github.com/foreverjs/forever/commit/f3b119b) [dist] Version bump v0.9.0 (`Charlie McConnell`) + * [b4798d8](https://github.com/foreverjs/forever/commit/b4798d8) [test fix] Make logger test more consistent. (`Charlie McConnell`) + * [4848f90](https://github.com/foreverjs/forever/commit/4848f90) [test] Add test fixture for producing logging output. (`Charlie McConnell`) + * [73b10be](https://github.com/foreverjs/forever/commit/73b10be) [test] New logging test for the new logging plugin. (`Charlie McConnell`) + * [8ec0bce](https://github.com/foreverjs/forever/commit/8ec0bce) [fix] Restore stdout and stderr events, fix semantics of silent option. (`Charlie McConnell`) + * [0b80e4d](https://github.com/foreverjs/forever/commit/0b80e4d) Minor wording fix (`Andrew Radev`) + * [9c787df](https://github.com/foreverjs/forever/commit/9c787df) Stop or restart a process by its uid (`Andrew Radev`) + * [af5b8c2](https://github.com/foreverjs/forever/commit/af5b8c2) [fix] cli pidFile text (`Bradley Meck`) + * [1ad16b0](https://github.com/foreverjs/forever/commit/1ad16b0) [pull-request] #244, from @michaelcdillon (`Bradley Meck`) + * [ea5317c](https://github.com/foreverjs/forever/commit/ea5317c) [doc] Remove unused `forever` option from docs (`Maciej Małecki`) + * [8474c9c](https://github.com/foreverjs/forever/commit/8474c9c) [api] forkShim option should allow a string to say which module to use when shimming (rather than the one currently used by this process) (`Bradley Meck`) + * [2f93ba4](https://github.com/foreverjs/forever/commit/2f93ba4) [fix] Destroy log file streams in a more intelligent way. (`Charlie McConnell`) + * [89f3614](https://github.com/foreverjs/forever/commit/89f3614) [fix] Logging now survives child process restarts. (`Charlie McConnell`) + * [2d7d462](https://github.com/foreverjs/forever/commit/2d7d462) [minor] Dont use optimist directly (`Joshua Holbrook`) + * [cda371d](https://github.com/foreverjs/forever/commit/cda371d) [fix] Pass argvOptions to app.config.argv as well. (`Joshua Holbrook`) + * [8529281](https://github.com/foreverjs/forever/commit/8529281) [refactor] Remove logging code from monitor. (`Charlie McConnell`) + * [70ae4f4](https://github.com/foreverjs/forever/commit/70ae4f4) [refactor] Replace logging plugin. (`Charlie McConnell`) + * [a6a1675](https://github.com/foreverjs/forever/commit/a6a1675) [fix] Remove duplicate alias. (`Charlie McConnell`) + * [dd1508b](https://github.com/foreverjs/forever/commit/dd1508b) [fix] s/appendLog/append/g to make --append work. (`Charlie McConnell`) + * [298ec73](https://github.com/foreverjs/forever/commit/298ec73) [fix] Restore optional logfile destination functionality. (`Charlie McConnell`) + * [a0c9ac5](https://github.com/foreverjs/forever/commit/a0c9ac5) [fix] Restore self.warn method on monitor instance. (`Charlie McConnell`) + * [114e378](https://github.com/foreverjs/forever/commit/114e378) [dist] Update package.json to use fork of daemon.node. (`Charlie McConnell`) + * [8186994](https://github.com/foreverjs/forever/commit/8186994) [fix] Alter logging paths to reduce memory leakage and prevent stdio issues. (`Charlie McConnell`) + * [5c8fcc5](https://github.com/foreverjs/forever/commit/5c8fcc5) [fix] Update forever.startDaemon to use adjusted daemon.node api. (`Charlie McConnell`) + * [f44d5f4](https://github.com/foreverjs/forever/commit/f44d5f4) Fix worker crash from bad socket client (`Felix Geisendörfer`) + * [b093bfc](https://github.com/foreverjs/forever/commit/b093bfc) [fix api] Expose `checkFile` and fix logical condition (`Maciej Małecki`) + * [e154a50](https://github.com/foreverjs/forever/commit/e154a50) [fix] Pass options.argv instead of options (cli.js, line 188) (`Joshua Holbrook`) + * [5aa16c3](https://github.com/foreverjs/forever/commit/5aa16c3) [dist] v0.8.5 (`Bradley Meck`) + * [157ce7b](https://github.com/foreverjs/forever/commit/157ce7b) [fix] use env `bash` rather than bin/sh (`Bradley Meck`) + * [205e6f3](https://github.com/foreverjs/forever/commit/205e6f3) [fix] EACCESS should still go to next() in `forever list` (`Bradley Meck`) v0.8.4 / Sun, 15 Jan 2012 ========================= - * [6094c7c] [dist] Version bump. 0.8.4 (`indexzero`) - * [1f4f5dc] [fix test] Make test/monitor/fork-test.js idempotent for processes created (`indexzero`) - * [b6daac5] [dist] `node-fork@0.4.x` (`indexzero`) - * [92d7dee] [doc] Update examples/cli-multiple-start (`indexzero`) - * [1fa4943] [refactor] Create unique worker socket files using the `microtime` module (`indexzero`) - * [72dac45] [fix] Update bad reference variable to forever in watch plugin (`indexzero`) + * [6094c7c](https://github.com/foreverjs/forever/commit/6094c7c) [dist] Version bump. 0.8.4 (`indexzero`) + * [1f4f5dc](https://github.com/foreverjs/forever/commit/1f4f5dc) [fix test] Make test/monitor/fork-test.js idempotent for processes created (`indexzero`) + * [b6daac5](https://github.com/foreverjs/forever/commit/b6daac5) [dist] `node-fork@0.4.x` (`indexzero`) + * [92d7dee](https://github.com/foreverjs/forever/commit/92d7dee) [doc] Update examples/cli-multiple-start (`indexzero`) + * [1fa4943](https://github.com/foreverjs/forever/commit/1fa4943) [refactor] Create unique worker socket files using the `microtime` module (`indexzero`) + * [72dac45](https://github.com/foreverjs/forever/commit/72dac45) [fix] Update bad reference variable to forever in watch plugin (`indexzero`) v0.8.3 / Fri, 13 Jan 2012 ========================= - * [96277b7] [dist] Version bump. 0.8.3. (`indexzero`) - * [432a088] [fix] Allow for `forever set` to include values with `/` (i.e. directories) (`indexzero`) - * [6bfe071] [fix test] try/catch around test/fixtures/* (`indexzero`) - * [80f9bec] Merge pull request #222 from skyisle/master (`Charlie Robbins`) - * [7064adb] Show -a option when user met log file exist error. (`skyisle`) - * [4e2ab81] [fix] Don't leak `fs`, `path`, `nssocket`, `utile` and `forever` (`Maciej Małecki`) - * [9b0ad25] [fix] Don't leak `mkdirp` and `async` (`Maciej Małecki`) + * [96277b7](https://github.com/foreverjs/forever/commit/96277b7) [dist] Version bump. 0.8.3. (`indexzero`) + * [432a088](https://github.com/foreverjs/forever/commit/432a088) [fix] Allow for `forever set` to include values with `/` (i.e. directories) (`indexzero`) + * [6bfe071](https://github.com/foreverjs/forever/commit/6bfe071) [fix test] try/catch around test/fixtures/* (`indexzero`) + * [7064adb](https://github.com/foreverjs/forever/commit/7064adb) Show -a option when user met log file exist error. (`skyisle`) + * [4e2ab81](https://github.com/foreverjs/forever/commit/4e2ab81) [fix] Don't leak `fs`, `path`, `nssocket`, `utile` and `forever` (`Maciej Małecki`) + * [9b0ad25](https://github.com/foreverjs/forever/commit/9b0ad25) [fix] Don't leak `mkdirp` and `async` (`Maciej Małecki`) v0.8.2 / Fri, 6 Jan 2012 ======================== - * [6779342] [dist] Version bump. 0.8.2 (`indexzero`) - * [6588f59] [api test] Expose `.forkShim` for communicating between `0.6.x` and `0.4.x` processes (`indexzero`) - * [82e2a7d] [api refactor] Remove fork hack since we are now using `node-fork` (`indexzero`) - * [a2c4313] [test fix] Fix test/worker/multiple-workers-test.js to pass on node@0.4.x and be idempotent (`indexzero`) - * [63676ed] [minor] Whitespace update (`indexzero`) - * [a987826] [fix] Attempt to listen again if EADDRINUSE in forever.Worker (`indexzero`) - * [d711ab8] [minor] Whitespace update (`indexzero`) + * [6779342](https://github.com/foreverjs/forever/commit/6779342) [dist] Version bump. 0.8.2 (`indexzero`) + * [6588f59](https://github.com/foreverjs/forever/commit/6588f59) [api test] Expose `.forkShim` for communicating between `0.6.x` and `0.4.x` processes (`indexzero`) + * [82e2a7d](https://github.com/foreverjs/forever/commit/82e2a7d) [api refactor] Remove fork hack since we are now using `node-fork` (`indexzero`) + * [a2c4313](https://github.com/foreverjs/forever/commit/a2c4313) [test fix] Fix test/worker/multiple-workers-test.js to pass on node@0.4.x and be idempotent (`indexzero`) + * [63676ed](https://github.com/foreverjs/forever/commit/63676ed) [minor] Whitespace update (`indexzero`) + * [a987826](https://github.com/foreverjs/forever/commit/a987826) [fix] Attempt to listen again if EADDRINUSE in forever.Worker (`indexzero`) + * [d711ab8](https://github.com/foreverjs/forever/commit/d711ab8) [minor] Whitespace update (`indexzero`) v0.8.1 / Thu, 5 Jan 2012 ======================== - * [b15cd34] [dist] Version bump. 0.8.1 (`indexzero`) - * [4e25765] [fix] Print help on just `forever` (`indexzero`) - * [0d5e893] [api] Added `forever restartall` and `forever.restartAll()`. Fixes #131 (`indexzero`) - * [cef3435] [doc fix] Update `.cleanup` to `.cleanUp`. Fixes #199 (`indexzero`) + * [b15cd34](https://github.com/foreverjs/forever/commit/b15cd34) [dist] Version bump. 0.8.1 (`indexzero`) + * [4e25765](https://github.com/foreverjs/forever/commit/4e25765) [fix] Print help on just `forever` (`indexzero`) + * [0d5e893](https://github.com/foreverjs/forever/commit/0d5e893) [api] Added `forever restartall` and `forever.restartAll()`. Fixes #131 (`indexzero`) + * [cef3435](https://github.com/foreverjs/forever/commit/cef3435) [doc fix] Update `.cleanup` to `.cleanUp`. Fixes #199 (`indexzero`) v0.8.0 / Thu, 5 Jan 2012 ======================== - * [53ba981] [dist] Version bump. 0.8.0 (`indexzero`) - * [7fc258c] [dist] Added @mmalecki to contributors (`indexzero`) - * [93b3fd0] [dist] Update node version to reflect backwards compatibility (`indexzero`) - * [49de211] [dist test] Move test/fork-test.js to test/monitor/fork-test.js (`indexzero`) - * [4ab4438] [fix] A couple of minor fixes to CLI edge cases (`indexzero`) - * [b830218] [fix] Ensure `forever script.js` works (`indexzero`) - * [285b659] [merge] Resolve bad cherry-pick from `fork` branch (`indexzero`) - * [1f673f9] [fix] use node-fork for listing (`bradleymeck`) - * [fa02258] [fix] use node-fork so 0.6 can talk to 0.4 using the fork: true in combination with command (`bradleymeck`) - * [b06d58b] [api] Expose `Monitor.fork` for using `child_process.fork()` (`indexzero`) - * [2c6800a] [api] Expose `Monitor.fork` for using `child_process.fork()` (`indexzero`) - * [7aa72c9] [api test doc] Expose `.fork()` through forever for node-specific processes. Currently blocked by joyent/node#2454 (`indexzero`) - * [1f78240] [test minor] A couple of small updates for tests after recent API changes. Readd Worker.exitOnStop (`indexzero`) - * [3888dbd] [merge] Resolve merge conflicts of `rewrite` into master (`indexzero`) - * [bde27e0] [refactor] Use the nssocket defined protocol for stopping and restarting worker processes (`indexzero`) - * [dc0b457] [dist] Remove bin/forever-worker now that it `daemon.node` works again (`indexzero`) - * [9cee338] [wtf.node] BLACK VOODOO MAGIC. `daemon.node` somehow works even though libuv isnt fork(2)-safe (`indexzero`) - * [ebd80a2] [refactor] Attempt to spawn workers via bin/forever-worker. (`indexzero`) - * [8f9f0ad] [refactor] Significant refactor to how forever works in the rewrite (`indexzero`) - * [bca8ed9] [test] Basic CLI test in `sh` (`Maciej Małecki`) - * [a9247de] [dist] Update `watch` to `watch@0.5` (`Maciej Małecki`) - * [e57568b] [test] Remove `cli` test (`Maciej Małecki`) - * [9ff117d] [refactor] Move `daemon` to devDependencies on its way to deprecation (`indexzero`) - * [84be160] [fix] Make logs work again (`Maciej Małecki`) - * [d983726] [bin] Make `forever start` work with parameters (`Maciej Małecki`) - * [55d96b2] [fix] Wrap parsing data from socket into `try .. catch` (`Maciej Małecki`) - * [85c4542] [minor] Remove unused `daemon` require (`Maciej Małecki`) - * [321c182] [refactor] Replace `daemon.node` with `child_process.fork` (`Maciej Małecki`) - * [df8d71d] [bin] Supress `stdout` and `stderr` when run as a fork (`Maciej Małecki`) - * [2ead453] [test] Test `kill` action (`Maciej Małecki`) - * [a0d09d2] [api] `kill` action for `Worker` (`Maciej Małecki`) - * [6517f74] [test] Add `MonitorMock.kill` (`Maciej Małecki`) - * [883e712] [api] First pass at Worker integration (`Maciej Małecki`) - * [bbc23e2] [test] DRY tests a bit (`Maciej Małecki`) - * [831f76f] [api] Worker `spawn` command (`Maciej Małecki`) - * [768f074] [api] If worker is a fork, notify master that it's listening (`Maciej Małecki`) - * [cf716d5] [api] Guard for no options for Worker (`Maciej Małecki`) - * [d174539] [test] Test if worker responds to `data` (`Maciej Małecki`) - * [3059a9d] [api] Worker responds to `data` now (`Maciej Małecki`) - * [e248716] [test] Add `data` property to `MonitorMock` (`Maciej Małecki`) - * [748380b] [test] Don't hardcode socket path in tests (`Maciej Małecki`) - * [d8b81dd] [api] `Worker.start` calls back with socket path (`Maciej Małecki`) - * [7be6917] [test refactor] Restructure worker test a bit (`Maciej Małecki`) - * [c710dc5] [test] Basic test for worker (`Maciej Małecki`) - * [f06c345] [api] Sketch of `Worker` (`Maciej Małecki`) - * [34ccb24] [refactor] Remove watching code from `forever.Monitor` (`Maciej Małecki`) - * [0e6ea8f] [test] Basic tests for `Logger` plugin (`Maciej Małecki`) - * [f84634b] [refactor] Add `Logger` plugin (`Maciej Małecki`) - * [ab0f8e9] [refactor] Remove logging from `forever.Monitor` (`Maciej Małecki`) - * [8a9af6b] [refactor] Inherit from `broadway.App` (`Maciej Małecki`) - * [d945bb2] [dist] Depend on `broadway` and `eventemitter2` (dev dep) (`Maciej Małecki`) - * [cdb355f] [test] Add useful mocks (`Maciej Małecki`) - * [ed75bd4] [dist] Ignore vim swap files (`Maciej Małecki`) + * [53ba981](https://github.com/foreverjs/forever/commit/53ba981) [dist] Version bump. 0.8.0 (`indexzero`) + * [7fc258c](https://github.com/foreverjs/forever/commit/7fc258c) [dist] Added @mmalecki to contributors (`indexzero`) + * [93b3fd0](https://github.com/foreverjs/forever/commit/93b3fd0) [dist] Update node version to reflect backwards compatibility (`indexzero`) + * [49de211](https://github.com/foreverjs/forever/commit/49de211) [dist test] Move test/fork-test.js to test/monitor/fork-test.js (`indexzero`) + * [4ab4438](https://github.com/foreverjs/forever/commit/4ab4438) [fix] A couple of minor fixes to CLI edge cases (`indexzero`) + * [b830218](https://github.com/foreverjs/forever/commit/b830218) [fix] Ensure `forever script.js` works (`indexzero`) + * [285b659](https://github.com/foreverjs/forever/commit/285b659) [merge] Resolve bad cherry-pick from `fork` branch (`indexzero`) + * [1f673f9](https://github.com/foreverjs/forever/commit/1f673f9) [fix] use node-fork for listing (`bradleymeck`) + * [fa02258](https://github.com/foreverjs/forever/commit/fa02258) [fix] use node-fork so 0.6 can talk to 0.4 using the fork: true in combination with command (`bradleymeck`) + * [b06d58b](https://github.com/foreverjs/forever/commit/b06d58b) [api] Expose `Monitor.fork` for using `child_process.fork()` (`indexzero`) + * [2c6800a](https://github.com/foreverjs/forever/commit/2c6800a) [api] Expose `Monitor.fork` for using `child_process.fork()` (`indexzero`) + * [7aa72c9](https://github.com/foreverjs/forever/commit/7aa72c9) [api test doc] Expose `.fork()` through forever for node-specific processes. Currently blocked by joyent/node#2454 (`indexzero`) + * [1f78240](https://github.com/foreverjs/forever/commit/1f78240) [test minor] A couple of small updates for tests after recent API changes. Readd Worker.exitOnStop (`indexzero`) + * [bde27e0](https://github.com/foreverjs/forever/commit/bde27e0) [refactor] Use the nssocket defined protocol for stopping and restarting worker processes (`indexzero`) + * [dc0b457](https://github.com/foreverjs/forever/commit/dc0b457) [dist] Remove bin/forever-worker now that it `daemon.node` works again (`indexzero`) + * [9cee338](https://github.com/foreverjs/forever/commit/9cee338) [wtf.node] BLACK VOODOO MAGIC. `daemon.node` somehow works even though libuv isnt fork(2)-safe (`indexzero`) + * [ebd80a2](https://github.com/foreverjs/forever/commit/ebd80a2) [refactor] Attempt to spawn workers via bin/forever-worker. (`indexzero`) + * [8f9f0ad](https://github.com/foreverjs/forever/commit/8f9f0ad) [refactor] Significant refactor to how forever works in the rewrite (`indexzero`) + * [bca8ed9](https://github.com/foreverjs/forever/commit/bca8ed9) [test] Basic CLI test in `sh` (`Maciej Małecki`) + * [a9247de](https://github.com/foreverjs/forever/commit/a9247de) [dist] Update `watch` to `watch@0.5` (`Maciej Małecki`) + * [e57568b](https://github.com/foreverjs/forever/commit/e57568b) [test] Remove `cli` test (`Maciej Małecki`) + * [9ff117d](https://github.com/foreverjs/forever/commit/9ff117d) [refactor] Move `daemon` to devDependencies on its way to deprecation (`indexzero`) + * [84be160](https://github.com/foreverjs/forever/commit/84be160) [fix] Make logs work again (`Maciej Małecki`) + * [d983726](https://github.com/foreverjs/forever/commit/d983726) [bin] Make `forever start` work with parameters (`Maciej Małecki`) + * [55d96b2](https://github.com/foreverjs/forever/commit/55d96b2) [fix] Wrap parsing data from socket into `try .. catch` (`Maciej Małecki`) + * [85c4542](https://github.com/foreverjs/forever/commit/85c4542) [minor] Remove unused `daemon` require (`Maciej Małecki`) + * [321c182](https://github.com/foreverjs/forever/commit/321c182) [refactor] Replace `daemon.node` with `child_process.fork` (`Maciej Małecki`) + * [df8d71d](https://github.com/foreverjs/forever/commit/df8d71d) [bin] Supress `stdout` and `stderr` when run as a fork (`Maciej Małecki`) + * [2ead453](https://github.com/foreverjs/forever/commit/2ead453) [test] Test `kill` action (`Maciej Małecki`) + * [a0d09d2](https://github.com/foreverjs/forever/commit/a0d09d2) [api] `kill` action for `Worker` (`Maciej Małecki`) + * [6517f74](https://github.com/foreverjs/forever/commit/6517f74) [test] Add `MonitorMock.kill` (`Maciej Małecki`) + * [883e712](https://github.com/foreverjs/forever/commit/883e712) [api] First pass at Worker integration (`Maciej Małecki`) + * [bbc23e2](https://github.com/foreverjs/forever/commit/bbc23e2) [test] DRY tests a bit (`Maciej Małecki`) + * [831f76f](https://github.com/foreverjs/forever/commit/831f76f) [api] Worker `spawn` command (`Maciej Małecki`) + * [768f074](https://github.com/foreverjs/forever/commit/768f074) [api] If worker is a fork, notify master that it's listening (`Maciej Małecki`) + * [cf716d5](https://github.com/foreverjs/forever/commit/cf716d5) [api] Guard for no options for Worker (`Maciej Małecki`) + * [d174539](https://github.com/foreverjs/forever/commit/d174539) [test] Test if worker responds to `data` (`Maciej Małecki`) + * [3059a9d](https://github.com/foreverjs/forever/commit/3059a9d) [api] Worker responds to `data` now (`Maciej Małecki`) + * [e248716](https://github.com/foreverjs/forever/commit/e248716) [test] Add `data` property to `MonitorMock` (`Maciej Małecki`) + * [748380b](https://github.com/foreverjs/forever/commit/748380b) [test] Don't hardcode socket path in tests (`Maciej Małecki`) + * [d8b81dd](https://github.com/foreverjs/forever/commit/d8b81dd) [api] `Worker.start` calls back with socket path (`Maciej Małecki`) + * [7be6917](https://github.com/foreverjs/forever/commit/7be6917) [test refactor] Restructure worker test a bit (`Maciej Małecki`) + * [c710dc5](https://github.com/foreverjs/forever/commit/c710dc5) [test] Basic test for worker (`Maciej Małecki`) + * [f06c345](https://github.com/foreverjs/forever/commit/f06c345) [api] Sketch of `Worker` (`Maciej Małecki`) + * [34ccb24](https://github.com/foreverjs/forever/commit/34ccb24) [refactor] Remove watching code from `forever.Monitor` (`Maciej Małecki`) + * [0e6ea8f](https://github.com/foreverjs/forever/commit/0e6ea8f) [test] Basic tests for `Logger` plugin (`Maciej Małecki`) + * [f84634b](https://github.com/foreverjs/forever/commit/f84634b) [refactor] Add `Logger` plugin (`Maciej Małecki`) + * [ab0f8e9](https://github.com/foreverjs/forever/commit/ab0f8e9) [refactor] Remove logging from `forever.Monitor` (`Maciej Małecki`) + * [8a9af6b](https://github.com/foreverjs/forever/commit/8a9af6b) [refactor] Inherit from `broadway.App` (`Maciej Małecki`) + * [d945bb2](https://github.com/foreverjs/forever/commit/d945bb2) [dist] Depend on `broadway` and `eventemitter2` (dev dep) (`Maciej Małecki`) + * [cdb355f](https://github.com/foreverjs/forever/commit/cdb355f) [test] Add useful mocks (`Maciej Małecki`) + * [ed75bd4](https://github.com/foreverjs/forever/commit/ed75bd4) [dist] Ignore vim swap files (`Maciej Małecki`) v0.7.6 / Fri, 23 Dec 2011 ========================= - * [2ac0459] [dist] Version bump. 0.7.6. 0.4.x only. `forever >= 0.8.0` will be 0.6.x compatible (`indexzero`) - * [88d9c20] [dist] Remove clip dependency (`indexzero`) - * [2815f71] [fix] Break apart cli.logs to support `forever logs` and `forever logs ` correctly (`indexzero`) - * [72f4d14] [test] Update test fixture pathing mistake (`indexzero`) - * [c6072f5] [dist] Remove console.error/log statements (`indexzero`) - * [ed0d1e8] [fix minor] Fix 2 typos in forever service CLI (`Maciej Małecki`) - * [079137c] [refactor] Refactor Forever service CLI (`Maciej Małecki`) - * [c01abef] [api] Export `cli.getOptions` (`Maciej Małecki`) - * [13e8db8] [api] Expose `argvOptions` (`Maciej Małecki`) - * [ee9f98b] [doc fix] `--pidfile` is now called `--pidFile` (`Maciej Małecki`) - * [1d1656c] [test refactor] `test/{helpers.js => helpers/macros.js}` (`Maciej Małecki`) - * [ce7d5a1] [fix] Fix option parsing for starting actions (`Maciej Małecki`) - * [afccdb4] Merge pull request #190 from muloka/patch-1 (`Marak Squires`) - * [fc4dec5] Fixed broken link, replaced indexzero with nodejitsu in url. (`Louis Galipeau`) - * [0812449] [fix] Respect `-c` on restart. Fixes #159 (`indexzero`) - * [0e7873b] [fix] Improve the ordering of options parsing and include some options missed on the reparse. Fixes #139 (`indexzero`) + * [2ac0459](https://github.com/foreverjs/forever/commit/2ac0459) [dist] Version bump. 0.7.6. 0.4.x only. `forever >= 0.8.0` will be 0.6.x compatible (`indexzero`) + * [88d9c20](https://github.com/foreverjs/forever/commit/88d9c20) [dist] Remove clip dependency (`indexzero`) + * [2815f71](https://github.com/foreverjs/forever/commit/2815f71) [fix] Break apart cli.logs to support `forever logs` and `forever logs ` correctly (`indexzero`) + * [72f4d14](https://github.com/foreverjs/forever/commit/72f4d14) [test] Update test fixture pathing mistake (`indexzero`) + * [c6072f5](https://github.com/foreverjs/forever/commit/c6072f5) [dist] Remove console.error/log statements (`indexzero`) + * [ed0d1e8](https://github.com/foreverjs/forever/commit/ed0d1e8) [fix minor] Fix 2 typos in forever service CLI (`Maciej Małecki`) + * [079137c](https://github.com/foreverjs/forever/commit/079137c) [refactor] Refactor Forever service CLI (`Maciej Małecki`) + * [c01abef](https://github.com/foreverjs/forever/commit/c01abef) [api] Export `cli.getOptions` (`Maciej Małecki`) + * [13e8db8](https://github.com/foreverjs/forever/commit/13e8db8) [api] Expose `argvOptions` (`Maciej Małecki`) + * [ee9f98b](https://github.com/foreverjs/forever/commit/ee9f98b) [doc fix] `--pidfile` is now called `--pidFile` (`Maciej Małecki`) + * [1d1656c](https://github.com/foreverjs/forever/commit/1d1656c) [test refactor] `test/{helpers.js => helpers/macros.js}` (`Maciej Małecki`) + * [ce7d5a1](https://github.com/foreverjs/forever/commit/ce7d5a1) [fix] Fix option parsing for starting actions (`Maciej Małecki`) + * [fc4dec5](https://github.com/foreverjs/forever/commit/fc4dec5) Fixed broken link, replaced indexzero with nodejitsu in url. (`Louis Galipeau`) + * [0812449](https://github.com/foreverjs/forever/commit/0812449) [fix] Respect `-c` on restart. Fixes #159 (`indexzero`) + * [0e7873b](https://github.com/foreverjs/forever/commit/0e7873b) [fix] Improve the ordering of options parsing and include some options missed on the reparse. Fixes #139 (`indexzero`) v0.7.5 / Fri, 2 Dec 2011 ======================== - * [76b4d96] [dist] Version bump. 0.7.5 (`indexzero`) - * [d6c7590] [minor] Always try to parse the response before calling next() (`indexzero`) - * [dcbfc70] [dist] Various small esoteric changes. Fixes #179 (`indexzero`) - * [061d14f] [fix doc] Fix README to match flatiron refactor (`Maciej Małecki`) - * [517d31b] [fix] Make option aliases work again (`Maciej Małecki`) - * [63d91b2] [fix] Fix for pass-through parameters (`nconf@0.5`) (`Maciej Małecki`) - * [e7e8fdf] prevent leading dashes in autogenerated log/pid filenames (`Brian Mount`) - * [76bea57] [fix] Fix `require`s in `foreverd` (`Maciej Małecki`) - * [7cdca07] [fix] Make it compatible with `broadway@0.1.1` (`nconf@0.5`) (`Maciej Małecki`) - * [791c123] [dist] Locked in nconf to v0.4.x. Bumped to v0.7.4. Should close #172 (`Marak Squires`) - * [4ae63d0] [merge] A few random missed conflicts from `git cherry-pick` on 22 commits. oops. (`indexzero`) - * [60a576a] [test fix] Since forever.kill is async, use `async.forEach`. Update test/cli-test.js to rimraf ~/.forever temporarily (`indexzero`) - * [1a04002] [fix] Make `--help` work (`Maciej Małecki`) - * [58c251f] [fix] Make column operations work (`Maciej Małecki`) - * [b9c5f18] [refactor minor] Code formatting, unused variable (`Maciej Małecki`) - * [feade6c] [test] Basic CLI tests with some helpers (`Maciej Małecki`) - * [d6b6c58] [fix] Reset system store before reparsing argv (`Maciej Małecki`) - * [736fecb] [test] Clean up after tests are done (`Maciej Małecki`) - * [6b1a08d] [test] Add test for option parsing (`Maciej Małecki`) - * [a52ee8a] [refactor] Make `forever app.js` work (`Maciej Małecki`) - * [93359eb] [refactor doc] Document `cli.startDaemon` and `cli.cleanLogs` (`Maciej Małecki`) - * [93482cb] [refactor minor] Remove unused `tty` require (`Maciej Małecki`) - * [4d3958e] [refactor] Better option parsing (`Maciej Małecki`) - * [dde31b7] [refactor bin] Remove options parsing from bin (`Maciej Małecki`) - * [d793874] [api] Remove redudant `forever` options (`Maciej Małecki`) - * [c9ab4f0] [dist] Add `flatiron` dependency (`Maciej Małecki`) - * [8abe38d] [refactor] Implement pass-through options for child (`Maciej Małecki`) - * [b30316e] [refactor] Use `utile.randomString` (`Maciej Małecki`) - * [dbf46c3] [refactor fix] Pass options to `forever.start` (`Maciej Małecki`) - * [3d262df] [refactor] Add `help` command (`Maciej Małecki`) - * [1da249c] [fix] Fix `cli.start` regex to match .* instead of .+ (`Maciej Małecki`) - * [89969ef] [refactor] First pass on flatiron refactor (`Maciej Małecki`) - * [8b05686] [dist] Depend on `utile` (`Maciej Małecki`) - * [71cf0de] [test fix] Kill child in `forever-test.js` (`Maciej Małecki`) + * [76b4d96](https://github.com/foreverjs/forever/commit/76b4d96) [dist] Version bump. 0.7.5 (`indexzero`) + * [d6c7590](https://github.com/foreverjs/forever/commit/d6c7590) [minor] Always try to parse the response before calling next() (`indexzero`) + * [dcbfc70](https://github.com/foreverjs/forever/commit/dcbfc70) [dist] Various small esoteric changes. Fixes #179 (`indexzero`) + * [061d14f](https://github.com/foreverjs/forever/commit/061d14f) [fix doc] Fix README to match flatiron refactor (`Maciej Małecki`) + * [517d31b](https://github.com/foreverjs/forever/commit/517d31b) [fix] Make option aliases work again (`Maciej Małecki`) + * [63d91b2](https://github.com/foreverjs/forever/commit/63d91b2) [fix] Fix for pass-through parameters (`nconf@0.5`) (`Maciej Małecki`) + * [e7e8fdf](https://github.com/foreverjs/forever/commit/e7e8fdf) prevent leading dashes in autogenerated log/pid filenames (`Brian Mount`) + * [76bea57](https://github.com/foreverjs/forever/commit/76bea57) [fix] Fix `require`s in `foreverd` (`Maciej Małecki`) + * [7cdca07](https://github.com/foreverjs/forever/commit/7cdca07) [fix] Make it compatible with `broadway@0.1.1` (`nconf@0.5`) (`Maciej Małecki`) + * [791c123](https://github.com/foreverjs/forever/commit/791c123) [dist] Locked in nconf to v0.4.x. Bumped to v0.7.4. Should close #172 (`Marak Squires`) + * [4ae63d0](https://github.com/foreverjs/forever/commit/4ae63d0) [merge] A few random missed conflicts from `git cherry-pick` on 22 commits. oops. (`indexzero`) + * [60a576a](https://github.com/foreverjs/forever/commit/60a576a) [test fix] Since forever.kill is async, use `async.forEach`. Update test/cli-test.js to rimraf ~/.forever temporarily (`indexzero`) + * [1a04002](https://github.com/foreverjs/forever/commit/1a04002) [fix] Make `--help` work (`Maciej Małecki`) + * [58c251f](https://github.com/foreverjs/forever/commit/58c251f) [fix] Make column operations work (`Maciej Małecki`) + * [b9c5f18](https://github.com/foreverjs/forever/commit/b9c5f18) [refactor minor] Code formatting, unused variable (`Maciej Małecki`) + * [feade6c](https://github.com/foreverjs/forever/commit/feade6c) [test] Basic CLI tests with some helpers (`Maciej Małecki`) + * [d6b6c58](https://github.com/foreverjs/forever/commit/d6b6c58) [fix] Reset system store before reparsing argv (`Maciej Małecki`) + * [736fecb](https://github.com/foreverjs/forever/commit/736fecb) [test] Clean up after tests are done (`Maciej Małecki`) + * [6b1a08d](https://github.com/foreverjs/forever/commit/6b1a08d) [test] Add test for option parsing (`Maciej Małecki`) + * [a52ee8a](https://github.com/foreverjs/forever/commit/a52ee8a) [refactor] Make `forever app.js` work (`Maciej Małecki`) + * [93359eb](https://github.com/foreverjs/forever/commit/93359eb) [refactor doc] Document `cli.startDaemon` and `cli.cleanLogs` (`Maciej Małecki`) + * [93482cb](https://github.com/foreverjs/forever/commit/93482cb) [refactor minor] Remove unused `tty` require (`Maciej Małecki`) + * [4d3958e](https://github.com/foreverjs/forever/commit/4d3958e) [refactor] Better option parsing (`Maciej Małecki`) + * [dde31b7](https://github.com/foreverjs/forever/commit/dde31b7) [refactor bin] Remove options parsing from bin (`Maciej Małecki`) + * [d793874](https://github.com/foreverjs/forever/commit/d793874) [api] Remove redudant `forever` options (`Maciej Małecki`) + * [c9ab4f0](https://github.com/foreverjs/forever/commit/c9ab4f0) [dist] Add `flatiron` dependency (`Maciej Małecki`) + * [8abe38d](https://github.com/foreverjs/forever/commit/8abe38d) [refactor] Implement pass-through options for child (`Maciej Małecki`) + * [b30316e](https://github.com/foreverjs/forever/commit/b30316e) [refactor] Use `utile.randomString` (`Maciej Małecki`) + * [dbf46c3](https://github.com/foreverjs/forever/commit/dbf46c3) [refactor fix] Pass options to `forever.start` (`Maciej Małecki`) + * [3d262df](https://github.com/foreverjs/forever/commit/3d262df) [refactor] Add `help` command (`Maciej Małecki`) + * [1da249c](https://github.com/foreverjs/forever/commit/1da249c) [fix] Fix `cli.start` regex to match .* instead of .+ (`Maciej Małecki`) + * [89969ef](https://github.com/foreverjs/forever/commit/89969ef) [refactor] First pass on flatiron refactor (`Maciej Małecki`) + * [8b05686](https://github.com/foreverjs/forever/commit/8b05686) [dist] Depend on `utile` (`Maciej Małecki`) + * [71cf0de](https://github.com/foreverjs/forever/commit/71cf0de) [test fix] Kill child in `forever-test.js` (`Maciej Małecki`) v0.7.3 / Thu, 17 Nov 2011 ========================= - * [865a8fd] [dist] Version bump. 0.7.3 (`indexzero`) - * [7ab97bd] always killTree (`Fabian Jakobs`) - * [e4f2b09] [dist] Update `watch` dependency. Fixes #155 (`indexzero`) - * [5f20181] [fix] give sigkills after a timeout given by options.killTTL in MS (`bradleymeck`) - * [8c8d670] Merge pull request #157 from mmalecki/assert-lengthof (`Maciej Małecki`) - * [3f1ed35] [test minor] Change `assert.length` to `assert.lengthOf` (`Maciej Małecki`) + * [865a8fd](https://github.com/foreverjs/forever/commit/865a8fd) [dist] Version bump. 0.7.3 (`indexzero`) + * [7ab97bd](https://github.com/foreverjs/forever/commit/7ab97bd) always killTree (`Fabian Jakobs`) + * [e4f2b09](https://github.com/foreverjs/forever/commit/e4f2b09) [dist] Update `watch` dependency. Fixes #155 (`indexzero`) + * [5f20181](https://github.com/foreverjs/forever/commit/5f20181) [fix] give sigkills after a timeout given by options.killTTL in MS (`bradleymeck`) + * [3f1ed35](https://github.com/foreverjs/forever/commit/3f1ed35) [test minor] Change `assert.length` to `assert.lengthOf` (`Maciej Małecki`) v0.7.2 / Sat, 22 Oct 2011 ========================= - * [382f8e7] [dist] Version bump. 0.7.2 (`indexzero`) - * [9131af7] [fix] Return when no index or script is passed to `forever logs`. Fixes #141 (`indexzero`) - * [8176f9f] Make sure all data is streamed before we try to parse it. (`Mariusz Nowak`) - * [4ca2862] [dist] Remove unnecessary eyes dependency (`indexzero`) - * [74f3140] [fix] Prefer `-` to `$` in `forever.randomString` (`indexzero`) - * [684296a] [test] Test `checkProcess` (`Maciej Małecki`) - * [c17d004] [refactor] Make `forever.checkProcess` synchronous (`Maciej Małecki`) - * [f820056] [fix] Use `process.kill` to check if process is alive (`Maciej Małecki`) + * [382f8e7](https://github.com/foreverjs/forever/commit/382f8e7) [dist] Version bump. 0.7.2 (`indexzero`) + * [9131af7](https://github.com/foreverjs/forever/commit/9131af7) [fix] Return when no index or script is passed to `forever logs`. Fixes #141 (`indexzero`) + * [8176f9f](https://github.com/foreverjs/forever/commit/8176f9f) Make sure all data is streamed before we try to parse it. (`Mariusz Nowak`) + * [4ca2862](https://github.com/foreverjs/forever/commit/4ca2862) [dist] Remove unnecessary eyes dependency (`indexzero`) + * [74f3140](https://github.com/foreverjs/forever/commit/74f3140) [fix] Prefer `-` to `$` in `forever.randomString` (`indexzero`) + * [684296a](https://github.com/foreverjs/forever/commit/684296a) [test] Test `checkProcess` (`Maciej Małecki`) + * [c17d004](https://github.com/foreverjs/forever/commit/c17d004) [refactor] Make `forever.checkProcess` synchronous (`Maciej Małecki`) + * [f820056](https://github.com/foreverjs/forever/commit/f820056) [fix] Use `process.kill` to check if process is alive (`Maciej Małecki`) v0.7.1 / Sun, 9 Oct 2011 ======================== - * [d791422] [dist] Verion bump. 0.7.1 (`indexzero`) - * [0d4f68e] [fix] Pass proc.spawnWith to `forever.restart`. Fixes #116 (`indexzero`) + * [d791422](https://github.com/foreverjs/forever/commit/d791422) [dist] Verion bump. 0.7.1 (`indexzero`) + * [0d4f68e](https://github.com/foreverjs/forever/commit/0d4f68e) [fix] Pass proc.spawnWith to `forever.restart`. Fixes #116 (`indexzero`) v0.7.0 / Sat, 8 Oct 2011 ======================== - * [39f8b5a] [dist] Version bump. 0.7.0 (`indexzero`) - * [0baaccf] [dist] Updated CHANGELOG.md (`indexzero`) - * [91dbd32] [api test] Expose `this.spawnWith` in Monitor.data (`indexzero`) - * [14c82fd] [dist] Update daemon to >= 0.3.2 (`indexzero`) - * [e740fb6] [doc] Update README.md for `forever logs *` commands (`indexzero`) - * [0d6f85f] [api test] Added `forever logs` CLI commands and `forever.tail()` method with appropriate tests. Fixes #123, #93 (`indexzero`) - * [3d23311] [minor] Minor whitespace fix (`indexzero`) - * [02f7b0f] [dist] Update `test` command in package.json (`indexzero`) - * [fa03117] [fix] Add the child PID to the list from `psTree` not remove it (`indexzero`) - * [7ae3d1d] [doc] Updated CHANGELOG.md (`indexzero`) - * [7c82d4b] [dist] Update contributors in package.json (`indexzero`) - * [067d50c] [minor] Remove file headers in examples/* (`indexzero`) - * [a942985] [dist] Update Copyright to Nodejitsu Inc. (`indexzero`) - * [877ef3b] [minor] Update file headers (`indexzero`) - * [a61e6be] [dist] Updates for JSHint in bin/* (`indexzero`) - * [f7575f9] [dist] Update for JSHint (`indexzero`) - * [4e27e3d] [api] Expose `Monitor.killTree` for killing process trees for processes spawned by forever (`indexzero`) - * [a83a1e1] kill all children of a monitored process. (`Dominic Tarr`) - * [89be252] [refactor test dist] Refactor /lib/foreverd/ into /lib/forever/service/ (`indexzero`) - * [36e0b9b] [minor] Updated foreverd for JSHint (`indexzero`) - * [3525130] [minor] Update lib/forever* for JSHint (`indexzero`) - * [1390910] [fix] forgot to add adapters (`bradleymeck`) - * [bad47f6] [fix][WIP] basic working order, starting CLI cleanup (`bradleymeck`) - * [6f68823] [API][WIP] Moved service manager out to its own system (`bradleymeck`) - * [61651a7] [fix] daemonize ourselve on startup rather than rely on OS function (TODO exit codes) (`bradleymeck`) - * [782cca7] [fix] services should be added to run levels during install (`bradleymeck`) - * [f2026b3] [fix] service process listing (`bradleymeck`) - * [1bfdcdb] [fix] Use lsb functions for starting up a daemon (`bradleymeck`) - * [60d4329] [fix] make services use hyphenated commands (`bradleymeck`) - * [93053d6] [api] Revive the service api stubs (`bradleymeck`) + * [39f8b5a](https://github.com/foreverjs/forever/commit/39f8b5a) [dist] Version bump. 0.7.0 (`indexzero`) + * [0baaccf](https://github.com/foreverjs/forever/commit/0baaccf) [dist] Updated CHANGELOG.md (`indexzero`) + * [91dbd32](https://github.com/foreverjs/forever/commit/91dbd32) [api test] Expose `this.spawnWith` in Monitor.data (`indexzero`) + * [14c82fd](https://github.com/foreverjs/forever/commit/14c82fd) [dist] Update daemon to >= 0.3.2 (`indexzero`) + * [e740fb6](https://github.com/foreverjs/forever/commit/e740fb6) [doc] Update README.md for `forever logs *` commands (`indexzero`) + * [0d6f85f](https://github.com/foreverjs/forever/commit/0d6f85f) [api test] Added `forever logs` CLI commands and `forever.tail()` method with appropriate tests. Fixes #123, #93 (`indexzero`) + * [3d23311](https://github.com/foreverjs/forever/commit/3d23311) [minor] Minor whitespace fix (`indexzero`) + * [02f7b0f](https://github.com/foreverjs/forever/commit/02f7b0f) [dist] Update `test` command in package.json (`indexzero`) + * [fa03117](https://github.com/foreverjs/forever/commit/fa03117) [fix] Add the child PID to the list from `psTree` not remove it (`indexzero`) + * [7ae3d1d](https://github.com/foreverjs/forever/commit/7ae3d1d) [doc] Updated CHANGELOG.md (`indexzero`) + * [7c82d4b](https://github.com/foreverjs/forever/commit/7c82d4b) [dist] Update contributors in package.json (`indexzero`) + * [067d50c](https://github.com/foreverjs/forever/commit/067d50c) [minor] Remove file headers in examples/* (`indexzero`) + * [a942985](https://github.com/foreverjs/forever/commit/a942985) [dist] Update Copyright to Nodejitsu Inc. (`indexzero`) + * [877ef3b](https://github.com/foreverjs/forever/commit/877ef3b) [minor] Update file headers (`indexzero`) + * [a61e6be](https://github.com/foreverjs/forever/commit/a61e6be) [dist] Updates for JSHint in bin/* (`indexzero`) + * [f7575f9](https://github.com/foreverjs/forever/commit/f7575f9) [dist] Update for JSHint (`indexzero`) + * [4e27e3d](https://github.com/foreverjs/forever/commit/4e27e3d) [api] Expose `Monitor.killTree` for killing process trees for processes spawned by forever (`indexzero`) + * [a83a1e1](https://github.com/foreverjs/forever/commit/a83a1e1) kill all children of a monitored process. (`Dominic Tarr`) + * [89be252](https://github.com/foreverjs/forever/commit/89be252) [refactor test dist] Refactor /lib/foreverd/ into /lib/forever/service/ (`indexzero`) + * [36e0b9b](https://github.com/foreverjs/forever/commit/36e0b9b) [minor] Updated foreverd for JSHint (`indexzero`) + * [3525130](https://github.com/foreverjs/forever/commit/3525130) [minor] Update lib/forever* for JSHint (`indexzero`) + * [1390910](https://github.com/foreverjs/forever/commit/1390910) [fix] forgot to add adapters (`bradleymeck`) + * [bad47f6](https://github.com/foreverjs/forever/commit/bad47f6) [fix][WIP] basic working order, starting CLI cleanup (`bradleymeck`) + * [6f68823](https://github.com/foreverjs/forever/commit/6f68823) [API][WIP] Moved service manager out to its own system (`bradleymeck`) + * [61651a7](https://github.com/foreverjs/forever/commit/61651a7) [fix] daemonize ourselve on startup rather than rely on OS function (TODO exit codes) (`bradleymeck`) + * [782cca7](https://github.com/foreverjs/forever/commit/782cca7) [fix] services should be added to run levels during install (`bradleymeck`) + * [f2026b3](https://github.com/foreverjs/forever/commit/f2026b3) [fix] service process listing (`bradleymeck`) + * [1bfdcdb](https://github.com/foreverjs/forever/commit/1bfdcdb) [fix] Use lsb functions for starting up a daemon (`bradleymeck`) + * [60d4329](https://github.com/foreverjs/forever/commit/60d4329) [fix] make services use hyphenated commands (`bradleymeck`) + * [93053d6](https://github.com/foreverjs/forever/commit/93053d6) [api] Revive the service api stubs (`bradleymeck`) v0.6.9 / Tue, 4 Oct 2011 ======================== - * [620a362] [dist] Version bump. 0.6.9 (`indexzero`) - * [2b8cf71] [doc] Add `--plain` option to README (`Maciej Małecki`) - * [4b08542] [bin] Add `--plain` option disabling CLI colors (`Maciej Małecki`) + * [620a362](https://github.com/foreverjs/forever/commit/620a362) [dist] Version bump. 0.6.9 (`indexzero`) + * [2b8cf71](https://github.com/foreverjs/forever/commit/2b8cf71) [doc] Add `--plain` option to README (`Maciej Małecki`) + * [4b08542](https://github.com/foreverjs/forever/commit/4b08542) [bin] Add `--plain` option disabling CLI colors (`Maciej Małecki`) v0.6.8 / Sat, 1 Oct 2011 ======================== - * [dfb12a6] [dist] Version bump. 0.6.8 (`indexzero`) - * [7d7398b] [doc] Update README.md with watch file options (`indexzero`) - * [8c8f0e0] [fix minor] A couple of small changes to merge in watch from @mmalecki (`indexzero`) - * [d891990] [test] Add tests for watch (`Maciej Małecki`) - * [f636447] [test] Add fixtures for watch test (`Maciej Małecki`) - * [836ea31] [fix minor] Use `path.join` (`Maciej Małecki`) - * [b9b3129] [fix refactor] Use `watch.watchTree` function (`Maciej Małecki`) - * [1b02785] [fix minor] Remove stupid `options.watch || false` (`Maciej Małecki`) - * [7ababd6] [bin] Add --watch/-w command line option (`Maciej Małecki`) - * [e2b3565] [api] Add watchDirectory option (`Maciej Małecki`) - * [b9d9703] [api] Complete file watching with .foreverignore (`Maciej Małecki`) - * [28a7c16] [dist] Add minimatch dependency (`Maciej Małecki`) - * [fff672d] [api] simplest possible file watcher (ref #41) (`Maciej Małecki`) - * [d658ee3] [dist] add watch dependency (`Maciej Małecki`) + * [dfb12a6](https://github.com/foreverjs/forever/commit/dfb12a6) [dist] Version bump. 0.6.8 (`indexzero`) + * [7d7398b](https://github.com/foreverjs/forever/commit/7d7398b) [doc] Update README.md with watch file options (`indexzero`) + * [8c8f0e0](https://github.com/foreverjs/forever/commit/8c8f0e0) [fix minor] A couple of small changes to merge in watch from @mmalecki (`indexzero`) + * [d891990](https://github.com/foreverjs/forever/commit/d891990) [test] Add tests for watch (`Maciej Małecki`) + * [f636447](https://github.com/foreverjs/forever/commit/f636447) [test] Add fixtures for watch test (`Maciej Małecki`) + * [836ea31](https://github.com/foreverjs/forever/commit/836ea31) [fix minor] Use `path.join` (`Maciej Małecki`) + * [b9b3129](https://github.com/foreverjs/forever/commit/b9b3129) [fix refactor] Use `watch.watchTree` function (`Maciej Małecki`) + * [1b02785](https://github.com/foreverjs/forever/commit/1b02785) [fix minor] Remove stupid `options.watch || false` (`Maciej Małecki`) + * [7ababd6](https://github.com/foreverjs/forever/commit/7ababd6) [bin] Add --watch/-w command line option (`Maciej Małecki`) + * [e2b3565](https://github.com/foreverjs/forever/commit/e2b3565) [api] Add watchDirectory option (`Maciej Małecki`) + * [b9d9703](https://github.com/foreverjs/forever/commit/b9d9703) [api] Complete file watching with .foreverignore (`Maciej Małecki`) + * [28a7c16](https://github.com/foreverjs/forever/commit/28a7c16) [dist] Add minimatch dependency (`Maciej Małecki`) + * [fff672d](https://github.com/foreverjs/forever/commit/fff672d) [api] simplest possible file watcher (ref #41) (`Maciej Małecki`) + * [d658ee3](https://github.com/foreverjs/forever/commit/d658ee3) [dist] add watch dependency (`Maciej Małecki`) v0.6.7 / Mon, 12 Sep 2011 ========================= - * [c87b4b3] [dist] Version bump. 0.6.7 (`indexzero`) - * [1170362] Merge pull request #113 from mmalecki/replace-sys-usages (`Charlie Robbins`) - * [227b158] [refactor] replace sys module usages in examples with util (`Maciej Małecki`) - * [8ae06c0] [refactor test] replace sys module usages in tests with util (`Maciej Małecki`) - * [72eba1f] [refactor] replace sys module usages with util (`Maciej Małecki`) - * [00628c2] [dist] Update winston version (`indexzero`) + * [c87b4b3](https://github.com/foreverjs/forever/commit/c87b4b3) [dist] Version bump. 0.6.7 (`indexzero`) + * [227b158](https://github.com/foreverjs/forever/commit/227b158) [refactor] replace sys module usages in examples with util (`Maciej Małecki`) + * [8ae06c0](https://github.com/foreverjs/forever/commit/8ae06c0) [refactor test] replace sys module usages in tests with util (`Maciej Małecki`) + * [72eba1f](https://github.com/foreverjs/forever/commit/72eba1f) [refactor] replace sys module usages with util (`Maciej Małecki`) + * [00628c2](https://github.com/foreverjs/forever/commit/00628c2) [dist] Update winston version (`indexzero`) v0.6.6 / Sun, 28 Aug 2011 ========================= - * [3f3cd17] [dist] Version bump. 0.6.6 (`indexzero`) - * [735fc95] [minor test] Update to the `hideEnv` implementation from @bmeck. Added tests appropriately (`indexzero`) - * [52c0529] [style] cleanup unused variable (`Bradley Meck`) - * [03daece] [api] Add options.hideEnv {key:boolean_hide,} to hide default env values (`Bradley Meck`) + * [3f3cd17](https://github.com/foreverjs/forever/commit/3f3cd17) [dist] Version bump. 0.6.6 (`indexzero`) + * [735fc95](https://github.com/foreverjs/forever/commit/735fc95) [minor test] Update to the `hideEnv` implementation from @bmeck. Added tests appropriately (`indexzero`) + * [52c0529](https://github.com/foreverjs/forever/commit/52c0529) [style] cleanup unused variable (`Bradley Meck`) + * [03daece](https://github.com/foreverjs/forever/commit/03daece) [api] Add options.hideEnv {key:boolean_hide,} to hide default env values (`Bradley Meck`) v0.6.5 / Fri, 12 Aug 2011 ========================= - * [a3f0df5] [dist] Version bump. 0.6.5 (`indexzero`) - * [fdf15a0] [api test] Update `forever.Monitor.prototype.restart()` to allow force restarting of processes in less than `.minUptime` (`indexzero`) + * [a3f0df5](https://github.com/foreverjs/forever/commit/a3f0df5) [dist] Version bump. 0.6.5 (`indexzero`) + * [fdf15a0](https://github.com/foreverjs/forever/commit/fdf15a0) [api test] Update `forever.Monitor.prototype.restart()` to allow force restarting of processes in less than `.minUptime` (`indexzero`) v0.6.4 / Thu, 11 Aug 2011 ========================= - * [f308f7a] [dist] Version bump. 0.6.4 (`indexzero`) - * [9dc7bad] [doc] Added example about running / listing multiple processes programmatically (`indexzero`) - * [c3fe93a] [fix] Update forever.startServer() to support more liberal arguments (`indexzero`) + * [f308f7a](https://github.com/foreverjs/forever/commit/f308f7a) [dist] Version bump. 0.6.4 (`indexzero`) + * [9dc7bad](https://github.com/foreverjs/forever/commit/9dc7bad) [doc] Added example about running / listing multiple processes programmatically (`indexzero`) + * [c3fe93a](https://github.com/foreverjs/forever/commit/c3fe93a) [fix] Update forever.startServer() to support more liberal arguments (`indexzero`) v0.6.3 / Sat, 23 Jul 2011 ========================= - * [fa3b225] [dist] Version bump. 0.6.3 (`indexzero`) - * [e47af9c] [fix] When stopping only respond with those processes which have been stopped. Fixes #87 (`indexzero`) - * [e7b9e58] [fix] Create `sockPath` if it does not exist already. Fixes #92 (`indexzero`) + * [fa3b225](https://github.com/foreverjs/forever/commit/fa3b225) [dist] Version bump. 0.6.3 (`indexzero`) + * [e47af9c](https://github.com/foreverjs/forever/commit/e47af9c) [fix] When stopping only respond with those processes which have been stopped. Fixes #87 (`indexzero`) + * [e7b9e58](https://github.com/foreverjs/forever/commit/e7b9e58) [fix] Create `sockPath` if it does not exist already. Fixes #92 (`indexzero`) v0.6.2 / Tue, 19 Jul 2011 ========================= - * [845ce2c] [dist] Version bump. 0.6.2 (`indexzero`) - * [f756e62] [fix] Display warning / error messages to the user when contacting UNIX sockets. Fixes #88 (`indexzero`) + * [845ce2c](https://github.com/foreverjs/forever/commit/845ce2c) [dist] Version bump. 0.6.2 (`indexzero`) + * [f756e62](https://github.com/foreverjs/forever/commit/f756e62) [fix] Display warning / error messages to the user when contacting UNIX sockets. Fixes #88 (`indexzero`) v0.6.1 / Fri, 15 Jul 2011 ========================= - * [72f200b] [dist] Version bump. 0.6.1 (`indexzero`) - * [1c0792e] Process variables are not always available, for example if you execute forever with a different process like monit. (`Arnout Kazemier`) - * [7ff26de] Fixed a bug where numbers in the file path caused forever to think that it should stop the script based on index instead of stopping it based on script. (`Arnout Kazemier`) + * [72f200b](https://github.com/foreverjs/forever/commit/72f200b) [dist] Version bump. 0.6.1 (`indexzero`) + * [1c0792e](https://github.com/foreverjs/forever/commit/1c0792e) Process variables are not always available, for example if you execute forever with a different process like monit. (`Arnout Kazemier`) + * [7ff26de](https://github.com/foreverjs/forever/commit/7ff26de) Fixed a bug where numbers in the file path caused forever to think that it should stop the script based on index instead of stopping it based on script. (`Arnout Kazemier`) v0.6.0 / Mon, 11 Jul 2011 ========================= - * [df54bc0] [dist] Version bump. 0.6.0 (`indexzero`) - * [8a50cf6] [doc] Minor updates to README.md (`indexzero`) - * [1dac9f4] [doc] Updated README.md (`indexzero`) - * [9d35315] [fix minor] Update how forever._debug works. Use updated CLI options in `forever restart` (`indexzero`) - * [da86724] [doc] Regenerate docco docs (`indexzero`) - * [ad40a95] [doc] Added some code docs (`indexzero`) - * [221c170] [doc] Update help in bin/forever (`indexzero`) - * [091e949] [api] Finished fleshing out `forever columns *` commands (`indexzero`) - * [581a132] [fix] Update `forever cleanlogs` for 0.6.x (`indexzero`) - * [a39fee1] [api] Began work on `forever columns *` (`indexzero`) - * [381ecaf] [api] Expose `forever.columns` and update `forever.format` to generate results dynamically (`indexzero`) - * [bc8153a] [minor] Trim whitespace in lib/* (`indexzero`) - * [2a163d3] [dist] Add `portfinder` dependency to package.json (`indexzero`) - * [57a5600] [doc] Remove references to *.fvr files in README.md (`indexzero`) - * [ef59672] [test] Updated tests for refactor in previous commit (`indexzero`) - * [7ae870e] [refactor] **Major awesome breaking changes** Forever no longer uses *.fvr files in-favor of a TCP server in each forever process started by the CLI. Programmatic usage will require an additional call to `forever.createServer()` explicitally in order for your application to be available in `forever list` or `forever.list()` (`indexzero`) - * [a26cf9d] [minor] Catch `uncaughtException` slightly more intelligently (`indexzero`) - * [4446215] [api] Include uids in `forever list` (`indexzero`) - * [57bc396] [minor] Create `options.uid` by default in `.startDaemon()` if it is already not provided (`indexzero`) - * [dbf4275] [api] Default `minUptime` to 0 (`indexzero`) - * [079ca20] [doc] Small update to README.md (`indexzero`) - * [aaefc95] [fix] use default values for log file and pid file (prevents a process from being nuked by being daemonized) (`Bradley Meck`) - * [76be51e] [fix] Quick fix for the last commit (`indexzero`) - * [6902890] [api test] Added generic hooks for forever.Monitor (`indexzero`) - * [c7ff2d9] [doc] Update the help in the forever CLI and README.md (`indexzero`) - * [725d11d] [doc] Update README.md (`indexzero`) - * [5a8b32e] [doc] Regenerated docco docs (`indexzero`) - * [dfb54be] [api test doc] Remove deprecated `forever.Forever` from samples and tests. Added `env` and `cwd` options and associated tests. Some additional code docs and minor style changes (`indexzero`) - * [c5c9172] [api] Update `forever list` to use cliff (`indexzero`) - * [d2aa52b] [dist] Drop eyes in favor of cliff (`indexzero`) - * [bc5995f] [fix minor] Keep processes silent on `forever restart` if requested. A couple of minor log formatting updates (`indexzero`) - * [f11610e] [minor api] Update to optional debugging. Various small style updates (`indexzero`) - * [686d009] [minor api] Added forever.debug for debugging purposes (`indexzero`) - * [abed353] [doc] Updated README.md with newer options and events (`indexzero`) - * [da44ad0] [doc] Kill some ancient stuff in README.md (`indexzero`) - * [3ef90c1] [doc] Add a little more color to documentation for `forever.load()` (`indexzero`) - * [3d6018f] [doc] Update documentation on forever.load(). Fixes #72 (`indexzero`) - * [3c8e6eb] [api fix] When executing stopall, dont kill the current process. Refactor flow-control of forever.cleanUp() (`indexzero`) - * [d681cb7] [fix] Dont allow `-` in uuids generated by forever. Fixes #66. (`indexzero`) - * [e0c3dcf] [dist] Minor style updates. Update to use pkginfo (`indexzero`) + * [df54bc0](https://github.com/foreverjs/forever/commit/df54bc0) [dist] Version bump. 0.6.0 (`indexzero`) + * [8a50cf6](https://github.com/foreverjs/forever/commit/8a50cf6) [doc] Minor updates to README.md (`indexzero`) + * [1dac9f4](https://github.com/foreverjs/forever/commit/1dac9f4) [doc] Updated README.md (`indexzero`) + * [9d35315](https://github.com/foreverjs/forever/commit/9d35315) [fix minor] Update how forever._debug works. Use updated CLI options in `forever restart` (`indexzero`) + * [da86724](https://github.com/foreverjs/forever/commit/da86724) [doc] Regenerate docco docs (`indexzero`) + * [ad40a95](https://github.com/foreverjs/forever/commit/ad40a95) [doc] Added some code docs (`indexzero`) + * [221c170](https://github.com/foreverjs/forever/commit/221c170) [doc] Update help in bin/forever (`indexzero`) + * [091e949](https://github.com/foreverjs/forever/commit/091e949) [api] Finished fleshing out `forever columns *` commands (`indexzero`) + * [581a132](https://github.com/foreverjs/forever/commit/581a132) [fix] Update `forever cleanlogs` for 0.6.x (`indexzero`) + * [a39fee1](https://github.com/foreverjs/forever/commit/a39fee1) [api] Began work on `forever columns *` (`indexzero`) + * [381ecaf](https://github.com/foreverjs/forever/commit/381ecaf) [api] Expose `forever.columns` and update `forever.format` to generate results dynamically (`indexzero`) + * [bc8153a](https://github.com/foreverjs/forever/commit/bc8153a) [minor] Trim whitespace in lib/* (`indexzero`) + * [2a163d3](https://github.com/foreverjs/forever/commit/2a163d3) [dist] Add `portfinder` dependency to package.json (`indexzero`) + * [57a5600](https://github.com/foreverjs/forever/commit/57a5600) [doc] Remove references to *.fvr files in README.md (`indexzero`) + * [ef59672](https://github.com/foreverjs/forever/commit/ef59672) [test] Updated tests for refactor in previous commit (`indexzero`) + * [7ae870e](https://github.com/foreverjs/forever/commit/7ae870e) [refactor] **Major awesome breaking changes** Forever no longer uses *.fvr files in-favor of a TCP server in each forever process started by the CLI. Programmatic usage will require an additional call to `forever.createServer()` explicitally in order for your application to be available in `forever list` or `forever.list()` (`indexzero`) + * [a26cf9d](https://github.com/foreverjs/forever/commit/a26cf9d) [minor] Catch `uncaughtException` slightly more intelligently (`indexzero`) + * [4446215](https://github.com/foreverjs/forever/commit/4446215) [api] Include uids in `forever list` (`indexzero`) + * [57bc396](https://github.com/foreverjs/forever/commit/57bc396) [minor] Create `options.uid` by default in `.startDaemon()` if it is already not provided (`indexzero`) + * [dbf4275](https://github.com/foreverjs/forever/commit/dbf4275) [api] Default `minUptime` to 0 (`indexzero`) + * [079ca20](https://github.com/foreverjs/forever/commit/079ca20) [doc] Small update to README.md (`indexzero`) + * [aaefc95](https://github.com/foreverjs/forever/commit/aaefc95) [fix] use default values for log file and pid file (prevents a process from being nuked by being daemonized) (`Bradley Meck`) + * [76be51e](https://github.com/foreverjs/forever/commit/76be51e) [fix] Quick fix for the last commit (`indexzero`) + * [6902890](https://github.com/foreverjs/forever/commit/6902890) [api test] Added generic hooks for forever.Monitor (`indexzero`) + * [c7ff2d9](https://github.com/foreverjs/forever/commit/c7ff2d9) [doc] Update the help in the forever CLI and README.md (`indexzero`) + * [725d11d](https://github.com/foreverjs/forever/commit/725d11d) [doc] Update README.md (`indexzero`) + * [5a8b32e](https://github.com/foreverjs/forever/commit/5a8b32e) [doc] Regenerated docco docs (`indexzero`) + * [dfb54be](https://github.com/foreverjs/forever/commit/dfb54be) [api test doc] Remove deprecated `forever.Forever` from samples and tests. Added `env` and `cwd` options and associated tests. Some additional code docs and minor style changes (`indexzero`) + * [c5c9172](https://github.com/foreverjs/forever/commit/c5c9172) [api] Update `forever list` to use cliff (`indexzero`) + * [d2aa52b](https://github.com/foreverjs/forever/commit/d2aa52b) [dist] Drop eyes in favor of cliff (`indexzero`) + * [bc5995f](https://github.com/foreverjs/forever/commit/bc5995f) [fix minor] Keep processes silent on `forever restart` if requested. A couple of minor log formatting updates (`indexzero`) + * [f11610e](https://github.com/foreverjs/forever/commit/f11610e) [minor api] Update to optional debugging. Various small style updates (`indexzero`) + * [686d009](https://github.com/foreverjs/forever/commit/686d009) [minor api] Added forever.debug for debugging purposes (`indexzero`) + * [abed353](https://github.com/foreverjs/forever/commit/abed353) [doc] Updated README.md with newer options and events (`indexzero`) + * [da44ad0](https://github.com/foreverjs/forever/commit/da44ad0) [doc] Kill some ancient stuff in README.md (`indexzero`) + * [3ef90c1](https://github.com/foreverjs/forever/commit/3ef90c1) [doc] Add a little more color to documentation for `forever.load()` (`indexzero`) + * [3d6018f](https://github.com/foreverjs/forever/commit/3d6018f) [doc] Update documentation on forever.load(). Fixes #72 (`indexzero`) + * [3c8e6eb](https://github.com/foreverjs/forever/commit/3c8e6eb) [api fix] When executing stopall, dont kill the current process. Refactor flow-control of forever.cleanUp() (`indexzero`) + * [d681cb7](https://github.com/foreverjs/forever/commit/d681cb7) [fix] Dont allow `-` in uuids generated by forever. Fixes #66. (`indexzero`) + * [e0c3dcf](https://github.com/foreverjs/forever/commit/e0c3dcf) [dist] Minor style updates. Update to use pkginfo (`indexzero`) v0.5.6 / Tue, 7 Jun 2011 ======================== - * [de0d6d2] [dist] Version bump. 0.5.6 (`indexzero`) + * [de0d6d2](https://github.com/foreverjs/forever/commit/de0d6d2) [dist] Version bump. 0.5.6 (`indexzero`) v0.5.5 / Tue, 31 May 2011 ========================= - * [4c5b73a] [dist] Version bump. 0.5.5 (`indexzero`) - * [1af1fe3] [fix] Remove .fvr file when a forever.Monitor child exits (`indexzero`) + * [4c5b73a](https://github.com/foreverjs/forever/commit/4c5b73a) [dist] Version bump. 0.5.5 (`indexzero`) + * [1af1fe3](https://github.com/foreverjs/forever/commit/1af1fe3) [fix] Remove .fvr file when a forever.Monitor child exits (`indexzero`) v0.5.4 / Mon, 30 May 2011 ========================= - * [4e84d71] [dist] Version bump. 0.5.4 (`indexzero`) - * [5b2bf74] [test] Update test/multiple-processes-test.js so that it doesnt leave zombie processes behind (`indexzero`) - * [6d93dcc] Add --spinSleepTime to throttle instead of killing spinning scripts (`Dusty Leary`) + * [4e84d71](https://github.com/foreverjs/forever/commit/4e84d71) [dist] Version bump. 0.5.4 (`indexzero`) + * [5b2bf74](https://github.com/foreverjs/forever/commit/5b2bf74) [test] Update test/multiple-processes-test.js so that it doesnt leave zombie processes behind (`indexzero`) + * [6d93dcc](https://github.com/foreverjs/forever/commit/6d93dcc) Add --spinSleepTime to throttle instead of killing spinning scripts (`Dusty Leary`) v0.5.3 / Sun, 29 May 2011 ========================= - * [7634248] [dist] Version bump. 0.5.3 (`indexzero`) - * [d6b0d0e] [test] Update tests to be consistent with new functionality (`indexzero`) - * [921966a] [api] Improve forever when working with `-c` or `--command` (`indexzero`) - * [349085d] [dist] Minor update to dependencies (`indexzero`) - * [96c3f08] [dist] Update .gitignore for npm 1.0 (`indexzero`) - * [f4982cd] [doc] Update README.md to still use -g (`indexzero`) - * [86fc40a] Merge branch 'master' of https://github.com/ded/forever (`indexzero`) - * [3feb0bc] [dist] Update package.json dependencies (`indexzero`) - * [270d976] preferGlobal (`Dustin Diaz`) - * [de90882] [doc] Update installation instructions with `-g` for npm 1.0 (`indexzero`) + * [7634248](https://github.com/foreverjs/forever/commit/7634248) [dist] Version bump. 0.5.3 (`indexzero`) + * [d6b0d0e](https://github.com/foreverjs/forever/commit/d6b0d0e) [test] Update tests to be consistent with new functionality (`indexzero`) + * [921966a](https://github.com/foreverjs/forever/commit/921966a) [api] Improve forever when working with `-c` or `--command` (`indexzero`) + * [349085d](https://github.com/foreverjs/forever/commit/349085d) [dist] Minor update to dependencies (`indexzero`) + * [96c3f08](https://github.com/foreverjs/forever/commit/96c3f08) [dist] Update .gitignore for npm 1.0 (`indexzero`) + * [f4982cd](https://github.com/foreverjs/forever/commit/f4982cd) [doc] Update README.md to still use -g (`indexzero`) + * [3feb0bc](https://github.com/foreverjs/forever/commit/3feb0bc) [dist] Update package.json dependencies (`indexzero`) + * [270d976](https://github.com/foreverjs/forever/commit/270d976) preferGlobal (`Dustin Diaz`) + * [de90882](https://github.com/foreverjs/forever/commit/de90882) [doc] Update installation instructions with `-g` for npm 1.0 (`indexzero`) v0.5.2 / Fri, 13 May 2011 ========================= - * [2c99741] [dist] Version bump. 0.5.2 (`indexzero`) - * [eab1c04] [fix] Check if processes exist before returning in `.findByScript()`. Fixes #50 (`indexzero`) - * [e18a256] [fix] Batch the cleaning of *.fvr and *.pid files to avoid file descriptor overload. Fixes #53 (`indexzero`) - * [828cd48] [minor] *print help when a valid action isn't given (`nlco`) + * [2c99741](https://github.com/foreverjs/forever/commit/2c99741) [dist] Version bump. 0.5.2 (`indexzero`) + * [eab1c04](https://github.com/foreverjs/forever/commit/eab1c04) [fix] Check if processes exist before returning in `.findByScript()`. Fixes #50 (`indexzero`) + * [e18a256](https://github.com/foreverjs/forever/commit/e18a256) [fix] Batch the cleaning of *.fvr and *.pid files to avoid file descriptor overload. Fixes #53 (`indexzero`) + * [828cd48](https://github.com/foreverjs/forever/commit/828cd48) [minor] *print help when a valid action isn't given (`nlco`) v0.5.1 / Sun, 1 May 2011 ======================== - * [f326d20] [dist] Version bump. 0.5.1. Add `eyes` dependency (`indexzero`) + * [f326d20](https://github.com/foreverjs/forever/commit/f326d20) [dist] Version bump. 0.5.1. Add `eyes` dependency (`indexzero`) v0.5.0 / Sun, 1 May 2011 ======================== - * [7b451d9] [dist] Version bump. 0.5.0 (`indexzero`) - * [1511179] [doc] Regenerated docco docs (`indexzero`) - * [0fb8abe] [minor] Small require formatting updates. Try to be more future-proof. (`indexzero`) - * [3112380] [fix] Small fixes found from some upstream integrations (`indexzero`) - * [9788748] [fix] Better handling of bookkeeping of *.fvr and *.pid files. Closes #47 (`indexzero`) - * [864b1d1] [minor] Small fixes (`indexzero`) - * [9b56c41] [api] Allow for forced exit if scripts restart in less than `minUptime` (`indexzero`) - * [650f874] [minor] Add docs for `forever clear ` (`indexzero`) - * [396b9a1] [doc] Regenerate docco docs (`indexzero`) - * [a49483d] [doc] Updated README.md (`indexzero`) - * [f0ba253] [bin api minor] Update Copyright headers. Refactor bin/forever into lib/forever/cli.js. Add `forever config`, `forever set `, and `forever clear ` (`indexzero`) - * [dffd0d1] [minor dist api] Small updates for storing a forever global config file. Update package.json using require-analyzer (`indexzero`) - * [6741c3a] [minor] More work for multiple processes from a single programmatic usage (`indexzero`) - * [6e52e03] [minor test] Added tests for multiple processes from a single node process (`indexzero`) - * [1c16e81] [api test] Update to use nconf for forever configuration. Use uids for filenames instead of forever* and forever pids (more defensive + support for multiple monitors from a single `forever` process). (`indexzero`) - * [be6de72] [minor] Small updates after merging from kpdecker (`indexzero`) - * [3beb6da] Merge branch 'master' of https://github.com/kpdecker/forever into v0.5.x (`indexzero`) - * [95434b3] Proper pid lookup in getForeverId (`kpdecker`) - * [13bf645] Add custom root directory to the initd-example (For cases where /tmp is removed) (`kpdecker`) - * [b181dd7] Init.d Example script (`kpdecker`) - * [51bc6c0] Append log implementation (`kpdecker`) - * [588b2bf] Append log CLI (`kpdecker`) - * [ab497f4] forever.stat append flag (`kpdecker`) - * [dca33d8] CLI pidfile argument (`kpdecker`) - * [52184ae] forever.pidFilePath implementation (`kpdecker`) - * [e9b2cd3] forever.logFilePath utility. Treat paths that start with / as paths relative to the root, not the forever root. (`kpdecker`) - * [8e323ca] Pass cwd to spawn (`kpdecker`) - * [b29a258] Return non-zero error code on tryStart failure (`kpdecker`) - * [11ffce8] Load the forever lib relative to the binary rather than using module notation. (`kpdecker`) + * [7b451d9](https://github.com/foreverjs/forever/commit/7b451d9) [dist] Version bump. 0.5.0 (`indexzero`) + * [1511179](https://github.com/foreverjs/forever/commit/1511179) [doc] Regenerated docco docs (`indexzero`) + * [0fb8abe](https://github.com/foreverjs/forever/commit/0fb8abe) [minor] Small require formatting updates. Try to be more future-proof. (`indexzero`) + * [3112380](https://github.com/foreverjs/forever/commit/3112380) [fix] Small fixes found from some upstream integrations (`indexzero`) + * [9788748](https://github.com/foreverjs/forever/commit/9788748) [fix] Better handling of bookkeeping of *.fvr and *.pid files. Closes #47 (`indexzero`) + * [864b1d1](https://github.com/foreverjs/forever/commit/864b1d1) [minor] Small fixes (`indexzero`) + * [9b56c41](https://github.com/foreverjs/forever/commit/9b56c41) [api] Allow for forced exit if scripts restart in less than `minUptime` (`indexzero`) + * [650f874](https://github.com/foreverjs/forever/commit/650f874) [minor] Add docs for `forever clear ` (`indexzero`) + * [396b9a1](https://github.com/foreverjs/forever/commit/396b9a1) [doc] Regenerate docco docs (`indexzero`) + * [a49483d](https://github.com/foreverjs/forever/commit/a49483d) [doc] Updated README.md (`indexzero`) + * [f0ba253](https://github.com/foreverjs/forever/commit/f0ba253) [bin api minor] Update Copyright headers. Refactor bin/forever into lib/forever/cli.js. Add `forever config`, `forever set `, and `forever clear ` (`indexzero`) + * [dffd0d1](https://github.com/foreverjs/forever/commit/dffd0d1) [minor dist api] Small updates for storing a forever global config file. Update package.json using require-analyzer (`indexzero`) + * [6741c3a](https://github.com/foreverjs/forever/commit/6741c3a) [minor] More work for multiple processes from a single programmatic usage (`indexzero`) + * [6e52e03](https://github.com/foreverjs/forever/commit/6e52e03) [minor test] Added tests for multiple processes from a single node process (`indexzero`) + * [1c16e81](https://github.com/foreverjs/forever/commit/1c16e81) [api test] Update to use nconf for forever configuration. Use uids for filenames instead of forever* and forever pids (more defensive + support for multiple monitors from a single `forever` process). (`indexzero`) + * [be6de72](https://github.com/foreverjs/forever/commit/be6de72) [minor] Small updates after merging from kpdecker (`indexzero`) + * [95434b3](https://github.com/foreverjs/forever/commit/95434b3) Proper pid lookup in getForeverId (`kpdecker`) + * [13bf645](https://github.com/foreverjs/forever/commit/13bf645) Add custom root directory to the initd-example (For cases where /tmp is removed) (`kpdecker`) + * [b181dd7](https://github.com/foreverjs/forever/commit/b181dd7) Init.d Example script (`kpdecker`) + * [51bc6c0](https://github.com/foreverjs/forever/commit/51bc6c0) Append log implementation (`kpdecker`) + * [588b2bf](https://github.com/foreverjs/forever/commit/588b2bf) Append log CLI (`kpdecker`) + * [ab497f4](https://github.com/foreverjs/forever/commit/ab497f4) forever.stat append flag (`kpdecker`) + * [dca33d8](https://github.com/foreverjs/forever/commit/dca33d8) CLI pidfile argument (`kpdecker`) + * [52184ae](https://github.com/foreverjs/forever/commit/52184ae) forever.pidFilePath implementation (`kpdecker`) + * [e9b2cd3](https://github.com/foreverjs/forever/commit/e9b2cd3) forever.logFilePath utility. Treat paths that start with / as paths relative to the root, not the forever root. (`kpdecker`) + * [8e323ca](https://github.com/foreverjs/forever/commit/8e323ca) Pass cwd to spawn (`kpdecker`) + * [b29a258](https://github.com/foreverjs/forever/commit/b29a258) Return non-zero error code on tryStart failure (`kpdecker`) + * [11ffce8](https://github.com/foreverjs/forever/commit/11ffce8) Load the forever lib relative to the binary rather than using module notation. (`kpdecker`) v0.4.2 / Wed, 13 Apr 2011 ========================= - * [7089311] [dist] Version bump. 0.4.2 (`indexzero`) + * [7089311](https://github.com/foreverjs/forever/commit/7089311) [dist] Version bump. 0.4.2 (`indexzero`) v0.4.1 / Sat, 19 Feb 2011 ========================= - * [f11321f] [dist] Version bump. 0.4.1 (`indexzero`) - * [987d8ed] [fix] Update sourceDir option to check for file paths relative to root (`indexzero`) + * [f11321f](https://github.com/foreverjs/forever/commit/f11321f) [dist] Version bump. 0.4.1 (`indexzero`) + * [987d8ed](https://github.com/foreverjs/forever/commit/987d8ed) [fix] Update sourceDir option to check for file paths relative to root (`indexzero`) v0.4.0 / Wed, 16 Feb 2011 ========================= - * [b870d47] [dist] Version bump. 0.4.0 (`indexzero`) - * [d9911dd] [doc] Update docs for v0.4.0 release (`indexzero`) - * [6862ad5] [api] Expose options passed to child_process.spawn (`indexzero`) - * [4b25241] [doc] Added example for chroot (`indexzero`) - * [9d2eefa] [fix] Dont slice off arguments after [SCRIPT] if it is not passed to the CLI (e.g. forever list) (`indexzero`) - * [7c0c3b8] [api] Refactor to use winston instead of pure sys.puts() for logging (`indexzero`) - * [cc3d465] [api] Make forever.load() sync and not required for default configurations. Grossly simplifies saving / reloading semantics (`indexzero`) - * [fd1b9a6] [api] Added `restart` command to both forever.Monitor and CLI (`indexzero`) - * [c073c47] [api] First pass at "restart" functionality, not 100% yet (`indexzero`) - * [7b9b4be] [docs] Updated docs from docco (`indexzero`) - * [ea89def] [minor] Small formatting update to package.json (`indexzero`) - * [85b0a02] [api] Added ctime property to forever instances to track uptime (`indexzero`) - * [bc07f95] [docs refactor] Refactor forever.Forever into lib/forever/monitor.js (`indexzero`) + * [b870d47](https://github.com/foreverjs/forever/commit/b870d47) [dist] Version bump. 0.4.0 (`indexzero`) + * [d9911dd](https://github.com/foreverjs/forever/commit/d9911dd) [doc] Update docs for v0.4.0 release (`indexzero`) + * [6862ad5](https://github.com/foreverjs/forever/commit/6862ad5) [api] Expose options passed to child_process.spawn (`indexzero`) + * [4b25241](https://github.com/foreverjs/forever/commit/4b25241) [doc] Added example for chroot (`indexzero`) + * [9d2eefa](https://github.com/foreverjs/forever/commit/9d2eefa) [fix] Dont slice off arguments after [SCRIPT] if it is not passed to the CLI (e.g. forever list) (`indexzero`) + * [7c0c3b8](https://github.com/foreverjs/forever/commit/7c0c3b8) [api] Refactor to use winston instead of pure sys.puts() for logging (`indexzero`) + * [cc3d465](https://github.com/foreverjs/forever/commit/cc3d465) [api] Make forever.load() sync and not required for default configurations. Grossly simplifies saving / reloading semantics (`indexzero`) + * [fd1b9a6](https://github.com/foreverjs/forever/commit/fd1b9a6) [api] Added `restart` command to both forever.Monitor and CLI (`indexzero`) + * [c073c47](https://github.com/foreverjs/forever/commit/c073c47) [api] First pass at "restart" functionality, not 100% yet (`indexzero`) + * [7b9b4be](https://github.com/foreverjs/forever/commit/7b9b4be) [docs] Updated docs from docco (`indexzero`) + * [ea89def](https://github.com/foreverjs/forever/commit/ea89def) [minor] Small formatting update to package.json (`indexzero`) + * [85b0a02](https://github.com/foreverjs/forever/commit/85b0a02) [api] Added ctime property to forever instances to track uptime (`indexzero`) + * [bc07f95](https://github.com/foreverjs/forever/commit/bc07f95) [docs refactor] Refactor forever.Forever into lib/forever/monitor.js (`indexzero`) v0.3.5 / Fri, 11 Feb 2011 ========================= - * [884037a] [dist] Version bump. 0.3.5. depends on daemon > 0.3.0 & node > 0.4.0 (`indexzero`) - * [7b31da2] [api minor] Updates for daemon.node 0.2.0. Fix randomString so it doesnt generate strings with "/" (`indexzero`) - * [a457ab7] [doc] Add docs from docco (`indexzero`) - * [4a0ca64] expose command to bin/forever as an option (`Adrien Friggeri`) + * [884037a](https://github.com/foreverjs/forever/commit/884037a) [dist] Version bump. 0.3.5. depends on daemon > 0.3.0 & node > 0.4.0 (`indexzero`) + * [7b31da2](https://github.com/foreverjs/forever/commit/7b31da2) [api minor] Updates for daemon.node 0.2.0. Fix randomString so it doesnt generate strings with "/" (`indexzero`) + * [a457ab7](https://github.com/foreverjs/forever/commit/a457ab7) [doc] Add docs from docco (`indexzero`) + * [4a0ca64](https://github.com/foreverjs/forever/commit/4a0ca64) expose command to bin/forever as an option (`Adrien Friggeri`) v0.3.1 / Fri, 24 Dec 2010 ========================= - * [3c7e4a7] [dist doc] Version bump 0.3.1. Added CHANGELOG.md (`indexzero`) - * [38177c4] [bin] Ensure both daemons and long running processes get the same stat checking (`indexzero`) - * [ea6849d] [api] Make it the responsibility of the programmer to save/re-save the Forever information on start or restart events (`indexzero`) - * [14c7aa8] [api test bin doc] Added stop by script name feature. Improved the cleanlogs functionality. Made event emission consistent. Added to docs (`indexzero`) - * [b7f792b] [minor] Small update to how forever works with pid files (`indexzero`) - * [57850e9] [api fix] Improved the way forever manages pid / fvr files. Added cleanlogs command line option (`indexzero`) - * [070313e] [api] Push options hierarchy up one level. e.g. Forever.options.silent is now Forever.silent (`indexzero`) - * [124cc25] [fix api bin test] Check for scripts with fs.stat() before running them. Use process.kill instead of exec('kill'). Clean logs from command line. Display log file in forever list. Emit save event. (`indexzero`) - * [57273ea] updated the readme with non-node usage and an example (`James Halliday`) - * [cc33f06] passing test for non-node array usage (`James Halliday`) - * [761b31b] file array case shortcut to set the command and options (`James Halliday`) - * [02de53f] "command" option to spawn() with, defaults to "node" (`James Halliday`) - * [6feedc1] [minor] Remove unnecessary comma in package.json (`indexzero`) + * [3c7e4a7](https://github.com/foreverjs/forever/commit/3c7e4a7) [dist doc] Version bump 0.3.1. Added CHANGELOG.md (`indexzero`) + * [38177c4](https://github.com/foreverjs/forever/commit/38177c4) [bin] Ensure both daemons and long running processes get the same stat checking (`indexzero`) + * [ea6849d](https://github.com/foreverjs/forever/commit/ea6849d) [api] Make it the responsibility of the programmer to save/re-save the Forever information on start or restart events (`indexzero`) + * [14c7aa8](https://github.com/foreverjs/forever/commit/14c7aa8) [api test bin doc] Added stop by script name feature. Improved the cleanlogs functionality. Made event emission consistent. Added to docs (`indexzero`) + * [b7f792b](https://github.com/foreverjs/forever/commit/b7f792b) [minor] Small update to how forever works with pid files (`indexzero`) + * [57850e9](https://github.com/foreverjs/forever/commit/57850e9) [api fix] Improved the way forever manages pid / fvr files. Added cleanlogs command line option (`indexzero`) + * [070313e](https://github.com/foreverjs/forever/commit/070313e) [api] Push options hierarchy up one level. e.g. Forever.options.silent is now Forever.silent (`indexzero`) + * [124cc25](https://github.com/foreverjs/forever/commit/124cc25) [fix api bin test] Check for scripts with fs.stat() before running them. Use process.kill instead of exec('kill'). Clean logs from command line. Display log file in forever list. Emit save event. (`indexzero`) + * [57273ea](https://github.com/foreverjs/forever/commit/57273ea) updated the readme with non-node usage and an example (`James Halliday`) + * [cc33f06](https://github.com/foreverjs/forever/commit/cc33f06) passing test for non-node array usage (`James Halliday`) + * [761b31b](https://github.com/foreverjs/forever/commit/761b31b) file array case shortcut to set the command and options (`James Halliday`) + * [02de53f](https://github.com/foreverjs/forever/commit/02de53f) "command" option to spawn() with, defaults to "node" (`James Halliday`) + * [6feedc1](https://github.com/foreverjs/forever/commit/6feedc1) [minor] Remove unnecessary comma in package.json (`indexzero`) v0.3.0 / Tue, 23 Nov 2010 ========================= - * [5d6f8da] [dist] Version bump. 0.3.0 (`indexzero`) - * [29bff87] [doc] Updated formatting in README.md (`indexzero`) - * [00fc643] [api bin doc test] Added stop, stopall, and list command line functionality. Forever now tracks all daemons running on the system using *.fvr files (`indexzero`) - * [d084ad1] [minor] Make samples/server.js listen on 8000 (`indexzero`) + * [5d6f8da](https://github.com/foreverjs/forever/commit/5d6f8da) [dist] Version bump. 0.3.0 (`indexzero`) + * [29bff87](https://github.com/foreverjs/forever/commit/29bff87) [doc] Updated formatting in README.md (`indexzero`) + * [00fc643](https://github.com/foreverjs/forever/commit/00fc643) [api bin doc test] Added stop, stopall, and list command line functionality. Forever now tracks all daemons running on the system using *.fvr files (`indexzero`) + * [d084ad1](https://github.com/foreverjs/forever/commit/d084ad1) [minor] Make samples/server.js listen on 8000 (`indexzero`) v0.2.7 / Tue, 16 Nov 2010 ========================= - * [29bc24f] [minor] Version bump. Fix small bug in 0.2.6 (`indexzero`) + * [29bc24f](https://github.com/foreverjs/forever/commit/29bc24f) [minor] Version bump. Fix small bug in 0.2.6 (`indexzero`) v0.2.6 / Mon, 15 Nov 2010 ========================= - * [2bcc53d] [bin dist] Version bump. Small fixes from 0.2.5 (`indexzero`) - * [faacc0f] [doc] Typo (`indexzero`) + * [2bcc53d](https://github.com/foreverjs/forever/commit/2bcc53d) [bin dist] Version bump. Small fixes from 0.2.5 (`indexzero`) + * [faacc0f](https://github.com/foreverjs/forever/commit/faacc0f) [doc] Typo (`indexzero`) v0.2.5 / Sun, 14 Nov 2010 ========================= - * [0d5a789] [dist] Version bump. (`indexzero`) - * [04705ed] [api test bin dist] Update to use daemon.node (`indexzero`) - * [65a91fb] [minor] Added .gitignore (`indexzero`) + * [0d5a789](https://github.com/foreverjs/forever/commit/0d5a789) [dist] Version bump. (`indexzero`) + * [04705ed](https://github.com/foreverjs/forever/commit/04705ed) [api test bin dist] Update to use daemon.node (`indexzero`) + * [65a91fb](https://github.com/foreverjs/forever/commit/65a91fb) [minor] Added .gitignore (`indexzero`) v0.2.0 / Mon, 27 Sep 2010 ========================= - * [f916359] [minor dist] Added LICENSE. Refactor forever.js to be more DRY (`indexzero`) - * [9243dee] Removed repeating function and replaced it by template generator (`Fedor Indutny`) - * [347dcaa] [minor] Updated contributors (`indexzero`) - * [a4f1700] [api test doc dist] Version bump. Merged from donnerjack. Added ability to log to file(s). Updated docs. (`indexzero`) - * [d5d2f1d] New-line at the end of file (`Fedor Indutny`) - * [73b52a4] Added chaining to run, simplyfied exports.run (`Fedor Indutny`) + * [f916359](https://github.com/foreverjs/forever/commit/f916359) [minor dist] Added LICENSE. Refactor forever.js to be more DRY (`indexzero`) + * [9243dee](https://github.com/foreverjs/forever/commit/9243dee) Removed repeating function and replaced it by template generator (`Fedor Indutny`) + * [347dcaa](https://github.com/foreverjs/forever/commit/347dcaa) [minor] Updated contributors (`indexzero`) + * [a4f1700](https://github.com/foreverjs/forever/commit/a4f1700) [api test doc dist] Version bump. Merged from donnerjack. Added ability to log to file(s). Updated docs. (`indexzero`) + * [d5d2f1d](https://github.com/foreverjs/forever/commit/d5d2f1d) New-line at the end of file (`Fedor Indutny`) + * [73b52a4](https://github.com/foreverjs/forever/commit/73b52a4) Added chaining to run, simplyfied exports.run (`Fedor Indutny`) diff --git a/node_modules/forever/README.md b/node_modules/forever/README.md index 79a3ce2..e1a705a 100644 --- a/node_modules/forever/README.md +++ b/node_modules/forever/README.md @@ -1,4 +1,9 @@ -# forever [![Build Status](https://api.travis-ci.org/foreverjs/forever.svg)](https://travis-ci.org/foreverjs/forever) [![Inline docs](http://inch-ci.org/github/foreverjs/forever.svg?branch=master)](http://inch-ci.org/github/foreverjs/forever) +# forever + +[![Version npm](https://img.shields.io/npm/v/forever.svg?style=flat-square)](https://www.npmjs.com/package/forever)[![npm Downloads](https://img.shields.io/npm/dm/forever.svg?style=flat-square)](https://www.npmjs.com/package/forever)[![Build Status](https://img.shields.io/travis/foreverjs/forever/master.svg?style=flat-square)](https://travis-ci.org/foreverjs/forever)[![Dependencies](https://img.shields.io/david/foreverjs/forever.svg?style=flat-square)](https://david-dm.org/foreverjs/forever)[![Inline docs](http://inch-ci.org/github/foreverjs/forever.svg?branch=master)](http://inch-ci.org/github/foreverjs/forever) + +[![NPM](https://nodei.co/npm/forever.png?downloads=true&downloadRank=true)](https://nodei.co/npm/forever/) + A simple CLI tool for ensuring that a given script runs continuously (i.e. forever). @@ -16,11 +21,17 @@ A simple CLI tool for ensuring that a given script runs continuously (i.e. forev ``` ## Usage -There are two distinct ways to use forever: through the command line interface, or by requiring the forever module in your own code. **Note:** If you are using forever _programatically_ you should install [forever-monitor][0]. +There are two ways to use forever: through the command line or by using forever in your code. **Note:** If you are using forever _programatically_ you should install [forever-monitor][0]. -### Using forever from the command line -You can use forever to run any kind of script continuously (whether it is written in node.js or not). The usage options are simple: +### Command Line Usage +You can use forever to run scripts continuously (whether it is written in node.js or not). +**Example** +``` +forever start app.js +``` + +**Options** ``` $ forever --help usage: forever [action] [options] SCRIPT [script-options] @@ -92,18 +103,69 @@ There are [several examples][1] designed to test the fault tolerance of forever. $ forever -m 5 examples/error-on-timer.js ``` -### Changing where forever writes files +### JSON Configuration Files -By default `forever` places all of the files it needs into `/$HOME/.forever`. If you would like to change that location just set the `FOREVER_ROOT` environment variable when you are running forever: +In addition to passing forever the path to a script (along with accompanying options, described above), you may also pass forever the path to a JSON file containing these options. For example, consider an application with the following file structure: ``` -FOREVER_ROOT=/etc/forever forever start index.js +. +├── forever +│ └── development.json +└── index.js + +// forever/development.json +{ + // Comments are supported + "uid": "app", + "append": true, + "watch": true, + "script": "index.js", + "sourceDir": "/home/myuser/app" +} ``` -Make sure that the user running the process has the appropriate privileges to read & write to this directory. +This application could be started with forever, as shown below: -## Using forever module from node.js -In addition to using a Forever object, the forever module also exposes some useful methods. Each method returns an instance of an EventEmitter which emits when complete. See the [forever cli commands][2] for sample usage. +``` bash +$ forever start ./forever/development.json +``` + +Absolute paths to such configuration files are also supported: + +``` bash +$ forever start /home/myuser/app/forever/development.json +``` + +**Note:** Forever parses JSON configuration files using [shush](https://github.com/krakenjs/shush), allowing the use of in-line comments within such files. + +#### Multi-App Configuration Files + +JSON configuration files can also be used to define the startup options for *multiple* applications, as shown below. + +``` +[ + { + // App1 + "uid": "app1", + "append": true, + "watch": true, + "script": "index.js", + "sourceDir": "/home/myuser/app1" + }, + { + // App2 + "uid": "app2", + "append": true, + "watch": true, + "script": "index.js", + "sourceDir": "/home/myuser/app2", + "args": ["--port", "8081"] + } +] +``` + +### Using In Your Code +The forever module exposes some useful methods to use in your code. Each method returns an instance of an EventEmitter which emits when complete. See the [forever cli commands][2] for sample usage. **Remark:** As of `forever@0.6.0` processes will not automatically be available in `forever.list()`. In order to get your processes into `forever.list()` or `forever list` you must instantiate the `forever` socket server: @@ -113,7 +175,7 @@ In addition to using a Forever object, the forever module also exposes some usef This method takes multiple `forever.Monitor` instances which are defined in the `forever-monitor` dependency. -### forever.load (config) +#### forever.load (config) _Synchronously_ sets the specified configuration (config) for the forever module. There are two important options: Option | Description   | Default @@ -126,40 +188,50 @@ columns | Array of columns to display when `format` is true | `forever.config. debug | Boolean value indicating to run in debug mode | false stream | Boolean value indicating if logs will be streamed | false -### forever.start (file, options) +#### forever.start (file, options) Starts a script with forever. The `options` object is what is expected by the `Monitor` of `forever-monitor`. -### forever.startDaemon (file, options) +#### forever.startDaemon (file, options) Starts a script with forever as a daemon. WARNING: Will daemonize the current process. The `options` object is what is expected by the `Monitor` of `forever-monitor`. -### forever.stop (index) +#### forever.stop (index) Stops the forever daemon script at the specified index. These indices are the same as those returned by forever.list(). This method returns an EventEmitter that raises the 'stop' event when complete. -### forever.stopAll (format) +#### forever.stopAll (format) Stops all forever scripts currently running. This method returns an EventEmitter that raises the 'stopAll' event when complete. The `format` parameter is a boolean value indicating whether the returned values should be formatted according to the configured columns which can set with `forever columns` or programmatically `forever.config.set('columns')`. -### forever.list (format, callback) +#### forever.list (format, callback) Returns a list of metadata objects about each process that is being run using forever. This method will return the list of metadata as such. Only processes which have invoked `forever.startServer()` will be available from `forever.list()` The `format` parameter is a boolean value indicating whether the returned values should be formatted according to the configured columns which can set with `forever columns` or programmatically `forever.config.set('columns')`. -### forever.tail (target, options, callback) +#### forever.tail (target, options, callback) Responds with the logs from the target script(s) from `tail`. There are two options: * `length` (numeric): is is used as the `-n` parameter to `tail`. * `stream` (boolean): is is used as the `-f` parameter to `tail`. -### forever.cleanUp () +#### forever.cleanUp () Cleans up any extraneous forever *.pid files that are on the target system. This method returns an EventEmitter that raises the 'cleanUp' event when complete. -### forever.cleanLogsSync (processes) +#### forever.cleanLogsSync (processes) Removes all log files from the root forever directory that do not belong to current running forever processes. Processes are the value returned from `Monitor.data` in `forever-monitor`. -### forever.startServer (monitor0, monitor1, ..., monitorN) +#### forever.startServer (monitor0, monitor1, ..., monitorN) Starts the `forever` HTTP server for communication with the forever CLI. **NOTE:** This will change your `process.title`. This method takes multiple `forever.Monitor` instances which are defined in the `forever-monitor` dependency. +### Logging and output file locations + +By default `forever` places all of the files it needs into `/$HOME/.forever`. If you would like to change that location just set the `FOREVER_ROOT` environment variable when you are running forever: + +``` +FOREVER_ROOT=/etc/forever forever start index.js +``` + +Make sure that the user running the process has the appropriate privileges to read & write to this directory. + ## Run Tests ``` bash diff --git a/node_modules/forever/lib/forever.js b/node_modules/forever/lib/forever.js index 5d8cf03..0f8d952 100644 --- a/node_modules/forever/lib/forever.js +++ b/node_modules/forever/lib/forever.js @@ -758,14 +758,16 @@ forever.findByUid = function (script, processes) { // Finds the process with the specified pid. // forever.findByPid = function (pid, processes) { - var procs = !processes - ? null - : processes.filter(function (p) { - return p.pid == pid; - }); + pid = typeof pid === 'string' + ? parseInt(pid, 10) + : pid; + + var procs = processes && processes.filter(function (p) { + return p.pid === pid; + }); if (procs && procs.length === 0) { procs = null; } - return procs; + return procs || null; }; // @@ -972,7 +974,7 @@ forever.logEvents = function (monitor) { }); monitor.on('exit:code', function (code, signal) { - forever.out.error(!isNaN(code) + forever.out.error((code !== null && code !== undefined) ? 'Forever detected script exited with code: ' + code : 'Forever detected script was killed by signal: ' + signal); }); diff --git a/node_modules/forever/lib/forever/cli.js b/node_modules/forever/lib/forever/cli.js index bb48670..6bf0913 100644 --- a/node_modules/forever/lib/forever/cli.js +++ b/node_modules/forever/lib/forever/cli.js @@ -11,7 +11,12 @@ var fs = require('fs'), util = require('util'), colors = require('colors'), cliff = require('cliff'), + isAbsolute = require('path-is-absolute'), flatiron = require('flatiron'), + shush = require('shush'), + prettyjson = require('prettyjson'), + clone = require('clone'), + objectAssign = require('object-assign'), forever = require('../forever'); var cli = exports; @@ -196,7 +201,46 @@ function checkColumn(name) { // `forever.startDaemon` // var getOptions = cli.getOptions = function (file) { - var options = {}; + var options = {}, + absFile = isAbsolute(file) ? file : path.resolve(process.cwd(), file), + configKeys = [ + 'pidFile', 'logFile', 'errFile', 'watch', 'minUptime', 'append', + 'silent', 'outFile', 'max', 'command', 'path', 'spinSleepTime', + 'sourceDir', 'workingDir', 'uid', 'watchDirectory', 'watchIgnore', + 'killTree', 'killSignal', 'id' + ], + specialKeys = ['script', 'args'], + configs; + + // + // Load JSON configuration values + // + if (path.extname(file) === '.json') { + configs = shush(absFile); + configs = !Array.isArray(configs) ? [configs] : configs; + + configs = configs.map(function (conf) { + var mut = Object.keys(conf) + .reduce(function (acc, key) { + if (~configKeys.indexOf(key) || ~specialKeys.indexOf(key)) { + acc[key] = conf[key]; + } + + return acc; + }, {}); + + if (!mut.script) { + forever.log.error('"script" option required in JSON configuration files'); + console.log(prettyjson.render(mut)); + process.exit(1); + } + + return mut; + }); + } else { + options.script = file; + } + // // First isolate options which should be passed to file // @@ -209,12 +253,7 @@ var getOptions = cli.getOptions = function (file) { app.config.stores.argv.store = {}; app.config.use('argv', argvOptions); - [ - 'pidFile', 'logFile', 'errFile', 'watch', 'minUptime', 'append', - 'silent', 'outFile', 'max', 'command', 'path', 'spinSleepTime', - 'sourceDir', 'workingDir', 'uid', 'watchDirectory', 'watchIgnore', - 'killTree', 'killSignal', 'id' - ].forEach(function (key) { + configKeys.forEach(function (key) { options[key] = app.config.get(key); }); @@ -240,7 +279,13 @@ var getOptions = cli.getOptions = function (file) { options.workingDir = options.workingDir || options.sourceDir; options.spawnWith = { cwd: options.workingDir }; - return options; + if (configs && configs.length) { + return configs.map(function (conf) { + return objectAssign(clone(options), conf); + }); + } + + return [options]; }; // @@ -264,10 +309,13 @@ app.cmd(/start (.+)/, cli.startDaemon = function () { var file = app.argv._[1], options = getOptions(file); - forever.log.info('Forever processing file: ' + file.grey); - tryStart(file, options, function () { - forever.startDaemon(file, options); + options.forEach(function (o) { + forever.log.info('Forever processing file: ' + o.script.grey); + tryStart(o.script, o, function () { + forever.startDaemon(o.script, o); + }); }); + }); // @@ -559,10 +607,12 @@ cli.run = function () { var file = app.argv._[0], options = getOptions(file); - tryStart(file, options, function () { - var monitor = forever.start(file, options); - monitor.on('start', function () { - forever.startServer(monitor); + options.forEach(function (o) { + tryStart(o.script, o, function () { + var monitor = forever.start(o.script, o); + monitor.on('start', function () { + forever.startServer(monitor); + }); }); }); }; diff --git a/node_modules/forever/node_modules/cliff/node_modules/colors/package.json b/node_modules/forever/node_modules/cliff/node_modules/colors/package.json index 2dca6e5..a701e80 100644 --- a/node_modules/forever/node_modules/cliff/node_modules/colors/package.json +++ b/node_modules/forever/node_modules/cliff/node_modules/colors/package.json @@ -16,7 +16,7 @@ ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/Marak/colors.js.git" + "url": "http://github.com/Marak/colors.js.git" }, "license": "MIT", "scripts": { @@ -26,10 +26,26 @@ "node": ">=0.1.90" }, "main": "./lib/index", - "readme": "# colors.js\n\n## get color and style in your node.js console\n\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n### text colors\n\n - black\n - red\n - green\n - yellow\n - blue\n - magenta\n - cyan\n - white\n - gray\n - grey\n\n### background colors\n\n\n\n - bgBlack\n - bgRed\n - bgGreen\n - bgYellow\n - bgBlue\n - bgMagenta\n - bgCyan\n - bgWhite\n\n### styles\n\n - reset\n - bold\n - dim\n - italic\n - underline\n - inverse\n - hidden\n - strikethrough\n\n### extras\n\n - rainbow\n - zebra\n - america\n - trap\n - random\n\n\n## Usage\n\nBy popular demand, `colors` now ships with two types of usages!\n\nThe super nifty way\n\n```js\nvar colors = require('colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow\nconsole.log('Run the trap'.trap); // Drops the bass\n\n```\n\nor a slightly less nifty way which doesn't extend `String.prototype`\n\n```js\nvar colors = require('colors/safe');\n\nconsole.log(colors.green('hello')); // outputs green text\nconsole.log(colors.red.underline('i like cake and pies')) // outputs red underlined text\nconsole.log(colors.inverse('inverse the color')); // inverses the color\nconsole.log(colors.rainbow('OMG Rainbows!')); // rainbow\nconsole.log(colors.trap('Run the trap')); // Drops the bass\n\n```\n\nI prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way. \n\nIf you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object.\n\n## Disabling Colors\n\nTo disable colors you can pass the following arguments in the command line to your application:\n\n```bash\nnode myapp.js --no-color\n```\n\n## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data)\n\n```js\nvar name = 'Marak';\nconsole.log(colors.green('Hello %s'), name);\n// outputs -> 'Hello Marak'\n```\n\n## Custom themes\n\n### Using standard API\n\n```js\n\nvar colors = require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n### Using string safe API\n\n```js\nvar colors = require('colors/safe');\n\n// set single property\nvar error = colors.red;\nerror('this is red');\n\n// set theme\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(colors.error(\"this is an error\"));\n\n// outputs yellow text\nconsole.log(colors.warn(\"this is a warning\"));\n```\n\n*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.*", - "readmeFilename": "ReadMe.md", + "gitHead": "e9e6557cc0fa26dba1a20b0d45e92de982f4047c", "_id": "colors@1.0.3", "_shasum": "0433f44d809680fdeb60ed260f1b0c262e82a40b", - "_resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "_from": "colors@>=1.0.3 <1.1.0" + "_from": "colors@~1.0.3", + "_npmVersion": "2.0.2", + "_nodeVersion": "0.11.13", + "_npmUser": { + "name": "marak", + "email": "marak.squires@gmail.com" + }, + "maintainers": [ + { + "name": "marak", + "email": "marak.squires@gmail.com" + } + ], + "dist": { + "shasum": "0433f44d809680fdeb60ed260f1b0c262e82a40b", + "tarball": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz" } diff --git a/node_modules/forever/node_modules/cliff/node_modules/eyes/package.json b/node_modules/forever/node_modules/cliff/node_modules/eyes/package.json index 19f85bc..d39ca07 100644 --- a/node_modules/forever/node_modules/cliff/node_modules/eyes/package.json +++ b/node_modules/forever/node_modules/cliff/node_modules/eyes/package.json @@ -33,10 +33,27 @@ "engines": { "node": "> 0.1.90" }, - "readme": "eyes\n====\n\na customizable value inspector for Node.js\n\nsynopsis\n--------\n\nI was tired of looking at cluttered output in the console -- something needed to be done,\n`sys.inspect()` didn't display regexps correctly, and was too verbose, and I had an hour or two to spare. \nSo I decided to have some fun. _eyes_ were born.\n\n![eyes-ss](http://dl.dropbox.com/u/251849/eyes-js-ss.gif)\n\n_example of the output of a user-customized eyes.js inspector_\n\n*eyes* also deals with circular objects in an intelligent way, and can pretty-print object literals.\n\nusage\n-----\n\n var inspect = require('eyes').inspector({styles: {all: 'magenta'}});\n\n inspect(something); // inspect with the settings passed to `inspector`\n\nor\n\n var eyes = require('eyes');\n\n eyes.inspect(something); // inspect with the default settings\n\nyou can pass a _label_ to `inspect()`, to keep track of your inspections:\n\n eyes.inspect(something, \"a random value\");\n\nIf you want to return the output of eyes without printing it, you can set it up this way:\n\n var inspect = require('eyes').inspector({ stream: null });\n\n sys.puts(inspect({ something: 42 }));\n\ncustomization\n-------------\n\nThese are the default styles and settings used by _eyes_.\n\n styles: { // Styles applied to stdout\n all: 'cyan', // Overall style applied to everything\n label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`\n other: 'inverted', // Objects which don't have a literal representation, such as functions\n key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`\n special: 'grey', // null, undefined...\n string: 'green',\n number: 'magenta',\n bool: 'blue', // true false\n regexp: 'green', // /\\d+/\n },\n \n pretty: true, // Indent object literals\n hideFunctions: false, // Don't output functions at all\n stream: process.stdout, // Stream to write to, or null\n maxLength: 2048 // Truncate output if longer\n\nYou can overwrite them with your own, by passing a similar object to `inspector()` or `inspect()`.\n\n var inspect = require('eyes').inspector({\n styles: {\n all: 'magenta',\n special: 'bold'\n },\n maxLength: 512\n });\n\n", - "readmeFilename": "README.md", "_id": "eyes@0.1.8", + "dist": { + "shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "tarball": "http://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + }, + "_npmVersion": "1.1.53", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "cloudhead", + "email": "self@cloudhead.net" + }, + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], "_shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", - "_resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "_from": "eyes@>=0.1.8 <0.2.0" + "_from": "eyes@~0.1.8", + "_resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" } diff --git a/node_modules/forever/node_modules/cliff/package.json b/node_modules/forever/node_modules/cliff/package.json index a004654..f38b955 100644 --- a/node_modules/forever/node_modules/cliff/package.json +++ b/node_modules/forever/node_modules/cliff/package.json @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/flatiron/cliff.git" + "url": "http://github.com/flatiron/cliff.git" }, "keywords": [ "cli", @@ -31,14 +31,34 @@ "engines": { "node": ">= 0.4.0" }, - "readme": "# cliff\n\nCLI output formatting tools: \"Your CLI Formatting Friend\".\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing cliff\n```\n [sudo] npm install cliff\n```\n\n## Usage\nThere are a number of methods available in Cliff for common logging tasks in command-line tools. If you're looking for more usage, checkout the [examples in this repository][3]:\n\n1. Logging rows of data\n2. Inspecting Objects\n\n### Logging rows of data\n\n**cliff.stringifyRows(rows[, colors])**\n\nTakes a set of Arrays and row headers and returns properly formatted and padded rows. Here's a sample:\n\n``` js\n var cliff = require('../lib/cliff');\n\n var rows = [\n ['Name', 'Flavor', 'Dessert'],\n ['Alice', 'cherry', 'yogurt'],\n ['Bob', 'carmel', 'apples'],\n ['Joe', 'chocolate', 'cake'],\n ['Nick', 'vanilla', 'ice cream']\n ];\n\n console.log(cliff.stringifyRows(rows, ['red', 'blue', 'green']));\n```\n\n![output from string-rows.js][string-rows]\n\n**cliff.putRows(level, rows[, colors])**\n\nThe `putRows` method is a simple helper that takes a set of Arrays and row headers and logs properly formatted and padded rows (logs `stringifyRows` to [winston][0]). Here's a quick sample:\n\n``` js\n var cliff = require('../lib/cliff');\n\n var rows = [\n ['Name', 'Flavor', 'Dessert'],\n ['Alice', 'cherry', 'yogurt'],\n ['Bob', 'carmel', 'apples'],\n ['Joe', 'chocolate', 'cake'],\n ['Nick', 'vanilla', 'ice cream']\n ];\n\n cliff.putRows('data', rows, ['red', 'blue', 'green']);\n```\n\nThe resulting output on the command-line would be:\n\n![output from put-rows.js][put-rows]\n\n**cliff.stringifyObjectRows(objs, properties[, colors])**\n*used to be: cliff.rowifyObjects(objs, properties, colors)*\n\nTakes a set of Objects and the properties to extract from them and returns properly formatted and padded rows. Here's a sample:\n\n``` js\n var cliff = require('../lib/cliff');\n\n var objs = [], obj = {\n name: \"bazz\",\n address: \"1234 Nowhere Dr.\",\n };\n\n for (var i = 0; i < 10; i++) {\n objs.push({\n name: obj.name,\n address: obj.address,\n id: Math.random().toString()\n });\n }\n\n console.log(cliff.stringifyObjectRows(objs, ['id', 'name', 'address'], ['red', 'blue', 'green']));\n```\n\n![output from string-object-rows.js][string-object-rows]\n\n**cliff.putObjectRows(level, objs, properties[, colors])**\n\nTakes a set of Objects and the properties to extract from them and it will log to the console. (it prints `stringifyObjectRows` with [winston][0]). Here's a sample:\n\n``` js\n var cliff = require('../lib/cliff');\n\n var objs = [], obj = {\n name: \"bazz\",\n address: \"1234 Nowhere Dr.\",\n };\n\n for (var i = 0; i < 10; i++) {\n objs.push({\n name: obj.name,\n address: obj.address,\n id: Math.random().toString()\n });\n }\n\n cliff.putObjectRows('data', objs, ['id', 'name', 'address']);\n```\n\n![output from string-object-rows.js][string-object-rows]\n\n**Colors Parameter**\n\nThe `colors` parameter is an array that colors the first row. It uses the [colors.js][2]. You can use any of those.\n\n``` js\n var cliff = require('../lib/cliff');\n\n var rows = [\n ['Name', 'Flavor', 'Dessert'],\n ['Alice'.grey, 'cherry'.cyan, 'yogurt'.yellow],\n ['Bob'.magenta, 'carmel'.rainbow, 'apples'.white],\n ['Joe'.italic, 'chocolate'.underline, 'cake'.inverse],\n ['Nick'.bold, 'vanilla', 'ice cream']\n ];\n\n cliff.putRows('data', rows, ['red', 'blue', 'green']);\n```\n\nThe resulting output on the command-line would be:\n\n![output from puts-rows-colors.js][put-rows-colors]\n\n### Inspecting Objects\n\n**cliff.inspect(obj)**\n\nThe `inspect` method is a lightweight wrapper to a pre-configured [eyes][1] inspector. If you wish to change the coloring of objects that are logged using `cliff` you only need to override `cliff.inspect` with a new [eyes][1] inspector. Here is how to use it:\n\n``` js\n var cliff = require('../lib/cliff');\n\n console.log(cliff.inspect({\n literal: \"bazz\",\n arr: [\n \"one\",\n 2,\n ],\n obj: {\n host: \"localhost\",\n port: 5984,\n auth: {\n username: \"admin\",\n password: \"password\"\n }\n }\n }));\n```\n\n![output from inspect.js][inspect]\n\n**cliff.putObject(obj, [rewriters, padding])**\n\nThe `putObject` method is a simple helper function for prefixing and styling inspected object output from [eyes][1]. Here's a quick sample:\n\n``` js\nvar cliff = require('cliff');\n\ncliff.putObject({\n literal: \"bazz\",\n arr: [\n \"one\",\n 2,\n ],\n obj: {\n host: \"localhost\",\n port: 5984,\n auth: {\n username: \"admin\",\n password: \"password\"\n }\n }\n});\n```\n\nThe resulting output on the command-line would be: \n\n![output from put-object.js][put-object]\n\n## Run Tests\n\nAll of the cliff tests are written in [vows][4], and cover all of the use cases described above.\n\n```\n npm test\n```\n\n## Motivation\n\nCliff is the swiss army knife of CLI formatting tools. It is based on highly flexible and powerful libraries: \n\n* [winston][0]: A multi-transport async logging library for node.js\n* [eyes][1]: A customizable value inspector for node.js\n* [colors][2]: Get colors in your node.js console like what \n\n\n#### Author: [Charlie Robbins](http://twitter.com/indexzero)\n\n[0]: http://github.com/indexzero/winston\n[1]: http://github.com/cloudhead/eyes.js\n[2]: http://github.com/marak/colors.js\n[3]: http://github.com/flatiron/cliff/tree/master/examples\n[4]: http://vowsjs.org\n\n[inspect]: https://github.com/flatiron/cliff/raw/master/assets/inspect.png\n[put-object-rows]: https://github.com/flatiron/cliff/raw/master/assets/put-object-rows.png\n[put-object]: https://github.com/flatiron/cliff/raw/master/assets/put-object.png\n[put-rows-colors]: https://github.com/flatiron/cliff/raw/master/assets/put-rows-colors.png\n[put-rows]: https://github.com/flatiron/cliff/raw/master/assets/put-rows.png\n[string-object-rows]: https://github.com/flatiron/cliff/raw/master/assets/string-object-rows.png\n[string-rows]: https://github.com/flatiron/cliff/raw/master/assets/string-rows.png", - "readmeFilename": "README.md", + "gitHead": "3baf40a73432a26303f080176c7d13fe293bc1d8", "bugs": { "url": "https://github.com/flatiron/cliff/issues" }, - "homepage": "https://github.com/flatiron/cliff#readme", + "homepage": "https://github.com/flatiron/cliff", "_id": "cliff@0.1.10", "_shasum": "53be33ea9f59bec85609ee300ac4207603e52013", - "_resolved": "https://registry.npmjs.org/cliff/-/cliff-0.1.10.tgz", - "_from": "cliff@>=0.1.9 <0.2.0" + "_from": "cliff@~0.1.9", + "_npmVersion": "2.1.9", + "_nodeVersion": "0.10.33", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + } + ], + "dist": { + "shasum": "53be33ea9f59bec85609ee300ac4207603e52013", + "tarball": "http://registry.npmjs.org/cliff/-/cliff-0.1.10.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/cliff/-/cliff-0.1.10.tgz" } diff --git a/node_modules/forever/node_modules/clone/package.json b/node_modules/forever/node_modules/clone/package.json index f1aa687..1c6fe1e 100644 --- a/node_modules/forever/node_modules/clone/package.json +++ b/node_modules/forever/node_modules/clone/package.json @@ -112,7 +112,7 @@ "homepage": "https://github.com/pvorb/node-clone", "_id": "clone@1.0.2", "_shasum": "260b7a99ebb1edfe247538175f783243cb19d149", - "_from": "clone@>=1.0.2 <2.0.0", + "_from": "clone@^1.0.2", "_npmVersion": "1.4.14", "_npmUser": { "name": "pvorb", diff --git a/node_modules/forever/node_modules/colors/package.json b/node_modules/forever/node_modules/colors/package.json index 0cdd4ea..7e1986c 100644 --- a/node_modules/forever/node_modules/colors/package.json +++ b/node_modules/forever/node_modules/colors/package.json @@ -16,16 +16,30 @@ ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/Marak/colors.js.git" + "url": "http://github.com/Marak/colors.js.git" }, "engines": { "node": ">=0.1.90" }, "main": "colors", - "readme": "# colors.js - get color and style in your node.js console ( and browser ) like what\n\n\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n- rainbow\n- zebra\n- random\n\n## Usage\n\n``` js\nvar colors = require('./colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n```\n\n# Creating Custom themes\n\n```js\n\nvar colors = require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n\n### Contributors \n\nMarak (Marak Squires)\nAlexis Sellier (cloudhead)\nmmalecki (Maciej Małecki)\nnicoreed (Nico Reed)\nmorganrallen (Morgan Allen)\nJustinCampbell (Justin Campbell)\nded (Dustin Diaz)\n\n\n#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)\n", - "readmeFilename": "ReadMe.md", "_id": "colors@0.6.2", + "dist": { + "shasum": "2423fe6678ac0c5dae8852e5d0e5be08c997abcc", + "tarball": "http://registry.npmjs.org/colors/-/colors-0.6.2.tgz" + }, + "_from": "colors@~0.6.2", + "_npmVersion": "1.2.30", + "_npmUser": { + "name": "marak", + "email": "marak.squires@gmail.com" + }, + "maintainers": [ + { + "name": "marak", + "email": "marak.squires@gmail.com" + } + ], + "directories": {}, "_shasum": "2423fe6678ac0c5dae8852e5d0e5be08c997abcc", - "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "_from": "colors@>=0.6.2 <0.7.0" + "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/cliff/node_modules/eyes/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/cliff/node_modules/eyes/package.json index c642c9d..5db1dbe 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/cliff/node_modules/eyes/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/cliff/node_modules/eyes/package.json @@ -33,10 +33,28 @@ "engines": { "node": "> 0.1.90" }, - "readme": "eyes\n====\n\na customizable value inspector for Node.js\n\nsynopsis\n--------\n\nI was tired of looking at cluttered output in the console -- something needed to be done,\n`sys.inspect()` didn't display regexps correctly, and was too verbose, and I had an hour or two to spare. \nSo I decided to have some fun. _eyes_ were born.\n\n![eyes-ss](http://dl.dropbox.com/u/251849/eyes-js-ss.gif)\n\n_example of the output of a user-customized eyes.js inspector_\n\n*eyes* also deals with circular objects in an intelligent way, and can pretty-print object literals.\n\nusage\n-----\n\n var inspect = require('eyes').inspector({styles: {all: 'magenta'}});\n\n inspect(something); // inspect with the settings passed to `inspector`\n\nor\n\n var eyes = require('eyes');\n\n eyes.inspect(something); // inspect with the default settings\n\nyou can pass a _label_ to `inspect()`, to keep track of your inspections:\n\n eyes.inspect(something, \"a random value\");\n\nIf you want to return the output of eyes without printing it, you can set it up this way:\n\n var inspect = require('eyes').inspector({ stream: null });\n\n sys.puts(inspect({ something: 42 }));\n\ncustomization\n-------------\n\nThese are the default styles and settings used by _eyes_.\n\n styles: { // Styles applied to stdout\n all: 'cyan', // Overall style applied to everything\n label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`\n other: 'inverted', // Objects which don't have a literal representation, such as functions\n key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`\n special: 'grey', // null, undefined...\n string: 'green',\n number: 'magenta',\n bool: 'blue', // true false\n regexp: 'green', // /\\d+/\n },\n \n pretty: true, // Indent object literals\n hideFunctions: false, // Don't output functions at all\n stream: process.stdout, // Stream to write to, or null\n maxLength: 2048 // Truncate output if longer\n\nYou can overwrite them with your own, by passing a similar object to `inspector()` or `inspect()`.\n\n var inspect = require('eyes').inspector({\n styles: {\n all: 'magenta',\n special: 'bold'\n },\n maxLength: 512\n });\n\n", - "readmeFilename": "README.md", "_id": "eyes@0.1.8", + "dist": { + "shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "tarball": "http://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + }, + "_npmVersion": "1.1.53", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "cloudhead", + "email": "self@cloudhead.net" + }, + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], "_shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "_from": "eyes@0.1.x", "_resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "_from": "eyes@>=0.1.0 <0.2.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/cliff/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/cliff/package.json index 32a0767..bbbedd3 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/cliff/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/cliff/package.json @@ -8,12 +8,16 @@ }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/flatiron/cliff.git" + "url": "http://github.com/flatiron/cliff.git" }, "maintainers": [ { "name": "indexzero", - "email": "charlie@nodejitsu.com" + "email": "charlie.robbins@gmail.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" } ], "keywords": [ @@ -37,14 +41,24 @@ "engines": { "node": ">= 0.4.0" }, - "readme": "# cliff\n\nCLI output formatting tools: \"Your CLI Formatting Friend\".\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing cliff\n```\n [sudo] npm install cliff\n```\n\n## Usage\nThere are a number of methods available in Cliff for common logging tasks in command-line tools. If you're looking for more usage, checkout the [examples in this repository][3]:\n\n1. Logging rows of data\n2. Inspecting Objects\n\n### Logging rows of data\n\n**cliff.stringifyRows(rows[, colors])**\n\nTakes a set of Arrays and row headers and returns properly formatted and padded rows. Here's a sample:\n\n``` js\n var cliff = require('../lib/cliff');\n\n var rows = [\n ['Name', 'Flavor', 'Dessert'],\n ['Alice', 'cherry', 'yogurt'],\n ['Bob', 'carmel', 'apples'],\n ['Joe', 'chocolate', 'cake'],\n ['Nick', 'vanilla', 'ice cream']\n ];\n\n console.log(cliff.stringifyRows(rows, ['red', 'blue', 'green']));\n```\n\n![output from string-rows.js][string-rows]\n\n**cliff.putRows(level, rows[, colors])**\n\nThe `putRows` method is a simple helper that takes a set of Arrays and row headers and logs properly formatted and padded rows (logs `stringifyRows` to [winston][0]). Here's a quick sample:\n\n``` js\n var cliff = require('../lib/cliff');\n\n var rows = [\n ['Name', 'Flavor', 'Dessert'],\n ['Alice', 'cherry', 'yogurt'],\n ['Bob', 'carmel', 'apples'],\n ['Joe', 'chocolate', 'cake'],\n ['Nick', 'vanilla', 'ice cream']\n ];\n\n cliff.putRows('data', rows, ['red', 'blue', 'green']);\n```\n\nThe resulting output on the command-line would be:\n\n![output from put-rows.js][put-rows]\n\n**cliff.stringifyObjectRows(objs, properties[, colors])**\n*used to be: cliff.rowifyObjects(objs, properties, colors)*\n\nTakes a set of Objects and the properties to extract from them and returns properly formatted and padded rows. Here's a sample:\n\n``` js\n var cliff = require('../lib/cliff');\n\n var objs = [], obj = {\n name: \"bazz\",\n address: \"1234 Nowhere Dr.\",\n };\n\n for (var i = 0; i < 10; i++) {\n objs.push({\n name: obj.name,\n address: obj.address,\n id: Math.random().toString()\n });\n }\n\n console.log(cliff.stringifyObjectRows(objs, ['id', 'name', 'address'], ['red', 'blue', 'green']));\n```\n\n![output from string-object-rows.js][string-object-rows]\n\n**cliff.putObjectRows(level, objs, properties[, colors])**\n\nTakes a set of Objects and the properties to extract from them and it will log to the console. (it prints `stringifyObjectRows` with [winston][0]). Here's a sample:\n\n``` js\n var cliff = require('../lib/cliff');\n\n var objs = [], obj = {\n name: \"bazz\",\n address: \"1234 Nowhere Dr.\",\n };\n\n for (var i = 0; i < 10; i++) {\n objs.push({\n name: obj.name,\n address: obj.address,\n id: Math.random().toString()\n });\n }\n\n cliff.putObjectRows('data', objs, ['id', 'name', 'address']);\n```\n\n![output from string-object-rows.js][string-object-rows]\n\n**Colors Parameter**\n\nThe `colors` parameter is an array that colors the first row. It uses the [colors.js][2]. You can use any of those.\n\n``` js\n var cliff = require('../lib/cliff');\n\n var rows = [\n ['Name', 'Flavor', 'Dessert'],\n ['Alice'.grey, 'cherry'.cyan, 'yogurt'.yellow],\n ['Bob'.magenta, 'carmel'.rainbow, 'apples'.white],\n ['Joe'.italic, 'chocolate'.underline, 'cake'.inverse],\n ['Nick'.bold, 'vanilla', 'ice cream']\n ];\n\n cliff.putRows('data', rows, ['red', 'blue', 'green']);\n```\n\nThe resulting output on the command-line would be:\n\n![output from puts-rows-colors.js][put-rows-colors]\n\n### Inspecting Objects\n\n**cliff.inspect(obj)**\n\nThe `inspect` method is a lightweight wrapper to a pre-configured [eyes][1] inspector. If you wish to change the coloring of objects that are logged using `cliff` you only need to override `cliff.inspect` with a new [eyes][1] inspector. Here is how to use it:\n\n``` js\n var cliff = require('../lib/cliff');\n\n console.log(cliff.inspect({\n literal: \"bazz\",\n arr: [\n \"one\",\n 2,\n ],\n obj: {\n host: \"localhost\",\n port: 5984,\n auth: {\n username: \"admin\",\n password: \"password\"\n }\n }\n }));\n```\n\n![output from inspect.js][inspect]\n\n**cliff.putObject(obj, [rewriters, padding])**\n\nThe `putObject` method is a simple helper function for prefixing and styling inspected object output from [eyes][1]. Here's a quick sample:\n\n``` js\nvar cliff = require('cliff');\n\ncliff.putObject({\n literal: \"bazz\",\n arr: [\n \"one\",\n 2,\n ],\n obj: {\n host: \"localhost\",\n port: 5984,\n auth: {\n username: \"admin\",\n password: \"password\"\n }\n }\n});\n```\n\nThe resulting output on the command-line would be: \n\n![output from put-object.js][put-object]\n\n## Run Tests\n\nAll of the cliff tests are written in [vows][4], and cover all of the use cases described above.\n\n```\n npm test\n```\n\n## Motivation\n\nCliff is the swiss army knife of CLI formatting tools. It is based on highly flexible and powerful libraries: \n\n* [winston][0]: A multi-transport async logging library for node.js\n* [eyes][1]: A customizable value inspector for node.js\n* [colors][2]: Get colors in your node.js console like what \n\n\n#### Author: [Charlie Robbins](http://twitter.com/indexzero)\n\n[0]: http://github.com/indexzero/winston\n[1]: http://github.com/cloudhead/eyes.js\n[2]: http://github.com/marak/colors.js\n[3]: http://github.com/flatiron/cliff/tree/master/examples\n[4]: http://vowsjs.org\n\n[inspect]: https://github.com/flatiron/cliff/raw/master/assets/inspect.png\n[put-object-rows]: https://github.com/flatiron/cliff/raw/master/assets/put-object-rows.png\n[put-object]: https://github.com/flatiron/cliff/raw/master/assets/put-object.png\n[put-rows-colors]: https://github.com/flatiron/cliff/raw/master/assets/put-rows-colors.png\n[put-rows]: https://github.com/flatiron/cliff/raw/master/assets/put-rows.png\n[string-object-rows]: https://github.com/flatiron/cliff/raw/master/assets/string-object-rows.png\n[string-rows]: https://github.com/flatiron/cliff/raw/master/assets/string-rows.png", - "readmeFilename": "README.md", + "gitHead": "66462b3de5ddab850675e8e6ac077645d0bfc425", "bugs": { "url": "https://github.com/flatiron/cliff/issues" }, - "homepage": "https://github.com/flatiron/cliff#readme", + "homepage": "https://github.com/flatiron/cliff", "_id": "cliff@0.1.9", "_shasum": "a211e09c6a3de3ba1af27d049d301250d18812bc", + "_from": "cliff@0.1.9", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + }, + "dist": { + "shasum": "a211e09c6a3de3ba1af27d049d301250d18812bc", + "tarball": "http://registry.npmjs.org/cliff/-/cliff-0.1.9.tgz" + }, + "directories": {}, "_resolved": "https://registry.npmjs.org/cliff/-/cliff-0.1.9.tgz", - "_from": "cliff@0.1.9" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/eventemitter2/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/eventemitter2/package.json index 0c6fb41..65e1023 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/eventemitter2/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/eventemitter2/package.json @@ -51,14 +51,33 @@ "lib/eventemitter2.js", "index.js" ], - "readme": "[![build-status](https://www.codeship.io/projects/3ad58940-4c7d-0131-15d5-5a8cd3f550f8/status)](https://www.codeship.io/projects/11259)\n\n# SYNOPSIS\n\nEventEmitter2 is an implementation of the EventEmitter found in Node.js\n\n# DESCRIPTION\n\n### FEATURES\n - Namespaces/Wildcards.\n - Times To Listen (TTL), extends the `once` concept with `many`.\n - Browser environment compatibility.\n - Demonstrates good performance in benchmarks\n\n```\nEventEmitterHeatUp x 3,728,965 ops/sec \\302\\2610.68% (60 runs sampled)\nEventEmitter x 2,822,904 ops/sec \\302\\2610.74% (63 runs sampled)\nEventEmitter2 x 7,251,227 ops/sec \\302\\2610.55% (58 runs sampled)\nEventEmitter2 (wild) x 3,220,268 ops/sec \\302\\2610.44% (65 runs sampled)\nFastest is EventEmitter2\n```\n\n### Differences (Non breaking, compatible with existing EventEmitter)\n\n - The constructor takes a configuration object.\n \n```javascript\n var EventEmitter2 = require('eventemitter2').EventEmitter2;\n var server = new EventEmitter2({\n\n //\n // use wildcards.\n //\n wildcard: true,\n\n //\n // the delimiter used to segment namespaces, defaults to `.`.\n //\n delimiter: '::', \n \n //\n // if you want to emit the newListener event set to true.\n //\n newListener: false, \n\n //\n // max listeners that can be assigned to an event, default 10.\n //\n maxListeners: 20\n });\n```\n\n - Getting the actual event that fired.\n\n```javascript\n server.on('foo.*', function(value1, value2) {\n console.log(this.event, value1, value2);\n });\n```\n\n - Fire an event N times and then remove it, an extension of the `once` concept.\n\n```javascript\n server.many('foo', 4, function() {\n console.log('hello');\n });\n```\n\n - Pass in a namespaced event as an array rather than a delimited string.\n\n```javascript\n server.many(['foo', 'bar', 'bazz'], function() {\n console.log('hello');\n });\n```\n\n\n# API\n\nWhen an `EventEmitter` instance experiences an error, the typical action is\nto emit an `error` event. Error events are treated as a special case.\nIf there is no listener for it, then the default action is to print a stack\ntrace and exit the program.\n\nAll EventEmitters emit the event `newListener` when new listeners are\nadded.\n\n\n**Namespaces** with **Wildcards**\nTo use namespaces/wildcards, pass the `wildcard` option into the EventEmitter \nconstructor. When namespaces/wildcards are enabled, events can either be \nstrings (`foo.bar`) separated by a delimiter or arrays (`['foo', 'bar']`). The \ndelimiter is also configurable as a constructor option.\n\nAn event name passed to any event emitter method can contain a wild card (the \n`*` character). If the event name is a string, a wildcard may appear as `foo.*`. \nIf the event name is an array, the wildcard may appear as `['foo', '*']`.\n\nIf either of the above described events were passed to the `on` method, \nsubsequent emits such as the following would be observed...\n\n```javascript\n emitter.emit('foo.bazz');\n emitter.emit(['foo', 'bar']);\n```\n\n\n### emitter.addListener(event, listener)\n### emitter.on(event, listener)\n\nAdds a listener to the end of the listeners array for the specified event.\n\n```javascript\n server.on('data', function(value1, value2, value3, ...) {\n console.log('The event was raised!');\n });\n```\n\n```javascript\n server.on('data', function(value) {\n console.log('The event was raised!');\n });\n```\n\n### emitter.onAny(listener)\n\nAdds a listener that will be fired when any event is emitted.\n\n```javascript\n server.onAny(function(value) {\n console.log('All events trigger this.');\n });\n```\n\n### emitter.offAny(listener)\n\nRemoves the listener that will be fired when any event is emitted.\n\n```javascript\n server.offAny(function(value) {\n console.log('The event was raised!');\n });\n```\n\n#### emitter.once(event, listener)\n\nAdds a **one time** listener for the event. The listener is invoked \nonly the first time the event is fired, after which it is removed.\n\n```javascript\n server.once('get', function (value) {\n console.log('Ah, we have our first value!');\n });\n```\n\n### emitter.many(event, timesToListen, listener)\n\nAdds a listener that will execute **n times** for the event before being\nremoved. The listener is invoked only the first **n times** the event is \nfired, after which it is removed.\n\n```javascript\n server.many('get', 4, function (value) {\n console.log('This event will be listened to exactly four times.');\n });\n```\n\n\n### emitter.removeListener(event, listener)\n### emitter.off(event, listener)\n\nRemove a listener from the listener array for the specified event. \n**Caution**: changes array indices in the listener array behind the listener.\n\n```javascript\n var callback = function(value) {\n console.log('someone connected!');\n };\n server.on('get', callback);\n // ...\n server.removeListener('get', callback);\n```\n\n\n### emitter.removeAllListeners([event])\n\nRemoves all listeners, or those of the specified event.\n\n\n### emitter.setMaxListeners(n)\n\nBy default EventEmitters will print a warning if more than 10 listeners \nare added to it. This is a useful default which helps finding memory leaks. \nObviously not all Emitters should be limited to 10. This function allows \nthat to be increased. Set to zero for unlimited.\n\n\n### emitter.listeners(event)\n\nReturns an array of listeners for the specified event. This array can be \nmanipulated, e.g. to remove listeners.\n\n```javascript\n server.on('get', function(value) {\n console.log('someone connected!');\n });\n console.log(server.listeners('get')); // [ [Function] ]\n```\n\n### emitter.listenersAny()\n\nReturns an array of listeners that are listening for any event that is \nspecified. This array can be manipulated, e.g. to remove listeners.\n\n```javascript\n server.onAny(function(value) {\n console.log('someone connected!');\n });\n console.log(server.listenersAny()[0]); // [ [Function] ]\n```\n\n### emitter.emit(event, [arg1], [arg2], [...])\n\nExecute each of the listeners that may be listening for the specified event \nname in order with the list of arguments.\n\n# LICENSE\n\n(The MIT License)\n\nCopyright (c) 2011 hij1nx \n\nPermission is hereby granted, free of charge, to any person obtaining a copy \nof this software and associated documentation files (the 'Software'), to deal \nin the Software without restriction, including without limitation the rights \nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell \ncopies of the Software, and to permit persons to whom the Software is furnished\nto do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR \nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION \nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", "bugs": { "url": "https://github.com/hij1nx/EventEmitter2/issues" }, - "homepage": "https://github.com/hij1nx/EventEmitter2#readme", + "homepage": "https://github.com/hij1nx/EventEmitter2", "_id": "eventemitter2@0.4.14", "_shasum": "8f61b75cde012b2e9eb284d4545583b5643b61ab", + "_from": "eventemitter2@0.4.14", + "_npmVersion": "1.4.7", + "_npmUser": { + "name": "jasonkuhrt", + "email": "jasonkuhrt@me.com" + }, + "maintainers": [ + { + "name": "hij1nx", + "email": "hij1nx@me.com" + }, + { + "name": "jasonkuhrt", + "email": "jasonkuhrt@me.com" + } + ], + "dist": { + "shasum": "8f61b75cde012b2e9eb284d4545583b5643b61ab", + "tarball": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz" + }, + "directories": {}, "_resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "_from": "eventemitter2@0.4.14" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/async/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/async/package.json index 2ca1ae5..5bfc09c 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/async/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/async/package.json @@ -8,7 +8,7 @@ "version": "0.2.10", "repository": { "type": "git", - "url": "git+https://github.com/caolan/async.git" + "url": "https://github.com/caolan/async.git" }, "bugs": { "url": "https://github.com/caolan/async/issues" @@ -35,11 +35,25 @@ "scripts": { "test": "nodeunit test/test-async.js" }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, each…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n\n\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [eachSeries](#eachSeries)\n* [eachLimit](#eachLimit)\n* [map](#map)\n* [mapSeries](#mapSeries)\n* [mapLimit](#mapLimit)\n* [filter](#filter)\n* [filterSeries](#filterSeries)\n* [reject](#reject)\n* [rejectSeries](#rejectSeries)\n* [reduce](#reduce)\n* [reduceRight](#reduceRight)\n* [detect](#detect)\n* [detectSeries](#detectSeries)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n* [concatSeries](#concatSeries)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [parallelLimit](#parallellimittasks-limit-callback)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [applyEachSeries](#applyEachSeries)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async#readme", "_id": "async@0.2.10", + "dist": { + "shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1", + "tarball": "http://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "_from": "async@0.2.x", + "_npmVersion": "1.3.2", + "_npmUser": { + "name": "caolan", + "email": "caolan.mcmahon@gmail.com" + }, + "maintainers": [ + { + "name": "caolan", + "email": "caolan@caolanmcmahon.com" + } + ], + "directories": {}, "_shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1", "_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "_from": "async@>=0.2.0 <0.3.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/cycle/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/cycle/package.json index d0b5275..49732ba 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/cycle/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/cycle/package.json @@ -7,7 +7,7 @@ "homepage": "https://github.com/douglascrockford/JSON-js", "repository": { "type": "git", - "url": "git+ssh://git@github.com/dscape/cycle.git" + "url": "http://github.com/dscape/cycle.git" }, "bugs": { "url": "http://github.com/douglascrockford/JSON-js/issues" @@ -24,7 +24,24 @@ "readme": "Fork of https://github.com/douglascrockford/JSON-js, maintained in npm as `cycle`.\n\n# Contributors\n\n* Douglas Crockford\n* Nuno Job\n* Justin Warkentin\n\n# JSON in JavaScript\n\nDouglas Crockford\ndouglas@crockford.com\n\n2010-11-18\n\n\nJSON is a light-weight, language independent, data interchange format.\nSee http://www.JSON.org/\n\nThe files in this collection implement JSON encoders/decoders in JavaScript.\n\nJSON became a built-in feature of JavaScript when the ECMAScript Programming\nLanguage Standard - Fifth Edition was adopted by the ECMA General Assembly\nin December 2009. Most of the files in this collection are for applications\nthat are expected to run in obsolete web browsers. For most purposes, json2.js\nis the best choice.\n\n\njson2.js: This file creates a JSON property in the global object, if there\nisn't already one, setting its value to an object containing a stringify\nmethod and a parse method. The parse method uses the eval method to do the\nparsing, guarding it with several regular expressions to defend against\naccidental code execution hazards. On current browsers, this file does nothing,\nprefering the built-in JSON object.\n\njson.js: This file does everything that json2.js does. It also adds a\ntoJSONString method and a parseJSON method to Object.prototype. Use of this\nfile is not recommended.\n\njson_parse.js: This file contains an alternative JSON parse function that\nuses recursive descent instead of eval.\n\njson_parse_state.js: This files contains an alternative JSON parse function that\nuses a state machine instead of eval.\n\ncycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,\nwhich make it possible to encode cyclical structures and dags in JSON, and to\nthen recover them. JSONPath is used to represent the links.\nhttp://GOESSNER.net/articles/JsonPath/\n", "readmeFilename": "README.md", "_id": "cycle@1.0.3", + "dist": { + "shasum": "21e80b2be8580f98b468f379430662b046c34ad2", + "tarball": "http://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz" + }, + "_from": "cycle@1.0.x", + "_npmVersion": "1.2.32", + "_npmUser": { + "name": "dscape", + "email": "nunojobpinto@gmail.com" + }, + "maintainers": [ + { + "name": "dscape", + "email": "nunojobpinto@gmail.com" + } + ], + "directories": {}, "_shasum": "21e80b2be8580f98b468f379430662b046c34ad2", "_resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "_from": "cycle@>=1.0.0 <1.1.0" + "scripts": {} } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/eyes/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/eyes/package.json index c642c9d..5db1dbe 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/eyes/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/eyes/package.json @@ -33,10 +33,28 @@ "engines": { "node": "> 0.1.90" }, - "readme": "eyes\n====\n\na customizable value inspector for Node.js\n\nsynopsis\n--------\n\nI was tired of looking at cluttered output in the console -- something needed to be done,\n`sys.inspect()` didn't display regexps correctly, and was too verbose, and I had an hour or two to spare. \nSo I decided to have some fun. _eyes_ were born.\n\n![eyes-ss](http://dl.dropbox.com/u/251849/eyes-js-ss.gif)\n\n_example of the output of a user-customized eyes.js inspector_\n\n*eyes* also deals with circular objects in an intelligent way, and can pretty-print object literals.\n\nusage\n-----\n\n var inspect = require('eyes').inspector({styles: {all: 'magenta'}});\n\n inspect(something); // inspect with the settings passed to `inspector`\n\nor\n\n var eyes = require('eyes');\n\n eyes.inspect(something); // inspect with the default settings\n\nyou can pass a _label_ to `inspect()`, to keep track of your inspections:\n\n eyes.inspect(something, \"a random value\");\n\nIf you want to return the output of eyes without printing it, you can set it up this way:\n\n var inspect = require('eyes').inspector({ stream: null });\n\n sys.puts(inspect({ something: 42 }));\n\ncustomization\n-------------\n\nThese are the default styles and settings used by _eyes_.\n\n styles: { // Styles applied to stdout\n all: 'cyan', // Overall style applied to everything\n label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`\n other: 'inverted', // Objects which don't have a literal representation, such as functions\n key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`\n special: 'grey', // null, undefined...\n string: 'green',\n number: 'magenta',\n bool: 'blue', // true false\n regexp: 'green', // /\\d+/\n },\n \n pretty: true, // Indent object literals\n hideFunctions: false, // Don't output functions at all\n stream: process.stdout, // Stream to write to, or null\n maxLength: 2048 // Truncate output if longer\n\nYou can overwrite them with your own, by passing a similar object to `inspector()` or `inspect()`.\n\n var inspect = require('eyes').inspector({\n styles: {\n all: 'magenta',\n special: 'bold'\n },\n maxLength: 512\n });\n\n", - "readmeFilename": "README.md", "_id": "eyes@0.1.8", + "dist": { + "shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "tarball": "http://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + }, + "_npmVersion": "1.1.53", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "cloudhead", + "email": "self@cloudhead.net" + }, + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], "_shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "_from": "eyes@0.1.x", "_resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "_from": "eyes@>=0.1.0 <0.2.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/pkginfo/README.md b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/pkginfo/README.md index 332704e..7a363bf 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/pkginfo/README.md +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/pkginfo/README.md @@ -26,7 +26,7 @@ How often when writing node.js modules have you written the following line(s) of * Programmatically expose the version from the package.json ``` js - exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version; + exports.version = require('/path/to/package.json').version; ``` In other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!** @@ -83,4 +83,4 @@ Tests are written in [vows][1] and give complete coverage of all APIs. [1]: http://vowsjs.org #### Author: [Charlie Robbins](http://nodejitsu.com) -#### License: MIT \ No newline at end of file +#### License: MIT diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/pkginfo/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/pkginfo/package.json index 416d062..ed3aa8a 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/pkginfo/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/pkginfo/package.json @@ -1,6 +1,7 @@ { "name": "pkginfo", - "version": "0.3.0", + "version": "0.3.1", + "license": "MIT", "description": "An easy way to expose properties on a module from a package.json", "author": { "name": "Charlie Robbins", @@ -10,6 +11,9 @@ "type": "git", "url": "git+ssh://git@github.com/indexzero/node-pkginfo.git" }, + "bugs": { + "url": "https://github.com/indexzero/node-pkginfo/issues" + }, "keywords": [ "info", "tools", @@ -18,21 +22,35 @@ "devDependencies": { "vows": "0.7.x" }, - "main": "./lib/pkginfo", + "main": "./lib/pkginfo.js", "scripts": { "test": "vows test/*-test.js --spec" }, "engines": { "node": ">= 0.4.0" }, - "readme": "# node-pkginfo\n\nAn easy way to expose properties on a module from a package.json\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing pkginfo\n```\n [sudo] npm install pkginfo\n```\n\n## Motivation\nHow often when writing node.js modules have you written the following line(s) of code? \n\n* Hard code your version string into your code\n\n``` js\n exports.version = '0.1.0';\n```\n\n* Programmatically expose the version from the package.json\n\n``` js\n exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version;\n```\n\nIn other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!**\n\n## Usage\n\nUsing `pkginfo` is idiot-proof, just require and invoke it. \n\n``` js\n var pkginfo = require('pkginfo')(module);\n \n console.dir(module.exports);\n```\n\nBy invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). \n\nHere's a sample of the output:\n\n```\n { name: 'simple-app',\n description: 'A test fixture for pkginfo',\n version: '0.1.0',\n author: 'Charlie Robbins ',\n keywords: [ 'test', 'fixture' ],\n main: './index.js',\n scripts: { test: 'vows test/*-test.js --spec' },\n engines: { node: '>= 0.4.0' } }\n```\n\n### Expose specific properties\nIf you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function:\n\n``` js\n var pkginfo = require('pkginfo')(module, 'version', 'author');\n \n console.dir(module.exports);\n```\n\n```\n { version: '0.1.0',\n author: 'Charlie Robbins ' }\n```\n\nIf you're looking for further usage see the [examples][0] included in this repository. \n\n## Run Tests\nTests are written in [vows][1] and give complete coverage of all APIs.\n\n```\n vows test/*-test.js --spec\n```\n\n[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples\n[1]: http://vowsjs.org\n\n#### Author: [Charlie Robbins](http://nodejitsu.com)\n#### License: MIT", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/indexzero/node-pkginfo/issues" - }, + "gitHead": "630fcf486543ee48b4c16afc575c0421fe039f26", "homepage": "https://github.com/indexzero/node-pkginfo#readme", - "_id": "pkginfo@0.3.0", - "_shasum": "726411401039fe9b009eea86614295d5f3a54276", - "_resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", - "_from": "pkginfo@>=0.3.0 <0.4.0" + "_id": "pkginfo@0.3.1", + "_shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21", + "_from": "pkginfo@0.3.x", + "_npmVersion": "2.14.1", + "_nodeVersion": "0.10.38", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], + "dist": { + "shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21", + "tarball": "http://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/stack-trace/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/stack-trace/package.json index 71410c7..b179e29 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/stack-trace/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/stack-trace/package.json @@ -21,13 +21,37 @@ "far": "0.0.3", "long-stack-traces": "0.1.2" }, - "readme": "# stack-trace\n\nGet v8 stack traces as an array of CallSite objects.\n\n## Install\n\n``` bash\nnpm install stack-trace\n```\n\n## Usage\n\nThe stack-trace module makes it easy for you to capture the current stack:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar trace = stackTrace.get();\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nHowever, sometimes you have already popped the stack you are interested in,\nand all you have left is an `Error` object. This module can help:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar err = new Error('something went wrong');\nvar trace = stackTrace.parse(err);\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nPlease note that parsing the `Error#stack` property is not perfect, only\ncertain properties can be retrieved with it as noted in the API docs below.\n\n## Long stack traces\n\nstack-trace works great with [long-stack-traces][], when parsing an `err.stack`\nthat has crossed the event loop boundary, a `CallSite` object returning\n`'----------------------------------------'` for `getFileName()` is created.\nAll other methods of the event loop boundary call site return `null`.\n\n[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces\n\n## API\n\n### stackTrace.get([belowFn])\n\nReturns an array of `CallSite` objects, where element `0` is the current call\nsite.\n\nWhen passing a function on the current stack as the `belowFn` parameter, the\nreturned array will only include `CallSite` objects below this function.\n\n### stackTrace.parse(err)\n\nParses the `err.stack` property of an `Error` object into an array compatible\nwith those returned by `stackTrace.get()`. However, only the following methods\nare implemented on the returned `CallSite` objects.\n\n* getTypeName\n* getFunctionName\n* getMethodName\n* getFileName\n* getLineNumber\n* getColumnNumber\n* isNative\n\nNote: Except `getFunctionName()`, all of the above methods return exactly the\nsame values as you would get from `stackTrace.get()`. `getFunctionName()`\nis sometimes a little different, but still useful.\n\n### CallSite\n\nThe official v8 CallSite object API can be found [here][v8stackapi]. A quick\nexcerpt:\n\n> A CallSite object defines the following methods:\n>\n> * **getThis**: returns the value of this\n> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.\n> * **getFunction**: returns the current function\n> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.\n> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function\n> * **getFileName**: if this function was defined in a script returns the name of the script\n> * **getLineNumber**: if this function was defined in a script returns the current line number\n> * **getColumnNumber**: if this function was defined in a script returns the current column number\n> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called\n> * **isToplevel**: is this a toplevel invocation, that is, is this the global object?\n> * **isEval**: does this call take place in code defined by a call to eval?\n> * **isNative**: is this call in native V8 code?\n> * **isConstructor**: is this a constructor call?\n\n[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\n\n## License\n\nstack-trace is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/felixge/node-stack-trace/issues" }, "_id": "stack-trace@0.0.9", + "dist": { + "shasum": "a8f6eaeca90674c333e7c43953f275b451510695", + "tarball": "http://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz" + }, + "_from": "stack-trace@0.0.x", + "_npmVersion": "1.3.24", + "_npmUser": { + "name": "sebastianhoitz", + "email": "hoitz@komola.de" + }, + "maintainers": [ + { + "name": "felixge", + "email": "felix@debuggable.com" + }, + { + "name": "tim-smart", + "email": "tim@fostle.com" + }, + { + "name": "sebastianhoitz", + "email": "hoitz@komola.de" + } + ], + "directories": {}, "_shasum": "a8f6eaeca90674c333e7c43953f275b451510695", "_resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", - "_from": "stack-trace@>=0.0.0 <0.1.0" + "readme": "ERROR: No README data found!", + "scripts": {} } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/package.json index 8b4b871..64c19a9 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/node_modules/winston/package.json @@ -9,12 +9,24 @@ "maintainers": [ { "name": "indexzero", - "email": "charlie@nodejitsu.com" + "email": "charlie.robbins@gmail.com" + }, + { + "name": "chjj", + "email": "chjjeffrey@gmail.com" + }, + { + "name": "V1", + "email": "info@3rd-Eden.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" } ], "repository": { "type": "git", - "url": "git+https://github.com/flatiron/winston.git" + "url": "https://github.com/flatiron/winston.git" }, "keywords": [ "logging", @@ -45,14 +57,24 @@ "url": "https://raw.github.com/flatiron/winston/master/LICENSE" } ], - "readme": "# winston [![Build Status](https://secure.travis-ci.org/flatiron/winston.png?branch=master)](http://travis-ci.org/flatiron/winston)\n\nA multi-transport async logging library for node.js. "CHILL WINSTON! ... I put it in the logs."\n\n## Motivation\nWinston is designed to be a simple and universal logging library with support for multiple transports. A transport is essentially a storage device for your logs. Each instance of a winston logger can have multiple transports configured at different levels. For example, one may want error logs to be stored in a persistent remote location (like a database), but all logs output to the console or a local file.\n\nThere also seemed to be a lot of logging libraries out there that coupled their implementation of logging (i.e. how the logs are stored / indexed) to the API that they exposed to the programmer. This library aims to decouple those parts of the process to make it more flexible and extensible.\n\n## Installation\n\n```bash\nnpm install winston\n```\n\n## Usage\nThere are two different ways to use winston: directly via the default logger, or by instantiating your own Logger. The former is merely intended to be a convenient shared logger to use throughout your application if you so choose.\n\n* [Logging](#logging)\n * [Using the Default Logger](#using-the-default-logger)\n * [Instantiating your own Logger](#instantiating-your-own-logger)\n * [Logging with Metadata](#logging-with-metadata)\n * [String interpolation ](#string-interpolation)\n* [Transports](https://github.com/flatiron/winston/blob/master/docs/transports.md)\n* [Profiling](#profiling)\n* [Streaming Logs](#streaming-logs)\n* [Querying Logs](#querying-logs) \n* [Exceptions](#exceptions)\n * [Handling Uncaught Exceptions with winston](#handling-uncaught-exceptions-with-winston)\n * [To Exit or Not to Exit](#to-exit-or-not-to-exit)\n* [Logging Levels](#logging-levels)\n * [Using Logging Levels](#using-logging-levels)\n * [Using Custom Logging Levels](#using-custom-logging-levels)\n* [Further Reading](#further-reading)\n * [Events and Callbacks in Winston](#events-and-callbacks-in-winston)\n * [Working with multiple Loggers in winston](#working-with-multiple-loggers-in-winston)\n * [Using winston in a CLI tool](#using-winston-in-a-cli-tool)\n * [Extending another object with Logging](#extending-another-object-with-logging)\n* [Working with transports](#working-with-transports)\n\t* [Adding Custom Transports](#adding-custom-transports)\n* [Installation](#installation)\n* [Run Tests](#run-tests)\n\n\n## Logging\n\n### Using the Default Logger\nThe default logger is accessible through the winston module directly. Any method that you could call on an instance of a logger is available on the default logger:\n\n``` js\n var winston = require('winston');\n\n winston.log('info', 'Hello distributed log files!');\n winston.info('Hello again distributed logs');\n```\n\nBy default, only the Console transport is set on the default logger. You can add or remove transports via the add() and remove() methods:\n\n``` js\n winston.add(winston.transports.File, { filename: 'somefile.log' });\n winston.remove(winston.transports.Console);\n```\n\nFor more documentation about working with each individual transport supported by Winston see the [Working with transports](#working-with-transports) section below.\n\n### Instantiating your own Logger\nIf you would prefer to manage the object lifetime of loggers you are free to instantiate them yourself:\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)(),\n new (winston.transports.File)({ filename: 'somefile.log' })\n ]\n });\n```\n\nYou can work with this logger in the same way that you work with the default logger:\n\n``` js\n //\n // Logging\n //\n logger.log('info', 'Hello distributed log files!');\n logger.info('Hello again distributed logs');\n\n //\n // Adding / Removing Transports\n // (Yes It's chainable)\n //\n logger.add(winston.transports.File)\n .remove(winston.transports.Console);\n```\n\n### Logging with Metadata\nIn addition to logging string messages, winston will also optionally log additional JSON metadata objects. Adding metadata is simple:\n\n``` js\n winston.log('info', 'Test Log Message', { anything: 'This is metadata' });\n```\n\nThe way these objects are stored varies from transport to transport (to best support the storage mechanisms offered). Here's a quick summary of how each transports handles metadata:\n\n1. __Console:__ Logged via util.inspect(meta)\n2. __File:__ Logged via util.inspect(meta)\n\n## Profiling\nIn addition to logging messages and metadata, winston also has a simple profiling mechanism implemented for any logger:\n\n``` js\n //\n // Start profile of 'test'\n // Remark: Consider using Date.now() with async operations\n //\n winston.profile('test');\n\n setTimeout(function () {\n //\n // Stop profile of 'test'. Logging will now take place:\n // \"17 Jan 21:00:00 - info: test duration=1000ms\"\n //\n winston.profile('test');\n }, 1000);\n```\n\nAll profile messages are set to the 'info' by default and both message and metadata are optional There are no plans in the Roadmap to make this configurable, but I'm open to suggestions / issues.\n\n### String interpolation\nThe `log` method provides the same string interpolation methods like [`util.format`][10]. \n\nThis allows for the following log messages.\n``` js\nlogger.log('info', 'test message %s', 'my string');\n// info: test message my string\n\nlogger.log('info', 'test message %d', 123);\n// info: test message 123\n\nlogger.log('info', 'test message %j', {number: 123}, {});\n// info: test message {\"number\":123}\n// meta = {}\n\nlogger.log('info', 'test message %s, %s', 'first', 'second', {number: 123});\n// info: test message first, second\n// meta = {number: 123}\n\nlogger.log('info', 'test message', 'first', 'second', {number: 123});\n// info: test message first second\n// meta = {number: 123}\n\nlogger.log('info', 'test message %s, %s', 'first', 'second', {number: 123}, function(){});\n// info: test message first, second\n// meta = {numer: 123}\n// callback = function(){}\n\nlogger.log('info', 'test message', 'first', 'second', {number: 123}, function(){});\n// info: test message first second\n// meta = {numer: 123}\n// callback = function(){}\n```\n\n\n\n\n\n## Querying Logs\nWinston supports querying of logs with Loggly-like options. [See Loggly Search API](http://wiki.loggly.com/retrieve_events#optional).\nSpecifically: `File`, `Couchdb`, `Redis`, `Loggly`, `Nssocket`, and `Http`.\n\n``` js\n var options = {\n from: new Date - 24 * 60 * 60 * 1000,\n until: new Date,\n limit: 10,\n start: 0,\n order: 'desc',\n fields: ['message']\n };\n\n //\n // Find items logged between today and yesterday.\n //\n winston.query(options, function (err, results) {\n if (err) {\n throw err;\n }\n \n console.log(results);\n });\n```\n\n## Streaming Logs\nStreaming allows you to stream your logs back from your chosen transport.\n\n``` js\n //\n // Start at the end.\n //\n winston.stream({ start: -1 }).on('log', function(log) {\n console.log(log);\n });\n```\n\n## Exceptions\n\n### Handling Uncaught Exceptions with winston\n\nWith `winston`, it is possible to catch and log `uncaughtException` events from your process. There are two distinct ways of enabling this functionality either through the default winston logger or your own logger instance.\n\nIf you want to use this feature with the default logger simply call `.handleExceptions()` with a transport instance.\n\n``` js\n //\n // You can add a separate exception logger by passing it to `.handleExceptions`\n //\n winston.handleExceptions(new winston.transports.File({ filename: 'path/to/exceptions.log' }))\n\n //\n // Alternatively you can set `.handleExceptions` to true when adding transports to winston\n //\n winston.add(winston.transports.File, {\n filename: 'path/to/all-logs.log',\n handleExceptions: true\n });\n```\n\n### To Exit or Not to Exit\n\nBy default, winston will exit after logging an uncaughtException. if this is not the behavior you want,\nset `exitOnError = false`\n\n``` js\n var logger = new (winston.Logger)({ exitOnError: false });\n\n //\n // or, like this:\n //\n logger.exitOnError = false;\n```\n\nWhen working with custom logger instances, you can pass in separate transports to the `exceptionHandlers` property or set `.handleExceptions` on any transport.\n\nExample 1\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new winston.transports.File({ filename: 'path/to/all-logs.log' })\n ]\n exceptionHandlers: [\n new winston.transports.File({ filename: 'path/to/exceptions.log' })\n ]\n });\n```\n\nExample 2\n\n```\nvar logger = new winston.Logger({\n transports: [\n new winston.transports.Console({\n handleExceptions: true,\n json: true\n })\n ],\n exitOnError: false\n});\n```\n\nThe `exitOnError` option can also be a function to prevent exit on only certain types of errors:\n\n``` js\n function ignoreEpipe(err) {\n return err.code !== 'EPIPE';\n }\n\n var logger = new (winston.Logger)({ exitOnError: ignoreEpipe });\n\n //\n // or, like this:\n //\n logger.exitOnError = ignoreEpipe;\n```\n\n## Logging Levels\n\n### Using Logging Levels\nSetting the level for your logging message can be accomplished in one of two ways. You can pass a string representing the logging level to the log() method or use the level specified methods defined on every winston Logger.\n\n``` js\n //\n // Any logger instance\n //\n logger.log('silly', \"127.0.0.1 - there's no place like home\");\n logger.log('debug', \"127.0.0.1 - there's no place like home\");\n logger.log('verbose', \"127.0.0.1 - there's no place like home\");\n logger.log('info', \"127.0.0.1 - there's no place like home\");\n logger.log('warn', \"127.0.0.1 - there's no place like home\");\n logger.log('error', \"127.0.0.1 - there's no place like home\");\n logger.info(\"127.0.0.1 - there's no place like home\");\n logger.warn(\"127.0.0.1 - there's no place like home\");\n logger.error(\"127.0.0.1 - there's no place like home\");\n\n //\n // Default logger\n //\n winston.log('info', \"127.0.0.1 - there's no place like home\");\n winston.info(\"127.0.0.1 - there's no place like home\");\n```\n\nWinston allows you to set a `level` on each transport that specifies the level of messages this transport should log. For example, you could log only errors to the console, with the full logs in a file (note that the default level of a transport is `info`):\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)({ level: 'error' }),\n new (winston.transports.File)({ filename: 'somefile.log' })\n ]\n });\n```\n\nYou may also dynamically change the log level of a transport:\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)({ level: 'warn' }),\n new (winston.transports.File)({ filename: 'somefile.log', level: 'error' })\n ]\n }); \n logger.debug(\"Will not be logged in either transport!\");\n logger.transports.console.level = 'debug';\n logger.transports.file.level = 'verbose';\n logger.verbose(\"Will be logged in both transports!\");\n```\n\nAs of 0.2.0, winston supports customizable logging levels, defaulting to [npm][0] style logging levels. Changing logging levels is easy:\n\n``` js\n //\n // Change levels on the default winston logger\n //\n winston.setLevels(winston.config.syslog.levels);\n\n //\n // Change levels on an instance of a logger\n //\n logger.setLevels(winston.config.syslog.levels);\n```\n\nCalling `.setLevels` on a logger will remove all of the previous helper methods for the old levels and define helper methods for the new levels. Thus, you should be careful about the logging statements you use when changing levels. For example, if you ran this code after changing to the syslog levels:\n\n``` js\n //\n // Logger does not have 'silly' defined since that level is not in the syslog levels\n //\n logger.silly('some silly message');\n```\n\n### Using Custom Logging Levels\nIn addition to the predefined `npm` and `syslog` levels available in Winston, you can also choose to define your own:\n\n``` js\n var myCustomLevels = {\n levels: {\n foo: 0,\n bar: 1,\n baz: 2,\n foobar: 3\n },\n colors: {\n foo: 'blue',\n bar: 'green',\n baz: 'yellow',\n foobar: 'red'\n }\n };\n\n var customLevelLogger = new (winston.Logger)({ levels: myCustomLevels.levels });\n customLevelLogger.foobar('some foobar level-ed message');\n```\n\nAlthough there is slight repetition in this data structure, it enables simple encapsulation if you not to have colors. If you do wish to have colors, in addition to passing the levels to the Logger itself, you must make winston aware of them:\n\n``` js\n //\n // Make winston aware of these colors\n //\n winston.addColors(myCustomLevels.colors);\n```\n\nThis enables transports with the 'colorize' option set to appropriately color the output of custom levels.\n\n## Further Reading\n\n### Events and Callbacks in Winston\nEach instance of winston.Logger is also an instance of an [EventEmitter][1]. A log event will be raised each time a transport successfully logs a message:\n\n``` js\n logger.on('logging', function (transport, level, msg, meta) {\n // [msg] and [meta] have now been logged at [level] to [transport]\n });\n\n logger.info('CHILL WINSTON!', { seriously: true });\n```\n\nIt is also worth mentioning that the logger also emits an 'error' event which you should handle or suppress if you don't want unhandled exceptions:\n\n``` js\n //\n // Handle errors\n //\n logger.on('error', function (err) { /* Do Something */ });\n\n //\n // Or just suppress them.\n //\n logger.emitErrs = false;\n```\n\nEvery logging method described in the previous section also takes an optional callback which will be called only when all of the transports have logged the specified message.\n\n``` js\n logger.info('CHILL WINSTON!', { seriously: true }, function (err, level, msg, meta) {\n // [msg] and [meta] have now been logged at [level] to **every** transport.\n });\n```\n\n### Working with multiple Loggers in winston\n\nOften in larger, more complex applications it is necessary to have multiple logger instances with different settings. Each logger is responsible for a different feature area (or category). This is exposed in `winston` in two ways: through `winston.loggers` and instances of `winston.Container`. In fact, `winston.loggers` is just a predefined instance of `winston.Container`:\n\n``` js\n var winston = require('winston');\n\n //\n // Configure the logger for `category1`\n //\n winston.loggers.add('category1', {\n console: {\n level: 'silly',\n colorize: 'true',\n label: 'category one'\n },\n file: {\n filename: '/path/to/some/file'\n }\n });\n\n //\n // Configure the logger for `category2`\n //\n winston.loggers.add('category2', {\n couchdb: {\n host: '127.0.0.1',\n port: 5984\n }\n });\n```\n\nNow that your loggers are setup you can require winston _in any file in your application_ and access these pre-configured loggers:\n\n``` js\n var winston = require('winston');\n\n //\n // Grab your preconfigured logger\n //\n var category1 = winston.loggers.get('category1');\n\n category1.info('logging from your IoC container-based logger');\n```\n\nIf you prefer to manage the `Container` yourself you can simply instantiate one:\n\n``` js\n var winston = require('winston'),\n container = new winston.Container();\n\n container.add('category1', {\n console: {\n level: 'silly',\n colorize: 'true'\n },\n file: {\n filename: '/path/to/some/file'\n }\n });\n```\n\n### Sharing transports between Loggers in winston\n\n``` js\n var winston = require('winston');\n\n //\n // Setup transports to be shared across all loggers\n // in three ways:\n //\n // 1. By setting it on the default Container\n // 2. By passing `transports` into the constructor function of winston.Container\n // 3. By passing `transports` into the `.get()` or `.add()` methods\n //\n\n //\n // 1. By setting it on the default Container\n //\n winston.loggers.options.transports = [\n // Setup your shared transports here\n ];\n\n //\n // 2. By passing `transports` into the constructor function of winston.Container\n //\n var container = new winston.Container({\n transports: [\n // Setup your shared transports here\n ]\n });\n\n //\n // 3. By passing `transports` into the `.get()` or `.add()` methods\n //\n winston.loggers.add('some-category', {\n transports: [\n // Setup your shared transports here\n ]\n });\n\n container.add('some-category', {\n transports: [\n // Setup your shared transports here\n ]\n });\n```\n\n### Using winston in a CLI tool\nA common use-case for logging is output to a CLI tool. Winston has a special helper method which will pretty print output from your CLI tool. Here's an example from the [require-analyzer][2] written by [Nodejitsu][3]:\n\n```\n info: require-analyzer starting in /Users/Charlie/Nodejitsu/require-analyzer\n info: Found existing dependencies\n data: {\n data: colors: '0.x.x',\n data: eyes: '0.1.x',\n data: findit: '0.0.x',\n data: npm: '1.0.x',\n data: optimist: '0.2.x',\n data: semver: '1.0.x',\n data: winston: '0.2.x'\n data: }\n info: Analyzing dependencies...\n info: Done analyzing raw dependencies\n info: Retrieved packages from npm\n warn: No additional dependencies found\n```\n\nConfiguring output for this style is easy, just use the `.cli()` method on `winston` or an instance of `winston.Logger`:\n\n``` js\n var winston = require('winston');\n\n //\n // Configure CLI output on the default logger\n //\n winston.cli();\n\n //\n // Configure CLI on an instance of winston.Logger\n //\n var logger = new winston.Logger({\n transports: [\n new (winston.transports.Console)()\n ]\n });\n\n logger.cli();\n```\n\n### Extending another object with Logging\nOften in a given code base with lots of Loggers it is useful to add logging methods to a different object so that these methods can be called with less syntax. Winston exposes this functionality via the 'extend' method:\n\n``` js\n var myObject = {};\n\n logger.extend(myObject);\n\n //\n // You can now call logger methods on 'myObject'\n //\n myObject.info(\"127.0.0.1 - there's no place like home\");\n```\n\n## Working with Transports\nThere are many transports supported by winston core. If you have a transport you would like to add either open an issue or fork and submit a pull request. Commits are welcome, but I'll give you extra street cred if you __add tests too :D__\n\n\n### Console Transport\n``` js\n winston.add(winston.transports.Console, options)\n```\n\nThe Console transport takes a few simple options:\n\n* __level:__ Level of messages that this transport should log (default 'info').\n* __silent:__ Boolean flag indicating whether to suppress output (default false).\n* __colorize:__ Boolean flag indicating if we should colorize output (default false).\n* __timestamp:__ Boolean flag indicating if we should prepend output with timestamps (default false). If function is specified, its return value will be used instead of timestamps.\n\n*Metadata:* Logged via util.inspect(meta);\n\n### File Transport\n``` js\n winston.add(winston.transports.File, options)\n```\n\nThe File transport should really be the 'Stream' transport since it will accept any [WritableStream][14]. It is named such because it will also accept filenames via the 'filename' option:\n\n* __level:__ Level of messages that this transport should log.\n* __silent:__ Boolean flag indicating whether to suppress output.\n* __colorize:__ Boolean flag indicating if we should colorize output.\n* __timestamp:__ Boolean flag indicating if we should prepend output with timestamps (default true). If function is specified, its return value will be used instead of timestamps.\n* __filename:__ The filename of the logfile to write output to.\n* __maxsize:__ Max size in bytes of the logfile, if the size is exceeded then a new file is created.\n* __maxFiles:__ Limit the number of files created when the size of the logfile is exceeded.\n* __stream:__ The WriteableStream to write output to.\n* __json:__ If true, messages will be logged as JSON (default true).\n* __logstash:__ If true, messages will be logged using the logstash JSON format.\n\n*Metadata:* Logged via util.inspect(meta);\n\n### Loggly Transport\n``` js\n var Loggly = require('winston-loggly').Loggly\n winston.add(Loggly, options);\n```\n\nThe Loggly transport is based on [Nodejitsu's][3] [node-loggly][6] implementation of the [Loggly][7] API. If you haven't heard of Loggly before, you should probably read their [value proposition][8]. The Loggly transport takes the following options. Either 'inputToken' or 'inputName' is required:\n\n* __level:__ Level of messages that this transport should log. \n* __subdomain:__ The subdomain of your Loggly account. *[required]*\n* __auth__: The authentication information for your Loggly account. *[required with inputName]*\n* __inputName:__ The name of the input this instance should log to.\n* __inputToken:__ The input token of the input this instance should log to.\n* __json:__ If true, messages will be sent to Loggly as JSON.\n\n*Metadata:* Logged in suggested [Loggly format][2]\n\n### Riak Transport\nAs of `0.3.0` the Riak transport has been broken out into a new module: [winston-riak][17]. Using it is just as easy:\n\n``` js\n var Riak = require('winston-riak').Riak;\n winston.add(Riak, options);\n```\n\nIn addition to the options accepted by the [riak-js][3] [client][4], the Riak transport also accepts the following options. It is worth noting that the riak-js debug option is set to *false* by default:\n\n* __level:__ Level of messages that this transport should log.\n* __bucket:__ The name of the Riak bucket you wish your logs to be in or a function to generate bucket names dynamically.\n\n``` js\n // Use a single bucket for all your logs\n var singleBucketTransport = new (Riak)({ bucket: 'some-logs-go-here' });\n \n // Generate a dynamic bucket based on the date and level\n var dynamicBucketTransport = new (Riak)({\n bucket: function (level, msg, meta, now) {\n var d = new Date(now);\n return level + [d.getDate(), d.getMonth(), d.getFullYear()].join('-');\n }\n });\n```\n\n*Metadata:* Logged as JSON literal in Riak\n\n### MongoDB Transport\nAs of `0.3.0` the MongoDB transport has been broken out into a new module: [winston-mongodb][16]. Using it is just as easy:\n\n``` js\n var MongoDB = require('winston-mongodb').MongoDB;\n winston.add(MongoDB, options);\n```\n\nThe MongoDB transport takes the following options. 'db' is required:\n\n* __level:__ Level of messages that this transport should log. \n* __silent:__ Boolean flag indicating whether to suppress output.\n* __db:__ The name of the database you want to log to. *[required]*\n* __collection__: The name of the collection you want to store log messages in, defaults to 'log'.\n* __safe:__ Boolean indicating if you want eventual consistency on your log messages, if set to true it requires an extra round trip to the server to ensure the write was committed, defaults to true.\n* __host:__ The host running MongoDB, defaults to localhost.\n* __port:__ The port on the host that MongoDB is running on, defaults to MongoDB's default port.\n\n*Metadata:* Logged as a native JSON object.\n\n### SimpleDB Transport\n\nThe [winston-simpledb][18] transport is just as easy:\n\n``` js\n var SimpleDB = require('winston-simpledb').SimpleDB;\n winston.add(SimpleDB, options);\n```\n\nThe SimpleDB transport takes the following options. All items marked with an asterisk are required:\n\n* __awsAccessKey__:* your AWS Access Key\n* __secretAccessKey__:* your AWS Secret Access Key\n* __awsAccountId__:* your AWS Account Id\n* __domainName__:* a string or function that returns the domain name to log to\n* __region__:* the region your domain resides in\n* __itemName__: a string ('uuid', 'epoch', 'timestamp') or function that returns the item name to log\n\n*Metadata:* Logged as a native JSON object to the 'meta' attribute of the item.\n\n### Mail Transport\n\nThe [winston-mail][19] is an email transport:\n\n``` js\n var Mail = require('winston-mail').Mail;\n winston.add(Mail, options);\n```\n\nThe Mail transport uses [emailjs](https://github.com/eleith/emailjs) behind the scenes. Options are the following:\n\n* __to:__ The address(es) you want to send to. *[required]*\n* __from:__ The address you want to send from. (default: `winston@[server-host-name]`)\n* __host:__ SMTP server hostname (default: localhost)\n* __port:__ SMTP port (default: 587 or 25)\n* __username__ User for server auth\n* __password__ Password for server auth\n* __ssl:__ Use SSL (boolean or object { key, ca, cert })\n* __tls:__ Boolean (if true, use starttls)\n* __level:__ Level of messages that this transport should log. \n* __silent:__ Boolean flag indicating whether to suppress output.\n\n*Metadata:* Stringified as JSON in email.\n\n### Amazon SNS (Simple Notification System) Transport\n\nThe [winston-sns][21] transport uses amazon SNS to send emails, texts, or a bunch of other notifications.\n\n``` js\n require('winston-sns').SNS;\n winston.add(winston.transports.SNS, options);\n```\n\nOptions:\n\n* __aws_key:__ Your Amazon Web Services Key. *[required]*\n* __aws_secret:__ Your Amazon Web Services Secret. *[required]*\n* __subscriber:__ Subscriber number - found in your SNS AWS Console, after clicking on a topic. Same as AWS Account ID. *[required]*\n* __topic_arn:__ Also found in SNS AWS Console - listed under a topic as Topic ARN. *[required]*\n* __region:__ AWS Region to use. Can be one of: `us-east-1`,`us-west-1`,`eu-west-1`,`ap-southeast-1`,`ap-northeast-1`,`us-gov-west-1`,`sa-east-1`. (default: `us-east-1`)\n* __subject:__ Subject for notifications. (default: \"Winston Error Report\")\n* __message:__ Message of notifications. Uses placeholders for level (%l), error message (%e), and metadata (%m). (default: \"Level '%l' Error:\\n%e\\n\\nMetadata:\\n%m\")\n* __level:__ lowest level this transport will log. (default: `info`)\n\n### Graylog2 Transport\n\n[winston-graylog2][22] is a Graylog2 transport:\n\n``` js\n var Graylog2 = require('winston-graylog2').Graylog2;\n winston.add(Graylog2, options);\n```\n\nThe Graylog2 transport connects to a Graylog2 server over UDP using the following options:\n\n* __level:__ Level of messages this transport should log. (default: info)\n* __silent:__ Boolean flag indicating whether to suppress output. (default: false)\n\n* __graylogHost:__ IP address or hostname of the graylog2 server. (default: localhost)\n* __graylogPort:__ Port to send messages to on the graylog2 server. (default: 12201)\n* __graylogHostname:__ The hostname associated with graylog2 messages. (default: require('os').hostname())\n* __graylogFacility:__ The graylog2 facility to send log messages.. (default: nodejs)\n\n*Metadata:* Stringified as JSON in the full message GELF field.\n\n### Papertrail Transport\n\n[winston-papertrail][23] is a Papertrail transport:\n\n``` js\n var Papertrail = require('winston-papertrail').Papertrail;\n winston.add(Papertrail, options);\n```\n\nThe Papertrail transport connects to a [PapertrailApp log destination](https://papertrailapp.com) over TCP (TLS) using the following options:\n\n* __level:__ Level of messages this transport should log. (default: info)\n* __host:__ FQDN or IP address of the Papertrail endpoint.\n* __port:__ Port for the Papertrail log destination.\n* __hostname:__ The hostname associated with messages. (default: require('os').hostname())\n* __program:__ The facility to send log messages.. (default: default)\n* __logFormat:__ a log formatting function with the signature `function(level, message)`, which allows custom formatting of the level or message prior to delivery\n\n*Metadata:* Logged as a native JSON object to the 'meta' attribute of the item.\n\n### Cassandra Transport\n\n[winston-cassandra][24] is a Cassandra transport:\n\n``` js\n var Cassandra = require('winston-cassandra').Cassandra;\n winston.add(Cassandra, options);\n```\n\nThe Cassandra transport connects to a cluster using the native protocol with the following options:\n\n* __level:__ Level of messages that this transport should log (default: `'info'`).\n* __table:__ The name of the Cassandra column family you want to store log messages in (default: `'logs'`).\n* __partitionBy:__ How you want the logs to be partitioned. Possible values `'hour'` and `'day'`(Default).\n* __consistency:__ The consistency of the insert query (default: `quorum`).\n\nIn addition to the options accepted by the [Node.js Cassandra driver](https://github.com/jorgebay/node-cassandra-cql) Client.\n\n* __hosts:__ Cluster nodes that will handle the write requests:\nArray of strings containing the hosts, for example `['host1', 'host2']` (required).\n* __keyspace:__ The name of the keyspace that will contain the logs table (required). The keyspace should be already created in the cluster.\n\n### Adding Custom Transports\nAdding a custom transport (say for one of the datastore on the Roadmap) is actually pretty easy. All you need to do is accept a couple of options, set a name, implement a log() method, and add it to the set of transports exposed by winston.\n\n``` js\n var util = require('util'),\n winston = require('winston');\n\n var CustomLogger = winston.transports.CustomerLogger = function (options) {\n //\n // Name this logger\n //\n this.name = 'customLogger';\n\n //\n // Set the level from your options\n //\n this.level = options.level || 'info';\n\n //\n // Configure your storage backing as you see fit\n //\n };\n\n //\n // Inherit from `winston.Transport` so you can take advantage\n // of the base functionality and `.handleExceptions()`.\n //\n util.inherits(CustomLogger, winston.Transport);\n\n CustomLogger.prototype.log = function (level, msg, meta, callback) {\n //\n // Store this message and metadata, maybe use some custom logic\n // then callback indicating success.\n //\n callback(null, true);\n };\n```\n\n### Inspirations\n1. [npm][0]\n2. [log.js][4]\n3. [socket.io][5]\n4. [node-rlog][6]\n5. [BigBrother][7]\n6. [Loggly][8]\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing winston\n```\n [sudo] npm install winston\n```\n\n## Run Tests\nAll of the winston tests are written in [vows][9], and designed to be run with npm. \n\n``` bash\n $ npm test\n```\n\n#### Author: [Charlie Robbins](http://twitter.com/indexzero)\n#### Contributors: [Matthew Bergman](http://github.com/fotoverite), [Marak Squires](http://github.com/marak)\n\n[0]: https://github.com/npm/npmlog/blob/master/log.js\n[1]: http://nodejs.org/docs/v0.3.5/api/events.html#events.EventEmitter\n[2]: http://github.com/nodejitsu/require-analyzer\n[3]: http://nodejitsu.com\n[4]: https://github.com/visionmedia/log.js\n[5]: http://socket.io\n[6]: https://github.com/jbrisbin/node-rlog\n[7]: https://github.com/feisty/BigBrother\n[8]: http://loggly.com\n[9]: http://vowsjs.org\n[10]: http://nodejs.org/api/util.html#util_util_format_format\n[14]: http://nodejs.org/api/stream.html#stream_class_stream_writable\n[16]: https://github.com/indexzero/winston-mongodb\n[17]: https://github.com/indexzero/winston-riak\n[18]: https://github.com/appsattic/winston-simpledb\n[19]: https://github.com/wavded/winston-mail\n[21]: https://github.com/jesseditson/winston-sns\n[22]: https://github.com/flite/winston-graylog2\n[23]: https://github.com/kenperkins/winston-papertrail\n[24]: https://github.com/jorgebay/winston-cassandra\n", - "readmeFilename": "README.md", + "gitHead": "5ff2673ea37f0122436248968f1e886a14f42c77", "bugs": { "url": "https://github.com/flatiron/winston/issues" }, - "homepage": "https://github.com/flatiron/winston#readme", + "homepage": "https://github.com/flatiron/winston", "_id": "winston@0.8.0", "_shasum": "61d0830fa699706212206b0a2b5ca69a93043668", + "_from": "winston@0.8.0", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + }, + "dist": { + "shasum": "61d0830fa699706212206b0a2b5ca69a93043668", + "tarball": "http://registry.npmjs.org/winston/-/winston-0.8.0.tgz" + }, + "directories": {}, "_resolved": "https://registry.npmjs.org/winston/-/winston-0.8.0.tgz", - "_from": "winston@0.8.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/broadway/package.json b/node_modules/forever/node_modules/flatiron/node_modules/broadway/package.json index bc27e1e..904fd63 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/broadway/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/broadway/package.json @@ -7,22 +7,22 @@ }, "version": "0.3.6", "maintainers": [ - { - "name": "AvianFlu", - "email": "avianflu@nodejitsu.com" - }, { "name": "indexzero", - "email": "charlie@nodejitsu.com" + "email": "charlie.robbins@gmail.com" }, { - "name": "Marak", - "email": "marak@nodejitsu.com" + "name": "mmalecki", + "email": "me@mmalecki.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" } ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/flatiron/broadway.git" + "url": "http://github.com/flatiron/broadway.git" }, "dependencies": { "cliff": "0.1.9", @@ -43,14 +43,23 @@ "engines": { "node": ">= 0.6.4" }, - "readme": "# broadway [![Build Status](https://secure.travis-ci.org/flatiron/broadway.png)](http://travis-ci.org/flatiron/broadway)\n\n*Lightweight application extensibility and composition with a twist of feature\nreflection.*\n\n## Example\n\n### app.js\n```js\nvar broadway = require(\"broadway\");\n\nvar app = new broadway.App();\n\n// Passes the second argument to `helloworld.attach`.\napp.use(require(\"./plugins/helloworld\"), { \"delimiter\": \"!\" } );\n\napp.init(function (err) {\n if (err) {\n console.log(err);\n }\n});\n\napp.hello(\"world\");\n```\n\n### plugins/helloworld.js\n\n```js\n// `exports.attach` gets called by broadway on `app.use`\nexports.attach = function (options) {\n\n this.hello = function (world) {\n console.log(\"Hello \"+ world + options.delimiter || \".\");\n };\n\n};\n\n// `exports.init` gets called by broadway on `app.init`.\nexports.init = function (done) {\n\n // This plugin doesn't require any initialization step.\n return done();\n\n};\n```\n\n### run it!\n\n```bash\njosh@onix:~/dev/broadway/examples$ node simple/app.js \nHello world!\njosh@onix:~/dev/broadway/examples$ \n```\n\n## Installation\n\n### Installing npm (node package manager)\n``` bash\n $ curl http://npmjs.org/install.sh | sh\n```\n\n### Installing broadway\n``` bash \n $ [sudo] npm install broadway\n```\n\n## API\n\n### App#init(callback)\n\nInitialize application and it's plugins, `callback` will be called with null or\ninitialization error as first argument.\n\n### App#use(plugin, options)\n\nAttach plugin to application. `plugin` should conform to following interface:\n\n```javascript\nvar plugin = {\n \"name\": \"example-plugin\", // Plugin's name\n\n \"attach\": function attach(options) {\n // Called with plugin options once plugin attached to application\n // `this` - is a reference to application\n },\n\n \"detach\": function detach() {\n // Called when plugin detached from application\n // (Only if plugin with same name was attached)\n // `this` - is a reference to application\n },\n\n \"init\": function init(callback) {\n // Called on application initialization\n // App#init(callback) will be called once every plugin will call `callback`\n // `this` - is a reference to application\n }\n};\n```\n\n### App#on(event, callback) and App#emit(event, data)\n\nApp inherits from [EventEmitter2][2], and many plugins build on this\nfunctionality.\n\n#### Built-In Events:\n\n* `error:init`: Broadway emits this event when it throws an error while attempting to initialize.\n\nRead the [EventEmitter2][2] documentation for more information.\n\n## Tests\nAll tests are written with [vows][0] and should be run with [npm][1]:\n\n``` bash\n $ npm test\n```\n\n#### [Charlie Robbins](http://nodejitsu.com)\n#### License: MIT\n\n[0]: http://vowsjs.org\n[1]: http://npmjs.org\n[2]: https://github.com/hij1nx/EventEmitter2\n", - "readmeFilename": "README.md", + "gitHead": "d293e467b2364b2432259f8c21df0c6bf1206762", "bugs": { "url": "https://github.com/flatiron/broadway/issues" }, - "homepage": "https://github.com/flatiron/broadway#readme", + "homepage": "https://github.com/flatiron/broadway", "_id": "broadway@0.3.6", "_shasum": "7dbef068b954b7907925fd544963b578a902ba7a", - "_resolved": "https://registry.npmjs.org/broadway/-/broadway-0.3.6.tgz", - "_from": "broadway@>=0.3.2 <0.4.0" + "_from": "broadway@~0.3.6", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + }, + "dist": { + "shasum": "7dbef068b954b7907925fd544963b578a902ba7a", + "tarball": "http://registry.npmjs.org/broadway/-/broadway-0.3.6.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/broadway/-/broadway-0.3.6.tgz" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/director/package.json b/node_modules/forever/node_modules/flatiron/node_modules/director/package.json index 222f88d..7a8fd50 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/director/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/director/package.json @@ -22,7 +22,7 @@ ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/flatiron/director.git" + "url": "http://github.com/flatiron/director.git" }, "keywords": [ "URL", @@ -69,6 +69,5 @@ "tarball": "http://registry.npmjs.org/director/-/director-1.2.7.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/director/-/director-1.2.7.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/director/-/director-1.2.7.tgz" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/optimist/node_modules/minimist/package.json b/node_modules/forever/node_modules/flatiron/node_modules/optimist/node_modules/minimist/package.json index 09ecda8..54f611b 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/optimist/node_modules/minimist/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/optimist/node_modules/minimist/package.json @@ -40,13 +40,28 @@ "url": "http://substack.net" }, "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/minimist/issues" }, "_id": "minimist@0.0.10", + "dist": { + "shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" + }, + "_from": "minimist@~0.0.1", + "_npmVersion": "1.4.3", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, "_shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "_from": "minimist@>=0.0.1 <0.1.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/optimist/node_modules/wordwrap/package.json b/node_modules/forever/node_modules/flatiron/node_modules/optimist/node_modules/wordwrap/package.json index 551b0f0..55055b4 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/optimist/node_modules/wordwrap/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/optimist/node_modules/wordwrap/package.json @@ -34,14 +34,30 @@ "email": "mail@substack.net", "url": "http://substack.net" }, - "readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n", - "readmeFilename": "README.markdown", + "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d", "bugs": { "url": "https://github.com/substack/node-wordwrap/issues" }, "homepage": "https://github.com/substack/node-wordwrap#readme", "_id": "wordwrap@0.0.3", "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", + "_from": "wordwrap@~0.0.2", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", + "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "_from": "wordwrap@>=0.0.2 <0.1.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/optimist/package.json b/node_modules/forever/node_modules/flatiron/node_modules/optimist/package.json index 2331e40..24d7733 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/optimist/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/optimist/package.json @@ -16,7 +16,7 @@ }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/substack/node-optimist.git" + "url": "http://github.com/substack/node-optimist.git" }, "keywords": [ "argument", @@ -36,14 +36,27 @@ "engine": { "node": ">=0.4" }, - "readme": "optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n { _: [],\n '$0': 'node ./examples/reflect.js',\n foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n $ node reflect.js -n123 -m456\n { '3': true,\n '6': true,\n _: [],\n '$0': 'node ./reflect.js',\n n: 123,\n m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", - "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/node-optimist/issues" }, - "homepage": "https://github.com/substack/node-optimist#readme", "_id": "optimist@0.6.0", + "dist": { + "shasum": "69424826f3405f79f142e6fc3d9ae58d4dbb9200", + "tarball": "http://registry.npmjs.org/optimist/-/optimist-0.6.0.tgz" + }, + "_from": "optimist@0.6.0", + "_npmVersion": "1.3.0", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, "_shasum": "69424826f3405f79f142e6fc3d9ae58d4dbb9200", - "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.0.tgz", - "_from": "optimist@0.6.0" + "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.0.tgz" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/pkginfo/README.md b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/pkginfo/README.md index 332704e..7a363bf 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/pkginfo/README.md +++ b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/pkginfo/README.md @@ -26,7 +26,7 @@ How often when writing node.js modules have you written the following line(s) of * Programmatically expose the version from the package.json ``` js - exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version; + exports.version = require('/path/to/package.json').version; ``` In other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!** @@ -83,4 +83,4 @@ Tests are written in [vows][1] and give complete coverage of all APIs. [1]: http://vowsjs.org #### Author: [Charlie Robbins](http://nodejitsu.com) -#### License: MIT \ No newline at end of file +#### License: MIT diff --git a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/pkginfo/package.json b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/pkginfo/package.json index 21d5986..6e1b9b5 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/pkginfo/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/pkginfo/package.json @@ -1,6 +1,7 @@ { "name": "pkginfo", - "version": "0.3.0", + "version": "0.3.1", + "license": "MIT", "description": "An easy way to expose properties on a module from a package.json", "author": { "name": "Charlie Robbins", @@ -10,6 +11,9 @@ "type": "git", "url": "git+ssh://git@github.com/indexzero/node-pkginfo.git" }, + "bugs": { + "url": "https://github.com/indexzero/node-pkginfo/issues" + }, "keywords": [ "info", "tools", @@ -18,21 +22,35 @@ "devDependencies": { "vows": "0.7.x" }, - "main": "./lib/pkginfo", + "main": "./lib/pkginfo.js", "scripts": { "test": "vows test/*-test.js --spec" }, "engines": { "node": ">= 0.4.0" }, - "readme": "# node-pkginfo\n\nAn easy way to expose properties on a module from a package.json\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing pkginfo\n```\n [sudo] npm install pkginfo\n```\n\n## Motivation\nHow often when writing node.js modules have you written the following line(s) of code? \n\n* Hard code your version string into your code\n\n``` js\n exports.version = '0.1.0';\n```\n\n* Programmatically expose the version from the package.json\n\n``` js\n exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version;\n```\n\nIn other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!**\n\n## Usage\n\nUsing `pkginfo` is idiot-proof, just require and invoke it. \n\n``` js\n var pkginfo = require('pkginfo')(module);\n \n console.dir(module.exports);\n```\n\nBy invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). \n\nHere's a sample of the output:\n\n```\n { name: 'simple-app',\n description: 'A test fixture for pkginfo',\n version: '0.1.0',\n author: 'Charlie Robbins ',\n keywords: [ 'test', 'fixture' ],\n main: './index.js',\n scripts: { test: 'vows test/*-test.js --spec' },\n engines: { node: '>= 0.4.0' } }\n```\n\n### Expose specific properties\nIf you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function:\n\n``` js\n var pkginfo = require('pkginfo')(module, 'version', 'author');\n \n console.dir(module.exports);\n```\n\n```\n { version: '0.1.0',\n author: 'Charlie Robbins ' }\n```\n\nIf you're looking for further usage see the [examples][0] included in this repository. \n\n## Run Tests\nTests are written in [vows][1] and give complete coverage of all APIs.\n\n```\n vows test/*-test.js --spec\n```\n\n[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples\n[1]: http://vowsjs.org\n\n#### Author: [Charlie Robbins](http://nodejitsu.com)\n#### License: MIT", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/indexzero/node-pkginfo/issues" - }, + "gitHead": "630fcf486543ee48b4c16afc575c0421fe039f26", "homepage": "https://github.com/indexzero/node-pkginfo#readme", - "_id": "pkginfo@0.3.0", - "_shasum": "726411401039fe9b009eea86614295d5f3a54276", - "_resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", - "_from": "pkginfo@>=0.0.0 <1.0.0" + "_id": "pkginfo@0.3.1", + "_shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21", + "_from": "pkginfo@0.x.x", + "_npmVersion": "2.14.1", + "_nodeVersion": "0.10.38", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], + "dist": { + "shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21", + "tarball": "http://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/LICENCE b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/LICENCE deleted file mode 100644 index 74489e2..0000000 --- a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/example/example.js b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/example/example.js deleted file mode 100644 index cf213bf..0000000 --- a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/example/example.js +++ /dev/null @@ -1,13 +0,0 @@ -var read = require("../lib/read.js") - -read({prompt: "Username: ", default: "test-user" }, function (er, user) { - read({prompt: "Password: ", default: "test-pass", silent: true }, function (er, pass) { - read({prompt: "Password again: ", default: "test-pass", silent: true }, function (er, pass2) { - console.error({user: user, - pass: pass, - verify: pass2, - passMatch: (pass === pass2)}) - console.error("the program should exit now") - }) - }) -}) diff --git a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/node_modules/mute-stream/package.json b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/node_modules/mute-stream/package.json index 2ebe49c..c93420d 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/node_modules/mute-stream/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/node_modules/mute-stream/package.json @@ -34,7 +34,7 @@ "homepage": "https://github.com/isaacs/mute-stream#readme", "_id": "mute-stream@0.0.5", "_shasum": "8fbfabb0a98a253d3184331f9e8deb7372fac6c0", - "_from": "mute-stream@>=0.0.4 <0.1.0", + "_from": "mute-stream@~0.0.4", "_npmVersion": "2.10.0", "_nodeVersion": "2.0.1", "_npmUser": { @@ -51,6 +51,5 @@ "email": "i@izs.me" } ], - "_resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/package.json b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/package.json index 9cd5b5d..13dfa1c 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/package.json +++ b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/package.json @@ -1,12 +1,12 @@ { "name": "read", - "version": "1.0.6", + "version": "1.0.7", "main": "lib/read.js", "dependencies": { "mute-stream": "~0.0.4" }, "devDependencies": { - "tap": "*" + "tap": "^1.2.0" }, "engines": { "node": ">=0.8" @@ -25,23 +25,26 @@ "scripts": { "test": "tap test/*.js" }, - "gitHead": "2f5101c8e41332a033e5aa4e27e33fd6e09598e2", + "files": [ + "lib/read.js" + ], + "gitHead": "b14516b9236c40140fd0666567f5d0c588a09a62", "bugs": { "url": "https://github.com/isaacs/read/issues" }, "homepage": "https://github.com/isaacs/read#readme", - "_id": "read@1.0.6", - "_shasum": "09873c14ecc114d063fad43b8ca5a33d304721c8", - "_from": "read@>=1.0.0 <1.1.0", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", + "_id": "read@1.0.7", + "_shasum": "b3da19bd052431a97671d44a42634adf710b40c4", + "_from": "read@1.0.x", + "_npmVersion": "3.2.2", + "_nodeVersion": "2.2.1", "_npmUser": { "name": "isaacs", "email": "isaacs@npmjs.com" }, "dist": { - "shasum": "09873c14ecc114d063fad43b8ca5a33d304721c8", - "tarball": "http://registry.npmjs.org/read/-/read-1.0.6.tgz" + "shasum": "b3da19bd052431a97671d44a42634adf710b40c4", + "tarball": "http://registry.npmjs.org/read/-/read-1.0.7.tgz" }, "maintainers": [ { @@ -50,6 +53,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/read/-/read-1.0.6.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz" } diff --git a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/rs.js b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/rs.js deleted file mode 100644 index d9f7f48..0000000 --- a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/rs.js +++ /dev/null @@ -1,4 +0,0 @@ -var read = require('read'); -read({ silent: true, prompt: 'stars: ' }, function(er, data) { - console.log(er, data) -}) diff --git a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/test/basic.js b/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/test/basic.js deleted file mode 100644 index f0926f3..0000000 --- a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/test/basic.js +++ /dev/null @@ -1,60 +0,0 @@ -var tap = require('tap') -var read = require('../lib/read.js') - -if (process.argv[2] === 'child') { - return child() -} - -var CLOSE = 'close' -if (process.version.match(/^v0\.6/)) { - CLOSE = 'exit' -} - -var spawn = require('child_process').spawn - -tap.test('basic', function (t) { - var child = spawn(process.execPath, [__filename, 'child']) - var output = '' - var write = child.stdin.write.bind(child.stdin) - child.stdout.on('data', function (c) { - console.error('data %s', c) - output += c - if (output.match(/Username: \(test-user\) $/)) { - process.nextTick(write.bind(null, 'a user\n')) - } else if (output.match(/Password: \(\n\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async#readme", "_id": "async@0.2.10", + "dist": { + "shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1", + "tarball": "http://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "_from": "async@0.2.x", + "_npmVersion": "1.3.2", + "_npmUser": { + "name": "caolan", + "email": "caolan.mcmahon@gmail.com" + }, + "maintainers": [ + { + "name": "caolan", + "email": "caolan@caolanmcmahon.com" + } + ], + "directories": {}, "_shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1", "_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "_from": "async@>=0.2.0 <0.3.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/cycle/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/cycle/package.json index d0b5275..fa45ec9 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/cycle/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/cycle/package.json @@ -7,7 +7,7 @@ "homepage": "https://github.com/douglascrockford/JSON-js", "repository": { "type": "git", - "url": "git+ssh://git@github.com/dscape/cycle.git" + "url": "http://github.com/dscape/cycle.git" }, "bugs": { "url": "http://github.com/douglascrockford/JSON-js/issues" @@ -24,7 +24,23 @@ "readme": "Fork of https://github.com/douglascrockford/JSON-js, maintained in npm as `cycle`.\n\n# Contributors\n\n* Douglas Crockford\n* Nuno Job\n* Justin Warkentin\n\n# JSON in JavaScript\n\nDouglas Crockford\ndouglas@crockford.com\n\n2010-11-18\n\n\nJSON is a light-weight, language independent, data interchange format.\nSee http://www.JSON.org/\n\nThe files in this collection implement JSON encoders/decoders in JavaScript.\n\nJSON became a built-in feature of JavaScript when the ECMAScript Programming\nLanguage Standard - Fifth Edition was adopted by the ECMA General Assembly\nin December 2009. Most of the files in this collection are for applications\nthat are expected to run in obsolete web browsers. For most purposes, json2.js\nis the best choice.\n\n\njson2.js: This file creates a JSON property in the global object, if there\nisn't already one, setting its value to an object containing a stringify\nmethod and a parse method. The parse method uses the eval method to do the\nparsing, guarding it with several regular expressions to defend against\naccidental code execution hazards. On current browsers, this file does nothing,\nprefering the built-in JSON object.\n\njson.js: This file does everything that json2.js does. It also adds a\ntoJSONString method and a parseJSON method to Object.prototype. Use of this\nfile is not recommended.\n\njson_parse.js: This file contains an alternative JSON parse function that\nuses recursive descent instead of eval.\n\njson_parse_state.js: This files contains an alternative JSON parse function that\nuses a state machine instead of eval.\n\ncycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,\nwhich make it possible to encode cyclical structures and dags in JSON, and to\nthen recover them. JSONPath is used to represent the links.\nhttp://GOESSNER.net/articles/JsonPath/\n", "readmeFilename": "README.md", "_id": "cycle@1.0.3", + "dist": { + "shasum": "21e80b2be8580f98b468f379430662b046c34ad2", + "tarball": "http://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz" + }, + "_from": "cycle@1.0.x", + "_npmVersion": "1.2.32", + "_npmUser": { + "name": "dscape", + "email": "nunojobpinto@gmail.com" + }, + "maintainers": [ + { + "name": "dscape", + "email": "nunojobpinto@gmail.com" + } + ], + "directories": {}, "_shasum": "21e80b2be8580f98b468f379430662b046c34ad2", - "_resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "_from": "cycle@>=1.0.0 <1.1.0" + "_resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/eyes/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/eyes/package.json index c642c9d..5db1dbe 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/eyes/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/eyes/package.json @@ -33,10 +33,28 @@ "engines": { "node": "> 0.1.90" }, - "readme": "eyes\n====\n\na customizable value inspector for Node.js\n\nsynopsis\n--------\n\nI was tired of looking at cluttered output in the console -- something needed to be done,\n`sys.inspect()` didn't display regexps correctly, and was too verbose, and I had an hour or two to spare. \nSo I decided to have some fun. _eyes_ were born.\n\n![eyes-ss](http://dl.dropbox.com/u/251849/eyes-js-ss.gif)\n\n_example of the output of a user-customized eyes.js inspector_\n\n*eyes* also deals with circular objects in an intelligent way, and can pretty-print object literals.\n\nusage\n-----\n\n var inspect = require('eyes').inspector({styles: {all: 'magenta'}});\n\n inspect(something); // inspect with the settings passed to `inspector`\n\nor\n\n var eyes = require('eyes');\n\n eyes.inspect(something); // inspect with the default settings\n\nyou can pass a _label_ to `inspect()`, to keep track of your inspections:\n\n eyes.inspect(something, \"a random value\");\n\nIf you want to return the output of eyes without printing it, you can set it up this way:\n\n var inspect = require('eyes').inspector({ stream: null });\n\n sys.puts(inspect({ something: 42 }));\n\ncustomization\n-------------\n\nThese are the default styles and settings used by _eyes_.\n\n styles: { // Styles applied to stdout\n all: 'cyan', // Overall style applied to everything\n label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`\n other: 'inverted', // Objects which don't have a literal representation, such as functions\n key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`\n special: 'grey', // null, undefined...\n string: 'green',\n number: 'magenta',\n bool: 'blue', // true false\n regexp: 'green', // /\\d+/\n },\n \n pretty: true, // Indent object literals\n hideFunctions: false, // Don't output functions at all\n stream: process.stdout, // Stream to write to, or null\n maxLength: 2048 // Truncate output if longer\n\nYou can overwrite them with your own, by passing a similar object to `inspector()` or `inspect()`.\n\n var inspect = require('eyes').inspector({\n styles: {\n all: 'magenta',\n special: 'bold'\n },\n maxLength: 512\n });\n\n", - "readmeFilename": "README.md", "_id": "eyes@0.1.8", + "dist": { + "shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "tarball": "http://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + }, + "_npmVersion": "1.1.53", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "cloudhead", + "email": "self@cloudhead.net" + }, + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], "_shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "_from": "eyes@0.1.x", "_resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "_from": "eyes@>=0.1.0 <0.2.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/pkginfo/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/pkginfo/README.md index 332704e..7a363bf 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/pkginfo/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/pkginfo/README.md @@ -26,7 +26,7 @@ How often when writing node.js modules have you written the following line(s) of * Programmatically expose the version from the package.json ``` js - exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version; + exports.version = require('/path/to/package.json').version; ``` In other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!** @@ -83,4 +83,4 @@ Tests are written in [vows][1] and give complete coverage of all APIs. [1]: http://vowsjs.org #### Author: [Charlie Robbins](http://nodejitsu.com) -#### License: MIT \ No newline at end of file +#### License: MIT diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/pkginfo/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/pkginfo/package.json index 416d062..ed3aa8a 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/pkginfo/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/pkginfo/package.json @@ -1,6 +1,7 @@ { "name": "pkginfo", - "version": "0.3.0", + "version": "0.3.1", + "license": "MIT", "description": "An easy way to expose properties on a module from a package.json", "author": { "name": "Charlie Robbins", @@ -10,6 +11,9 @@ "type": "git", "url": "git+ssh://git@github.com/indexzero/node-pkginfo.git" }, + "bugs": { + "url": "https://github.com/indexzero/node-pkginfo/issues" + }, "keywords": [ "info", "tools", @@ -18,21 +22,35 @@ "devDependencies": { "vows": "0.7.x" }, - "main": "./lib/pkginfo", + "main": "./lib/pkginfo.js", "scripts": { "test": "vows test/*-test.js --spec" }, "engines": { "node": ">= 0.4.0" }, - "readme": "# node-pkginfo\n\nAn easy way to expose properties on a module from a package.json\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing pkginfo\n```\n [sudo] npm install pkginfo\n```\n\n## Motivation\nHow often when writing node.js modules have you written the following line(s) of code? \n\n* Hard code your version string into your code\n\n``` js\n exports.version = '0.1.0';\n```\n\n* Programmatically expose the version from the package.json\n\n``` js\n exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version;\n```\n\nIn other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!**\n\n## Usage\n\nUsing `pkginfo` is idiot-proof, just require and invoke it. \n\n``` js\n var pkginfo = require('pkginfo')(module);\n \n console.dir(module.exports);\n```\n\nBy invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). \n\nHere's a sample of the output:\n\n```\n { name: 'simple-app',\n description: 'A test fixture for pkginfo',\n version: '0.1.0',\n author: 'Charlie Robbins ',\n keywords: [ 'test', 'fixture' ],\n main: './index.js',\n scripts: { test: 'vows test/*-test.js --spec' },\n engines: { node: '>= 0.4.0' } }\n```\n\n### Expose specific properties\nIf you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function:\n\n``` js\n var pkginfo = require('pkginfo')(module, 'version', 'author');\n \n console.dir(module.exports);\n```\n\n```\n { version: '0.1.0',\n author: 'Charlie Robbins ' }\n```\n\nIf you're looking for further usage see the [examples][0] included in this repository. \n\n## Run Tests\nTests are written in [vows][1] and give complete coverage of all APIs.\n\n```\n vows test/*-test.js --spec\n```\n\n[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples\n[1]: http://vowsjs.org\n\n#### Author: [Charlie Robbins](http://nodejitsu.com)\n#### License: MIT", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/indexzero/node-pkginfo/issues" - }, + "gitHead": "630fcf486543ee48b4c16afc575c0421fe039f26", "homepage": "https://github.com/indexzero/node-pkginfo#readme", - "_id": "pkginfo@0.3.0", - "_shasum": "726411401039fe9b009eea86614295d5f3a54276", - "_resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", - "_from": "pkginfo@>=0.3.0 <0.4.0" + "_id": "pkginfo@0.3.1", + "_shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21", + "_from": "pkginfo@0.3.x", + "_npmVersion": "2.14.1", + "_nodeVersion": "0.10.38", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], + "dist": { + "shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21", + "tarball": "http://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/stack-trace/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/stack-trace/package.json index 71410c7..ea309a1 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/stack-trace/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/node_modules/stack-trace/package.json @@ -21,13 +21,36 @@ "far": "0.0.3", "long-stack-traces": "0.1.2" }, - "readme": "# stack-trace\n\nGet v8 stack traces as an array of CallSite objects.\n\n## Install\n\n``` bash\nnpm install stack-trace\n```\n\n## Usage\n\nThe stack-trace module makes it easy for you to capture the current stack:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar trace = stackTrace.get();\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nHowever, sometimes you have already popped the stack you are interested in,\nand all you have left is an `Error` object. This module can help:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar err = new Error('something went wrong');\nvar trace = stackTrace.parse(err);\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nPlease note that parsing the `Error#stack` property is not perfect, only\ncertain properties can be retrieved with it as noted in the API docs below.\n\n## Long stack traces\n\nstack-trace works great with [long-stack-traces][], when parsing an `err.stack`\nthat has crossed the event loop boundary, a `CallSite` object returning\n`'----------------------------------------'` for `getFileName()` is created.\nAll other methods of the event loop boundary call site return `null`.\n\n[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces\n\n## API\n\n### stackTrace.get([belowFn])\n\nReturns an array of `CallSite` objects, where element `0` is the current call\nsite.\n\nWhen passing a function on the current stack as the `belowFn` parameter, the\nreturned array will only include `CallSite` objects below this function.\n\n### stackTrace.parse(err)\n\nParses the `err.stack` property of an `Error` object into an array compatible\nwith those returned by `stackTrace.get()`. However, only the following methods\nare implemented on the returned `CallSite` objects.\n\n* getTypeName\n* getFunctionName\n* getMethodName\n* getFileName\n* getLineNumber\n* getColumnNumber\n* isNative\n\nNote: Except `getFunctionName()`, all of the above methods return exactly the\nsame values as you would get from `stackTrace.get()`. `getFunctionName()`\nis sometimes a little different, but still useful.\n\n### CallSite\n\nThe official v8 CallSite object API can be found [here][v8stackapi]. A quick\nexcerpt:\n\n> A CallSite object defines the following methods:\n>\n> * **getThis**: returns the value of this\n> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.\n> * **getFunction**: returns the current function\n> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.\n> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function\n> * **getFileName**: if this function was defined in a script returns the name of the script\n> * **getLineNumber**: if this function was defined in a script returns the current line number\n> * **getColumnNumber**: if this function was defined in a script returns the current column number\n> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called\n> * **isToplevel**: is this a toplevel invocation, that is, is this the global object?\n> * **isEval**: does this call take place in code defined by a call to eval?\n> * **isNative**: is this call in native V8 code?\n> * **isConstructor**: is this a constructor call?\n\n[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\n\n## License\n\nstack-trace is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/felixge/node-stack-trace/issues" }, "_id": "stack-trace@0.0.9", + "dist": { + "shasum": "a8f6eaeca90674c333e7c43953f275b451510695", + "tarball": "http://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz" + }, + "_from": "stack-trace@0.0.x", + "_npmVersion": "1.3.24", + "_npmUser": { + "name": "sebastianhoitz", + "email": "hoitz@komola.de" + }, + "maintainers": [ + { + "name": "felixge", + "email": "felix@debuggable.com" + }, + { + "name": "tim-smart", + "email": "tim@fostle.com" + }, + { + "name": "sebastianhoitz", + "email": "hoitz@komola.de" + } + ], + "directories": {}, "_shasum": "a8f6eaeca90674c333e7c43953f275b451510695", "_resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", - "_from": "stack-trace@>=0.0.0 <0.1.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/package.json index 8b4b871..49d7a3c 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/winston/package.json @@ -9,12 +9,24 @@ "maintainers": [ { "name": "indexzero", - "email": "charlie@nodejitsu.com" + "email": "charlie.robbins@gmail.com" + }, + { + "name": "chjj", + "email": "chjjeffrey@gmail.com" + }, + { + "name": "V1", + "email": "info@3rd-Eden.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" } ], "repository": { "type": "git", - "url": "git+https://github.com/flatiron/winston.git" + "url": "https://github.com/flatiron/winston.git" }, "keywords": [ "logging", @@ -45,14 +57,23 @@ "url": "https://raw.github.com/flatiron/winston/master/LICENSE" } ], - "readme": "# winston [![Build Status](https://secure.travis-ci.org/flatiron/winston.png?branch=master)](http://travis-ci.org/flatiron/winston)\n\nA multi-transport async logging library for node.js. "CHILL WINSTON! ... I put it in the logs."\n\n## Motivation\nWinston is designed to be a simple and universal logging library with support for multiple transports. A transport is essentially a storage device for your logs. Each instance of a winston logger can have multiple transports configured at different levels. For example, one may want error logs to be stored in a persistent remote location (like a database), but all logs output to the console or a local file.\n\nThere also seemed to be a lot of logging libraries out there that coupled their implementation of logging (i.e. how the logs are stored / indexed) to the API that they exposed to the programmer. This library aims to decouple those parts of the process to make it more flexible and extensible.\n\n## Installation\n\n```bash\nnpm install winston\n```\n\n## Usage\nThere are two different ways to use winston: directly via the default logger, or by instantiating your own Logger. The former is merely intended to be a convenient shared logger to use throughout your application if you so choose.\n\n* [Logging](#logging)\n * [Using the Default Logger](#using-the-default-logger)\n * [Instantiating your own Logger](#instantiating-your-own-logger)\n * [Logging with Metadata](#logging-with-metadata)\n * [String interpolation ](#string-interpolation)\n* [Transports](https://github.com/flatiron/winston/blob/master/docs/transports.md)\n* [Profiling](#profiling)\n* [Streaming Logs](#streaming-logs)\n* [Querying Logs](#querying-logs) \n* [Exceptions](#exceptions)\n * [Handling Uncaught Exceptions with winston](#handling-uncaught-exceptions-with-winston)\n * [To Exit or Not to Exit](#to-exit-or-not-to-exit)\n* [Logging Levels](#logging-levels)\n * [Using Logging Levels](#using-logging-levels)\n * [Using Custom Logging Levels](#using-custom-logging-levels)\n* [Further Reading](#further-reading)\n * [Events and Callbacks in Winston](#events-and-callbacks-in-winston)\n * [Working with multiple Loggers in winston](#working-with-multiple-loggers-in-winston)\n * [Using winston in a CLI tool](#using-winston-in-a-cli-tool)\n * [Extending another object with Logging](#extending-another-object-with-logging)\n* [Working with transports](#working-with-transports)\n\t* [Adding Custom Transports](#adding-custom-transports)\n* [Installation](#installation)\n* [Run Tests](#run-tests)\n\n\n## Logging\n\n### Using the Default Logger\nThe default logger is accessible through the winston module directly. Any method that you could call on an instance of a logger is available on the default logger:\n\n``` js\n var winston = require('winston');\n\n winston.log('info', 'Hello distributed log files!');\n winston.info('Hello again distributed logs');\n```\n\nBy default, only the Console transport is set on the default logger. You can add or remove transports via the add() and remove() methods:\n\n``` js\n winston.add(winston.transports.File, { filename: 'somefile.log' });\n winston.remove(winston.transports.Console);\n```\n\nFor more documentation about working with each individual transport supported by Winston see the [Working with transports](#working-with-transports) section below.\n\n### Instantiating your own Logger\nIf you would prefer to manage the object lifetime of loggers you are free to instantiate them yourself:\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)(),\n new (winston.transports.File)({ filename: 'somefile.log' })\n ]\n });\n```\n\nYou can work with this logger in the same way that you work with the default logger:\n\n``` js\n //\n // Logging\n //\n logger.log('info', 'Hello distributed log files!');\n logger.info('Hello again distributed logs');\n\n //\n // Adding / Removing Transports\n // (Yes It's chainable)\n //\n logger.add(winston.transports.File)\n .remove(winston.transports.Console);\n```\n\n### Logging with Metadata\nIn addition to logging string messages, winston will also optionally log additional JSON metadata objects. Adding metadata is simple:\n\n``` js\n winston.log('info', 'Test Log Message', { anything: 'This is metadata' });\n```\n\nThe way these objects are stored varies from transport to transport (to best support the storage mechanisms offered). Here's a quick summary of how each transports handles metadata:\n\n1. __Console:__ Logged via util.inspect(meta)\n2. __File:__ Logged via util.inspect(meta)\n\n## Profiling\nIn addition to logging messages and metadata, winston also has a simple profiling mechanism implemented for any logger:\n\n``` js\n //\n // Start profile of 'test'\n // Remark: Consider using Date.now() with async operations\n //\n winston.profile('test');\n\n setTimeout(function () {\n //\n // Stop profile of 'test'. Logging will now take place:\n // \"17 Jan 21:00:00 - info: test duration=1000ms\"\n //\n winston.profile('test');\n }, 1000);\n```\n\nAll profile messages are set to the 'info' by default and both message and metadata are optional There are no plans in the Roadmap to make this configurable, but I'm open to suggestions / issues.\n\n### String interpolation\nThe `log` method provides the same string interpolation methods like [`util.format`][10]. \n\nThis allows for the following log messages.\n``` js\nlogger.log('info', 'test message %s', 'my string');\n// info: test message my string\n\nlogger.log('info', 'test message %d', 123);\n// info: test message 123\n\nlogger.log('info', 'test message %j', {number: 123}, {});\n// info: test message {\"number\":123}\n// meta = {}\n\nlogger.log('info', 'test message %s, %s', 'first', 'second', {number: 123});\n// info: test message first, second\n// meta = {number: 123}\n\nlogger.log('info', 'test message', 'first', 'second', {number: 123});\n// info: test message first second\n// meta = {number: 123}\n\nlogger.log('info', 'test message %s, %s', 'first', 'second', {number: 123}, function(){});\n// info: test message first, second\n// meta = {numer: 123}\n// callback = function(){}\n\nlogger.log('info', 'test message', 'first', 'second', {number: 123}, function(){});\n// info: test message first second\n// meta = {numer: 123}\n// callback = function(){}\n```\n\n\n\n\n\n## Querying Logs\nWinston supports querying of logs with Loggly-like options. [See Loggly Search API](http://wiki.loggly.com/retrieve_events#optional).\nSpecifically: `File`, `Couchdb`, `Redis`, `Loggly`, `Nssocket`, and `Http`.\n\n``` js\n var options = {\n from: new Date - 24 * 60 * 60 * 1000,\n until: new Date,\n limit: 10,\n start: 0,\n order: 'desc',\n fields: ['message']\n };\n\n //\n // Find items logged between today and yesterday.\n //\n winston.query(options, function (err, results) {\n if (err) {\n throw err;\n }\n \n console.log(results);\n });\n```\n\n## Streaming Logs\nStreaming allows you to stream your logs back from your chosen transport.\n\n``` js\n //\n // Start at the end.\n //\n winston.stream({ start: -1 }).on('log', function(log) {\n console.log(log);\n });\n```\n\n## Exceptions\n\n### Handling Uncaught Exceptions with winston\n\nWith `winston`, it is possible to catch and log `uncaughtException` events from your process. There are two distinct ways of enabling this functionality either through the default winston logger or your own logger instance.\n\nIf you want to use this feature with the default logger simply call `.handleExceptions()` with a transport instance.\n\n``` js\n //\n // You can add a separate exception logger by passing it to `.handleExceptions`\n //\n winston.handleExceptions(new winston.transports.File({ filename: 'path/to/exceptions.log' }))\n\n //\n // Alternatively you can set `.handleExceptions` to true when adding transports to winston\n //\n winston.add(winston.transports.File, {\n filename: 'path/to/all-logs.log',\n handleExceptions: true\n });\n```\n\n### To Exit or Not to Exit\n\nBy default, winston will exit after logging an uncaughtException. if this is not the behavior you want,\nset `exitOnError = false`\n\n``` js\n var logger = new (winston.Logger)({ exitOnError: false });\n\n //\n // or, like this:\n //\n logger.exitOnError = false;\n```\n\nWhen working with custom logger instances, you can pass in separate transports to the `exceptionHandlers` property or set `.handleExceptions` on any transport.\n\nExample 1\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new winston.transports.File({ filename: 'path/to/all-logs.log' })\n ]\n exceptionHandlers: [\n new winston.transports.File({ filename: 'path/to/exceptions.log' })\n ]\n });\n```\n\nExample 2\n\n```\nvar logger = new winston.Logger({\n transports: [\n new winston.transports.Console({\n handleExceptions: true,\n json: true\n })\n ],\n exitOnError: false\n});\n```\n\nThe `exitOnError` option can also be a function to prevent exit on only certain types of errors:\n\n``` js\n function ignoreEpipe(err) {\n return err.code !== 'EPIPE';\n }\n\n var logger = new (winston.Logger)({ exitOnError: ignoreEpipe });\n\n //\n // or, like this:\n //\n logger.exitOnError = ignoreEpipe;\n```\n\n## Logging Levels\n\n### Using Logging Levels\nSetting the level for your logging message can be accomplished in one of two ways. You can pass a string representing the logging level to the log() method or use the level specified methods defined on every winston Logger.\n\n``` js\n //\n // Any logger instance\n //\n logger.log('silly', \"127.0.0.1 - there's no place like home\");\n logger.log('debug', \"127.0.0.1 - there's no place like home\");\n logger.log('verbose', \"127.0.0.1 - there's no place like home\");\n logger.log('info', \"127.0.0.1 - there's no place like home\");\n logger.log('warn', \"127.0.0.1 - there's no place like home\");\n logger.log('error', \"127.0.0.1 - there's no place like home\");\n logger.info(\"127.0.0.1 - there's no place like home\");\n logger.warn(\"127.0.0.1 - there's no place like home\");\n logger.error(\"127.0.0.1 - there's no place like home\");\n\n //\n // Default logger\n //\n winston.log('info', \"127.0.0.1 - there's no place like home\");\n winston.info(\"127.0.0.1 - there's no place like home\");\n```\n\nWinston allows you to set a `level` on each transport that specifies the level of messages this transport should log. For example, you could log only errors to the console, with the full logs in a file (note that the default level of a transport is `info`):\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)({ level: 'error' }),\n new (winston.transports.File)({ filename: 'somefile.log' })\n ]\n });\n```\n\nYou may also dynamically change the log level of a transport:\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)({ level: 'warn' }),\n new (winston.transports.File)({ filename: 'somefile.log', level: 'error' })\n ]\n }); \n logger.debug(\"Will not be logged in either transport!\");\n logger.transports.console.level = 'debug';\n logger.transports.file.level = 'verbose';\n logger.verbose(\"Will be logged in both transports!\");\n```\n\nAs of 0.2.0, winston supports customizable logging levels, defaulting to [npm][0] style logging levels. Changing logging levels is easy:\n\n``` js\n //\n // Change levels on the default winston logger\n //\n winston.setLevels(winston.config.syslog.levels);\n\n //\n // Change levels on an instance of a logger\n //\n logger.setLevels(winston.config.syslog.levels);\n```\n\nCalling `.setLevels` on a logger will remove all of the previous helper methods for the old levels and define helper methods for the new levels. Thus, you should be careful about the logging statements you use when changing levels. For example, if you ran this code after changing to the syslog levels:\n\n``` js\n //\n // Logger does not have 'silly' defined since that level is not in the syslog levels\n //\n logger.silly('some silly message');\n```\n\n### Using Custom Logging Levels\nIn addition to the predefined `npm` and `syslog` levels available in Winston, you can also choose to define your own:\n\n``` js\n var myCustomLevels = {\n levels: {\n foo: 0,\n bar: 1,\n baz: 2,\n foobar: 3\n },\n colors: {\n foo: 'blue',\n bar: 'green',\n baz: 'yellow',\n foobar: 'red'\n }\n };\n\n var customLevelLogger = new (winston.Logger)({ levels: myCustomLevels.levels });\n customLevelLogger.foobar('some foobar level-ed message');\n```\n\nAlthough there is slight repetition in this data structure, it enables simple encapsulation if you not to have colors. If you do wish to have colors, in addition to passing the levels to the Logger itself, you must make winston aware of them:\n\n``` js\n //\n // Make winston aware of these colors\n //\n winston.addColors(myCustomLevels.colors);\n```\n\nThis enables transports with the 'colorize' option set to appropriately color the output of custom levels.\n\n## Further Reading\n\n### Events and Callbacks in Winston\nEach instance of winston.Logger is also an instance of an [EventEmitter][1]. A log event will be raised each time a transport successfully logs a message:\n\n``` js\n logger.on('logging', function (transport, level, msg, meta) {\n // [msg] and [meta] have now been logged at [level] to [transport]\n });\n\n logger.info('CHILL WINSTON!', { seriously: true });\n```\n\nIt is also worth mentioning that the logger also emits an 'error' event which you should handle or suppress if you don't want unhandled exceptions:\n\n``` js\n //\n // Handle errors\n //\n logger.on('error', function (err) { /* Do Something */ });\n\n //\n // Or just suppress them.\n //\n logger.emitErrs = false;\n```\n\nEvery logging method described in the previous section also takes an optional callback which will be called only when all of the transports have logged the specified message.\n\n``` js\n logger.info('CHILL WINSTON!', { seriously: true }, function (err, level, msg, meta) {\n // [msg] and [meta] have now been logged at [level] to **every** transport.\n });\n```\n\n### Working with multiple Loggers in winston\n\nOften in larger, more complex applications it is necessary to have multiple logger instances with different settings. Each logger is responsible for a different feature area (or category). This is exposed in `winston` in two ways: through `winston.loggers` and instances of `winston.Container`. In fact, `winston.loggers` is just a predefined instance of `winston.Container`:\n\n``` js\n var winston = require('winston');\n\n //\n // Configure the logger for `category1`\n //\n winston.loggers.add('category1', {\n console: {\n level: 'silly',\n colorize: 'true',\n label: 'category one'\n },\n file: {\n filename: '/path/to/some/file'\n }\n });\n\n //\n // Configure the logger for `category2`\n //\n winston.loggers.add('category2', {\n couchdb: {\n host: '127.0.0.1',\n port: 5984\n }\n });\n```\n\nNow that your loggers are setup you can require winston _in any file in your application_ and access these pre-configured loggers:\n\n``` js\n var winston = require('winston');\n\n //\n // Grab your preconfigured logger\n //\n var category1 = winston.loggers.get('category1');\n\n category1.info('logging from your IoC container-based logger');\n```\n\nIf you prefer to manage the `Container` yourself you can simply instantiate one:\n\n``` js\n var winston = require('winston'),\n container = new winston.Container();\n\n container.add('category1', {\n console: {\n level: 'silly',\n colorize: 'true'\n },\n file: {\n filename: '/path/to/some/file'\n }\n });\n```\n\n### Sharing transports between Loggers in winston\n\n``` js\n var winston = require('winston');\n\n //\n // Setup transports to be shared across all loggers\n // in three ways:\n //\n // 1. By setting it on the default Container\n // 2. By passing `transports` into the constructor function of winston.Container\n // 3. By passing `transports` into the `.get()` or `.add()` methods\n //\n\n //\n // 1. By setting it on the default Container\n //\n winston.loggers.options.transports = [\n // Setup your shared transports here\n ];\n\n //\n // 2. By passing `transports` into the constructor function of winston.Container\n //\n var container = new winston.Container({\n transports: [\n // Setup your shared transports here\n ]\n });\n\n //\n // 3. By passing `transports` into the `.get()` or `.add()` methods\n //\n winston.loggers.add('some-category', {\n transports: [\n // Setup your shared transports here\n ]\n });\n\n container.add('some-category', {\n transports: [\n // Setup your shared transports here\n ]\n });\n```\n\n### Using winston in a CLI tool\nA common use-case for logging is output to a CLI tool. Winston has a special helper method which will pretty print output from your CLI tool. Here's an example from the [require-analyzer][2] written by [Nodejitsu][3]:\n\n```\n info: require-analyzer starting in /Users/Charlie/Nodejitsu/require-analyzer\n info: Found existing dependencies\n data: {\n data: colors: '0.x.x',\n data: eyes: '0.1.x',\n data: findit: '0.0.x',\n data: npm: '1.0.x',\n data: optimist: '0.2.x',\n data: semver: '1.0.x',\n data: winston: '0.2.x'\n data: }\n info: Analyzing dependencies...\n info: Done analyzing raw dependencies\n info: Retrieved packages from npm\n warn: No additional dependencies found\n```\n\nConfiguring output for this style is easy, just use the `.cli()` method on `winston` or an instance of `winston.Logger`:\n\n``` js\n var winston = require('winston');\n\n //\n // Configure CLI output on the default logger\n //\n winston.cli();\n\n //\n // Configure CLI on an instance of winston.Logger\n //\n var logger = new winston.Logger({\n transports: [\n new (winston.transports.Console)()\n ]\n });\n\n logger.cli();\n```\n\n### Extending another object with Logging\nOften in a given code base with lots of Loggers it is useful to add logging methods to a different object so that these methods can be called with less syntax. Winston exposes this functionality via the 'extend' method:\n\n``` js\n var myObject = {};\n\n logger.extend(myObject);\n\n //\n // You can now call logger methods on 'myObject'\n //\n myObject.info(\"127.0.0.1 - there's no place like home\");\n```\n\n## Working with Transports\nThere are many transports supported by winston core. If you have a transport you would like to add either open an issue or fork and submit a pull request. Commits are welcome, but I'll give you extra street cred if you __add tests too :D__\n\n\n### Console Transport\n``` js\n winston.add(winston.transports.Console, options)\n```\n\nThe Console transport takes a few simple options:\n\n* __level:__ Level of messages that this transport should log (default 'info').\n* __silent:__ Boolean flag indicating whether to suppress output (default false).\n* __colorize:__ Boolean flag indicating if we should colorize output (default false).\n* __timestamp:__ Boolean flag indicating if we should prepend output with timestamps (default false). If function is specified, its return value will be used instead of timestamps.\n\n*Metadata:* Logged via util.inspect(meta);\n\n### File Transport\n``` js\n winston.add(winston.transports.File, options)\n```\n\nThe File transport should really be the 'Stream' transport since it will accept any [WritableStream][14]. It is named such because it will also accept filenames via the 'filename' option:\n\n* __level:__ Level of messages that this transport should log.\n* __silent:__ Boolean flag indicating whether to suppress output.\n* __colorize:__ Boolean flag indicating if we should colorize output.\n* __timestamp:__ Boolean flag indicating if we should prepend output with timestamps (default true). If function is specified, its return value will be used instead of timestamps.\n* __filename:__ The filename of the logfile to write output to.\n* __maxsize:__ Max size in bytes of the logfile, if the size is exceeded then a new file is created.\n* __maxFiles:__ Limit the number of files created when the size of the logfile is exceeded.\n* __stream:__ The WriteableStream to write output to.\n* __json:__ If true, messages will be logged as JSON (default true).\n* __logstash:__ If true, messages will be logged using the logstash JSON format.\n\n*Metadata:* Logged via util.inspect(meta);\n\n### Loggly Transport\n``` js\n var Loggly = require('winston-loggly').Loggly\n winston.add(Loggly, options);\n```\n\nThe Loggly transport is based on [Nodejitsu's][3] [node-loggly][6] implementation of the [Loggly][7] API. If you haven't heard of Loggly before, you should probably read their [value proposition][8]. The Loggly transport takes the following options. Either 'inputToken' or 'inputName' is required:\n\n* __level:__ Level of messages that this transport should log. \n* __subdomain:__ The subdomain of your Loggly account. *[required]*\n* __auth__: The authentication information for your Loggly account. *[required with inputName]*\n* __inputName:__ The name of the input this instance should log to.\n* __inputToken:__ The input token of the input this instance should log to.\n* __json:__ If true, messages will be sent to Loggly as JSON.\n\n*Metadata:* Logged in suggested [Loggly format][2]\n\n### Riak Transport\nAs of `0.3.0` the Riak transport has been broken out into a new module: [winston-riak][17]. Using it is just as easy:\n\n``` js\n var Riak = require('winston-riak').Riak;\n winston.add(Riak, options);\n```\n\nIn addition to the options accepted by the [riak-js][3] [client][4], the Riak transport also accepts the following options. It is worth noting that the riak-js debug option is set to *false* by default:\n\n* __level:__ Level of messages that this transport should log.\n* __bucket:__ The name of the Riak bucket you wish your logs to be in or a function to generate bucket names dynamically.\n\n``` js\n // Use a single bucket for all your logs\n var singleBucketTransport = new (Riak)({ bucket: 'some-logs-go-here' });\n \n // Generate a dynamic bucket based on the date and level\n var dynamicBucketTransport = new (Riak)({\n bucket: function (level, msg, meta, now) {\n var d = new Date(now);\n return level + [d.getDate(), d.getMonth(), d.getFullYear()].join('-');\n }\n });\n```\n\n*Metadata:* Logged as JSON literal in Riak\n\n### MongoDB Transport\nAs of `0.3.0` the MongoDB transport has been broken out into a new module: [winston-mongodb][16]. Using it is just as easy:\n\n``` js\n var MongoDB = require('winston-mongodb').MongoDB;\n winston.add(MongoDB, options);\n```\n\nThe MongoDB transport takes the following options. 'db' is required:\n\n* __level:__ Level of messages that this transport should log. \n* __silent:__ Boolean flag indicating whether to suppress output.\n* __db:__ The name of the database you want to log to. *[required]*\n* __collection__: The name of the collection you want to store log messages in, defaults to 'log'.\n* __safe:__ Boolean indicating if you want eventual consistency on your log messages, if set to true it requires an extra round trip to the server to ensure the write was committed, defaults to true.\n* __host:__ The host running MongoDB, defaults to localhost.\n* __port:__ The port on the host that MongoDB is running on, defaults to MongoDB's default port.\n\n*Metadata:* Logged as a native JSON object.\n\n### SimpleDB Transport\n\nThe [winston-simpledb][18] transport is just as easy:\n\n``` js\n var SimpleDB = require('winston-simpledb').SimpleDB;\n winston.add(SimpleDB, options);\n```\n\nThe SimpleDB transport takes the following options. All items marked with an asterisk are required:\n\n* __awsAccessKey__:* your AWS Access Key\n* __secretAccessKey__:* your AWS Secret Access Key\n* __awsAccountId__:* your AWS Account Id\n* __domainName__:* a string or function that returns the domain name to log to\n* __region__:* the region your domain resides in\n* __itemName__: a string ('uuid', 'epoch', 'timestamp') or function that returns the item name to log\n\n*Metadata:* Logged as a native JSON object to the 'meta' attribute of the item.\n\n### Mail Transport\n\nThe [winston-mail][19] is an email transport:\n\n``` js\n var Mail = require('winston-mail').Mail;\n winston.add(Mail, options);\n```\n\nThe Mail transport uses [emailjs](https://github.com/eleith/emailjs) behind the scenes. Options are the following:\n\n* __to:__ The address(es) you want to send to. *[required]*\n* __from:__ The address you want to send from. (default: `winston@[server-host-name]`)\n* __host:__ SMTP server hostname (default: localhost)\n* __port:__ SMTP port (default: 587 or 25)\n* __username__ User for server auth\n* __password__ Password for server auth\n* __ssl:__ Use SSL (boolean or object { key, ca, cert })\n* __tls:__ Boolean (if true, use starttls)\n* __level:__ Level of messages that this transport should log. \n* __silent:__ Boolean flag indicating whether to suppress output.\n\n*Metadata:* Stringified as JSON in email.\n\n### Amazon SNS (Simple Notification System) Transport\n\nThe [winston-sns][21] transport uses amazon SNS to send emails, texts, or a bunch of other notifications.\n\n``` js\n require('winston-sns').SNS;\n winston.add(winston.transports.SNS, options);\n```\n\nOptions:\n\n* __aws_key:__ Your Amazon Web Services Key. *[required]*\n* __aws_secret:__ Your Amazon Web Services Secret. *[required]*\n* __subscriber:__ Subscriber number - found in your SNS AWS Console, after clicking on a topic. Same as AWS Account ID. *[required]*\n* __topic_arn:__ Also found in SNS AWS Console - listed under a topic as Topic ARN. *[required]*\n* __region:__ AWS Region to use. Can be one of: `us-east-1`,`us-west-1`,`eu-west-1`,`ap-southeast-1`,`ap-northeast-1`,`us-gov-west-1`,`sa-east-1`. (default: `us-east-1`)\n* __subject:__ Subject for notifications. (default: \"Winston Error Report\")\n* __message:__ Message of notifications. Uses placeholders for level (%l), error message (%e), and metadata (%m). (default: \"Level '%l' Error:\\n%e\\n\\nMetadata:\\n%m\")\n* __level:__ lowest level this transport will log. (default: `info`)\n\n### Graylog2 Transport\n\n[winston-graylog2][22] is a Graylog2 transport:\n\n``` js\n var Graylog2 = require('winston-graylog2').Graylog2;\n winston.add(Graylog2, options);\n```\n\nThe Graylog2 transport connects to a Graylog2 server over UDP using the following options:\n\n* __level:__ Level of messages this transport should log. (default: info)\n* __silent:__ Boolean flag indicating whether to suppress output. (default: false)\n\n* __graylogHost:__ IP address or hostname of the graylog2 server. (default: localhost)\n* __graylogPort:__ Port to send messages to on the graylog2 server. (default: 12201)\n* __graylogHostname:__ The hostname associated with graylog2 messages. (default: require('os').hostname())\n* __graylogFacility:__ The graylog2 facility to send log messages.. (default: nodejs)\n\n*Metadata:* Stringified as JSON in the full message GELF field.\n\n### Papertrail Transport\n\n[winston-papertrail][23] is a Papertrail transport:\n\n``` js\n var Papertrail = require('winston-papertrail').Papertrail;\n winston.add(Papertrail, options);\n```\n\nThe Papertrail transport connects to a [PapertrailApp log destination](https://papertrailapp.com) over TCP (TLS) using the following options:\n\n* __level:__ Level of messages this transport should log. (default: info)\n* __host:__ FQDN or IP address of the Papertrail endpoint.\n* __port:__ Port for the Papertrail log destination.\n* __hostname:__ The hostname associated with messages. (default: require('os').hostname())\n* __program:__ The facility to send log messages.. (default: default)\n* __logFormat:__ a log formatting function with the signature `function(level, message)`, which allows custom formatting of the level or message prior to delivery\n\n*Metadata:* Logged as a native JSON object to the 'meta' attribute of the item.\n\n### Cassandra Transport\n\n[winston-cassandra][24] is a Cassandra transport:\n\n``` js\n var Cassandra = require('winston-cassandra').Cassandra;\n winston.add(Cassandra, options);\n```\n\nThe Cassandra transport connects to a cluster using the native protocol with the following options:\n\n* __level:__ Level of messages that this transport should log (default: `'info'`).\n* __table:__ The name of the Cassandra column family you want to store log messages in (default: `'logs'`).\n* __partitionBy:__ How you want the logs to be partitioned. Possible values `'hour'` and `'day'`(Default).\n* __consistency:__ The consistency of the insert query (default: `quorum`).\n\nIn addition to the options accepted by the [Node.js Cassandra driver](https://github.com/jorgebay/node-cassandra-cql) Client.\n\n* __hosts:__ Cluster nodes that will handle the write requests:\nArray of strings containing the hosts, for example `['host1', 'host2']` (required).\n* __keyspace:__ The name of the keyspace that will contain the logs table (required). The keyspace should be already created in the cluster.\n\n### Adding Custom Transports\nAdding a custom transport (say for one of the datastore on the Roadmap) is actually pretty easy. All you need to do is accept a couple of options, set a name, implement a log() method, and add it to the set of transports exposed by winston.\n\n``` js\n var util = require('util'),\n winston = require('winston');\n\n var CustomLogger = winston.transports.CustomerLogger = function (options) {\n //\n // Name this logger\n //\n this.name = 'customLogger';\n\n //\n // Set the level from your options\n //\n this.level = options.level || 'info';\n\n //\n // Configure your storage backing as you see fit\n //\n };\n\n //\n // Inherit from `winston.Transport` so you can take advantage\n // of the base functionality and `.handleExceptions()`.\n //\n util.inherits(CustomLogger, winston.Transport);\n\n CustomLogger.prototype.log = function (level, msg, meta, callback) {\n //\n // Store this message and metadata, maybe use some custom logic\n // then callback indicating success.\n //\n callback(null, true);\n };\n```\n\n### Inspirations\n1. [npm][0]\n2. [log.js][4]\n3. [socket.io][5]\n4. [node-rlog][6]\n5. [BigBrother][7]\n6. [Loggly][8]\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing winston\n```\n [sudo] npm install winston\n```\n\n## Run Tests\nAll of the winston tests are written in [vows][9], and designed to be run with npm. \n\n``` bash\n $ npm test\n```\n\n#### Author: [Charlie Robbins](http://twitter.com/indexzero)\n#### Contributors: [Matthew Bergman](http://github.com/fotoverite), [Marak Squires](http://github.com/marak)\n\n[0]: https://github.com/npm/npmlog/blob/master/log.js\n[1]: http://nodejs.org/docs/v0.3.5/api/events.html#events.EventEmitter\n[2]: http://github.com/nodejitsu/require-analyzer\n[3]: http://nodejitsu.com\n[4]: https://github.com/visionmedia/log.js\n[5]: http://socket.io\n[6]: https://github.com/jbrisbin/node-rlog\n[7]: https://github.com/feisty/BigBrother\n[8]: http://loggly.com\n[9]: http://vowsjs.org\n[10]: http://nodejs.org/api/util.html#util_util_format_format\n[14]: http://nodejs.org/api/stream.html#stream_class_stream_writable\n[16]: https://github.com/indexzero/winston-mongodb\n[17]: https://github.com/indexzero/winston-riak\n[18]: https://github.com/appsattic/winston-simpledb\n[19]: https://github.com/wavded/winston-mail\n[21]: https://github.com/jesseditson/winston-sns\n[22]: https://github.com/flite/winston-graylog2\n[23]: https://github.com/kenperkins/winston-papertrail\n[24]: https://github.com/jorgebay/winston-cassandra\n", - "readmeFilename": "README.md", + "gitHead": "5ff2673ea37f0122436248968f1e886a14f42c77", "bugs": { "url": "https://github.com/flatiron/winston/issues" }, - "homepage": "https://github.com/flatiron/winston#readme", + "homepage": "https://github.com/flatiron/winston", "_id": "winston@0.8.0", "_shasum": "61d0830fa699706212206b0a2b5ca69a93043668", - "_resolved": "https://registry.npmjs.org/winston/-/winston-0.8.0.tgz", - "_from": "winston@0.8.0" + "_from": "winston@0.8.0", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + }, + "dist": { + "shasum": "61d0830fa699706212206b0a2b5ca69a93043668", + "tarball": "http://registry.npmjs.org/winston/-/winston-0.8.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/winston/-/winston-0.8.0.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/package.json index bc27e1e..904fd63 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/package.json @@ -7,22 +7,22 @@ }, "version": "0.3.6", "maintainers": [ - { - "name": "AvianFlu", - "email": "avianflu@nodejitsu.com" - }, { "name": "indexzero", - "email": "charlie@nodejitsu.com" + "email": "charlie.robbins@gmail.com" }, { - "name": "Marak", - "email": "marak@nodejitsu.com" + "name": "mmalecki", + "email": "me@mmalecki.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" } ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/flatiron/broadway.git" + "url": "http://github.com/flatiron/broadway.git" }, "dependencies": { "cliff": "0.1.9", @@ -43,14 +43,23 @@ "engines": { "node": ">= 0.6.4" }, - "readme": "# broadway [![Build Status](https://secure.travis-ci.org/flatiron/broadway.png)](http://travis-ci.org/flatiron/broadway)\n\n*Lightweight application extensibility and composition with a twist of feature\nreflection.*\n\n## Example\n\n### app.js\n```js\nvar broadway = require(\"broadway\");\n\nvar app = new broadway.App();\n\n// Passes the second argument to `helloworld.attach`.\napp.use(require(\"./plugins/helloworld\"), { \"delimiter\": \"!\" } );\n\napp.init(function (err) {\n if (err) {\n console.log(err);\n }\n});\n\napp.hello(\"world\");\n```\n\n### plugins/helloworld.js\n\n```js\n// `exports.attach` gets called by broadway on `app.use`\nexports.attach = function (options) {\n\n this.hello = function (world) {\n console.log(\"Hello \"+ world + options.delimiter || \".\");\n };\n\n};\n\n// `exports.init` gets called by broadway on `app.init`.\nexports.init = function (done) {\n\n // This plugin doesn't require any initialization step.\n return done();\n\n};\n```\n\n### run it!\n\n```bash\njosh@onix:~/dev/broadway/examples$ node simple/app.js \nHello world!\njosh@onix:~/dev/broadway/examples$ \n```\n\n## Installation\n\n### Installing npm (node package manager)\n``` bash\n $ curl http://npmjs.org/install.sh | sh\n```\n\n### Installing broadway\n``` bash \n $ [sudo] npm install broadway\n```\n\n## API\n\n### App#init(callback)\n\nInitialize application and it's plugins, `callback` will be called with null or\ninitialization error as first argument.\n\n### App#use(plugin, options)\n\nAttach plugin to application. `plugin` should conform to following interface:\n\n```javascript\nvar plugin = {\n \"name\": \"example-plugin\", // Plugin's name\n\n \"attach\": function attach(options) {\n // Called with plugin options once plugin attached to application\n // `this` - is a reference to application\n },\n\n \"detach\": function detach() {\n // Called when plugin detached from application\n // (Only if plugin with same name was attached)\n // `this` - is a reference to application\n },\n\n \"init\": function init(callback) {\n // Called on application initialization\n // App#init(callback) will be called once every plugin will call `callback`\n // `this` - is a reference to application\n }\n};\n```\n\n### App#on(event, callback) and App#emit(event, data)\n\nApp inherits from [EventEmitter2][2], and many plugins build on this\nfunctionality.\n\n#### Built-In Events:\n\n* `error:init`: Broadway emits this event when it throws an error while attempting to initialize.\n\nRead the [EventEmitter2][2] documentation for more information.\n\n## Tests\nAll tests are written with [vows][0] and should be run with [npm][1]:\n\n``` bash\n $ npm test\n```\n\n#### [Charlie Robbins](http://nodejitsu.com)\n#### License: MIT\n\n[0]: http://vowsjs.org\n[1]: http://npmjs.org\n[2]: https://github.com/hij1nx/EventEmitter2\n", - "readmeFilename": "README.md", + "gitHead": "d293e467b2364b2432259f8c21df0c6bf1206762", "bugs": { "url": "https://github.com/flatiron/broadway/issues" }, - "homepage": "https://github.com/flatiron/broadway#readme", + "homepage": "https://github.com/flatiron/broadway", "_id": "broadway@0.3.6", "_shasum": "7dbef068b954b7907925fd544963b578a902ba7a", - "_resolved": "https://registry.npmjs.org/broadway/-/broadway-0.3.6.tgz", - "_from": "broadway@>=0.3.2 <0.4.0" + "_from": "broadway@~0.3.6", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + }, + "dist": { + "shasum": "7dbef068b954b7907925fd544963b578a902ba7a", + "tarball": "http://registry.npmjs.org/broadway/-/broadway-0.3.6.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/broadway/-/broadway-0.3.6.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/CHANGELOG.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/CHANGELOG.md index c33cf67..d7b0344 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/CHANGELOG.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/CHANGELOG.md @@ -1,3 +1,24 @@ +# Chokidar 1.4.2 (Dec 30, 2015) +* Now correctly emitting `stats` with `awaitWriteFinish` option. + +# Chokidar 1.4.1 (Dec 9, 2015) +* The watcher could now be correctly subclassed with ES6 class syntax. + +# Chokidar 1.4.0 (3 December 2015) +* Add `.getWatched()` method, exposing all file system entries being watched +* Apply `awaitWriteFinish` methodology to `change` events (in addition to `add`) +* Fix handling of symlinks within glob paths (#293) +* Fix `addDir` and `unlinkDir` events under globs (#337, #401) +* Fix issues with `.unwatch()` (#374, #403) + +# Chokidar 1.3.0 (18 November 2015) +* Improve `awaitWriteFinish` option behavior +* Fix some `cwd` option behavior on Windows +* `awaitWriteFinish` and `cwd` are now compatible +* Fix some race conditions. +* #379: Recreating deleted directory doesn't trigger event +* When adding a previously-deleted file, emit 'add', not 'change' + # Chokidar 1.2.0 (1 October 2015) * Allow nested arrays of paths to be provided to `.watch()` and `.add()` * Add `awaitWriteFinish` option diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/README.md index 074f235..5fd9d6f 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/README.md @@ -1,6 +1,6 @@ # Chokidar [![Mac/Linux Build Status](https://img.shields.io/travis/paulmillr/chokidar/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/paulmillr/chokidar) [![Windows Build status](https://img.shields.io/appveyor/ci/es128/chokidar/master.svg?label=Windows)](https://ci.appveyor.com/project/es128/chokidar/branch/master) [![Coverage Status](https://coveralls.io/repos/paulmillr/chokidar/badge.svg)](https://coveralls.io/r/paulmillr/chokidar) [![Join the chat at https://gitter.im/paulmillr/chokidar](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/paulmillr/chokidar?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -A neat wrapper around node.js fs.watch / fs.watchFile / fsevents. +> A neat wrapper around node.js fs.watch / fs.watchFile / fsevents. [![NPM](https://nodei.co/npm-dl/chokidar.png)](https://nodei.co/npm/chokidar/) [![NPM](https://nodei.co/npm/chokidar.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/chokidar/) @@ -25,15 +25,14 @@ Node.js `fs.watchFile`: Chokidar resolves these problems. -It is used in -[brunch](http://brunch.io), +Initially made for [brunch](http://brunch.io) (an ultra-swift web app build tool), it is now used in +[gulp](https://github.com/gulpjs/gulp/), [karma](http://karma-runner.github.io), [PM2](https://github.com/Unitech/PM2), [browserify](http://browserify.org/), [webpack](http://webpack.github.io/), [BrowserSync](http://www.browsersync.io/), -[socketstream](http://www.socketstream.org), -[derby](http://derbyjs.com/), +[Microsoft's Visual Studio Code](https://github.com/microsoft/vscode), and [many others](https://www.npmjs.org/browse/depended/chokidar/). It has proven itself in production environments. @@ -64,48 +63,55 @@ Then `require` and use it in your code: var chokidar = require('chokidar'); // One-liner for current directory, ignores .dotfiles -chokidar.watch('.', {ignored: /[\/\\]\./}).on('all', function(event, path) { +chokidar.watch('.', {ignored: /[\/\\]\./}).on('all', (event, path) => { console.log(event, path); }); +``` - +```javascript // Example of a more typical implementation structure: -// Initialize watcher -var watcher = chokidar.watch('file, dir, or glob', { +// Initialize watcher. +var watcher = chokidar.watch('file, dir, glob, or array', { ignored: /[\/\\]\./, persistent: true }); -// something to use when events are received +// Something to use when events are received. var log = console.log.bind(console); - -// Add event listeners +// Add event listeners. watcher - .on('add', function(path) { log('File', path, 'has been added'); }) - .on('change', function(path) { log('File', path, 'has been changed'); }) - .on('unlink', function(path) { log('File', path, 'has been removed'); }) - // More events. - .on('addDir', function(path) { log('Directory', path, 'has been added'); }) - .on('unlinkDir', function(path) { log('Directory', path, 'has been removed'); }) - .on('error', function(error) { log('Error happened', error); }) - .on('ready', function() { log('Initial scan complete. Ready for changes.'); }) - .on('raw', function(event, path, details) { log('Raw event info:', event, path, details); }) + .on('add', path => log(`File ${path} has been added`)) + .on('change', path => log(`File ${path} has been changed`)) + .on('unlink', path => log(`File ${path} has been removed`)); + +// More possible events. +watcher + .on('addDir', path => log(`Directory ${path} has been added`)) + .on('unlinkDir', path => log(`Directory ${path} has been removed`)) + .on('error', error => log(`Watcher error: ${error}`)) + .on('ready', () => log('Initial scan complete. Ready for changes')) + .on('raw', (event, path, details) => { + log('Raw event info:', event, path, details); + }); // 'add', 'addDir' and 'change' events also receive stat() results as second // argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats -watcher.on('change', function(path, stats) { - if (stats) console.log('File', path, 'changed size to', stats.size); +watcher.on('change', (path, stats) => { + if (stats) console.log(`File ${path} changed size to ${stats.size}`); }); // Watch new files. watcher.add('new-file'); watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); +// Get list of actual paths being watched on the filesystem +var watchedPaths = watcher.getWatched(); + // Un-watch some files. watcher.unwatch('new-file*'); -// Only needed if watching is `persistent: true`. +// Stop watching. watcher.close(); // Full list of options. See below for descriptions. (do not use this example) @@ -135,8 +141,11 @@ chokidar.watch('file', { ## API -`chokidar.watch(paths, options)` — takes one or more paths (which may be paths -to files, dirs to be watched recursively, or glob patterns) and options: +`chokidar.watch(paths, [options])` + +* `paths` (string or array of strings). Paths to files, dirs to be watched +recursively, or glob patterns. +* `options` (object) Options object as defined below: #### Persistence @@ -154,8 +163,8 @@ gets called twice per path - once with a single argument (the path), second time with two arguments (the path and the [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). -* `ignoreInitial` (default: `false`). Indicates whether chokidar -should ignore the initial `add` events or not. +* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while +instantiating the watching as chokidar discovers these file paths (before the `ready` event). * `followSymlinks` (default: `true`). When `false`, only the symlinks themselves will be watched for changes instead of following the link references and bubbling events through the link's path. @@ -190,14 +199,14 @@ subdirectories will be traversed. * `awaitWriteFinish` (default: `false`). By default, the `add` event will fire when a file first appear on disk, before the entire file has been written. Furthermore, in some cases some `change` -events will be emitted while the file is being written. -In some cases, especially when watching for large files there will be a need to -wait for the write operation to finish before responding to the file creation. -Setting `awaitWriteFinish` to `true` (or a truthy value) will poll a newly -created file size, holding its `add` and `change` events until the size does not -change for a configurable amount of time. The appropriate duration setting is -heavily dependent on the OS and hardware. For accurate detection this parameter -should be relatively high, making file watching much less responsive. +events will be emitted while the file is being written. In some cases, +especially when watching for large files there will be a need to wait for the +write operation to finish before responding to a file creation or modification. +Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size, +holding its `add` and `change` events until the size does not change for a +configurable amount of time. The appropriate duration setting is heavily +dependent on the OS and hardware. For accurate detection this parameter should +be relatively high, making file watching much less responsive. Use with caution. * *`options.awaitWriteFinish` can be set to an object in order to adjust timing params:* @@ -227,6 +236,10 @@ name and path for every event other than `ready`, `raw`, and `error`. * `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns. Takes an array of strings or just one string. * `.close()`: Removes all listeners from watched files. +* `.getWatched()`: Returns an object representing all the paths on the file +system being watched by this `FSWatcher` instance. The object's keys are all the +directories (using absolute paths unless the `cwd` option was used), and the +values are arrays of the names of the items contained in each directory. ## CLI @@ -251,7 +264,7 @@ execute a command on each change, or get a stdio stream of change events. ## License The MIT license. -Copyright (c) 2012 - 2015 Paul Miller (http://paulmillr.com) & Elan Shanker +Copyright (c) 2012 - 2015 Paul Miller [paulmillr.com](http://paulmillr.com) & Elan Shanker Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/index.js index 2066920..3b94331 100755 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/index.js @@ -2,17 +2,38 @@ var EventEmitter = require('events').EventEmitter; var fs = require('fs'); var sysPath = require('path'); -var each = require('async-each'); +var asyncEach = require('async-each'); var anymatch = require('anymatch'); -var globparent = require('glob-parent'); -var isglob = require('is-glob'); -var arrify = require('arrify'); +var globParent = require('glob-parent'); +var isGlob = require('is-glob'); var isAbsolute = require('path-is-absolute'); -var flatten = require('lodash.flatten'); +var inherits = require('inherits'); var NodeFsHandler = require('./lib/nodefs-handler'); var FsEventsHandler = require('./lib/fsevents-handler'); +var arrify = function(value) { + if (value == null) return []; + return Array.isArray(value) ? value : [value]; +}; + +var flatten = function(list, result) { + if (result == null) result = []; + list.forEach(function(item) { + if (Array.isArray(item)) { + flatten(item, result); + } else { + result.push(item); + } + }); + return result; +}; + +// Little isString util for use in Array#every. +var isString = function(thing) { + return typeof thing === 'string'; +}; + // Public: Main class. // Watches files & directories for changes. // @@ -31,6 +52,7 @@ var FsEventsHandler = require('./lib/fsevents-handler'); // .on('all', function(event, path) {console.log(path, ' emitted ', event);}) // function FSWatcher(_opts) { + EventEmitter.call(this); var opts = {}; // in case _opts that is passed in is a frozen object if (_opts) for (var opt in _opts) opts[opt] = _opts[opt]; @@ -83,6 +105,7 @@ function FSWatcher(_opts) { this._pendingWrites = Object.create(null); } + if (opts.ignored) opts.ignored = arrify(opts.ignored); this._isntIgnored = function(path, stat) { return !this._isIgnored(path, stat); @@ -92,6 +115,7 @@ function FSWatcher(_opts) { this._emitReady = function() { if (++readyCalls >= this._readyCount) { this._emitReady = Function.prototype; + this._readyEmitted = true; // use process.nextTick to allow time for listener to be bound process.nextTick(this.emit.bind(this, 'ready')); } @@ -103,7 +127,7 @@ function FSWatcher(_opts) { Object.freeze(opts); } -FSWatcher.prototype = Object.create(EventEmitter.prototype); +inherits(FSWatcher, EventEmitter); // Common helpers // -------------- @@ -143,28 +167,37 @@ FSWatcher.prototype._emit = function(event, path, val1, val2, val3) { } } - if (event === 'change') { - if (!this._throttle('change', path, 50)) return this; - } - var emitEvent = function() { this.emit.apply(this, args); if (event !== 'error') this.emit.apply(this, ['all'].concat(args)); }.bind(this); - if (awf && event === 'add') { - this._awaitWriteFinish(path, awf.stabilityThreshold, function(err, stats) { + if (awf && (event === 'add' || event === 'change') && this._readyEmitted) { + var awfEmit = function(err, stats) { if (err) { event = args[0] = 'error'; args[1] = err; emitEvent(); } else if (stats) { // if stats doesn't exist the file must have been deleted - args.push(stats); + if (args.length > 2) { + args[2] = stats; + } else { + args.push(stats); + } emitEvent(); } - }); - } else if ( + }; + + this._awaitWriteFinish(path, awf.stabilityThreshold, awfEmit); + return this; + } + + if (event === 'change') { + if (!this._throttle('change', path, 50)) return this; + } + + if ( this.options.alwaysStat && val1 === undefined && (event === 'add' || event === 'addDir' || event === 'change') ) { @@ -226,52 +259,58 @@ FSWatcher.prototype._throttle = function(action, path, timeout) { // * path - string, path being acted upon // * threshold - int, time in milliseconds a file size must be fixed before // acknowledgeing write operation is finished -// * callback - function, callback to call when write operation is finished +// * awfEmit - function, to be called when ready for event to be emitted // Polls a newly created file for size variations. When files size does not // change for 'threshold' milliseconds calls callback. -FSWatcher.prototype._awaitWriteFinish = function(path, threshold, callback) { +FSWatcher.prototype._awaitWriteFinish = function(path, threshold, awfEmit) { var timeoutHandler; - (function awaitWriteFinish (prevStat) { - fs.stat(path, function(err, curStat) { + var fullPath = path; + if (this.options.cwd && !isAbsolute(path)) { + fullPath = sysPath.join(this.options.cwd, path); + } + + var now = new Date(); + + var awaitWriteFinish = (function (prevStat) { + fs.stat(fullPath, function(err, curStat) { if (err) { - // if the file have been erased, the file entry in _pendingWrites will - // be deleted in the unlink event. - if (err.code == 'ENOENT') return; - return callback(err); + if (err.code !== 'ENOENT') awfEmit(err); + return; } var now = new Date(); - if (this._pendingWrites[path] === undefined) { - this._pendingWrites[path] = { - creationTime: now, - cancelWait: function() { - delete this._pendingWrites[path]; - clearTimeout(timeoutHandler); - return callback(); - }.bind(this) - } - return timeoutHandler = setTimeout( - awaitWriteFinish.bind(this, curStat), - this.options.awaitWriteFinish.pollInterval - ); + + if (prevStat && curStat.size != prevStat.size) { + this._pendingWrites[path].lastChange = now; } - if ( - curStat.size == prevStat.size && - now - this._pendingWrites[path].creationTime > threshold - ) { + if (now - this._pendingWrites[path].lastChange >= threshold) { delete this._pendingWrites[path]; - callback(null, curStat); + awfEmit(null, curStat); } else { - return timeoutHandler = setTimeout( + timeoutHandler = setTimeout( awaitWriteFinish.bind(this, curStat), this.options.awaitWriteFinish.pollInterval ); } }.bind(this)); - }.bind(this))(); -} + }.bind(this)); + + if (!(path in this._pendingWrites)) { + this._pendingWrites[path] = { + lastChange: now, + cancelWait: function() { + delete this._pendingWrites[path]; + clearTimeout(timeoutHandler); + }.bind(this) + }; + timeoutHandler = setTimeout( + awaitWriteFinish.bind(this), + this.options.awaitWriteFinish.pollInterval + ); + } +}; // Private method: Determines whether user has asked to ignore this path // @@ -279,30 +318,27 @@ FSWatcher.prototype._awaitWriteFinish = function(path, threshold, callback) { // * stats - object, result of fs.stat // // Returns boolean +var dotRe = /\..*\.(sw[px])$|\~$|\.subl.*\.tmp/; FSWatcher.prototype._isIgnored = function(path, stats) { - if ( - this.options.atomic && - /\..*\.(sw[px])$|\~$|\.subl.*\.tmp/.test(path) - ) return true; + if (this.options.atomic && dotRe.test(path)) return true; if (!this._userIgnored) { var cwd = this.options.cwd; var ignored = this.options.ignored; if (cwd && ignored) { - ignored = arrify(ignored).map(function (path) { + ignored = ignored.map(function (path) { if (typeof path !== 'string') return path; return isAbsolute(path) ? path : sysPath.join(cwd, path); }); } - this._userIgnored = anymatch(this._globIgnored - .concat(ignored) - .concat(arrify(ignored) - .filter(function(path) { - return typeof path === 'string' && !isglob(path); - }).map(function(path) { - return path + '/**/*'; - }) - ) + var paths = arrify(ignored) + .filter(function(path) { + return typeof path === 'string' && !isGlob(path); + }).map(function(path) { + return path + '/**'; + }); + this._userIgnored = anymatch( + this._globIgnored.concat(ignored).concat(paths) ); } @@ -316,19 +352,43 @@ FSWatcher.prototype._isIgnored = function(path, stats) { // * depth - int, at any depth > 0, this isn't a glob // // Returns object containing helpers for this path +var replacerRe = /^\.[\/\\]/; FSWatcher.prototype._getWatchHelpers = function(path, depth) { - path = path.replace(/^\.[\/\\]/, ''); - var watchPath = depth || !isglob(path) ? path : globparent(path); + path = path.replace(replacerRe, ''); + var watchPath = depth || !isGlob(path) ? path : globParent(path); + var fullWatchPath = sysPath.resolve(watchPath); var hasGlob = watchPath !== path; var globFilter = hasGlob ? anymatch(path) : false; + var follow = this.options.followSymlinks; + var globSymlink = hasGlob && follow ? null : false; + + var checkGlobSymlink = function(entry) { + // only need to resolve once + // first entry should always have entry.parentDir === '' + if (globSymlink == null) { + globSymlink = entry.fullParentDir === fullWatchPath ? false : { + realPath: entry.fullParentDir, + linkPath: fullWatchPath + }; + } + + if (globSymlink) { + return entry.fullPath.replace(globSymlink.realPath, globSymlink.linkPath); + } + + return entry.fullPath; + }; var entryPath = function(entry) { - return sysPath.join(watchPath, sysPath.relative(watchPath, entry.fullPath)); - } + return sysPath.join(watchPath, + sysPath.relative(watchPath, checkGlobSymlink(entry)) + ); + }; var filterPath = function(entry) { - return (!hasGlob || globFilter(entryPath(entry))) && - this._isntIgnored(entryPath(entry), entry.stat) && + var resolvedPath = entryPath(entry); + return (!hasGlob || globFilter(resolvedPath)) && + this._isntIgnored(resolvedPath, entry.stat) && (this.options.ignorePermissionErrors || this._hasReadPermissions(entry.stat)); }.bind(this); @@ -337,15 +397,17 @@ FSWatcher.prototype._getWatchHelpers = function(path, depth) { if (!hasGlob) return false; var parts = sysPath.relative(watchPath, path).split(/[\/\\]/); return parts; - } + }; + var dirParts = getDirParts(path); if (dirParts && dirParts.length > 1) dirParts.pop(); + var unmatchedGlob; var filterDir = function(entry) { if (hasGlob) { - var entryParts = getDirParts(entry.fullPath); + var entryParts = getDirParts(checkGlobSymlink(entry)); var globstar = false; - var unmatchedGlob = !dirParts.every(function(part, i) { + unmatchedGlob = !dirParts.every(function(part, i) { if (part === '**') globstar = true; return globstar || !entryParts[i] || anymatch(part, entryParts[i]); }); @@ -354,8 +416,8 @@ FSWatcher.prototype._getWatchHelpers = function(path, depth) { }.bind(this); return { - followSymlinks: this.options.followSymlinks, - statMethod: this.options.followSymlinks ? 'stat' : 'lstat', + followSymlinks: follow, + statMethod: follow ? 'stat' : 'lstat', path: path, watchPath: watchPath, entryPath: entryPath, @@ -364,7 +426,7 @@ FSWatcher.prototype._getWatchHelpers = function(path, depth) { filterPath: filterPath, filterDir: filterDir }; -} +}; // Directory helpers // ----------------- @@ -379,7 +441,9 @@ FSWatcher.prototype._getWatchedDir = function(directory) { var watcherRemove = this._remove.bind(this); if (!(dir in this._watched)) this._watched[dir] = { _items: Object.create(null), - add: function(item) {this._items[item] = true;}, + add: function(item) { + if (item !== '.') this._items[item] = true; + }, remove: function(item) { delete this._items[item]; if (!this.children().length) { @@ -459,8 +523,20 @@ FSWatcher.prototype._remove = function(directory, item) { delete this._watched[fullPath]; var eventName = isDirectory ? 'unlinkDir' : 'unlink'; if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); + + // Avoid conflicts if we later create another file with the same name + if (!this.options.useFsEvents) { + this._closePath(path); + } }; +FSWatcher.prototype._closePath = function(path) { + if (!this._closers[path]) return; + this._closers[path](); + delete this._closers[path]; + this._getWatchedDir(sysPath.dirname(path)).remove(sysPath.basename(path)); +} + // Public method: Adds paths to be watched on an existing FSWatcher instance // * paths - string or array of strings, file/directory paths and/or globs @@ -474,7 +550,7 @@ FSWatcher.prototype.add = function(paths, _origAdd, _internal) { paths = flatten(arrify(paths)); if (!paths.every(isString)) { - throw new TypeError('Non-string provided as watch path'); + throw new TypeError('Non-string provided as watch path: ' + paths); } if (cwd) paths = paths.map(function(path) { @@ -489,11 +565,12 @@ FSWatcher.prototype.add = function(paths, _origAdd, _internal) { // set aside negated glob strings paths = paths.filter(function(path) { - if (path[0] === '!') this._ignoredPaths[path.substring(1)] = true; - else { + if (path[0] === '!') { + this._ignoredPaths[path.substring(1)] = true; + } else { // if a path is being added that was previously ignored, stop ignoring it delete this._ignoredPaths[path]; - delete this._ignoredPaths[path + '/**/*']; + delete this._ignoredPaths[path + '/**']; // reset the cached userIgnored anymatch fn // to make ignoredPaths changes effective @@ -510,7 +587,7 @@ FSWatcher.prototype.add = function(paths, _origAdd, _internal) { } else { if (!this._readyCount) this._readyCount = 0; this._readyCount += paths.length; - each(paths, function(path, next) { + asyncEach(paths, function(path, next) { this._addToNodeFs(path, !_internal, 0, 0, _origAdd, function(err, res) { if (res) this._emitReady(); next(err, res); @@ -536,23 +613,22 @@ FSWatcher.prototype.unwatch = function(paths) { paths = flatten(arrify(paths)); paths.forEach(function(path) { - if (this._closers[path]) { - this._closers[path](); - delete this._closers[path]; - this._getWatchedDir(sysPath.dirname(path)).remove(sysPath.basename(path)); - } else { - //convert to absolute path + // convert to absolute path unless relative path already matches + if (!isAbsolute(path) && !this._closers[path]) { + if (this.options.cwd) path = sysPath.join(this.options.cwd, path); path = sysPath.resolve(path); - - this._ignoredPaths[path] = true; - if (path in this._watched) { - this._ignoredPaths[path + '/**/*'] = true; - } - - // reset the cached userIgnored anymatch fn - // to make ignoredPaths changes effective - this._userIgnored = null; } + + this._closePath(path); + + this._ignoredPaths[path] = true; + if (path in this._watched) { + this._ignoredPaths[path + '/**'] = true; + } + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = null; }, this); return this; @@ -575,6 +651,18 @@ FSWatcher.prototype.close = function() { return this; }; +// Public method: Expose list of watched paths + +// Returns object w/ dir paths as keys and arrays of contained paths as values. +FSWatcher.prototype.getWatched = function() { + var watchList = {}; + Object.keys(this._watched).forEach(function(dir) { + var key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; + watchList[key || '.'] = Object.keys(this._watched[dir]._items).sort(); + }.bind(this)); + return watchList; +}; + // Attach watch handler prototype methods function importHandler(handler) { Object.keys(handler.prototype).forEach(function(method) { @@ -584,11 +672,6 @@ function importHandler(handler) { importHandler(NodeFsHandler); if (FsEventsHandler.canUse()) importHandler(FsEventsHandler); -// little isString util for use in Array.prototype.every -function isString(maybeString) { - return typeof maybeString === 'string' -} - // Export FSWatcher class exports.FSWatcher = FSWatcher; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/fsevents-handler.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/fsevents-handler.js index f0b9dfe..9429753 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/fsevents-handler.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/fsevents-handler.js @@ -86,7 +86,7 @@ function setFSEventsListener(path, realPath, listener, rawEmitter) { watchContainer.watcher.stop(); delete FSEventsWatchers[watchPath]; } - } + }; } // returns boolean indicating whether fsevents can be used diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/nodefs-handler.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/nodefs-handler.js index 8f49bac..9d05b6f 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/nodefs-handler.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/nodefs-handler.js @@ -193,7 +193,7 @@ function setFsWatchFileListener(path, fullPath, options, handlers) { fs.unwatchFile(fullPath); delete FsWatchFileInstances[fullPath]; } - } + }; } // fake constructor for attaching nodefs-specific prototype methods that @@ -314,7 +314,7 @@ function(entry, directory, path, item) { // don't follow the same symlink more than once if (this._symlinkPaths[full]) return true; else this._symlinkPaths[full] = true; -} +}; // Private method: Read directory to add / remove files from `@watched` list // and re-read it on change. @@ -330,12 +330,14 @@ function(entry, directory, path, item) { // Returns close function for the watcher instance NodeFsHandler.prototype._handleDir = function(dir, stats, initialAdd, depth, target, wh, callback) { - if (!(initialAdd && this.options.ignoreInitial) && !target && !wh.hasGlob) { - this._emit('addDir', dir, stats); + var parentDir = this._getWatchedDir(sysPath.dirname(dir)); + var tracked = parentDir.has(sysPath.basename(dir)); + if (!(initialAdd && this.options.ignoreInitial) && !target && !tracked) { + if (!wh.hasGlob || wh.globFilter(dir)) this._emit('addDir', dir, stats); } - // ensure dir is tracked - this._getWatchedDir(sysPath.dirname(dir)).add(sysPath.basename(dir)); + // ensure dir is tracked (harmless if redundant) + parentDir.add(sysPath.basename(dir)); this._getWatchedDir(dir); var read = function(directory, initialAdd, done) { @@ -398,9 +400,11 @@ function(dir, stats, initialAdd, depth, target, wh, callback) { }.bind(this)).on('error', this._handleError.bind(this)); }.bind(this); + var closer; + if (this.options.depth == null || depth <= this.options.depth) { if (!target) read(dir, initialAdd, callback); - var closer = this._watchWithNodeFs(dir, function(dirPath, stats) { + closer = this._watchWithNodeFs(dir, function(dirPath, stats) { // if current directory is removed, do nothing if (stats && stats.mtime.getTime() === 0) return; @@ -434,6 +438,7 @@ function(path, initialAdd, priorWh, depth, target, callback) { var wh = this._getWatchHelpers(path, depth); if (!wh.hasGlob && priorWh) { wh.hasGlob = priorWh.hasGlob; + wh.globFilter = priorWh.globFilter; wh.filterPath = priorWh.filterPath; wh.filterDir = priorWh.filterDir; } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/index.js new file mode 100644 index 0000000..2a2fdee --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = function (val) { + if (val === null || val === undefined) { + return []; + } + + return Array.isArray(val) ? val : [val]; +}; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/license b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/package.json similarity index 56% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/package.json rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/package.json index 72391f0..52fcadb 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/arrify/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/package.json @@ -1,11 +1,11 @@ { "name": "arrify", - "version": "1.0.0", + "version": "1.0.1", "description": "Convert a value to an array", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/sindresorhus/arrify" + "url": "git+https://github.com/sindresorhus/arrify.git" }, "author": { "name": "Sindre Sorhus", @@ -16,7 +16,7 @@ "node": ">=0.10.0" }, "scripts": { - "test": "node test.js" + "test": "xo && ava" }, "files": [ "index.js" @@ -30,32 +30,33 @@ "value" ], "devDependencies": { - "ava": "0.0.4" + "ava": "*", + "xo": "*" }, - "gitHead": "4576e944677c722c356480b17a6d709d34d0733c", + "gitHead": "087edee1a58d5adaac6cae5a107886121ef43783", "bugs": { "url": "https://github.com/sindresorhus/arrify/issues" }, - "homepage": "https://github.com/sindresorhus/arrify", - "_id": "arrify@1.0.0", - "_shasum": "d6c361518250802fa2147ea7fb67597128cb8c81", - "_from": "arrify@>=1.0.0 <2.0.0", - "_npmVersion": "2.5.0", - "_nodeVersion": "0.12.0", + "homepage": "https://github.com/sindresorhus/arrify#readme", + "_id": "arrify@1.0.1", + "_shasum": "898508da2226f380df904728456849c1501a4b0d", + "_from": "arrify@^1.0.0", + "_npmVersion": "3.5.2", + "_nodeVersion": "4.2.1", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, + "dist": { + "shasum": "898508da2226f380df904728456849c1501a4b0d", + "tarball": "http://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], - "dist": { - "shasum": "d6c361518250802fa2147ea7fb67597128cb8c81", - "tarball": "http://registry.npmjs.org/arrify/-/arrify-1.0.0.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.0.tgz" + "_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/readme.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/readme.md new file mode 100644 index 0000000..183d075 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/arrify/readme.md @@ -0,0 +1,36 @@ +# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify) + +> Convert a value to an array + + +## Install + +``` +$ npm install --save arrify +``` + + +## Usage + +```js +const arrify = require('arrify'); + +arrify('unicorn'); +//=> ['unicorn'] + +arrify(['unicorn']); +//=> ['unicorn'] + +arrify(null); +//=> [] + +arrify(undefined); +//=> [] +``` + +*Supplying `null` or `undefined` results in an empty array.* + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/README.md index 7d13880..0c8cede 100755 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/README.md @@ -52,15 +52,15 @@ $ npm i micromatch --save * [Author](#author) * [License](#license) -_(Table of contents generated by [verb](https://github.com/assemble/verb))_ +_(Table of contents generated by [verb](https://github.com/verbose/verb))_ ## Features -Micromatch is [10-55x faster](#benchmarks) than [minimatch](https://github.com/isaacs/minimatch#readme), resulting from a combination of caching, tokenization, parsing, runtime compilation and regex optimization strategies. +Micromatch is [10-55x faster](#benchmarks) than [minimatch](https://github.com/isaacs/minimatch), resulting from a combination of caching, tokenization, parsing, runtime compilation and regex optimization strategies. -* [Drop-in replacement](#switch-from-minimatch) for [minimatch](https://github.com/isaacs/minimatch#readme) and [multimatch](https://github.com/sindresorhus/multimatch) +* [Drop-in replacement](#switch-from-minimatch) for [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) * Built-in support for multiple glob patterns, like `['foo/*.js', '!bar.js']` * Better support for the Bash 4.3 specification, and less buggy * Extensive [unit tests](./test) (approx. 1,300 tests). Minimatch fails many of the tests. @@ -106,7 +106,7 @@ mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.md', '*.txt']); Behavior; -* when the pattern is a string, [minimatch](https://github.com/isaacs/minimatch#readme) behavior is used, so patterns are **inclusive by default**. +* when the pattern is a string, [minimatch](https://github.com/isaacs/minimatch) behavior is used, so patterns are **inclusive by default**. * when an array of patterns is passed, [multimatch](https://github.com/sindresorhus/multimatch) behavior is used, so patterns are **exclusive by default** ```js @@ -322,7 +322,7 @@ Default: `undefined` on non-windows, `true` on windows. ### options.dot -Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme). +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch). Type: `{Boolean}` @@ -365,7 +365,7 @@ mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true, nodupes: true}); ### options.matchBase -Allow glob patterns without slashes to match a file path based on its basename. . Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme). +Allow glob patterns without slashes to match a file path based on its basename. . Same behavior as [minimatch](https://github.com/isaacs/minimatch). Type: `{Boolean}` @@ -383,7 +383,7 @@ mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); ### options.nobraces -Don't expand braces in glob patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme) `nobrace`. +Don't expand braces in glob patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) `nobrace`. Type: `{Boolean}` @@ -413,7 +413,7 @@ See [extglob](https://github.com/jonschlinkert/extglob) for more information abo ### options.nocase -Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme). +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). Type: `{Boolean}` @@ -421,7 +421,7 @@ Default: `false` ### options.nonull -If `true`, when no matches are found the actual (array-ified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme). +If `true`, when no matches are found the actual (array-ified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch). Type: `{Boolean}` @@ -516,60 +516,60 @@ Run the [benchmarks](./benchmark): node benchmark ``` -As of July 24, 2015: +As of October 03, 2015: ```bash #1: basename-braces - micromatch x 28,335 ops/sec ±0.49% (96 runs sampled) - minimatch x 3,496 ops/sec ±0.76% (98 runs sampled) + micromatch x 26,420 ops/sec ±0.89% (91 runs sampled) + minimatch x 3,507 ops/sec ±0.64% (97 runs sampled) #2: basename - micromatch x 28,602 ops/sec ±0.46% (96 runs sampled) - minimatch x 4,389 ops/sec ±0.38% (98 runs sampled) + micromatch x 25,315 ops/sec ±0.82% (93 runs sampled) + minimatch x 4,398 ops/sec ±0.86% (94 runs sampled) #3: braces-no-glob - micromatch x 405,445 ops/sec ±0.64% (91 runs sampled) - minimatch x 31,078 ops/sec ±0.45% (95 runs sampled) + micromatch x 341,254 ops/sec ±0.78% (93 runs sampled) + minimatch x 30,197 ops/sec ±1.12% (91 runs sampled) #4: braces - micromatch x 81,977 ops/sec ±0.36% (99 runs sampled) - minimatch x 2,986 ops/sec ±0.41% (100 runs sampled) + micromatch x 54,649 ops/sec ±0.74% (94 runs sampled) + minimatch x 3,095 ops/sec ±0.82% (95 runs sampled) #5: immediate - micromatch x 20,753 ops/sec ±0.36% (101 runs sampled) - minimatch x 4,233 ops/sec ±0.34% (100 runs sampled) + micromatch x 16,719 ops/sec ±0.79% (95 runs sampled) + minimatch x 4,348 ops/sec ±0.86% (96 runs sampled) #6: large - micromatch x 755 ops/sec ±0.53% (97 runs sampled) - minimatch x 17.06 ops/sec ±0.25% (46 runs sampled) + micromatch x 721 ops/sec ±0.77% (94 runs sampled) + minimatch x 17.73 ops/sec ±1.08% (50 runs sampled) #7: long - micromatch x 7,009 ops/sec ±0.33% (100 runs sampled) - minimatch x 592 ops/sec ±0.39% (96 runs sampled) + micromatch x 5,051 ops/sec ±0.87% (97 runs sampled) + minimatch x 628 ops/sec ±0.83% (94 runs sampled) #8: mid - micromatch x 60,071 ops/sec ±0.48% (97 runs sampled) - minimatch x 1,853 ops/sec ±0.72% (99 runs sampled) + micromatch x 51,280 ops/sec ±0.80% (95 runs sampled) + minimatch x 1,923 ops/sec ±0.84% (95 runs sampled) #9: multi-patterns - micromatch x 24,308 ops/sec ±0.67% (98 runs sampled) - minimatch x 2,169 ops/sec ±0.62% (96 runs sampled) + micromatch x 22,440 ops/sec ±0.97% (94 runs sampled) + minimatch x 2,481 ops/sec ±1.10% (94 runs sampled) #10: no-glob - micromatch x 552,116 ops/sec ±0.35% (96 runs sampled) - minimatch x 55,957 ops/sec ±0.32% (94 runs sampled) + micromatch x 722,823 ops/sec ±1.30% (87 runs sampled) + minimatch x 52,967 ops/sec ±1.09% (94 runs sampled) #11: range - micromatch x 321,030 ops/sec ±0.62% (95 runs sampled) - minimatch x 14,247 ops/sec ±0.59% (100 runs sampled) + micromatch x 243,471 ops/sec ±0.79% (94 runs sampled) + minimatch x 11,736 ops/sec ±0.82% (96 runs sampled) #12: shallow - micromatch x 253,455 ops/sec ±0.52% (99 runs sampled) - minimatch x 21,169 ops/sec ±0.54% (97 runs sampled) + micromatch x 190,874 ops/sec ±0.98% (95 runs sampled) + minimatch x 21,699 ops/sec ±0.81% (97 runs sampled) #13: short - micromatch x 661,874 ops/sec ±0.42% (96 runs sampled) - minimatch x 60,228 ops/sec ±0.45% (97 runs sampled) + micromatch x 496,393 ops/sec ±3.86% (90 runs sampled) + minimatch x 53,765 ops/sec ±0.75% (95 runs sampled) ``` ## Run tests @@ -582,20 +582,20 @@ $ npm i -d && npm test ## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/micromatch/issues/new) +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/micromatch/issues/new). Please be sure to run the benchmarks before/after any code changes to judge the impact before you do a PR. thanks! ## Related -* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete… [more](https://github.com/jonschlinkert/braces) -* [extglob](https://github.com/jonschlinkert/extglob): Convert extended globs to regex-compatible strings. Add (almost) the… [more](https://github.com/jonschlinkert/extglob) -* [expand-brackets](https://github.com/jonschlinkert/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. -* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers… [more](https://github.com/jonschlinkert/expand-range) -* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally… [more](https://github.com/jonschlinkert/fill-range) -* [gulp-micromatch](https://github.com/tunnckoCore/gulp-micromatch#readme): micromatch as gulp plugin. Filtering vinyl files with glob… [more](https://github.com/tunnckoCore/gulp-micromatch#readme) -* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a… [more](https://github.com/jonschlinkert/is-glob) -* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces) +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets) +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers… [more](https://www.npmjs.com/package/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range) +* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the… [more](https://www.npmjs.com/package/extglob) | [homepage](https://github.com/jonschlinkert/extglob) +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range) +* [gulp-micromatch](https://www.npmjs.com/package/gulp-micromatch): Filter vinyl files with glob patterns, string, regexp, array,… [more](https://www.npmjs.com/package/gulp-micromatch) | [homepage](https://github.com/tunnckocore/gulp-micromatch) +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) +* [parse-glob](https://www.npmjs.com/package/parse-glob): Parse a glob pattern into an object of tokens. | [homepage](https://github.com/jonschlinkert/parse-glob) ## Author @@ -611,6 +611,6 @@ Released under the MIT license. *** -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 24, 2015._ +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 03, 2015._ - + \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/index.js index 8cdd931..cbafd67 100755 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/index.js @@ -7,12 +7,6 @@ 'use strict'; -var diff = require('arr-diff'); -var typeOf = require('kind-of'); -var omit = require('object.omit'); -var unique = require('array-unique'); -var cache = require('regex-cache'); -var isGlob = require('is-glob'); var expand = require('./lib/expand'); var utils = require('./lib/utils'); @@ -43,13 +37,13 @@ function micromatch(files, patterns, opts) { while (len--) { var glob = patterns[i++]; - if (glob.charCodeAt(0) === 33 /* ! */) { + if (typeof glob === 'string' && glob.charCodeAt(0) === 33 /* ! */) { omit.push.apply(omit, match(files, glob.slice(1), opts)); } else { keep.push.apply(keep, match(files, glob, opts)); } } - return diff(keep, omit); + return utils.diff(keep, omit); } /** @@ -66,7 +60,7 @@ function micromatch(files, patterns, opts) { */ function match(files, pattern, opts) { - if (typeOf(files) !== 'string' && !Array.isArray(files)) { + if (utils.typeOf(files) !== 'string' && !Array.isArray(files)) { throw new Error(msg('match', 'files', 'a string or array')); } @@ -76,11 +70,17 @@ function match(files, pattern, opts) { var negate = opts.negate || false; var orig = pattern; - if (typeof pattern === 'string' && opts.nonegate !== true) { + if (typeof pattern === 'string') { negate = pattern.charAt(0) === '!'; if (negate) { pattern = pattern.slice(1); } + + // we need to remove the character regardless, + // so the above logic is still needed + if (opts.nonegate === true) { + negate = false; + } } var _isMatch = matcher(pattern, opts); @@ -106,17 +106,17 @@ function match(files, pattern, opts) { } // if `negate` was defined, diff negated files - if (negate) { res = diff(files, res); } + if (negate) { res = utils.diff(files, res); } // if `ignore` was defined, diff ignored filed if (opts.ignore && opts.ignore.length) { pattern = opts.ignore; - opts = omit(opts, ['ignore']); - res = diff(res, micromatch(res, pattern, opts)); + opts = utils.omit(opts, ['ignore']); + res = utils.diff(res, micromatch(res, pattern, opts)); } if (opts.nodupes) { - return unique(res); + return utils.unique(res); } return res; } @@ -143,14 +143,20 @@ function filter(patterns, opts) { } patterns = utils.arrayify(patterns); - return function (fp) { + var len = patterns.length, i = 0; + var patternMatchers = Array(len); + while (i < len) { + patternMatchers[i] = matcher(patterns[i++], opts); + } + + return function(fp) { if (fp == null) return []; - var len = patterns.length, i = 0; + var len = patternMatchers.length, i = 0; var res = true; fp = utils.unixify(fp, opts); while (i < len) { - var fn = matcher(patterns[i++], opts); + var fn = patternMatchers[i++]; if (!fn(fp)) { res = false; break; @@ -184,7 +190,7 @@ function isMatch(fp, pattern, opts) { } fp = utils.unixify(fp, opts); - if (typeOf(pattern) === 'object') { + if (utils.typeOf(pattern) === 'object') { return matcher(fp, pattern); } return matcher(pattern, opts)(fp); @@ -204,7 +210,7 @@ function contains(fp, pattern, opts) { opts.contains = (pattern !== ''); fp = utils.unixify(fp, opts); - if (opts.contains && !isGlob(pattern)) { + if (opts.contains && !utils.isGlob(pattern)) { return fp.indexOf(pattern) !== -1; } return matcher(pattern, opts)(fp); @@ -248,7 +254,7 @@ function any(fp, patterns, opts) { */ function matchKeys(obj, glob, options) { - if (typeOf(obj) !== 'object') { + if (utils.typeOf(obj) !== 'object') { throw new TypeError(msg('matchKeys', 'first argument', 'an object')); } @@ -284,11 +290,15 @@ function matcher(pattern, opts) { }; } + if (typeof pattern !== 'string') { + throw new TypeError(msg('matcher', 'pattern', 'a string, regex, or function')); + } + // strings, all the way down... pattern = utils.unixify(pattern, opts); // pattern is a non-glob string - if (!isGlob(pattern)) { + if (!utils.isGlob(pattern)) { return utils.matchPath(pattern, opts); } // pattern is a glob string @@ -318,10 +328,6 @@ function matcher(pattern, opts) { */ function toRegex(glob, options) { - if (typeOf(glob) !== 'string') { - throw new Error(msg('toRegex', 'glob', 'a string')); - } - // clone options to prevent mutating the original object var opts = Object.create(options || {}); var flags = opts.flags || ''; @@ -341,9 +347,12 @@ function toRegex(glob, options) { re = new RegExp(glob, flags); return re; } catch (err) { - var msg = 'micromatch invalid regex: (' + re + ')'; - if (opts.strict) throw new SyntaxError(msg + err); + err.reason = 'micromatch invalid regex: (' + re + ')'; + if (opts.strict) throw new SyntaxError(err); } + + // we're only here if a bad pattern was used and the user + // passed `options.silent`, so match nothing return /$^/; } @@ -366,12 +375,15 @@ function wrapGlob(glob, opts) { } /** - * Wrap `toRegex` to memoize the generated regex + * Wrap `toRegex` to memoize the generated regex when * the string and options don't change */ function makeRe(glob, opts) { - return cache(toRegex, glob, opts); + if (utils.typeOf(glob) !== 'string') { + throw new Error(msg('makeRe', 'glob', 'a string')); + } + return utils.cache(toRegex, glob, opts); } /** @@ -397,8 +409,9 @@ function msg(method, what, type) { * Public methods */ +/* eslint no-multi-spaces: 0 */ micromatch.any = any; -micromatch.braces = micromatch.braceExpand = require('braces'); +micromatch.braces = micromatch.braceExpand = utils.braces; micromatch.contains = contains; micromatch.expand = expand; micromatch.filter = filter; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/chars.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/chars.js index a9f7199..a1ffe37 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/chars.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/chars.js @@ -1,14 +1,14 @@ 'use strict'; -var reverse = function(object, prepender) { +var chars = {}, unesc, temp; + +function reverse(object, prepender) { return Object.keys(object).reduce(function(reversed, key) { var newKey = prepender ? prepender + key : key; // Optionally prepend a string to key. reversed[object[key]] = newKey; // Swap key and value. return reversed; // Return the result. }, {}); -}; - -var chars = {}; +} /** * Regex for common characters @@ -23,7 +23,7 @@ chars.escapeRegex = { '(': /\(/g, ')': /\)/g, '[': /\[/g, - ']': /\]/g, + ']': /\]/g }; /** @@ -40,14 +40,14 @@ chars.ESC = { '(': '__UNESC_LTPAREN__', ')': '__UNESC_RTPAREN__', '[': '__UNESC_LTBRACK__', - ']': '__UNESC_RTBRACK__', + ']': '__UNESC_RTBRACK__' }; /** * Unescape characters */ -chars.UNESC = reverse(chars.ESC, '\\'); +chars.UNESC = unesc || (unesc = reverse(chars.ESC, '\\')); chars.ESC_TEMP = { '?': '__TEMP_QMRK__', @@ -59,9 +59,9 @@ chars.ESC_TEMP = { '(': '__TEMP_LTPAREN__', ')': '__TEMP_RTPAREN__', '[': '__TEMP_LTBRACK__', - ']': '__TEMP_RTBRACK__', + ']': '__TEMP_RTBRACK__' }; -chars.TEMP = reverse(chars.ESC_TEMP); +chars.TEMP = temp || (temp = reverse(chars.ESC_TEMP)); module.exports = chars; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/expand.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/expand.js index 40d8ac4..a8c95ae 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/expand.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/expand.js @@ -34,13 +34,16 @@ function expand(pattern, options) { var glob = new Glob(pattern, options || {}); var opts = glob.options; - if (typeof opts.braces !== 'boolean' && typeof opts.nobraces !== 'boolean') { - opts.braces = true; + if (!utils.isGlob(pattern)) { + glob.pattern = glob.pattern.replace(/([\/.])/g, '\\$1'); + return glob; } - // return early if glob pattern matches special patterns - if (specialCase(pattern) && opts.safemode) { - return new RegExp(utils.escapeRe(pattern), 'g'); + glob.pattern = glob.pattern.replace(/(\+)(?!\()/g, '\\$1'); + glob.pattern = glob.pattern.split('$').join('\\$'); + + if (typeof opts.braces !== 'boolean' && typeof opts.nobraces !== 'boolean') { + opts.braces = true; } if (glob.pattern === '.*') { @@ -51,14 +54,6 @@ function expand(pattern, options) { }; } - if (glob.pattern === '.') { - return { - pattern: '\\.', - tokens: tok, - options: opts - }; - } - if (glob.pattern === '*') { return { pattern: oneStar(opts.dot), @@ -102,13 +97,6 @@ function expand(pattern, options) { * Extended globs */ - // expand brackets, e.g `[[:alpha:]]` - glob.track('before brackets'); - if (tok.is.brackets) { - glob.brackets(); - } - glob.track('after brackets'); - // expand braces, e.g `{1..5}` glob.track('before braces'); if (tok.is.braces) { @@ -123,10 +111,17 @@ function expand(pattern, options) { } glob.track('after extglob'); + // expand brackets, e.g `[[:alpha:]]` + glob.track('before brackets'); + if (tok.is.brackets) { + glob.brackets(); + } + glob.track('after brackets'); + // special patterns glob._replace('[!', '[^'); glob._replace('(?', '(%~'); - glob._replace('[]', '\\[\\]'); + glob._replace(/\[\]/, '\\[\\]'); glob._replace('/[', '/' + (opts.dot ? dotfiles : nodot) + '[', true); glob._replace('/?', '/' + (opts.dot ? dotfiles : nodot) + '[^/]', true); glob._replace('/.', '/(?=.)\\.', true); @@ -140,11 +135,11 @@ function expand(pattern, options) { } if (opts.globstar !== false && glob.pattern === '**') { - glob.pattern = globstar(opts.dot); + glob.pattern = globstar(opts.dot); } else { // '/*/*/*' => '(?:/*){3}' - glob._replace(/(\/\*)+/g, function (match) { + glob._replace(/(\/\*)+/g, function(match) { var len = match.length / 2; if (len === 1) { return match; } return '(?:\\/*){' + len + '}'; @@ -157,6 +152,7 @@ function expand(pattern, options) { if (tok.is.globstar) { glob.pattern = collapse(glob.pattern, '/**'); glob.pattern = collapse(glob.pattern, '**/'); + glob._replace('/**/', '(?:/' + globstar(opts.dot) + '/|/)', true); glob._replace(/\*{2,}/g, '**'); // 'foo/*' @@ -184,7 +180,7 @@ function expand(pattern, options) { glob._replace('?.', '?\\.', true); glob._replace('?:', '?:', true); - glob._replace(/\?+/g, function (match) { + glob._replace(/\?+/g, function(match) { var len = match.length; if (len === 1) { return qmark; @@ -213,9 +209,7 @@ function expand(pattern, options) { glob._replace('[^\\/]', qmark); if (glob.pattern.length > 1) { - if (glob.pattern.indexOf('\\/') === 0 && glob.pattern.indexOf('\\/' + nodot) !== 0) { - glob.pattern = '\\/' + nodot + glob.pattern.slice(2); - } else if (/^[\[?*]/.test(glob.pattern)) { + if (/^[\[?*]/.test(glob.pattern)) { // only prepend the string if we don't want to match dotfiles glob.pattern = (opts.dot ? dotfiles : nodot) + glob.pattern; } @@ -224,18 +218,6 @@ function expand(pattern, options) { return glob; } -/** - * Special cases. This is somewhat of a placeholder - * for more advanced logic. - */ - -function specialCase(glob) { - if (glob === '\\') { - return true; - } - return false; -} - /** * Collapse repeated character sequences. * @@ -272,7 +254,7 @@ function collapse(str, ch) { */ function negateSlash(str) { - return str.replace(/\[\^([^\]]*?)\]/g, function (match, inner) { + return str.replace(/\[\^([^\]]*?)\]/g, function(match, inner) { if (inner.indexOf('/') === -1) { inner = '\\/' + inner; } @@ -304,6 +286,7 @@ function balance(str, a, b) { * and speed up processing. */ +/* eslint no-multi-spaces: 0 */ var qmark = '[^/]'; var star = qmark + '*?'; var nodot = '(?!\\.)(?=.)'; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/glob.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/glob.js index d935d7b..c613326 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/glob.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/glob.js @@ -1,24 +1,22 @@ 'use strict'; -var braces = require('braces'); -var brackets = require('expand-brackets'); -var extglob = require('extglob'); -var parse = require('parse-glob'); var chars = require('./chars'); +var utils = require('./utils'); /** * Expose `Glob` */ -module.exports = Glob; - -function Glob(pattern, options) { +var Glob = module.exports = function Glob(pattern, options) { + if (!(this instanceof Glob)) { + return new Glob(pattern, options); + } this.options = options || {}; this.pattern = pattern; this.history = []; this.tokens = {}; this.init(pattern); -} +}; /** * Initialize defaults @@ -42,31 +40,14 @@ Glob.prototype.track = function(msg) { } }; -/** - * Return true if the glob pattern has the given - * `ch`aracter. - * - * @param {String} `pattern` - * @param {String} `ch` - * @return {Boolean} - */ - -Glob.prototype.has = function(pattern, ch) { - if (ch instanceof RegExp) { - return ch.test(pattern); - } - return pattern.indexOf(ch) !== -1; -}; - /** * Return true if `glob.pattern` was negated - * with `!`. Also removes the `!` from the pattern. + * with `!`, also remove the `!` from the pattern. * * @return {Boolean} */ Glob.prototype.isNegated = function() { - if (this.tokens.isNegated) return true; if (this.pattern.charCodeAt(0) === 33 /* '!' */) { this.pattern = this.pattern.slice(1); return true; @@ -93,7 +74,7 @@ Glob.prototype.braces = function() { } // expand brace patterns and join the resulting array - var expanded = braces(this.pattern, this.options); + var expanded = utils.braces(this.pattern, this.options); this.pattern = expanded.join('|'); } }; @@ -104,7 +85,7 @@ Glob.prototype.braces = function() { Glob.prototype.brackets = function() { if (this.options.nobrackets !== true) { - this.pattern = brackets(this.pattern); + this.pattern = utils.brackets(this.pattern); } }; @@ -113,17 +94,19 @@ Glob.prototype.brackets = function() { */ Glob.prototype.extglob = function() { - if (this.options.noextglob !== true) { - this.pattern = extglob(this.pattern, {escape: true}); + if (this.options.noextglob === true) return; + + if (utils.isExtglob(this.pattern)) { + this.pattern = utils.extglob(this.pattern, {escape: true}); } }; /** - * Parse the given glob `pattern` or `glob.pattern` + * Parse the given pattern */ Glob.prototype.parse = function(pattern) { - this.tokens = parse(pattern || this.pattern, true); + this.tokens = utils.parseGlob(pattern || this.pattern, true); return this.tokens; }; @@ -146,7 +129,7 @@ Glob.prototype._replace = function(a, b, escape) { if (escape) b = esc(b); if (a && b && typeof a === 'string') { this.pattern = this.pattern.split(a).join(b); - } else if (a instanceof RegExp) { + } else { this.pattern = this.pattern.replace(a, b); } this.track('after'); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/utils.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/utils.js index b12389c..30f3c2a 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/utils.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/lib/utils.js @@ -1,33 +1,75 @@ 'use strict'; +var win32 = process && process.platform === 'win32'; var path = require('path'); var fileRe = require('filename-regex'); -var win32 = process && process.platform === 'win32'; - -/** - * Expose `utils` - */ - var utils = module.exports; +/** + * Module dependencies + */ + +utils.diff = require('arr-diff'); +utils.unique = require('array-unique'); +utils.braces = require('braces'); +utils.brackets = require('expand-brackets'); +utils.extglob = require('extglob'); +utils.isExtglob = require('is-extglob'); +utils.isGlob = require('is-glob'); +utils.typeOf = require('kind-of'); +utils.normalize = require('normalize-path'); +utils.omit = require('object.omit'); +utils.parseGlob = require('parse-glob'); +utils.cache = require('regex-cache'); + +/** + * Get the filename of a filepath + * + * @param {String} `string` + * @return {String} + */ utils.filename = function filename(fp) { var seg = fp.match(fileRe()); return seg && seg[0]; }; +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + utils.isPath = function isPath(pattern, opts) { - return function (fp) { - return utils.unixify(fp, opts) === pattern; + return function(fp) { + return pattern === utils.unixify(fp, opts); }; }; +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + utils.hasPath = function hasPath(pattern, opts) { - return function (fp) { - return utils.unixify(fp, opts).indexOf(pattern) !== -1; + return function(fp) { + return utils.unixify(pattern, opts).indexOf(fp) !== -1; }; }; +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + utils.matchPath = function matchPath(pattern, opts) { var fn = (opts && opts.contains) ? utils.hasPath(pattern, opts) @@ -35,8 +77,16 @@ utils.matchPath = function matchPath(pattern, opts) { return fn; }; +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` + * @return {Boolean} + */ + utils.hasFilename = function hasFilename(re) { - return function (fp) { + return function(fp) { var name = utils.filename(fp); return name && re.test(name); }; @@ -63,7 +113,7 @@ utils.arrayify = function arrayify(val) { utils.unixify = function unixify(fp, opts) { if (opts && opts.unixify === false) return fp; if (opts && opts.unixify === true || win32 || path.sep === '\\') { - return fp.split('\\').join('/'); + return utils.normalize(fp, false); } if (opts && opts.unescape === true) { return fp ? fp.toString().replace(/\\(\w)/g, '$1') : ''; @@ -86,3 +136,9 @@ utils.unescapeGlob = function unescapeGlob(fp) { utils.escapeRe = function escapeRe(str) { return str.replace(/[-[\\$*+?.#^\s{}(|)\]]/g, '\\$&'); }; + +/** + * Expose `utils` + */ + +module.exports = utils; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/LICENSE index 0acf79d..fa30c4c 100755 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/LICENSE +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/LICENSE @@ -1,24 +1,21 @@ The MIT License (MIT) -Copyright (c) 2014-2015 Jon Schlinkert. +Copyright (c) 2014-2015, Jon Schlinkert. -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/README.md old mode 100755 new mode 100644 index 34a71f9..7705c6c --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/README.md @@ -1,4 +1,4 @@ -# arr-diff [![NPM version](https://badge.fury.io/js/arr-diff.svg)](http://badge.fury.io/js/arr-diff) [![Build Status](https://travis-ci.org/jonschlinkert/arr-diff.svg)](https://travis-ci.org/jonschlinkert/arr-diff) +# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg)](https://www.npmjs.com/package/arr-diff) [![Build Status](https://img.shields.io/travis/jonschlinkert/base.svg)](https://travis-ci.org/jonschlinkert/base) > Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. @@ -9,7 +9,6 @@ Install with [npm](https://www.npmjs.com/) ```sh $ npm i arr-diff --save ``` - Install with [bower](http://bower.io/) ```sh @@ -67,9 +66,9 @@ Pull requests and stars are always welcome. For bugs and feature requests, [plea ## License -Copyright © 2015 Jon Schlinkert +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) Released under the MIT license. *** -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 23, 2015._ +_This file was generated by [verb](https://github.com/verbose/verb) on Sat Dec 05 2015 23:24:53 GMT-0500 (EST)._ diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/index.js old mode 100755 new mode 100644 index f543f5a..bc7200d --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/index.js @@ -8,7 +8,7 @@ 'use strict'; var flatten = require('arr-flatten'); -var slice = require('array-slice'); +var slice = [].slice; /** * Return the difference between the first array and @@ -40,7 +40,7 @@ function diff(arr, arrays) { } if (argsLen > 2) { - arrays = flatten(slice(arguments, 1)); + arrays = flatten(slice.call(arguments, 1)); } while (++i < len) { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/arr-flatten/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/arr-flatten/package.json old mode 100644 new mode 100755 index c3929b4..28e625d --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/arr-flatten/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/arr-flatten/package.json @@ -51,7 +51,7 @@ "gitHead": "7b3706eaa0093d8f5ba65af8ed590b6fcb3fe7cf", "_id": "arr-flatten@1.0.1", "_shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b", - "_from": "arr-flatten@>=1.0.1 <2.0.0", + "_from": "arr-flatten@^1.0.1", "_npmVersion": "2.5.1", "_nodeVersion": "0.12.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/README.md deleted file mode 100755 index a26c98e..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# array-slice [![NPM version](https://badge.fury.io/js/array-slice.svg)](http://badge.fury.io/js/array-slice) [![Build Status](https://travis-ci.org/jonschlinkert/array-slice.svg)](https://travis-ci.org/jonschlinkert/array-slice) - -> Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index. - -This function is used instead of `Array#slice` to support node lists in IE < 9 and to ensure dense arrays are returned. - -## Install with [npm](npmjs.org) - -```bash -npm i array-slice --save -``` - -## Usage - -```js -var slice = require('array-slice'); -var arr = ['a', 'b', 'd', 'e', 'f', 'g', 'h', 'i', 'j']; - -slice(arr, 3, 6); -//=> ['e', 'f', 'g'] -``` - -## Useful array utils - * [arr-diff](https://github.com/jonschlinkert/arr-diff): Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. - * [arr-filter](https://github.com/jonschlinkert/arr-filter): Faster alternative to javascript's native filter method. - * [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. - * [arr-union](https://github.com/jonschlinkert/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons. - * [array-unique](https://github.com/jonschlinkert/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. - * [array-intersection](https://github.com/jonschlinkert/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality for comparisons. - -## Running tests -Install dev dependencies: - -```bash -npm i -d && npm test -``` - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-slice/issues) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 07, 2015._ diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/index.js deleted file mode 100755 index 785fd02..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/*! - * array-slice - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -module.exports = function slice(arr, start, end) { - var len = arr.length >>> 0; - var range = []; - - start = idx(arr, start); - end = idx(arr, end, len); - - while (start < end) { - range.push(arr[start++]); - } - return range; -}; - - -function idx(arr, pos, end) { - var len = arr.length >>> 0; - - if (pos == null) { - pos = end || 0; - } else if (pos < 0) { - pos = Math.max(len + pos, 0); - } else { - pos = Math.min(pos, len); - } - - return pos; -} \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/package.json deleted file mode 100644 index 213910a..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/node_modules/array-slice/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "array-slice", - "description": "Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index.", - "version": "0.2.3", - "homepage": "https://github.com/jonschlinkert/array-slice", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/array-slice.git" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/array-slice/issues" - }, - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/array-slice/blob/master/LICENSE" - }, - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "*", - "should": "^5.2.0" - }, - "keywords": [ - "array", - "javascript", - "js", - "slice", - "util", - "utils" - ], - "gitHead": "15bcb1d3d2d5689a1f519207cecb3ab3a63b8654", - "_id": "array-slice@0.2.3", - "_shasum": "dd3cfb80ed7973a75117cdac69b0b99ec86186f5", - "_from": "array-slice@>=0.2.3 <0.3.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "dist": { - "shasum": "dd3cfb80ed7973a75117cdac69b0b99ec86186f5", - "tarball": "http://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/package.json index 2fd4072..b5c13f4 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/arr-diff/package.json @@ -1,7 +1,7 @@ { "name": "arr-diff", "description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.", - "version": "1.1.0", + "version": "2.0.0", "homepage": "https://github.com/jonschlinkert/arr-diff", "author": { "name": "Jon Schlinkert", @@ -26,15 +26,15 @@ "test": "mocha" }, "dependencies": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" + "arr-flatten": "^1.0.1" }, "devDependencies": { "array-differ": "^1.0.0", + "array-slice": "^0.2.3", "benchmarked": "^0.1.4", "chalk": "^1.1.1", - "mocha": "^2.2.5", - "should": "^7.0.4" + "mocha": "*", + "should": "*" }, "keywords": [ "arr", @@ -52,26 +52,34 @@ ] } }, - "gitHead": "a749b8f9a21dae711050a14e580860abe7299a01", - "_id": "arr-diff@1.1.0", - "_shasum": "687c32758163588fef7de7b36fabe495eb1a399a", - "_from": "arr-diff@>=1.0.1 <2.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.12.4", + "gitHead": "b89f54eb88ca51afd0e0ea6be9a4a63e5ccecf27", + "_id": "arr-diff@2.0.0", + "_shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", + "_from": "arr-diff@^2.0.0", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" }, "maintainers": [ + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + }, { "name": "jonschlinkert", "email": "github@sellside.com" + }, + { + "name": "paulmillr", + "email": "paul@paulmillr.com" } ], "dist": { - "shasum": "687c32758163588fef7de7b36fabe495eb1a399a", - "tarball": "http://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz" + "shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", + "tarball": "http://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz" + "_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/array-unique/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/array-unique/package.json old mode 100644 new mode 100755 index 3c39f2b..35d47d1 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/array-unique/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/array-unique/package.json @@ -37,7 +37,7 @@ "gitHead": "36fde8e586fb7cf880b8b3aa6515df889e64ed85", "_id": "array-unique@0.2.1", "_shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53", - "_from": "array-unique@>=0.2.1 <0.3.0", + "_from": "array-unique@^0.2.1", "_npmVersion": "2.7.1", "_nodeVersion": "1.6.2", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/README.md index 2998b06..eb1db0b 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/README.md @@ -2,20 +2,18 @@ > Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. - - Complete support for the braces part of the [Bash 4.3 specification][bash]. Braces passes [all of the relevant unit tests](#bash-4-3-support) from the spec. - - Expands comma-separated values: `a/{b,c}/d` => `['a/b/d', 'a/c/d']` - - Expands alphabetical or numerical ranges: `{1..3}` => `['1', '2', '3']` - - [Very fast](#benchmarks) - - [Special characters](./patterns.md) can be used to generate interesting patterns. +* Complete support for the braces part of the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/). Braces passes [all of the relevant unit tests](#bash-4-3-support) from the spec. +* Expands comma-separated values: `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +* Expands alphabetical or numerical ranges: `{1..3}` => `['1', '2', '3']` +* [Very fast](#benchmarks) +* [Special characters](./patterns.md) can be used to generate interesting patterns. +Install with [npm](https://www.npmjs.com/) -## Install with [npm](npmjs.org) - -```bash -npm i braces --save +```sh +$ npm i braces --save ``` - ## Example usage ```js @@ -52,7 +50,6 @@ braces('blah/{a..z}.js').forEach(function(fp) { See the [tests](./test/test.js) for more examples and use cases (also see the [bash spec tests](./test/bash-mm-adjusted.js)); - ### Range expansion Uses [expand-range](https://github.com/jonschlinkert/expand-range) for range expansion. @@ -91,7 +88,7 @@ console.log(range); //=> ['xa0y', 'xb1y', 'xc2y', 'xd3y', 'xe4y'] ``` -See [expand-range] for benchmarks, tests and the full list of range expansion features. +See [expand-range](https://github.com/jonschlinkert/expand-range)for benchmarks, tests and the full list of range expansion features. ## Options @@ -128,7 +125,7 @@ Type: `Boolean` Default: `false` -Enables complete support for the Bash specification. The downside is a 20-25% speed decrease. +Enables complete support for the Bash specification. The downside is a 20-25% speed decrease. **Example** @@ -154,14 +151,11 @@ Deafault: `true` Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options - - ## Bash 4.3 Support > Better support for Bash 4.3 than minimatch -This project has comprehensive unit tests, including tests coverted from [Bash 4.3][bash]. Currently only 8 of 102 unit tests fail, and - +This project has comprehensive unit tests, including tests coverted from [Bash 4.3](www.gnu.org/software/bash/). Currently only 8 of 102 unit tests fail, and ## Run benchmarks @@ -171,7 +165,6 @@ Install dev dependencies: npm i -d && npm benchmark ``` - ```bash #1: escape.js brace-expansion.js x 114,934 ops/sec ±1.24% (93 runs sampled) @@ -198,7 +191,6 @@ npm i -d && npm benchmark braces.js x 1,108,353 ops/sec ±0.85% (94 runs sampled) ``` - ## Run tests Install dev dependencies: @@ -209,34 +201,30 @@ npm i -d && npm test ## Related -- [micromatch]: wildcard/glob matcher for javascript. a faster alternative to minimatch. -- [fill-range]: Fill in a range of numbers or letters, optionally passing an increment or multiplier to use -- [expand-range]: Wraps fill-range for fast, bash-like range expansion in strings. Expand a range of numbers or letters, uppercase or lowercase +* [micromatch](https://github.com/jonschlinkert/micromatch): wildcard/glob matcher for javascript. a faster alternative to minimatch. +* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to use +* [expand-range](https://github.com/jonschlinkert/expand-range): Wraps fill-range for fast, bash-like range expansion in strings. Expand a range of numbers or letters, uppercase or lowercase ## Contributing + Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/braces/issues). -Please run benchmarks before and after any code changes to what the impact of the code changes are before submitting a PR. +Please run benchmarks before and after any code changes to what the impact of the code changes are before submitting a PR. ## Author **Jon Schlinkert** - + + [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ## License -Copyright (c) 2014-2015 Jon Schlinkert -Released under the MIT license + +Copyright © 2014-2015 Jon Schlinkert +Released under the MIT license. *** -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 18, 2015._ +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 19, 2015._ -[bash]: www.gnu.org/software/bash/ -[braces]: https://github.com/jonschlinkert/braces -[expand-range]: https://github.com/jonschlinkert/expand-range -[fill-range]: https://github.com/jonschlinkert/fill-range -[micromatch]: https://github.com/jonschlinkert/micromatch -[minimatch]: https://github.com/isaacs/minimatch \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/index.js index 39e46ad..a4dbf3f 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/index.js @@ -11,10 +11,9 @@ * Module dependencies */ -var lazy = require('lazy-cache')(require); -lazy('expand-range', 'expand'); -lazy('repeat-element', 'repeat'); -lazy('preserve', 'tokens'); +var expand = require('expand-range'); +var repeat = require('repeat-element'); +var tokens = require('preserve'); /** * Expose `braces` @@ -90,7 +89,7 @@ function braces(str, arr, options) { return arr.concat(str); } else { es6 = true; - str = lazy.tokens.before(str, es6Regex()); + str = tokens.before(str, es6Regex()); } } @@ -110,7 +109,7 @@ function braces(str, arr, options) { var segs, segsLength; if (inner.indexOf('..') !== -1) { - segs = lazy.expand(inner, opts, fn) || inner.split(','); + segs = expand(inner, opts, fn) || inner.split(','); segsLength = segs.length; } else if (inner[0] === '"' || inner[0] === '\'') { @@ -148,7 +147,7 @@ function braces(str, arr, options) { arr = braces(val, arr, opts); } else if (val !== '') { if (opts.nodupes && arr.indexOf(val) !== -1) { continue; } - arr.push(es6 ? lazy.tokens.after(val) : val); + arr.push(es6 ? tokens.after(val) : val); } } @@ -198,7 +197,7 @@ function exponential(str, options, fn) { } else { var num = Math.pow(2, exp); - arr.push.apply(arr, lazy.repeat(ele, num)); + arr.push.apply(arr, repeat(ele, num)); } } } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/README.md index 4950412..8395f91 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/README.md @@ -1,17 +1,17 @@ -# is-number [![NPM version](https://badge.fury.io/js/is-number.svg)](http://badge.fury.io/js/is-number) [![Build Status](https://travis-ci.org/jonschlinkert/is-number.svg)](https://travis-ci.org/jonschlinkert/is-number) +# is-number [![NPM version](https://badge.fury.io/js/is-number.svg)](http://badge.fury.io/js/is-number) [![Build Status](https://travis-ci.org/jonschlinkert/is-number.svg)](https://travis-ci.org/jonschlinkert/is-number) > Returns true if the value is a number. comprehensive tests. -To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist][gist]. +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). +## Install -## Install with [npm](npmjs.org) +Install with [npm](https://www.npmjs.com/) -```bash -npm i is-number --save +```sh +$ npm i is-number --save ``` - ## Usage ```js @@ -66,39 +66,38 @@ isNumber({abc: 'abc'}) //=> 'false' ``` ## Other projects -* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. -* [is-primitive](https://github.com/jonschlinkert/is-primitive): Returns `true` if the value is a primitive. -* [even](https://github.com/jonschlinkert/even): Get the even numbered items from an array. -* [odd](https://github.com/jonschlinkert/odd): Get the odd numbered items from an array. -* [is-even](https://github.com/jonschlinkert/is-even): Return true if the given number is even. -* [is-odd](https://github.com/jonschlinkert/is-odd): Returns true if the given number is odd. + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even) +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even) +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd) +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive) +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd) ## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-number/issues) +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-number/issues/new). ## Run tests -Install dev dependencies. -```bash -npm i -d && npm test +Install dev dependencies: + +```sh +$ npm i -d && npm test ``` - ## Author **Jon Schlinkert** - + + [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. *** -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 05, 2015._ - -[infinity]: http://en.wikipedia.org/wiki/Infinity -[gist]: https://gist.github.com/jonschlinkert/e30c70c713da325d0e81 +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 22, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/index.js index a927ba9..96ec66d 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/index.js @@ -7,8 +7,13 @@ 'use strict'; -module.exports = function isNumber(n) { - return (!!(+n) && !Array.isArray(n)) && isFinite(n) - || n === '0' - || n === 0; +var typeOf = require('kind-of'); + +module.exports = function isNumber(num) { + var type = typeOf(num); + if (type !== 'number' && type !== 'string') { + return false; + } + var n = +num; + return (n - n + 1) >= 0 && num !== ''; }; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/package.json index 773a4d3..5c21e78 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/is-number/package.json @@ -1,7 +1,7 @@ { "name": "is-number", "description": "Returns true if the value is a number. comprehensive tests.", - "version": "1.1.2", + "version": "2.1.0", "homepage": "https://github.com/jonschlinkert/is-number", "author": { "name": "Jon Schlinkert", @@ -9,15 +9,12 @@ }, "repository": { "type": "git", - "url": "git://github.com/jonschlinkert/is-number.git" + "url": "git+https://github.com/jonschlinkert/is-number.git" }, "bugs": { "url": "https://github.com/jonschlinkert/is-number/issues" }, - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/is-number/blob/master/LICENSE" - }, + "license": "MIT", "files": [ "index.js" ], @@ -28,18 +25,21 @@ "scripts": { "test": "mocha" }, + "dependencies": { + "kind-of": "^3.0.2" + }, "devDependencies": { "benchmarked": "^0.1.3", "chalk": "^0.5.1", - "mocha": "^2.1.0" + "mocha": "*" }, "keywords": [ "check", "coerce", "coercion", "integer", - "is number", "is", + "is number", "is-number", "istype", "kind of", @@ -50,12 +50,24 @@ "typeof", "value" ], - "gitHead": "a902495bca1f471beaa8deb6193ba628bf80c0e4", - "_id": "is-number@1.1.2", - "_shasum": "9d82409f3a8a8beecf249b1bc7dada49829966e4", - "_from": "is-number@>=1.1.2 <2.0.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", + "verb": { + "related": { + "list": [ + "kind-of", + "is-primitive", + "even", + "odd", + "is-even", + "is-odd" + ] + } + }, + "gitHead": "d06c6e2cc048d3cad016cb8dfb055bb14d86fffa", + "_id": "is-number@2.1.0", + "_shasum": "01fcbbb393463a548f2f466cce16dece49db908f", + "_from": "is-number@^2.1.0", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" @@ -64,12 +76,16 @@ { "name": "jonschlinkert", "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" } ], "dist": { - "shasum": "9d82409f3a8a8beecf249b1bc7dada49829966e4", - "tarball": "http://registry.npmjs.org/is-number/-/is-number-1.1.2.tgz" + "shasum": "01fcbbb393463a548f2f466cce16dece49db908f", + "tarball": "http://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/is-number/-/is-number-1.1.2.tgz" + "_resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/README.md index 7ee6f31..29eec83 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/README.md @@ -74,8 +74,8 @@ Pull requests and stars are always welcome. For bugs and feature requests, [plea ## License Copyright © 2014-2015 [Jon Schlinkert](https://github.com/jonschlinkert) -Released under the [MIT](https://github.com/jonschlinkert/isobject/blob/master/LICENSE) license. +Released under the MIT license. *** -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 13, 2015._ \ No newline at end of file +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 20, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/index.js index 3cb7e33..66159fa 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/index.js @@ -7,7 +7,8 @@ 'use strict'; -module.exports = function isObject(val) { - return val != null && typeof val === 'object' - && !Array.isArray(val); +var isArray = require('isarray'); + +module.exports = function isObject(o) { + return o != null && typeof o === 'object' && !isArray(o); }; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/README.md new file mode 100644 index 0000000..052a62b --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/README.md @@ -0,0 +1,54 @@ + +# isarray + +`Array#isArray` for older browsers. + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/build/build.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/build/build.js new file mode 100644 index 0000000..ec58596 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/build/build.js @@ -0,0 +1,209 @@ + +/** + * Require the given path. + * + * @param {String} path + * @return {Object} exports + * @api public + */ + +function require(path, parent, orig) { + var resolved = require.resolve(path); + + // lookup failed + if (null == resolved) { + orig = orig || path; + parent = parent || 'root'; + var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); + err.path = orig; + err.parent = parent; + err.require = true; + throw err; + } + + var module = require.modules[resolved]; + + // perform real require() + // by invoking the module's + // registered function + if (!module.exports) { + module.exports = {}; + module.client = module.component = true; + module.call(this, module.exports, require.relative(resolved), module); + } + + return module.exports; +} + +/** + * Registered modules. + */ + +require.modules = {}; + +/** + * Registered aliases. + */ + +require.aliases = {}; + +/** + * Resolve `path`. + * + * Lookup: + * + * - PATH/index.js + * - PATH.js + * - PATH + * + * @param {String} path + * @return {String} path or null + * @api private + */ + +require.resolve = function(path) { + if (path.charAt(0) === '/') path = path.slice(1); + var index = path + '/index.js'; + + var paths = [ + path, + path + '.js', + path + '.json', + path + '/index.js', + path + '/index.json' + ]; + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + if (require.modules.hasOwnProperty(path)) return path; + } + + if (require.aliases.hasOwnProperty(index)) { + return require.aliases[index]; + } +}; + +/** + * Normalize `path` relative to the current path. + * + * @param {String} curr + * @param {String} path + * @return {String} + * @api private + */ + +require.normalize = function(curr, path) { + var segs = []; + + if ('.' != path.charAt(0)) return path; + + curr = curr.split('/'); + path = path.split('/'); + + for (var i = 0; i < path.length; ++i) { + if ('..' == path[i]) { + curr.pop(); + } else if ('.' != path[i] && '' != path[i]) { + segs.push(path[i]); + } + } + + return curr.concat(segs).join('/'); +}; + +/** + * Register module at `path` with callback `definition`. + * + * @param {String} path + * @param {Function} definition + * @api private + */ + +require.register = function(path, definition) { + require.modules[path] = definition; +}; + +/** + * Alias a module definition. + * + * @param {String} from + * @param {String} to + * @api private + */ + +require.alias = function(from, to) { + if (!require.modules.hasOwnProperty(from)) { + throw new Error('Failed to alias "' + from + '", it does not exist'); + } + require.aliases[to] = from; +}; + +/** + * Return a require function relative to the `parent` path. + * + * @param {String} parent + * @return {Function} + * @api private + */ + +require.relative = function(parent) { + var p = require.normalize(parent, '..'); + + /** + * lastIndexOf helper. + */ + + function lastIndexOf(arr, obj) { + var i = arr.length; + while (i--) { + if (arr[i] === obj) return i; + } + return -1; + } + + /** + * The relative require() itself. + */ + + function localRequire(path) { + var resolved = localRequire.resolve(path); + return require(resolved, parent, path); + } + + /** + * Resolve relative to the parent. + */ + + localRequire.resolve = function(path) { + var c = path.charAt(0); + if ('/' == c) return path.slice(1); + if ('.' == c) return require.normalize(p, path); + + // resolve deps by returning + // the dep in the nearest "deps" + // directory + var segs = parent.split('/'); + var i = lastIndexOf(segs, 'deps') + 1; + if (!i) i = 0; + path = segs.slice(0, i + 1).join('/') + '/deps/' + path; + return path; + }; + + /** + * Check if module is defined at `path`. + */ + + localRequire.exists = function(path) { + return require.modules.hasOwnProperty(localRequire.resolve(path)); + }; + + return localRequire; +}; +require.register("isarray/index.js", function(exports, require, module){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +}); +require.alias("isarray/index.js", "isarray/index.js"); + diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/component.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/component.json new file mode 100644 index 0000000..9e31b68 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/index.js new file mode 100644 index 0000000..5f5ad45 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/index.js @@ -0,0 +1,3 @@ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/package.json new file mode 100644 index 0000000..19228ab --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/node_modules/isarray/package.json @@ -0,0 +1,53 @@ +{ + "name": "isarray", + "description": "Array#isArray for older browsers", + "version": "0.0.1", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "homepage": "https://github.com/juliangruber/isarray", + "main": "index.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": {}, + "devDependencies": { + "tap": "*" + }, + "keywords": [ + "browser", + "isarray", + "array" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "_id": "isarray@0.0.1", + "dist": { + "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "_from": "isarray@0.0.1", + "_npmVersion": "1.2.18", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "directories": {}, + "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/package.json index 6b49645..4911ae2 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/isobject/package.json @@ -1,7 +1,7 @@ { "name": "isobject", "description": "Returns true if the value is an object and not an array or null.", - "version": "1.0.2", + "version": "2.0.0", "homepage": "https://github.com/jonschlinkert/isobject", "author": { "name": "Jon Schlinkert", @@ -9,15 +9,12 @@ }, "repository": { "type": "git", - "url": "git://github.com/jonschlinkert/isobject.git" + "url": "git+https://github.com/jonschlinkert/isobject.git" }, "bugs": { "url": "https://github.com/jonschlinkert/isobject/issues" }, - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/isobject/blob/master/LICENSE" - }, + "license": "MIT", "files": [ "index.js" ], @@ -28,31 +25,42 @@ "scripts": { "test": "mocha" }, + "dependencies": { + "isarray": "0.0.1" + }, "devDependencies": { "mocha": "*" }, "keywords": [ "check", - "function", "is", "is-object", "isobject", - "javascript", "kind", "kind-of", "kindof", "native", "object", - "of", "type", "typeof", - "validate", "value" ], - "gitHead": "0d3070262eb950e2e19c5781da8f243b629c7731", - "_id": "isobject@1.0.2", - "_shasum": "f0f9b8ce92dd540fa0740882e3835a2e022ec78a", - "_from": "isobject@>=1.0.0 <2.0.0", + "verb": { + "related": { + "list": [ + "is-plain-object", + "kind-of", + "is-extendable", + "is-equal-shallow", + "extend-shallow", + "assign-deep" + ] + } + }, + "gitHead": "563423a8cd174564f2cf758358c690b0d3a5e5c2", + "_id": "isobject@2.0.0", + "_shasum": "208de872bd7378c2a92af9428a3f56eb91a122c4", + "_from": "isobject@^2.0.0", "_npmVersion": "2.10.1", "_nodeVersion": "0.12.4", "_npmUser": { @@ -66,10 +74,9 @@ } ], "dist": { - "shasum": "f0f9b8ce92dd540fa0740882e3835a2e022ec78a", - "tarball": "http://registry.npmjs.org/isobject/-/isobject-1.0.2.tgz" + "shasum": "208de872bd7378c2a92af9428a3f56eb91a122c4", + "tarball": "http://registry.npmjs.org/isobject/-/isobject-2.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/isobject/-/isobject-1.0.2.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-2.0.0.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/LICENSE new file mode 100755 index 0000000..6d53705 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/README.md index 1624330..28b1ae0 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/README.md @@ -1,18 +1,20 @@ -# randomatic [![NPM version](https://badge.fury.io/js/randomatic.svg)](http://badge.fury.io/js/randomatic) +# randomatic [![NPM version](https://img.shields.io/npm/v/randomatic.svg)](https://www.npmjs.com/package/randomatic) > Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters. -## Install with [npm](npmjs.org) +## Install -```bash -npm i randomatic --save -``` -### Install with [bower](https://github.com/bower/bower) +Install with [npm](https://www.npmjs.com/) -```bash -bower install randomatic --save +```sh +$ npm i randomatic --save ``` +Install with [bower](http://bower.io/) + +```sh +$ bower install randomatic --save +``` ## Usage @@ -20,16 +22,14 @@ bower install randomatic --save var randomize = require('randomatic'); ``` - ## API -``` +```js randomize(pattern, length, options); ``` -- `pattern` **{String}**: The pattern to use for randomizing -- `length` **{Object}**: The length of the string to generate - +* `pattern` **{String}**: The pattern to use for randomizing +* `length` **{Object}**: The length of the string to generate ### pattern @@ -56,7 +56,6 @@ randomize('Aa0!', 10); * `*`: All characters (all of the above combined) * `?`: Custom characters (pass a string of custom characters to the options) - ### length > the length of the string to generate @@ -71,18 +70,17 @@ randomize('Aa0!', 10); If `length` is left undefined, the length of the pattern in the first parameter will be used. For example: -* `randomize('00')` will generate a 2-digit random number ++ `randomize('00')` will generate a 2-digit random number * `randomize('000')` will generate a 3-digit random number * `randomize('0000')` will generate a 4-digit random number... * `randomize('AAAAA')` will generate a 5-character, uppercase alphabetical random string... These are just examples, [see the tests](./test.js) for more use cases and examples. - - ## options #### chars + Type: `String` Default: `undefined` @@ -94,8 +92,6 @@ Define a custom string to be randomized. * `randomize('?', 20, {chars: 'jonschlinkert'})` will generate a 20-character randomized string from the letters contained in `jonschlinkert`. * `randomize('?', {chars: 'jonschlinkert'})` will generate a 13-character randomized string from the letters contained in `jonschlinkert`. - - ## Usage Examples * `randomize('A', 4)` (_whitespace insenstive_) would result in randomized 4-digit uppercase letters, like, `ZAKH`, `UJSL`... etc. @@ -109,30 +105,28 @@ Define a custom string to be randomized. _The order in which the characters are defined is insignificant._ +## Related - -## Running tests - -Install dev dependencies: - -```bash -npm install -d && mocha -``` +* [pad-left](https://www.npmjs.com/package/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-left) +* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right) +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string) ## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/randomatic/issues) + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/randomatic/issues/new). ## Author **Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. *** -_This file was generated by [verb](https://github.com/assemble/verb) on January 26, 2015._ \ No newline at end of file +_This file was generated by [verb](https://github.com/verbose/verb) on December 10, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/index.js index b30522d..85dbe21 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/index.js @@ -1,11 +1,9 @@ /*! * randomatic * + * This was originally inspired by * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License (MIT) - * - * Many changes have been made, but this was originally - * inspired by */ 'use strict'; @@ -58,7 +56,7 @@ function randomatic(pattern, length, options) { } } - if(typeOf(length) === 'object' && length.hasOwnProperty('chars')) { + if (typeOf(length) === 'object' && length.hasOwnProperty('chars')) { options = length; pattern = options.chars; length = pattern.length; @@ -79,8 +77,7 @@ function randomatic(pattern, length, options) { if (custom) mask += pattern; while (length--) { - res += mask.charAt(parseInt(Math.random() * mask.length)); + res += mask.charAt(parseInt(Math.random() * mask.length, 10)); } - return res; }; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/package.json index 6241a3f..984ccb1 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/randomatic/package.json @@ -1,7 +1,7 @@ { "name": "randomatic", "description": "Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters.", - "version": "1.1.0", + "version": "1.1.5", "homepage": "https://github.com/jonschlinkert/randomatic", "author": { "name": "Jon Schlinkert", @@ -9,31 +9,29 @@ }, "repository": { "type": "git", - "url": "https://github.com/jonschlinkert/randomatic.git" + "url": "git+https://github.com/jonschlinkert/randomatic.git" }, "bugs": { "url": "https://github.com/jonschlinkert/randomatic/issues" }, - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/randomatic/blob/master/LICENSE-MIT" - }, - "scripts": { - "test": "mocha -R spec" - }, - "main": "index.js", + "license": "MIT", "files": [ "index.js" ], + "main": "index.js", + "scripts": { + "test": "mocha" + }, "dependencies": { - "is-number": "^1.1.0", - "kind-of": "^1.0.0" + "is-number": "^2.0.2", + "kind-of": "^3.0.2" }, "devDependencies": { - "benchmarked": "^0.1.3", - "chalk": "^0.5.1", - "glob": "^4.3.5", - "should": "^4.4.1" + "ansi-bold": "^0.1.1", + "benchmarked": "^0.1.4", + "glob": "^5.0.15", + "mocha": "*", + "should": "*" }, "keywords": [ "alpha", @@ -47,11 +45,24 @@ "randomize", "randomized" ], - "gitHead": "ca326363bee58a3eb2556a5805822ffbf328397e", - "_id": "randomatic@1.1.0", - "_shasum": "2ca36b9f93747aac985eb242749af88b45d5d42d", - "_from": "randomatic@>=1.1.0 <2.0.0", - "_npmVersion": "1.4.28", + "verb": { + "related": { + "list": [ + "repeat-string", + "pad-left", + "pad-right" + ] + }, + "plugins": [ + "gulp-format-md" + ] + }, + "gitHead": "8d74759d683a580412484e95ec5f1b87d93fd50c", + "_id": "randomatic@1.1.5", + "_shasum": "5e9ef5f2d573c67bd2b8124ae90b5156e457840b", + "_from": "randomatic@^1.1.3", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" @@ -63,9 +74,9 @@ } ], "dist": { - "shasum": "2ca36b9f93747aac985eb242749af88b45d5d42d", - "tarball": "http://registry.npmjs.org/randomatic/-/randomatic-1.1.0.tgz" + "shasum": "5e9ef5f2d573c67bd2b8124ae90b5156e457840b", + "tarball": "http://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.0.tgz" + "_resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/repeat-string/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/repeat-string/package.json index bcf1027..972ef56 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/repeat-string/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/node_modules/repeat-string/package.json @@ -56,7 +56,7 @@ "gitHead": "bf20e5dc1414305bec6ff26d90988378a5bad6ec", "_id": "repeat-string@1.5.2", "_shasum": "21065f70727ad053a0dd5e957ac9e00c7560d90a", - "_from": "repeat-string@>=1.5.2 <2.0.0", + "_from": "repeat-string@^1.5.2", "_npmVersion": "2.5.1", "_nodeVersion": "0.12.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/package.json index abc00c9..8f54436 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/node_modules/fill-range/package.json @@ -1,7 +1,7 @@ { "name": "fill-range", "description": "Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.", - "version": "2.2.2", + "version": "2.2.3", "homepage": "https://github.com/jonschlinkert/fill-range", "author": { "name": "Jon Schlinkert", @@ -9,15 +9,12 @@ }, "repository": { "type": "git", - "url": "git://github.com/jonschlinkert/fill-range.git" + "url": "git+https://github.com/jonschlinkert/fill-range.git" }, "bugs": { "url": "https://github.com/jonschlinkert/fill-range/issues" }, - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/fill-range/blob/master/LICENSE" - }, + "license": "MIT", "files": [ "index.js" ], @@ -29,10 +26,10 @@ "test": "mocha" }, "dependencies": { - "is-number": "^1.1.2", - "isobject": "^1.0.0", - "randomatic": "^1.1.0", - "repeat-element": "^1.1.0", + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", "repeat-string": "^1.5.2" }, "devDependencies": { @@ -57,12 +54,22 @@ "ranges", "sh" ], - "gitHead": "dafcb07a8cb9d8138543234fde0cc92340248cb1", - "_id": "fill-range@2.2.2", - "_shasum": "2ad9d158a6a666f9fb8c9f9f05345dff68d45760", - "_from": "fill-range@>=2.1.0 <3.0.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", + "verb": { + "related": { + "list": [ + "micromatch", + "expand-range", + "braces", + "is-glob" + ] + } + }, + "gitHead": "6cb50d5c679d9e6d9e8ad97bb2efd63a8c8da610", + "_id": "fill-range@2.2.3", + "_shasum": "50b77dfd7e469bc7492470963699fe7a8485a723", + "_from": "fill-range@^2.1.0", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" @@ -82,9 +89,9 @@ } ], "dist": { - "shasum": "2ad9d158a6a666f9fb8c9f9f05345dff68d45760", - "tarball": "http://registry.npmjs.org/fill-range/-/fill-range-2.2.2.tgz" + "shasum": "50b77dfd7e469bc7492470963699fe7a8485a723", + "tarball": "http://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.2.tgz" + "_resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/package.json old mode 100644 new mode 100755 index f9fae83..1e45862 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/expand-range/package.json @@ -59,7 +59,7 @@ "gitHead": "de01a2ae06e6fe9c69812595c439870cca71839f", "_id": "expand-range@1.8.1", "_shasum": "acbd63e56efd9139722b755f099b9db5ac1f33f6", - "_from": "expand-range@>=1.8.1 <2.0.0", + "_from": "expand-range@^1.8.1", "_npmVersion": "2.5.1", "_nodeVersion": "0.12.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/README.md deleted file mode 100644 index 9549428..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# lazy-cache [![NPM version](https://badge.fury.io/js/lazy-cache.svg)](http://badge.fury.io/js/lazy-cache) - -> Cache requires to be lazy-loaded when needed. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i lazy-cache --save -``` - -## Usage - -```js -var lazy = require('lazy-cache')(require); -``` - -**Use as a property on `lazy`** - -The module is also added as a property to the `lazy` function -so it can be called without having to call a function first. - -```js -var lazy = require('lazy-cache')(require); - -// `npm install glob` -lazy('glob'); - -// glob sync -console.log(lazy.glob.sync('*.js')); - -// glob async -lazy.glob('*.js', function (err, files) { - console.log(files); -}); -``` - -**Use as a function** - -```js -var lazy = require('lazy-cache')(require); -var glob = lazy('glob'); - -// `glob` is a now a function that may be called when needed -glob().sync('foo/*.js'); -``` - -## Aliases - -An alias may be passed as the second argument if you don't want to use the automatically camel-cased variable name. - -**Example** - -```js -var lazy = require('lazy-cache')(require); - -lazy('ansi-yellow', 'yellow'); -console.log(lazy.yellow('foo')); -``` - -## Related - -[lint-deps](https://github.com/jonschlinkert/lint-deps): CLI tool that tells you when dependencies are missing from package.json and offers you a… [more](https://github.com/jonschlinkert/lint-deps) - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/lazy-cache/issues/new) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 19, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/index.js deleted file mode 100644 index d919cb5..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -/** - * Cache results of the first function call to ensure only calling once. - * - * ```js - * var lazy = require('lazy-cache')(require); - * // cache the call to `require('ansi-yellow')` - * lazy('ansi-yellow', 'yellow'); - * // use `ansi-yellow` - * console.log(lazy.yellow('this is yellow')); - * ``` - * - * @param {Function} `fn` Function that will be called only once. - * @return {Function} Function that can be called to get the cached function - * @api public - */ - -function lazyCache(fn) { - var cache = {}; - var proxy = function (mod, name) { - name = name || camelcase(mod); - Object.defineProperty(proxy, name, { - get: getter - }); - - function getter () { - if (cache.hasOwnProperty(name)) { - return cache[name]; - } - try { - return (cache[name] = fn(mod)); - } catch (err) { - err.message = 'lazy-cache ' + err.message + ' ' + __filename; - throw err; - } - }; - return getter; - }; - return proxy; -} - -/** - * Used to camelcase the name to be stored on the `lazy` object. - * - * @param {String} `str` String containing `_`, `.`, `-` or whitespace that will be camelcased. - * @return {String} camelcased string. - */ - -function camelcase(str) { - if (str.length === 1) { return str.toLowerCase(); } - str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase(); - return str.replace(/[\W_]+(\w|$)/g, function (_, ch) { - return ch.toUpperCase(); - }); -} - -/** - * Expose `lazyCache` - */ - -module.exports = lazyCache; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/package.json deleted file mode 100644 index 6c7c661..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/lazy-cache/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "lazy-cache", - "description": "Cache requires to be lazy-loaded when needed.", - "version": "0.2.3", - "homepage": "https://github.com/jonschlinkert/lazy-cache", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/lazy-cache.git" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/lazy-cache/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "ansi-yellow": "^0.1.1", - "glob": "^5.0.14", - "mocha": "*" - }, - "keywords": [ - "cache", - "caching", - "dependencies", - "dependency", - "lazy", - "require", - "requires" - ], - "verb": { - "related": { - "list": [ - "lint-deps" - ] - } - }, - "gitHead": "a25332b0e118340af776729423135a198f10783d", - "_id": "lazy-cache@0.2.3", - "_shasum": "0f30be62cce1e025039f921efde5cce31f2625c8", - "_from": "lazy-cache@>=0.2.3 <0.3.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.12.4", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "dist": { - "shasum": "0f30be62cce1e025039f921efde5cce31f2625c8", - "tarball": "http://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.3.tgz" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/preserve/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/preserve/package.json index fa639ec..6423cd6 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/preserve/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/preserve/package.json @@ -48,7 +48,7 @@ "gitHead": "1bf405d35e4aea06a2ee83db2d34dc54abc0a1f9", "_id": "preserve@0.2.0", "_shasum": "815ed1f6ebc65926f865b310c0713bcb3315ce4b", - "_from": "preserve@>=0.2.0 <0.3.0", + "_from": "preserve@^0.2.0", "_npmVersion": "1.4.23", "_npmUser": { "name": "jonschlinkert", diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/repeat-element/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/repeat-element/package.json index ec9e62b..6f86659 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/repeat-element/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/node_modules/repeat-element/package.json @@ -44,7 +44,7 @@ "gitHead": "7a6b21d58eafcc44fc8de133c70a8398ee9fdd8d", "_id": "repeat-element@1.1.2", "_shasum": "ef089a178d1483baae4d93eb98b4f9e4e11d990a", - "_from": "repeat-element@>=1.1.2 <2.0.0", + "_from": "repeat-element@^1.1.2", "_npmVersion": "2.5.1", "_nodeVersion": "0.12.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/package.json index d058a61..585d850 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/braces/package.json @@ -1,7 +1,7 @@ { "name": "braces", "description": "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.", - "version": "1.8.1", + "version": "1.8.3", "homepage": "https://github.com/jonschlinkert/braces", "author": { "name": "Jon Schlinkert", @@ -23,11 +23,11 @@ "test": "mocha" }, "files": [ - "index.js" + "index.js", + "utils.js" ], "dependencies": { "expand-range": "^1.8.1", - "lazy-cache": "^0.2.3", "preserve": "^0.2.0", "repeat-element": "^1.1.2" }, @@ -63,12 +63,12 @@ "ranges", "sh" ], - "gitHead": "04aa03dccdadaf469bb7cad86ac8a31d21e974d7", - "_id": "braces@1.8.1", - "_shasum": "2d195b85a0a997ec21be78a7f1bc970480b12a1a", - "_from": "braces@>=1.8.0 <2.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.12.4", + "gitHead": "9ab31c0dbf663ad08a7d9519286858f24e2ea9ac", + "_id": "braces@1.8.3", + "_shasum": "35d4e7dda632b33e215d38a8a9cf4329c9c75d2c", + "_from": "braces@^1.8.2", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" @@ -88,9 +88,9 @@ } ], "dist": { - "shasum": "2d195b85a0a997ec21be78a7f1bc970480b12a1a", - "tarball": "http://registry.npmjs.org/braces/-/braces-1.8.1.tgz" + "shasum": "35d4e7dda632b33e215d38a8a9cf4329c9c75d2c", + "tarball": "http://registry.npmjs.org/braces/-/braces-1.8.3.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/braces/-/braces-1.8.1.tgz" + "_resolved": "https://registry.npmjs.org/braces/-/braces-1.8.3.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/expand-brackets/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/expand-brackets/package.json index f7cd53a..b3c69b1 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/expand-brackets/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/expand-brackets/package.json @@ -49,7 +49,7 @@ "gitHead": "38475d3e4973b8496812e39983d2945a78d0ade3", "_id": "expand-brackets@0.1.4", "_shasum": "797b9e484101205f418cecaec6312c132f51e2ae", - "_from": "expand-brackets@>=0.1.1 <0.2.0", + "_from": "expand-brackets@^0.1.4", "_npmVersion": "2.10.1", "_nodeVersion": "0.12.4", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/ansi-green/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/ansi-green/package.json index 01d74ec..d74e4aa 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/ansi-green/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/ansi-green/package.json @@ -60,7 +60,7 @@ ], "_id": "ansi-green@0.1.1", "_shasum": "8a5d9a979e458d57c40e33580b37390b8e10d0f7", - "_from": "ansi-green@>=0.1.1 <0.2.0", + "_from": "ansi-green@^0.1.1", "_resolved": "https://registry.npmjs.org/ansi-green/-/ansi-green-0.1.1.tgz", "_npmVersion": "2.10.0", "_nodeVersion": "0.12.0", diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/success-symbol/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/success-symbol/package.json index 8e9d8e6..313a436 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/success-symbol/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/success-symbol/package.json @@ -57,7 +57,7 @@ ], "_id": "success-symbol@0.1.0", "_shasum": "24022e486f3bf1cdca094283b769c472d3b72897", - "_from": "success-symbol@>=0.1.0 <0.2.0", + "_from": "success-symbol@^0.1.0", "_npmVersion": "2.5.1", "_nodeVersion": "0.12.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/package.json index 869cbea..26a6d13 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/package.json @@ -60,7 +60,7 @@ "gitHead": "7466402011f262f316a3206b6bdce83a57ca3a23", "_id": "extglob@0.3.1", "_shasum": "4f31241c0dddc90ac8c729cb6d7c872dee77c8f5", - "_from": "extglob@>=0.3.0 <0.4.0", + "_from": "extglob@^0.3.1", "_npmVersion": "2.10.1", "_nodeVersion": "0.12.4", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/filename-regex/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/filename-regex/package.json index 2fda95a..1c61759 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/filename-regex/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/filename-regex/package.json @@ -43,7 +43,7 @@ "gitHead": "aa0f2933322d38cf547ff4c8ced882fbd8422866", "_id": "filename-regex@2.0.0", "_shasum": "996e3e80479b98b9897f15a8a58b3d084e926775", - "_from": "filename-regex@>=2.0.0 <3.0.0", + "_from": "filename-regex@^2.0.0", "_npmVersion": "1.4.28", "_npmUser": { "name": "jonschlinkert", diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/README.md similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob/README.md rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/README.md diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/index.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob/index.js rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/index.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/package.json similarity index 93% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob/package.json rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/package.json index 148383a..6a2c094 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-extglob/package.json @@ -9,7 +9,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/jonschlinkert/is-extglob.git" + "url": "https://github.com/jonschlinkert/is-extglob" }, "bugs": { "url": "https://github.com/jonschlinkert/is-extglob/issues" @@ -50,7 +50,7 @@ ], "_id": "is-extglob@1.0.0", "_shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", - "_from": "is-extglob@>=1.0.0 <2.0.0", + "_from": "is-extglob@^1.0.0", "_npmVersion": "2.5.1", "_nodeVersion": "0.12.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/README.md deleted file mode 100644 index f24228e..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# is-glob [![NPM version](https://badge.fury.io/js/is-glob.svg)](http://badge.fury.io/js/is-glob) [![Build Status](https://travis-ci.org/jonschlinkert/is-glob.svg)](https://travis-ci.org/jonschlinkert/is-glob) - -> Returns `true` if the given string looks like a glob pattern. - -## Install with [npm](npmjs.org) - -```bash -npm i is-glob --save -``` - -## Usage - -```js -var isGlob = require('is-glob'); - -isGlob('foo.js'); -//=> 'false' -isGlob('!foo.js'); -//=> 'true' -isGlob('*.js'); -//=> 'true' -isGlob('**/abc.js'); -//=> 'true' -isGlob('abc/*.js'); -//=> 'true' -isGlob('abc/(aaa|bbb).js'); -//=> 'true' -isGlob('abc/[a-z].js'); -//=> 'true' -isGlob('abc/{a,b}.js'); -//=> 'true' -isGlob('abc/?.js'); -//=> 'true' -isGlob('abc.js'); -//=> 'false' -isGlob('abc/def/ghi.js'); -//=> 'false' -``` - -## Related -* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. -* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. - -## Run tests -Install dev dependencies. - -```bash -npm i -d && npm test -``` - - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-glob/issues) - - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 04, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/index.js deleted file mode 100644 index 16ec18a..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * is-glob - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isGlob(str) { - return typeof str === 'string' - && /[!*{}?(|)[\]]/.test(str); -}; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/package.json deleted file mode 100644 index 23a3ffa..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/is-glob/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "is-glob", - "description": "Returns `true` if the given string looks like a glob pattern.", - "version": "1.1.3", - "homepage": "https://github.com/jonschlinkert/is-glob", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "repository": { - "type": "git", - "url": "https://github.com/jonschlinkert/is-glob" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-glob/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "keywords": [ - "bash", - "braces", - "check", - "exec", - "extglob", - "expression", - "glob", - "globbing", - "globstar", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "gitHead": "dbfdb6a271cc0fc46168d23dc0603739ff287e01", - "_id": "is-glob@1.1.3", - "_shasum": "b4c64b8303d39114492a460d364ccfb0d3c0a045", - "_from": "is-glob@>=1.1.3 <2.0.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "dist": { - "shasum": "b4c64b8303d39114492a460d364ccfb0d3c0a045", - "tarball": "http://registry.npmjs.org/is-glob/-/is-glob-1.1.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-1.1.3.tgz" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/README.md index 9596a94..bfc8e20 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/README.md @@ -1,15 +1,27 @@ -# kind-of [![NPM version](https://badge.fury.io/js/kind-of.svg)](http://badge.fury.io/js/kind-of) [![Build Status](https://travis-ci.org/jonschlinkert/kind-of.svg)](https://travis-ci.org/jonschlinkert/kind-of) +# kind-of [![NPM version](https://badge.fury.io/js/kind-of.svg)](http://badge.fury.io/js/kind-of) [![Build Status](https://travis-ci.org/jonschlinkert/kind-of.svg)](https://travis-ci.org/jonschlinkert/kind-of) > Get the native type of a value. -## Install with [npm](npmjs.org) +[](#optimizations)**What makes this so fast?** -```bash -npm i kind-of --save +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i kind-of --save +``` + +Install with [bower](http://bower.io/) + +```sh +$ bower install kind-of --save ``` ## Usage +> es5, browser and es6 ready + ```js var kindOf = require('kind-of'); @@ -37,7 +49,10 @@ kindOf(42); kindOf(new Number(42)); //=> 'number' -kindOf("string"); +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); //=> 'string' kindOf(arguments); @@ -46,6 +61,9 @@ kindOf(arguments); kindOf({}); //=> 'object' +kindOf(Object.create(null)); +//=> 'object' + kindOf(new Test()); //=> 'object' @@ -70,86 +88,150 @@ kindOf(new RegExp('^' + 'foo$')); kindOf(function () {}); //=> 'function' +kindOf(function * () {}); +//=> 'function' + kindOf(new Function()); //=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' ``` +## Related projects -## Run tests - -Install dev dependencies: - -```bash -npm i -d && npm test -``` +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number) +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive) ## Benchmarks Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. ```bash -#1: array.js - kind-of x 21,578,944 ops/sec ±1.01% (97 runs sampled) - (lib) type-of x 4,593,840 ops/sec ±0.76% (92 runs sampled) - (lib) typeof x 5,786,776 ops/sec ±0.71% (97 runs sampled) +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) -#2: boolean.js - kind-of x 25,189,600 ops/sec ±0.60% (97 runs sampled) - (lib) type-of x 2,751,076 ops/sec ±0.78% (100 runs sampled) - (lib) typeof x 4,390,312 ops/sec ±0.61% (99 runs sampled) +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) -#3: date.js - kind-of x 8,862,303 ops/sec ±0.77% (99 runs sampled) - (lib) type-of x 6,239,662 ops/sec ±0.67% (94 runs sampled) - (lib) typeof x 6,180,922 ops/sec ±0.59% (97 runs sampled) +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) -#4: function.js - kind-of x 19,685,336 ops/sec ±1.67% (95 runs sampled) - (lib) type-of x 6,648,551 ops/sec ±0.93% (95 runs sampled) - (lib) typeof x 6,631,967 ops/sec ±1.05% (92 runs sampled) +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) -#5: null.js - kind-of x 24,155,010 ops/sec ±0.95% (91 runs sampled) - (lib) type-of x 12,854,583 ops/sec ±0.69% (94 runs sampled) - (lib) typeof x 8,182,952 ops/sec ±0.48% (99 runs sampled) +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) -#6: number.js - kind-of x 20,993,521 ops/sec ±0.37% (98 runs sampled) - (lib) type-of x 2,112,716 ops/sec ±0.73% (96 runs sampled) - (lib) typeof x 4,492,943 ops/sec ±0.68% (96 runs sampled) +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) -#7: object.js - kind-of x 3,686,169 ops/sec ±0.85% (96 runs sampled) - (lib) type-of x 3,661,833 ops/sec ±0.73% (98 runs sampled) - (lib) typeof x 6,159,847 ops/sec ±0.72% (98 runs sampled) +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) -#8: regex.js - kind-of x 10,780,535 ops/sec ±0.75% (95 runs sampled) - (lib) type-of x 5,380,781 ops/sec ±0.83% (92 runs sampled) - (lib) typeof x 5,852,558 ops/sec ±0.67% (95 runs sampled) +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) -#9: string.js - kind-of x 19,713,570 ops/sec ±0.69% (91 runs sampled) - (lib) type-of x 4,017,753 ops/sec ±0.85% (98 runs sampled) - (lib) typeof x 4,370,984 ops/sec ±0.62% (100 runs sampled) +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) -#10: undef.js - kind-of x 23,250,387 ops/sec ±0.88% (91 runs sampled) - (lib) type-of x 13,725,183 ops/sec ±0.62% (91 runs sampled) - (lib) typeof x 20,549,334 ops/sec ±0.74% (97 runs sampled) +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) ``` +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/kind-of/issues/new). + ## Author **Jon Schlinkert** - + + [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ## License -Copyright (c) 2014-2015 Jon Schlinkert -Released under the MIT license + +Copyright © 2014-2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. *** -_This file was generated by [verb](https://github.com/assemble/verb) on February 09, 2015._ \ No newline at end of file +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 17, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/index.js index 4eb70b1..87938c9 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/index.js @@ -1,3 +1,4 @@ +var isBuffer = require('is-buffer'); var toString = Object.prototype.toString; /** @@ -8,7 +9,8 @@ var toString = Object.prototype.toString; */ module.exports = function kindOf(val) { - if (val === undefined) { + // primitivies + if (typeof val === 'undefined') { return 'undefined'; } if (val === null) { @@ -17,29 +19,95 @@ module.exports = function kindOf(val) { if (val === true || val === false || val instanceof Boolean) { return 'boolean'; } - if (typeof val !== 'object') { - return typeof val; + if (typeof val === 'string' || val instanceof String) { + return 'string'; } - if (Array.isArray(val)) { + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { return 'array'; } - var type = toString.call(val); - - if (val instanceof RegExp || type === '[object RegExp]') { + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { return 'regexp'; } - if (val instanceof Date || type === '[object Date]') { + if (val instanceof Date) { return 'date'; } - if (type === '[object Function]') { - return 'function'; + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; } if (type === '[object Arguments]') { return 'arguments'; } - if (typeof Buffer !== 'undefined' && Buffer.isBuffer(val)) { + + // buffer + if (typeof Buffer !== 'undefined' && isBuffer(val)) { return 'buffer'; } - return type.slice(8, -1).toLowerCase(); + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; }; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/.travis.yml b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/.travis.yml new file mode 100644 index 0000000..8803fc1 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: +- 'iojs' +env: + global: + - secure: du27W3wTgZ3G183axW7w0I01lOIurx8kilMH9p45VMfNXCu8lo6FLtLIQZxJ1FYMoJLQ1yfJTu2G0rq39SotDfJumsk6tF7BjTY/HKCocZaHqCMgw0W2bcylb5kMAdLhBNPlzejpPoWa1x1axbAHNFOLQNVosG/Bavu3/kuIIps= + - secure: Ax/5aekM40o67NuTkvQqx1DhfP86ZlHTtKbv5yI+WFmbjD3FQM8b8G1J/o7doaBDev7Mp+1zDJOK2pFGtt+JGRl0lM2JUmLh6yh/b28obXyei5iuUkqzKJLfKZHMbY5QW/1i4DUM+zSXe6Kava0qnqYg5wBBnrF6gLdsVsCGNQk= diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/.zuul.yml b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/.zuul.yml new file mode 100644 index 0000000..7b84b05 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/.zuul.yml @@ -0,0 +1,18 @@ +ui: tape +browsers: + - name: chrome + version: 39..latest + - name: firefox + version: 34..latest + - name: safari + version: 5..latest + - name: ie + version: 8..latest + - name: opera + version: 11..latest + - name: iphone + version: 5.1..latest + - name: ipad + version: 5.1..latest + - name: android + version: 5.0..latest diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/README.md new file mode 100644 index 0000000..82f7fcf --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/README.md @@ -0,0 +1,49 @@ +# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] + +#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (incl. [browser Buffers](https://github.com/feross/buffer)) + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg?style=flat +[travis-url]: https://travis-ci.org/feross/is-buffer +[npm-image]: https://img.shields.io/npm/v/is-buffer.svg?style=flat +[npm-url]: https://npmjs.org/package/is-buffer +[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg?style=flat +[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg +[saucelabs-url]: https://saucelabs.com/u/is-buffer + +## Why not use `Buffer.isBuffer`? + +This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). + +It's future-proof and works in node too! + +## install + +```bash +npm install is-buffer +``` + +## usage + +```js +var isBuffer = require('is-buffer') + +isBuffer(new Buffer(4)) // true + +isBuffer(undefined) // false +isBuffer(null) // false +isBuffer('') // false +isBuffer(true) // false +isBuffer(false) // false +isBuffer(0) // false +isBuffer(1) // false +isBuffer(1.0) // false +isBuffer('string') // false +isBuffer({}) // false +isBuffer(function foo () {}) // false +``` + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/index.js new file mode 100644 index 0000000..ef02824 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/index.js @@ -0,0 +1,17 @@ +/** + * Determine if an object is Buffer + * + * Author: Feross Aboukhadijeh + * License: MIT + * + * `npm install is-buffer` + */ + +module.exports = function (obj) { + return !!(obj != null && + (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) + (obj.constructor && + typeof obj.constructor.isBuffer === 'function' && + obj.constructor.isBuffer(obj)) + )) +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/package.json new file mode 100644 index 0000000..3018451 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/package.json @@ -0,0 +1,73 @@ +{ + "name": "is-buffer", + "description": "Determine if an object is Buffer", + "version": "1.1.1", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org/" + }, + "bugs": { + "url": "https://github.com/feross/is-buffer/issues" + }, + "dependencies": {}, + "devDependencies": { + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "homepage": "http://feross.org", + "keywords": [ + "buffer", + "buffers", + "type", + "core buffer", + "browser buffer", + "browserify", + "typed array", + "uint32array", + "int16array", + "int32array", + "float32array", + "float64array", + "browser", + "arraybuffer", + "dataview" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/feross/is-buffer.git" + }, + "scripts": { + "test": "npm run test-node && npm run test-browser", + "test-browser": "zuul -- test/*.js", + "test-browser-local": "zuul --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "testling": { + "files": "test/*.js" + }, + "gitHead": "9ccd67d6ca6476d1cb7b38fd9fc7d9d71d212f5c", + "_id": "is-buffer@1.1.1", + "_shasum": "3058de9ca454564e8bbe5b8dd2719a8d7089e7d7", + "_from": "is-buffer@^1.0.2", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.3", + "_npmUser": { + "name": "feross", + "email": "feross@feross.org" + }, + "dist": { + "shasum": "3058de9ca454564e8bbe5b8dd2719a8d7089e7d7", + "tarball": "http://registry.npmjs.org/is-buffer/-/is-buffer-1.1.1.tgz" + }, + "maintainers": [ + { + "name": "feross", + "email": "feross@feross.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.1.tgz" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/test/basic.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/test/basic.js new file mode 100644 index 0000000..38d883b --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/test/basic.js @@ -0,0 +1,20 @@ +var isBuffer = require('../') +var test = require('tape') + +test('is-buffer', function (t) { + t.ok(isBuffer(new Buffer(4)), 'new Buffer(4)') + + t.notOk(isBuffer(undefined), 'undefined') + t.notOk(isBuffer(null), 'null') + t.notOk(isBuffer(''), 'empty string') + t.notOk(isBuffer(true), 'true') + t.notOk(isBuffer(false), 'false') + t.notOk(isBuffer(0), '0') + t.notOk(isBuffer(1), '1') + t.notOk(isBuffer(1.0), '1.0') + t.notOk(isBuffer('string'), 'string') + t.notOk(isBuffer({}), '{}') + t.notOk(isBuffer(function foo () {}), 'function foo () {}') + + t.end() +}) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/package.json index c055d31..25e5a3a 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/package.json @@ -1,7 +1,7 @@ { "name": "kind-of", "description": "Get the native type of a value.", - "version": "1.1.0", + "version": "3.0.2", "homepage": "https://github.com/jonschlinkert/kind-of", "author": { "name": "Jon Schlinkert", @@ -9,15 +9,12 @@ }, "repository": { "type": "git", - "url": "git://github.com/jonschlinkert/kind-of.git" + "url": "git+https://github.com/jonschlinkert/kind-of.git" }, "bugs": { "url": "https://github.com/jonschlinkert/kind-of/issues" }, - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/kind-of/blob/master/LICENSE" - }, + "license": "MIT", "files": [ "index.js" ], @@ -26,13 +23,19 @@ "node": ">=0.10.0" }, "scripts": { - "test": "mocha" + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.0.2" }, "devDependencies": { + "ansi-bold": "^0.1.1", "benchmarked": "^0.1.3", - "chalk": "^0.5.1", + "browserify": "^11.0.1", "glob": "^4.3.5", - "should": "^4.6.1", + "mocha": "*", + "should": "*", "type-of": "^2.0.1", "typeof": "^1.0.0" }, @@ -58,11 +61,21 @@ "typeof", "types" ], - "gitHead": "4ee1c34ffba8743451ddef17b4a6588468ba187d", - "_id": "kind-of@1.1.0", - "_shasum": "140a3d2d41a36d2efcfa9377b62c24f8495a5c44", - "_from": "kind-of@>=1.1.0 <2.0.0", - "_npmVersion": "1.4.28", + "verb": { + "related": { + "list": [ + "is-glob", + "is-primitive", + "is-number" + ] + } + }, + "gitHead": "917a9701737a64abe0f77441c9ef21afca5ab397", + "_id": "kind-of@3.0.2", + "_shasum": "187db427046e7e90945692e6768668bd6900dea0", + "_from": "kind-of@^3.0.2", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" @@ -71,12 +84,16 @@ { "name": "jonschlinkert", "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" } ], "dist": { - "shasum": "140a3d2d41a36d2efcfa9377b62c24f8495a5c44", - "tarball": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz" + "shasum": "187db427046e7e90945692e6768668bd6900dea0", + "tarball": "http://registry.npmjs.org/kind-of/-/kind-of-3.0.2.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz" + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.2.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/README.md new file mode 100644 index 0000000..e75d4bd --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/README.md @@ -0,0 +1,75 @@ +# normalize-path [![NPM version](https://badge.fury.io/js/normalize-path.svg)](http://badge.fury.io/js/normalize-path) [![Build Status](https://travis-ci.org/jonschlinkert/normalize-path.svg)](https://travis-ci.org/jonschlinkert/normalize-path) + +> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i normalize-path --save +``` + +## Usage + +```js +var normalize = require('normalize-path'); + +normalize('\\foo\\bar\\baz\\'); +//=> '/foo/bar/baz' + +normalize('./foo/bar/baz/'); +//=> './foo/bar/baz' +``` + +Pass `false` as the last argument to **not** strip trailing slashes: + +```js +normalize('./foo/bar/baz/', false); +//=> './foo/bar/baz/' + +normalize('foo\\bar\\baz\\', false); +//=> 'foo/bar/baz/' +``` + +## Related + +Other useful libraries for working with paths in node.js: + +* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path) +* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://www.npmjs.com/package/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with) +* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute) +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative) +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Parse a filepath into an object. Falls back on the native node.js `path.parse` method if… [more](https://www.npmjs.com/package/parse-filepath) | [homepage](https://github.com/jonschlinkert/parse-filepath) +* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with) +* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments) +* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g … [more](https://www.npmjs.com/package/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext) +* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/normalize-path/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 17, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/index.js new file mode 100644 index 0000000..137f601 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/index.js @@ -0,0 +1,17 @@ +/*! + * normalize-path + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License + */ + +module.exports = function normalizePath(str, stripTrailing) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + str = str.replace(/[\\\/]+/g, '/'); + if (stripTrailing !== false) { + str = str.replace(/\/$/, ''); + } + return str; +}; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/package.json new file mode 100644 index 0000000..17f4cb0 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/normalize-path/package.json @@ -0,0 +1,91 @@ +{ + "name": "normalize-path", + "description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/normalize-path", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/normalize-path.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/normalize-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "benchmarked": "^0.1.1", + "minimist": "^1.2.0", + "mocha": "*" + }, + "keywords": [ + "backslash", + "file", + "filepath", + "fix", + "forward", + "fp", + "fs", + "normalize", + "path", + "slash", + "slashes", + "trailing", + "unix", + "urix" + ], + "verb": { + "related": { + "list": [ + "rewrite-ext", + "contains-path", + "ends-with", + "path-ends-with", + "path-segments", + "is-absolute", + "is-relative", + "parse-filepath", + "unixify" + ], + "description": "Other useful libraries for working with paths in node.js:" + } + }, + "gitHead": "ca536e0e8755d3ed04f3ba4d21cc9e122e0f749f", + "_id": "normalize-path@2.0.1", + "_shasum": "47886ac1662760d4261b7d979d241709d3ce3f7a", + "_from": "normalize-path@^2.0.1", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "maintainers": [ + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + }, + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "dist": { + "shasum": "47886ac1662760d4261b7d979d241709d3ce3f7a", + "tarball": "http://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/README.md index 5ecb436..3925183 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/README.md @@ -1,12 +1,12 @@ # object.omit [![NPM version](https://badge.fury.io/js/object.omit.svg)](http://badge.fury.io/js/object.omit) -> Return a copy of an object without the given key, or array of keys. +> Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument. ## Install -```bash -npm i object.omit --save-dev -``` +```sh +$ npm i object.omit --save-dev +``` ## Usage @@ -42,34 +42,63 @@ omit() //=> {} ``` +### Filter function + +An optional filter function may be passed as the last argument, with or without keys passed on the arguments: + +**filter on keys** + +```js +var res = omit({a: 'a', b: 'b', c: 'c'}, function (val, key) { + return key === 'a'; +}); +//=> {a: 'a'} +``` + +**filter on values** + +```js +var fn = function() {}; +var obj = {a: 'a', b: 'b', c: fn}; + +var res = omit(obj, ['a'], function (val, key) { + return typeof val !== 'function'; +}); +//=> {b: 'b'} +``` + ### Other awesome javascript/node.js utils - * [object.filter](https://github.com/jonschlinkert/object.filter): Create a new object filtered to have only properties for which the callback returns true. - * [object.pick](https://github.com/jonschlinkert/object.pick): Returns a filtered copy of an object with only the specified keys, like `pick` from lo-dash / underscore. - * [object.pluck](https://github.com/jonschlinkert/object.pluck): Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with values unmodified from those of the original object. - * [object.reduce](https://github.com/jonschlinkert/object.reduce): Reduces an object to a value that is the accumulated result of running each property in the object through a callback. - * [object.defaults](https://github.com/jonschlinkert/object.defaults): Like `extend` but only copies missing properties/values to the target object. + +* [object.filter](https://github.com/jonschlinkert/object.filter): Create a new object filtered to have only properties for which the callback returns true. +* [object.pick](https://github.com/jonschlinkert/object.pick): Returns a filtered copy of an object with only the specified keys, like `pick` from… [more](https://github.com/jonschlinkert/object.pick) +* [object.pluck](https://github.com/jonschlinkert/object.pluck): Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with… [more](https://github.com/jonschlinkert/object.pluck) +* [object.reduce](https://github.com/jonschlinkert/object.reduce): Reduces an object to a value that is the accumulated result of running each property… [more](https://github.com/jonschlinkert/object.reduce) +* [object.defaults](https://github.com/jonschlinkert/object.defaults): Like `extend` but only copies missing properties/values to the target object. ## Runing tests + Install dev dependencies: -```bash -npm i -d && npm test +```sh +$ npm i -d && npm test ``` ## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/object.omit/issues) + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/object.omit/issues/new) ## Author **Jon Schlinkert** + [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ## License -Copyright (c) 2014-2015 Jon Schlinkert -Released under the MIT license + +Copyright © 2014-2015 Jon Schlinkert +Released under the MIT license. *** -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 09, 2015._ +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 22, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/index.js index 2cce314..576a578 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/index.js @@ -7,19 +7,33 @@ 'use strict'; -var isObject = require('isobject'); +var isObject = require('is-extendable'); var forOwn = require('for-own'); module.exports = function omit(obj, keys) { if (!isObject(obj)) return {}; - if (!keys) return obj; - keys = Array.isArray(keys) ? keys : [keys]; - var res = {}; + var keys = [].concat.apply([], [].slice.call(arguments, 1)); + var last = keys[keys.length - 1]; + var res = {}, fn; + + if (typeof last === 'function') { + fn = keys.pop(); + } + + var isFunction = typeof fn === 'function'; + if (!keys.length && !isFunction) { + return obj; + } forOwn(obj, function (value, key) { if (keys.indexOf(key) === -1) { - res[key] = value; + + if (!isFunction) { + res[key] = value; + } else if (fn(value, key, obj)) { + res[key] = value; + } } }); return res; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/for-own/node_modules/for-in/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/for-own/node_modules/for-in/package.json index 8d7b7dd..e679f8e 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/for-own/node_modules/for-in/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/for-own/node_modules/for-in/package.json @@ -47,7 +47,7 @@ "gitHead": "fb09612d3e4137486c652a328888872eba5c1548", "_id": "for-in@0.1.4", "_shasum": "9f5cf7b4ffc7e1ae6591a4e97b177aa59d70fb2e", - "_from": "for-in@>=0.1.4 <0.2.0", + "_from": "for-in@^0.1.4", "_npmVersion": "2.7.1", "_nodeVersion": "1.6.2", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/for-own/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/for-own/package.json index dee1137..0b2f78c 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/for-own/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/for-own/package.json @@ -50,7 +50,7 @@ "gitHead": "43c5291f22b71297e1b5855236fcc35ac9ce51e4", "_id": "for-own@0.1.3", "_shasum": "606444cde77c2f0a11088169e2e354eaf56e74fe", - "_from": "for-own@>=0.1.3 <0.2.0", + "_from": "for-own@^0.1.3", "_npmVersion": "2.7.1", "_nodeVersion": "1.6.2", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/README.md new file mode 100644 index 0000000..e4cfaeb --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/README.md @@ -0,0 +1,72 @@ +# is-extendable [![NPM version](https://badge.fury.io/js/is-extendable.svg)](http://badge.fury.io/js/is-extendable) + +> Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. "can the value have keys?" + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-extendable --save +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* `array` +* `regexp` +* `plain object` +* `function` +* `date` +* `error` + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is an `object`, `function` + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Related projects + +* [assign-deep](https://github.com/jonschlinkert/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [is-equal-shallow](https://github.com/jonschlinkert/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extendable/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 04, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/index.js new file mode 100644 index 0000000..4ee71a4 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/index.js @@ -0,0 +1,13 @@ +/*! + * is-extendable + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function isExtendable(val) { + return typeof val !== 'undefined' && val !== null + && (typeof val === 'object' || typeof val === 'function'); +}; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/package.json new file mode 100644 index 0000000..448be4c --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/is-extendable/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. \"can the value have keys?\"", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-extendable.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verbiage": { + "related": { + "list": [ + "isobject", + "is-plain-object", + "kind-of", + "is-extendable", + "is-equal-shallow", + "extend-shallow", + "assign-deep" + ] + } + }, + "gitHead": "c36a0732e6a76931c6f66c5931d1f3e54fa44380", + "_id": "is-extendable@0.1.1", + "_shasum": "62b110e289a471418e3ec36a617d472e301dfc89", + "_from": "is-extendable@^0.1.1", + "_npmVersion": "2.10.1", + "_nodeVersion": "0.12.4", + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "dist": { + "shasum": "62b110e289a471418e3ec36a617d472e301dfc89", + "tarball": "http://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/package.json deleted file mode 100644 index 5d1a096..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "isobject", - "description": "Returns true if the value is an object and not an array or null.", - "version": "1.0.2", - "homepage": "https://github.com/jonschlinkert/isobject", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/isobject.git" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/isobject/issues" - }, - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/isobject/blob/master/LICENSE" - }, - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "*" - }, - "keywords": [ - "check", - "function", - "is", - "is-object", - "isobject", - "javascript", - "kind", - "kind-of", - "kindof", - "native", - "object", - "of", - "type", - "typeof", - "validate", - "value" - ], - "gitHead": "0d3070262eb950e2e19c5781da8f243b629c7731", - "_id": "isobject@1.0.2", - "_shasum": "f0f9b8ce92dd540fa0740882e3835a2e022ec78a", - "_from": "isobject@>=1.0.0 <2.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.12.4", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "dist": { - "shasum": "f0f9b8ce92dd540fa0740882e3835a2e022ec78a", - "tarball": "http://registry.npmjs.org/isobject/-/isobject-1.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/isobject/-/isobject-1.0.2.tgz" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/package.json index 4ec0b2a..3b84f61 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/package.json @@ -1,7 +1,7 @@ { "name": "object.omit", - "description": "Return a copy of an object without the given key, or array of keys.", - "version": "1.1.0", + "description": "Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument.", + "version": "2.0.0", "homepage": "https://github.com/jonschlinkert/object.omit", "author": { "name": "Jon Schlinkert", @@ -9,15 +9,12 @@ }, "repository": { "type": "git", - "url": "git://github.com/jonschlinkert/object.omit.git" + "url": "git+https://github.com/jonschlinkert/object.omit.git" }, "bugs": { "url": "https://github.com/jonschlinkert/object.omit/issues" }, - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/object.omit/blob/master/LICENSE" - }, + "license": "MIT", "files": [ "index.js" ], @@ -28,6 +25,25 @@ "scripts": { "test": "mocha" }, + "dependencies": { + "for-own": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "verb": { + "related": { + "list": [ + "object.filter", + "object.pick", + "object.pluck", + "object.reduce", + "object.defaults" + ] + } + }, "keywords": [ "clear", "delete", @@ -38,20 +54,12 @@ "property", "remove" ], - "dependencies": { - "for-own": "^0.1.3", - "isobject": "^1.0.0" - }, - "devDependencies": { - "mocha": "^2.2.4", - "should": "^5.2.0" - }, - "gitHead": "9dc4d35d57b04515e32c644cf7c59d0e0f363137", - "_id": "object.omit@1.1.0", - "_shasum": "9d17ea16778e5057deba7752c6f55f1496829e94", - "_from": "object.omit@>=1.1.0 <2.0.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", + "gitHead": "6e222f2cf39634faa26f642b06af4eb2050b5e75", + "_id": "object.omit@2.0.0", + "_shasum": "868597333d54e60662940bb458605dd6ae12fe94", + "_from": "object.omit@^2.0.0", + "_npmVersion": "2.10.1", + "_nodeVersion": "0.12.4", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" @@ -63,9 +71,9 @@ } ], "dist": { - "shasum": "9d17ea16778e5057deba7752c6f55f1496829e94", - "tarball": "http://registry.npmjs.org/object.omit/-/object.omit-1.1.0.tgz" + "shasum": "868597333d54e60662940bb458605dd6ae12fe94", + "tarball": "http://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/object.omit/-/object.omit-1.1.0.tgz" + "_resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/glob-base/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/glob-base/package.json index 6c8661b..9b24312 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/glob-base/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/glob-base/package.json @@ -52,7 +52,7 @@ "gitHead": "adbc0ab07ec8a85f76ffd1b54dd41cdb9d1d0b83", "_id": "glob-base@0.3.0", "_shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", - "_from": "glob-base@>=0.3.0 <0.4.0", + "_from": "glob-base@^0.3.0", "_npmVersion": "2.11.3", "_nodeVersion": "0.12.7", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-dotfile/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-dotfile/README.md index 3f2460e..d17b55c 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-dotfile/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-dotfile/README.md @@ -1,6 +1,6 @@ # is-dotfile [![NPM version](https://badge.fury.io/js/is-dotfile.svg)](http://badge.fury.io/js/is-dotfile) -> Return true if a file path is (or has) a dotfile. +> Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory. ## Install @@ -14,28 +14,36 @@ $ npm i is-dotfile --save ```js var isDotfile = require('is-dotfile'); +``` +**false** + +All of the following return `false`: + +```js isDotfile('a/b/c.js'); +isDotfile('/.git/foo'); +isDotfile('a/b/c/.git/foo'); //=> false +``` +**true** + +All of the following return `true`: + +```js isDotfile('a/b/.gitignore'); -//=> true - isDotfile('.gitignore'); -//=> true - isDotfile('/.gitignore'); //=> true - -isDotfile('/.gitignore/foo'); -//=> false ``` ## Related projects -* [dotfile-regex](https://github.com/regexps/dotfile-regex): Regular expresson for matching dotfiles. -* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. -* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://github.com/jonschlinkert/micromatch) +* [dotfile-regex](https://www.npmjs.com/package/dotfile-regex): Regular expresson for matching dotfiles. | [homepage](https://github.com/regexps/dotfile-regex) +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob) +* [is-dotdir](https://www.npmjs.com/package/is-dotdir): Returns true if a path is a dot-directory. | [homepage](https://github.com/jonschlinkert/is-dotdir) +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) ## Running tests @@ -47,7 +55,7 @@ $ npm i -d && npm test ## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-dotfile/issues/new) +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-dotfile/issues/new). ## Authors @@ -63,4 +71,4 @@ Released under the MIT license. *** -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 25, 2015._ \ No newline at end of file +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 20, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-dotfile/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-dotfile/package.json index c6d2675..689e1d3 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-dotfile/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-dotfile/package.json @@ -1,7 +1,7 @@ { "name": "is-dotfile", - "description": "Return true if a file path is (or has) a dotfile.", - "version": "1.0.1", + "description": "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.", + "version": "1.0.2", "homepage": "https://github.com/jonschlinkert/is-dotfile", "author": { "name": "Jon Schlinkert", @@ -9,7 +9,7 @@ }, "repository": { "type": "git", - "url": "git://github.com/jonschlinkert/is-dotfile.git" + "url": "git+https://github.com/jonschlinkert/is-dotfile.git" }, "bugs": { "url": "https://github.com/jonschlinkert/is-dotfile/issues" @@ -32,21 +32,36 @@ }, "keywords": [ "detect", + "dot", "dotfile", "expression", - "regular expression", + "file", + "filepath", "find", + "fs", + "is", "match", + "path", "regex", "regexp", "regular" ], - "gitHead": "73de4314c679e80783335a95d6c37139c1fd40c0", - "_id": "is-dotfile@1.0.1", - "_shasum": "38beee44a79a835242c6cce328a88b7eddac5d5f", - "_from": "is-dotfile@>=1.0.0 <2.0.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", + "verb": { + "related": { + "list": [ + "has-glob", + "is-glob", + "dotfile-regex", + "is-dotdir" + ] + } + }, + "gitHead": "df258600b0afa6403a2a840f2ec486c9d350492f", + "_id": "is-dotfile@1.0.2", + "_shasum": "2c132383f39199f8edc268ca01b9b007d205cc4d", + "_from": "is-dotfile@^1.0.0", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.1", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" @@ -58,9 +73,9 @@ } ], "dist": { - "shasum": "38beee44a79a835242c6cce328a88b7eddac5d5f", - "tarball": "http://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.1.tgz" + "shasum": "2c132383f39199f8edc268ca01b9b007d205cc4d", + "tarball": "http://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.1.tgz" + "_resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/package.json index 601b946..5bf0ea9 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/package.json @@ -68,7 +68,7 @@ "gitHead": "9bfccb63acdeb3b1ed62035b3adef0e5081d8fc6", "_id": "parse-glob@3.0.4", "_shasum": "b2c376cfb11f35513badd173ef0bb6e3a388391c", - "_from": "parse-glob@>=3.0.1 <4.0.0", + "_from": "parse-glob@^3.0.4", "_npmVersion": "2.10.1", "_nodeVersion": "0.12.4", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/is-equal-shallow/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/is-equal-shallow/package.json index 6fa7b20..16b2d6e 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/is-equal-shallow/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/is-equal-shallow/package.json @@ -60,7 +60,7 @@ "gitHead": "dceb47dd9c9c21066958116e3b54b3c8c251ee4a", "_id": "is-equal-shallow@0.1.3", "_shasum": "2238098fc221de0bcfa5d9eac4c45d638aa1c534", - "_from": "is-equal-shallow@>=0.1.1 <0.2.0", + "_from": "is-equal-shallow@^0.1.1", "_npmVersion": "2.10.1", "_nodeVersion": "0.12.4", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/is-primitive/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/is-primitive/package.json index cd87f15..b2be3da 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/is-primitive/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/is-primitive/package.json @@ -46,7 +46,7 @@ "gitHead": "c512b7c95fb049aa9b1f039ddc0670611b66cce2", "_id": "is-primitive@2.0.0", "_shasum": "207bab91638499c07b2adf240a41a87210034575", - "_from": "is-primitive@>=2.0.0 <3.0.0", + "_from": "is-primitive@^2.0.0", "_npmVersion": "2.5.1", "_nodeVersion": "0.12.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/package.json index 3249b3f..deecf4f 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/package.json @@ -53,7 +53,7 @@ "gitHead": "9478eec6d9322a96a6ceb3e5488cd8433295a95f", "_id": "regex-cache@0.4.2", "_shasum": "6e4f89c266bc03c33fd129c062184687f4663487", - "_from": "regex-cache@>=0.4.2 <0.5.0", + "_from": "regex-cache@^0.4.2", "_npmVersion": "2.7.1", "_nodeVersion": "1.6.2", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/package.json index 621be79..37b0a17 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/package.json @@ -1,7 +1,7 @@ { "name": "micromatch", "description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`.", - "version": "2.2.0", + "version": "2.3.7", "homepage": "https://github.com/jonschlinkert/micromatch", "author": { "name": "Jon Schlinkert", @@ -24,32 +24,36 @@ "node": ">=0.10.0" }, "scripts": { - "test": "mocha", - "prepublish": "browserify -o browser.js -e index.js" + "test": "mocha" }, "dependencies": { - "arr-diff": "^1.0.1", + "arr-diff": "^2.0.0", "array-unique": "^0.2.1", - "braces": "^1.8.0", - "expand-brackets": "^0.1.1", - "extglob": "^0.3.0", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", "filename-regex": "^2.0.0", - "is-glob": "^1.1.3", - "kind-of": "^1.1.0", - "object.omit": "^1.1.0", - "parse-glob": "^3.0.1", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", "regex-cache": "^0.4.2" }, "devDependencies": { "benchmarked": "^0.1.4", - "browserify": "^9.0.8", - "chalk": "^1.0.0", - "minimatch": "^2.0.4", - "minimist": "^1.1.1", - "mocha": "^2.2.4", + "chalk": "^1.1.1", + "gulp": "^3.9.0", + "gulp-eslint": "^1.1.1", + "gulp-istanbul": "^0.10.1", + "gulp-mocha": "^2.1.3", + "minimatch": "^3.0.0", + "minimist": "^1.2.0", + "mocha": "*", "multimatch": "^2.0.0", - "should": "^6.0.1", - "write": "^0.2.0" + "should": "*", + "write": "^0.2.1" }, "keywords": [ "bash", @@ -80,11 +84,6 @@ "wildcard" ], "verb": { - "deps": { - "ignore": [ - "browser.js" - ] - }, "related": { "list": [ "braces", @@ -106,12 +105,12 @@ "verb" ] }, - "gitHead": "5017fd78202e04c684cc31d3c2fb1f469ea222ff", - "_id": "micromatch@2.2.0", - "_shasum": "e7281bf971100827b890e375d994f12034898ff5", - "_from": "micromatch@>=2.1.5 <3.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.12.4", + "gitHead": "cf7209ba3a3c962613509d5ec61a890aaf2a42a0", + "_id": "micromatch@2.3.7", + "_shasum": "2f2e85ef46140dbea6cb55e739b6b11b30eaa509", + "_from": "micromatch@^2.1.5", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" @@ -131,9 +130,9 @@ } ], "dist": { - "shasum": "e7281bf971100827b890e375d994f12034898ff5", - "tarball": "http://registry.npmjs.org/micromatch/-/micromatch-2.2.0.tgz" + "shasum": "2f2e85ef46140dbea6cb55e739b6b11b30eaa509", + "tarball": "http://registry.npmjs.org/micromatch/-/micromatch-2.3.7.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.2.0.tgz" + "_resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.7.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/package.json index c396e37..da2ea1b 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/package.json @@ -47,7 +47,7 @@ "gitHead": "253d2ad42f644ed18557f561312a7f8426daca84", "_id": "anymatch@1.3.0", "_shasum": "a3e52fa39168c825ff57b0248126ce5a8ff95507", - "_from": "anymatch@>=1.1.0 <2.0.0", + "_from": "anymatch@^1.3.0", "_npmVersion": "2.7.3", "_nodeVersion": "1.6.2", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/async-each/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/async-each/package.json index 7b9f1fa..5694ca5 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/async-each/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/async-each/package.json @@ -36,7 +36,7 @@ "_id": "async-each@0.1.6", "scripts": {}, "_shasum": "b67e99edcddf96541e44af56290cd7d5c6e70439", - "_from": "async-each@>=0.1.5 <0.2.0", + "_from": "async-each@^0.1.6", "_npmVersion": "1.4.28", "_npmUser": { "name": "es128", diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/glob-parent/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/glob-parent/package.json index f6c85b9..f0584a5 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/glob-parent/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/glob-parent/package.json @@ -37,7 +37,7 @@ "gitHead": "a956910c7ccb5eafd1b3fe900ceb6335cc5b6d3d", "_id": "glob-parent@2.0.0", "_shasum": "81383d72db054fcccf5336daa902f182f6edbb28", - "_from": "glob-parent@>=2.0.0 <3.0.0", + "_from": "glob-parent@^2.0.0", "_npmVersion": "2.13.3", "_nodeVersion": "3.0.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/LICENSE similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/LICENSE rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/LICENSE diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/README.md similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/README.md rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/README.md diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/inherits.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/inherits.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/inherits.js rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/inherits.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/inherits_browser.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/inherits_browser.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/inherits_browser.js rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/inherits_browser.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/package.json similarity index 83% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/package.json rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/package.json index 93d5078..f601343 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/package.json @@ -16,7 +16,7 @@ "browser": "./inherits_browser.js", "repository": { "type": "git", - "url": "git://github.com/isaacs/inherits.git" + "url": "git://github.com/isaacs/inherits" }, "license": "ISC", "scripts": { @@ -30,7 +30,7 @@ "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" }, - "_from": "inherits@>=2.0.1 <2.1.0", + "_from": "inherits@^2.0.1", "_npmVersion": "1.3.8", "_npmUser": { "name": "isaacs", @@ -44,7 +44,5 @@ ], "directories": {}, "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/isaacs/inherits#readme" + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/test.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/test.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/test.js rename to node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/inherits/test.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/node_modules/binary-extensions/binary-extensions.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/node_modules/binary-extensions/binary-extensions.json index e1b5476..7b200f9 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/node_modules/binary-extensions/binary-extensions.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/node_modules/binary-extensions/binary-extensions.json @@ -175,6 +175,8 @@ "wvx", "xbm", "xif", + "xls", + "xlsx", "xm", "xpi", "xpm", diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/node_modules/binary-extensions/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/node_modules/binary-extensions/package.json index a431bab..bb1a65d 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/node_modules/binary-extensions/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/node_modules/binary-extensions/package.json @@ -1,6 +1,6 @@ { "name": "binary-extensions", - "version": "1.3.1", + "version": "1.4.0", "description": "List of binary file extensions", "license": "MIT", "repository": { @@ -36,23 +36,23 @@ "devDependencies": { "ava": "0.0.4" }, - "gitHead": "38f603a7822c488436c32c67f9f5f505aca09cd3", + "gitHead": "8c3a781127ff15ee516c8bedda97807e4dddf1ff", "bugs": { "url": "https://github.com/sindresorhus/binary-extensions/issues" }, "homepage": "https://github.com/sindresorhus/binary-extensions", - "_id": "binary-extensions@1.3.1", - "_shasum": "32dd9ed2a7c69acec56f77f6cd80df043f78777a", - "_from": "binary-extensions@>=1.0.0 <2.0.0", - "_npmVersion": "2.9.1", - "_nodeVersion": "0.12.3", + "_id": "binary-extensions@1.4.0", + "_shasum": "d733ccb628986d7b326d88656e0ddbd3aac351b7", + "_from": "binary-extensions@^1.0.0", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.1", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { - "shasum": "32dd9ed2a7c69acec56f77f6cd80df043f78777a", - "tarball": "http://registry.npmjs.org/binary-extensions/-/binary-extensions-1.3.1.tgz" + "shasum": "d733ccb628986d7b326d88656e0ddbd3aac351b7", + "tarball": "http://registry.npmjs.org/binary-extensions/-/binary-extensions-1.4.0.tgz" }, "maintainers": [ { @@ -73,5 +73,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.3.1.tgz" + "_resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.4.0.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/package.json index 658558f..f2f560f 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-binary-path/package.json @@ -46,7 +46,7 @@ "homepage": "https://github.com/sindresorhus/is-binary-path", "_id": "is-binary-path@1.0.1", "_shasum": "75f16642b480f187a711c814161fd3a4a7655898", - "_from": "is-binary-path@>=1.0.0 <2.0.0", + "_from": "is-binary-path@^1.0.0", "_npmVersion": "2.10.1", "_nodeVersion": "0.12.4", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-glob/node_modules/is-extglob/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-glob/node_modules/is-extglob/package.json index 66d0318..f409800 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-glob/node_modules/is-extglob/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-glob/node_modules/is-extglob/package.json @@ -50,7 +50,7 @@ ], "_id": "is-extglob@1.0.0", "_shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", - "_from": "is-extglob@>=1.0.0 <2.0.0", + "_from": "is-extglob@^1.0.0", "_npmVersion": "2.5.1", "_nodeVersion": "0.12.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-glob/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-glob/package.json index bfcbb8f..8058b54 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-glob/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/is-glob/package.json @@ -63,7 +63,7 @@ "gitHead": "d7db1b2dd559b3d5a73f89dbe72d9e9f4d6587d7", "_id": "is-glob@2.0.1", "_shasum": "d096f926a3ded5600f3fdfd91198cb0888c2d863", - "_from": "is-glob@>=2.0.0 <3.0.0", + "_from": "is-glob@^2.0.0", "_npmVersion": "2.10.1", "_nodeVersion": "0.12.4", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/LICENSE.txt b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/LICENSE.txt deleted file mode 100644 index 9cd87e5..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/README.md deleted file mode 100644 index 0c28319..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.flatten v3.0.2 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.flatten` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.flatten -``` - -In Node.js/io.js: - -```js -var flatten = require('lodash.flatten'); -``` - -See the [documentation](https://lodash.com/docs#flatten) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.flatten) for more details. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/index.js deleted file mode 100644 index eaafe6a..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * lodash 3.0.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseFlatten = require('lodash._baseflatten'), - isIterateeCall = require('lodash._isiterateecall'); - -/** - * Flattens a nested array. If `isDeep` is `true` the array is recursively - * flattened, otherwise it is only flattened a single level. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, 3, [4]]]); - * // => [1, 2, 3, [4]] - * - * // using `isDeep` - * _.flatten([1, [2, 3, [4]]], true); - * // => [1, 2, 3, 4] - */ -function flatten(array, isDeep, guard) { - var length = array ? array.length : 0; - if (guard && isIterateeCall(array, isDeep, guard)) { - isDeep = false; - } - return length ? baseFlatten(array, isDeep) : []; -} - -module.exports = flatten; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/README.md deleted file mode 100644 index f3e2277..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._baseflatten v3.1.4 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseFlatten` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._baseflatten -``` - -In Node.js/io.js: - -```js -var baseFlatten = require('lodash._baseflatten'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.1.4-npm-packages/lodash._baseflatten) for more details. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/index.js deleted file mode 100644 index c43acfa..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/index.js +++ /dev/null @@ -1,131 +0,0 @@ -/** - * lodash 3.1.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isArguments = require('lodash.isarguments'), - isArray = require('lodash.isarray'); - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/** - * The base implementation of `_.flatten` with added support for restricting - * flattening and specifying the start index. - * - * @private - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, isDeep, isStrict, result) { - result || (result = []); - - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index]; - if (isObjectLike(value) && isArrayLike(value) && - (isStrict || isArray(value) || isArguments(value))) { - if (isDeep) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, isDeep, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = baseFlatten; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/LICENSE deleted file mode 100644 index 9cd87e5..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/README.md deleted file mode 100644 index 2e94f79..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.isarguments v3.0.4 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isArguments` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isarguments -``` - -In Node.js/io.js: - -```js -var isArguments = require('lodash.isarguments'); -``` - -See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isarguments) for more details. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/index.js deleted file mode 100644 index b947b47..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/index.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * lodash 3.0.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Native method references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - return isObjectLike(value) && isArrayLike(value) && - hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); -} - -module.exports = isArguments; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/package.json deleted file mode 100644 index 6e17ce7..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarguments/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "lodash.isarguments", - "version": "3.0.4", - "description": "The modern build of lodash’s `_.isArguments` as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "_id": "lodash.isarguments@3.0.4", - "_shasum": "ebbb884c48d27366a44ea6fee57ed7b5a32a81e0", - "_from": "lodash.isarguments@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - } - ], - "dist": { - "shasum": "ebbb884c48d27366a44ea6fee57ed7b5a32a81e0", - "tarball": "http://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.0.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.0.4.tgz" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/README.md deleted file mode 100644 index ea274aa..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.isarray v3.0.4 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isarray -``` - -In Node.js/io.js: - -```js -var isArray = require('lodash.isarray'); -``` - -See the [documentation](https://lodash.com/docs#isArray) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isarray) for more details. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/index.js deleted file mode 100644 index dd24658..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/index.js +++ /dev/null @@ -1,180 +0,0 @@ -/** - * lodash 3.0.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]', - funcTag = '[object Function]'; - -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var fnToString = Function.prototype.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsArray = getNative(Array, 'isArray'); - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(function() { return arguments; }()); - * // => false - */ -var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; -}; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 equivalents which return 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (value == null) { - return false; - } - if (isFunction(value)) { - return reIsNative.test(fnToString.call(value)); - } - return isObjectLike(value) && reIsHostCtor.test(value); -} - -module.exports = isArray; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/package.json deleted file mode 100644 index 895ccfb..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "lodash.isarray", - "version": "3.0.4", - "description": "The modern build of lodash’s `_.isArray` as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "_id": "lodash.isarray@3.0.4", - "_shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55", - "_from": "lodash.isarray@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - } - ], - "dist": { - "shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55", - "tarball": "http://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/package.json deleted file mode 100644 index 284ac37..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "name": "lodash._baseflatten", - "version": "3.1.4", - "description": "The modern build of lodash’s internal `baseFlatten` as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "dependencies": { - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "_id": "lodash._baseflatten@3.1.4", - "_shasum": "0770ff80131af6e34f3b511796a7ba5214e65ff7", - "_from": "lodash._baseflatten@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - } - ], - "dist": { - "shasum": "0770ff80131af6e34f3b511796a7ba5214e65ff7", - "tarball": "http://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/LICENSE.txt b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/LICENSE.txt deleted file mode 100644 index 9cd87e5..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/README.md deleted file mode 100644 index 0c5c701..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._isiterateecall v3.0.9 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._isiterateecall -``` - -In Node.js/io.js: - -```js -var isIterateeCall = require('lodash._isiterateecall'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash._isiterateecall) for more details. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/index.js deleted file mode 100644 index ea3761b..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/index.js +++ /dev/null @@ -1,132 +0,0 @@ -/** - * lodash 3.0.9 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -/** - * Checks if the provided arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = isIterateeCall; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/package.json deleted file mode 100644 index e769774..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._isiterateecall/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "lodash._isiterateecall", - "version": "3.0.9", - "description": "The modern build of lodash’s internal `isIterateeCall` as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "_id": "lodash._isiterateecall@3.0.9", - "_shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", - "_from": "lodash._isiterateecall@>=3.0.0 <4.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "2.0.2", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", - "tarball": "http://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/package.json deleted file mode 100644 index af1fc33..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "lodash.flatten", - "version": "3.0.2", - "description": "The modern build of lodash’s `_.flatten` as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "dependencies": { - "lodash._baseflatten": "^3.0.0", - "lodash._isiterateecall": "^3.0.0" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "_id": "lodash.flatten@3.0.2", - "_shasum": "de1cf57758f8f4479319d35c3e9cc60c4501938c", - "_from": "lodash.flatten@>=3.0.2 <4.0.0", - "_npmVersion": "2.7.3", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - } - ], - "dist": { - "shasum": "de1cf57758f8f4479319d35c3e9cc60c4501938c", - "tarball": "http://registry.npmjs.org/lodash.flatten/-/lodash.flatten-3.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-3.0.2.tgz" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/graceful-fs/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/graceful-fs/package.json index 58a0b28..b537e3b 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/graceful-fs/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/graceful-fs/package.json @@ -51,7 +51,7 @@ "homepage": "https://github.com/isaacs/node-graceful-fs#readme", "_id": "graceful-fs@4.1.2", "_shasum": "fe2239b7574972e67e41f808823f9bfa4a991e37", - "_from": "graceful-fs@>=4.1.2 <5.0.0", + "_from": "graceful-fs@^4.1.2", "_npmVersion": "3.0.0", "_nodeVersion": "2.2.1", "_npmUser": { diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/.travis.yml b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/.travis.yml index a2870df..cfe1c94 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/.travis.yml +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/.travis.yml @@ -1,6 +1,7 @@ sudo: false language: node_js before_install: + - npm install -g npm@2 - npm install -g npm notifications: email: false @@ -14,23 +15,33 @@ matrix: env: TASK=test - node_js: '0.12' env: TASK=test - - node_js: 'iojs' + - node_js: 1 env: TASK=test - - node_js: 'iojs' + - node_js: 2 + env: TASK=test + - node_js: 3 + env: TASK=test + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: node + env: TASK=test + - node_js: node env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 'iojs' + - node_js: node env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 'iojs' - env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="39..beta" - - node_js: 'iojs' - env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="34..beta" - - node_js: 'iojs' - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - node_js: 'iojs' - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - - node_js: 'iojs' + - node_js: node + env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="41..beta" + - node_js: node + env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="36..latest" + - node_js: node + env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="['6.1', '7.1', '8.2']" + - node_js: node + env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="['6.1', '7.1', '8.2']" + - node_js: node env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" - - node_js: 'iojs' + - node_js: node env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" script: "npm run $TASK" env: diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/doc/stream.markdown b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/doc/stream.markdown index e34dac4..5602f07 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/doc/stream.markdown +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/doc/stream.markdown @@ -3,8 +3,7 @@ Stability: 2 - Stable A stream is an abstract interface implemented by various objects in -io.js. For example a [request to an HTTP -server](https://iojs.org/dist/v2.3.0/doc/api/http.html#http_http_incomingmessage) is a stream, as is +Node.js. For example a [request to an HTTP server][] is a stream, as is [stdout][]. Streams are readable, writable, or both. All streams are instances of [EventEmitter][] @@ -47,8 +46,8 @@ streams in your programs. If you **are** implementing streaming interfaces in your own program, please also refer to [API for Stream Implementors][] below. -Almost all io.js programs, no matter how simple, use Streams in some -way. Here is an example of using Streams in an io.js program: +Almost all Node.js programs, no matter how simple, use Streams in some +way. Here is an example of using Streams in an Node.js program: ```javascript var http = require('http'); @@ -93,6 +92,17 @@ server.listen(1337); // error: Unexpected token o ``` +### Class: stream.Duplex + +Duplex streams are streams that implement both the [Readable][] and +[Writable][] interfaces. See above for usage. + +Examples of Duplex streams include: + +* [tcp sockets][] +* [zlib streams][] +* [crypto streams][] + ### Class: stream.Readable @@ -136,33 +146,22 @@ destinations drain and ask for more data. Examples of readable streams include: -* [http responses, on the client](https://iojs.org/dist/v2.3.0/doc/api/http.html#http_http_incomingmessage) -* [http requests, on the server](https://iojs.org/dist/v2.3.0/doc/api/http.html#http_http_incomingmessage) -* [fs read streams](https://iojs.org/dist/v2.3.0/doc/api/fs.html#fs_class_fs_readstream) +* [http responses, on the client][] +* [http requests, on the server][] +* [fs read streams][] * [zlib streams][] * [crypto streams][] * [tcp sockets][] * [child process stdout and stderr][] * [process.stdin][] -#### Event: 'readable' +#### Event: 'close' -When a chunk of data can be read from the stream, it will emit a -`'readable'` event. +Emitted when the stream and any of its underlying resources (a file +descriptor, for example) have been closed. The event indicates that +no more events will be emitted, and no further computation will occur. -In some cases, listening for a `'readable'` event will cause some data -to be read into the internal buffer from the underlying system, if it -hadn't already. - -```javascript -var readable = getReadableStreamSomehow(); -readable.on('readable', function() { - // there is some data to read now -}); -``` - -Once the internal buffer is drained, a `readable` event will fire -again when more data is available. +Not all streams will emit the 'close' event. #### Event: 'data' @@ -200,93 +199,75 @@ readable.on('end', function() { }); ``` -#### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - #### Event: 'error' * {Error Object} Emitted if there was an error receiving data. -#### readable.read([size]) +#### Event: 'readable' -* `size` {Number} Optional argument to specify how much data to read. -* Return {String | Buffer | null} +When a chunk of data can be read from the stream, it will emit a +`'readable'` event. -The `read()` method pulls some data out of the internal buffer and -returns it. If there is no data available, then it will return -`null`. - -If you pass in a `size` argument, then it will return that many -bytes. If `size` bytes are not available, then it will return `null`. - -If you do not specify a `size` argument, then it will return all the -data in the internal buffer. - -This method should only be called in paused mode. In flowing mode, -this method is called automatically until the internal buffer is -drained. +In some cases, listening for a `'readable'` event will cause some data +to be read into the internal buffer from the underlying system, if it +hadn't already. ```javascript var readable = getReadableStreamSomehow(); readable.on('readable', function() { - var chunk; - while (null !== (chunk = readable.read())) { - console.log('got %d bytes of data', chunk.length); - } + // there is some data to read now }); ``` -If this method returns a data chunk, then it will also trigger the -emission of a [`'data'` event][]. +Once the internal buffer is drained, a `readable` event will fire +again when more data is available. -#### readable.setEncoding(encoding) +The `readable` event is not emitted in the "flowing" mode with the +sole exception of the last one, on end-of-stream. -* `encoding` {String} The encoding to use. -* Return: `this` - -Call this function to cause the stream to return strings of the -specified encoding instead of Buffer objects. For example, if you do -`readable.setEncoding('utf8')`, then the output data will be -interpreted as UTF-8 data, and returned as strings. If you do -`readable.setEncoding('hex')`, then the data will be encoded in -hexadecimal string format. - -This properly handles multi-byte characters that would otherwise be -potentially mangled if you simply pulled the Buffers directly and -called `buf.toString(encoding)` on them. If you want to read the data -as strings, always use this method. +The 'readable' event indicates that the stream has new information: +either new data is available or the end of the stream has been reached. +In the former case, `.read()` will return that data. In the latter case, +`.read()` will return null. For instance, in the following example, `foo.txt` +is an empty file: ```javascript -var readable = getReadableStreamSomehow(); -readable.setEncoding('utf8'); -readable.on('data', function(chunk) { - assert.equal(typeof chunk, 'string'); - console.log('got %d characters of string data', chunk.length); +var fs = require('fs'); +var rr = fs.createReadStream('foo.txt'); +rr.on('readable', function() { + console.log('readable:', rr.read()); +}); +rr.on('end', function() { + console.log('end'); }); ``` -#### readable.resume() +The output of running this script is: -* Return: `this` +``` +bash-3.2$ node test.js +readable: null +end +``` -This method will cause the readable stream to resume emitting `data` -events. +#### readable.isPaused() -This method will switch the stream into flowing mode. If you do *not* -want to consume the data from a stream, but you *do* want to get to -its `end` event, you can call [`readable.resume()`][] to open the flow of -data. +* Return: `Boolean` + +This method returns whether or not the `readable` has been **explicitly** +paused by client code (using `readable.pause()` without a corresponding +`readable.resume()`). ```javascript -var readable = getReadableStreamSomehow(); -readable.resume(); -readable.on('end', function() { - console.log('got to the end, but did not read anything'); -}); +var readable = new stream.Readable + +readable.isPaused() // === false +readable.pause() +readable.isPaused() // === true +readable.resume() +readable.isPaused() // === false ``` #### readable.pause() @@ -310,24 +291,6 @@ readable.on('data', function(chunk) { }); ``` -#### readable.isPaused() - -* Return: `Boolean` - -This method returns whether or not the `readable` has been **explicitly** -paused by client code (using `readable.pause()` without a corresponding -`readable.resume()`). - -```javascript -var readable = new stream.Readable - -readable.isPaused() // === false -readable.pause() -readable.isPaused() // === true -readable.resume() -readable.isPaused() // === false -``` - #### readable.pipe(destination[, options]) * `destination` {[Writable][] Stream} The destination for writing data @@ -380,6 +343,89 @@ reader.on('end', function() { Note that `process.stderr` and `process.stdout` are never closed until the process exits, regardless of the specified options. +#### readable.read([size]) + +* `size` {Number} Optional argument to specify how much data to read. +* Return {String | Buffer | null} + +The `read()` method pulls some data out of the internal buffer and +returns it. If there is no data available, then it will return +`null`. + +If you pass in a `size` argument, then it will return that many +bytes. If `size` bytes are not available, then it will return `null`, +unless we've ended, in which case it will return the data remaining +in the buffer. + +If you do not specify a `size` argument, then it will return all the +data in the internal buffer. + +This method should only be called in paused mode. In flowing mode, +this method is called automatically until the internal buffer is +drained. + +```javascript +var readable = getReadableStreamSomehow(); +readable.on('readable', function() { + var chunk; + while (null !== (chunk = readable.read())) { + console.log('got %d bytes of data', chunk.length); + } +}); +``` + +If this method returns a data chunk, then it will also trigger the +emission of a [`'data'` event][]. + +Note that calling `readable.read([size])` after the `end` event has been +triggered will return `null`. No runtime error will be raised. + +#### readable.resume() + +* Return: `this` + +This method will cause the readable stream to resume emitting `data` +events. + +This method will switch the stream into flowing mode. If you do *not* +want to consume the data from a stream, but you *do* want to get to +its `end` event, you can call [`readable.resume()`][] to open the flow of +data. + +```javascript +var readable = getReadableStreamSomehow(); +readable.resume(); +readable.on('end', function() { + console.log('got to the end, but did not read anything'); +}); +``` + +#### readable.setEncoding(encoding) + +* `encoding` {String} The encoding to use. +* Return: `this` + +Call this function to cause the stream to return strings of the +specified encoding instead of Buffer objects. For example, if you do +`readable.setEncoding('utf8')`, then the output data will be +interpreted as UTF-8 data, and returned as strings. If you do +`readable.setEncoding('hex')`, then the data will be encoded in +hexadecimal string format. + +This properly handles multi-byte characters that would otherwise be +potentially mangled if you simply pulled the Buffers directly and +called `buf.toString(encoding)` on them. If you want to read the data +as strings, always use this method. + +```javascript +var readable = getReadableStreamSomehow(); +readable.setEncoding('utf8'); +readable.on('data', function(chunk) { + assert.equal(typeof chunk, 'string'); + console.log('got %d characters of string data', chunk.length); +}); +``` + #### readable.unpipe([destination]) * `destination` {[Writable][] Stream} Optional specific stream to unpipe @@ -414,6 +460,9 @@ parser, which needs to "un-consume" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party. +Note that `stream.unshift(chunk)` cannot be called after the `end` event +has been triggered; a runtime error will be raised. + If you find that you must often call `stream.unshift(chunk)` in your programs, consider implementing a [Transform][] stream instead. (See API for Stream Implementors, below.) @@ -452,6 +501,13 @@ function parseHeader(stream, callback) { } } ``` +Note that, unlike `stream.push(chunk)`, `stream.unshift(chunk)` will not +end the reading process by resetting the internal reading state of the +stream. This can cause unexpected results if `unshift` is called during a +read (i.e. from within a `_read` implementation on a custom stream). Following +the call to `unshift` with an immediate `stream.push('')` will reset the +reading state appropriately, however it is best to simply avoid calling +`unshift` while in the process of performing a read. #### readable.wrap(stream) @@ -461,13 +517,13 @@ Versions of Node.js prior to v0.10 had streams that did not implement the entire Streams API as it is today. (See "Compatibility" below for more information.) -If you are using an older io.js library that emits `'data'` events and +If you are using an older Node.js library that emits `'data'` events and has a [`pause()`][] method that is advisory only, then you can use the `wrap()` method to create a [Readable][] stream that uses the old stream as its data source. You will very rarely ever need to call this function, but it exists -as a convenience for interacting with old io.js programs and libraries. +as a convenience for interacting with old Node.js programs and libraries. For example: @@ -482,6 +538,16 @@ myReader.on('readable', function() { }); ``` +### Class: stream.Transform + +Transform streams are [Duplex][] streams where the output is in some way +computed from the input. They implement both the [Readable][] and +[Writable][] interfaces. See above for usage. + +Examples of Transform streams include: + +* [zlib streams][] +* [crypto streams][] ### Class: stream.Writable @@ -492,34 +558,15 @@ that you are writing data *to*. Examples of writable streams include: -* [http requests, on the client](https://iojs.org/dist/v2.3.0/doc/api/http.html#http_class_http_clientrequest) -* [http responses, on the server](https://iojs.org/dist/v2.3.0/doc/api/http.html#http_class_http_serverresponse) -* [fs write streams](https://iojs.org/dist/v2.3.0/doc/api/fs.html#fs_class_fs_writestream) +* [http requests, on the client][] +* [http responses, on the server][] +* [fs write streams][] * [zlib streams][] * [crypto streams][] * [tcp sockets][] -* [child process stdin](https://iojs.org/dist/v2.3.0/doc/api/child_process.html#child_process_child_stdin) +* [child process stdin][] * [process.stdout][], [process.stderr][] -#### writable.write(chunk[, encoding][, callback]) - -* `chunk` {String | Buffer} The data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Callback for when this chunk of data is flushed -* Returns: {Boolean} True if the data was handled completely. - -This method writes some data to the underlying system, and calls the -supplied callback once the data has been fully handled. - -The return value indicates if you should continue writing right now. -If the data had to be buffered internally, then it will return -`false`. Otherwise, it will return `true`. - -This return value is strictly advisory. You MAY continue to write, -even if it returns `false`. However, writes will be buffered in -memory, so it is best not to do this excessively. Instead, wait for -the `drain` event before writing more data. - #### Event: 'drain' If a [`writable.write(chunk)`][] call returns false, then the `drain` @@ -527,7 +574,7 @@ event will indicate when it is appropriate to begin writing more data to the stream. ```javascript -// Write the data to the supplied writable stream 1MM times. +// Write the data to the supplied writable stream one million times. // Be attentive to back-pressure. function writeOneMillionTimes(writer, data, encoding, callback) { var i = 1000000; @@ -554,40 +601,11 @@ function writeOneMillionTimes(writer, data, encoding, callback) { } ``` -#### writable.cork() +#### Event: 'error' -Forces buffering of all writes. +* {Error object} -Buffered data will be flushed either at `.uncork()` or at `.end()` call. - -#### writable.uncork() - -Flush all data, buffered since `.cork()` call. - -#### writable.setDefaultEncoding(encoding) - -* `encoding` {String} The new default encoding - -Sets the default encoding for a writable stream. - -#### writable.end([chunk][, encoding][, callback]) - -* `chunk` {String | Buffer} Optional data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Optional callback for when the stream is finished - -Call this method when no more data will be written to the stream. If -supplied, the callback is attached as a listener on the `finish` event. - -Calling [`write()`][] after calling [`end()`][] will raise an error. - -```javascript -// write 'hello, ' and then end with 'world!' -var file = fs.createWriteStream('example.txt'); -file.write('hello, '); -file.end('world!'); -// writing more now is not allowed! -``` +Emitted if there was an error when writing or piping data. #### Event: 'finish' @@ -640,34 +658,59 @@ reader.pipe(writer); reader.unpipe(writer); ``` -#### Event: 'error' +#### writable.cork() -* {Error object} +Forces buffering of all writes. -Emitted if there was an error when writing or piping data. +Buffered data will be flushed either at `.uncork()` or at `.end()` call. -### Class: stream.Duplex +#### writable.end([chunk][, encoding][, callback]) -Duplex streams are streams that implement both the [Readable][] and -[Writable][] interfaces. See above for usage. +* `chunk` {String | Buffer} Optional data to write +* `encoding` {String} The encoding, if `chunk` is a String +* `callback` {Function} Optional callback for when the stream is finished -Examples of Duplex streams include: +Call this method when no more data will be written to the stream. If +supplied, the callback is attached as a listener on the `finish` event. -* [tcp sockets][] -* [zlib streams][] -* [crypto streams][] +Calling [`write()`][] after calling [`end()`][] will raise an error. +```javascript +// write 'hello, ' and then end with 'world!' +var file = fs.createWriteStream('example.txt'); +file.write('hello, '); +file.end('world!'); +// writing more now is not allowed! +``` -### Class: stream.Transform +#### writable.setDefaultEncoding(encoding) -Transform streams are [Duplex][] streams where the output is in some way -computed from the input. They implement both the [Readable][] and -[Writable][] interfaces. See above for usage. +* `encoding` {String} The new default encoding -Examples of Transform streams include: +Sets the default encoding for a writable stream. -* [zlib streams][] -* [crypto streams][] +#### writable.uncork() + +Flush all data, buffered since `.cork()` call. + +#### writable.write(chunk[, encoding][, callback]) + +* `chunk` {String | Buffer} The data to write +* `encoding` {String} The encoding, if `chunk` is a String +* `callback` {Function} Callback for when this chunk of data is flushed +* Returns: {Boolean} True if the data was handled completely. + +This method writes some data to the underlying system, and calls the +supplied callback once the data has been fully handled. + +The return value indicates if you should continue writing right now. +If the data had to be buffered internally, then it will return +`false`. Otherwise, it will return `true`. + +This return value is strictly advisory. You MAY continue to write, +even if it returns `false`. However, writes will be buffered in +memory, so it is best not to do this excessively. Instead, wait for +the `drain` event before writing more data. ## API for Stream Implementors @@ -750,6 +793,49 @@ methods described in [API for Stream Consumers][] above. Otherwise, you can potentially cause adverse side effects in programs that consume your streaming interfaces. +### Class: stream.Duplex + + + +A "duplex" stream is one that is both Readable and Writable, such as a +TCP socket connection. + +Note that `stream.Duplex` is an abstract class designed to be extended +with an underlying implementation of the `_read(size)` and +[`_write(chunk, encoding, callback)`][] methods as you would with a +Readable or Writable stream class. + +Since JavaScript doesn't have multiple prototypal inheritance, this +class prototypally inherits from Readable, and then parasitically from +Writable. It is thus up to the user to implement both the lowlevel +`_read(n)` method as well as the lowlevel +[`_write(chunk, encoding, callback)`][] method on extension duplex classes. + +#### new stream.Duplex(options) + +* `options` {Object} Passed to both Writable and Readable + constructors. Also has the following fields: + * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then + the stream will automatically end the readable side when the + writable side ends and vice versa. + * `readableObjectMode` {Boolean} Default=false. Sets `objectMode` + for readable side of the stream. Has no effect if `objectMode` + is `true`. + * `writableObjectMode` {Boolean} Default=false. Sets `objectMode` + for writable side of the stream. Has no effect if `objectMode` + is `true`. + +In classes that extend the Duplex class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### Class: stream.PassThrough + +This is a trivial implementation of a [Transform][] stream that simply +passes the input bytes across to the output. Its purpose is mainly +for examples and testing, but there are occasionally use cases where +it can come in handy as a building block for novel sorts of streams. + ### Class: stream.Readable @@ -761,6 +847,106 @@ Please see above under [API for Stream Consumers][] for how to consume streams in your programs. What follows is an explanation of how to implement Readable streams in your programs. +#### new stream.Readable([options]) + +* `options` {Object} + * `highWaterMark` {Number} The maximum number of bytes to store in + the internal buffer before ceasing to read from the underlying + resource. Default=16kb, or 16 for `objectMode` streams + * `encoding` {String} If specified, then buffers will be decoded to + strings using the specified encoding. Default=null + * `objectMode` {Boolean} Whether this stream should behave + as a stream of objects. Meaning that stream.read(n) returns + a single value instead of a Buffer of size n. Default=false + +In classes that extend the Readable class, make sure to call the +Readable constructor so that the buffering settings can be properly +initialized. + +#### readable.\_read(size) + +* `size` {Number} Number of bytes to read asynchronously + +Note: **Implement this method, but do NOT call it directly.** + +This method is prefixed with an underscore because it is internal to the +class that defines it and should only be called by the internal Readable +class methods. All Readable stream implementations must provide a _read +method to fetch data from the underlying resource. + +When _read is called, if data is available from the resource, `_read` should +start pushing that data into the read queue by calling `this.push(dataChunk)`. +`_read` should continue reading from the resource and pushing data until push +returns false, at which point it should stop reading from the resource. Only +when _read is called again after it has stopped should it start reading +more data from the resource and pushing that data onto the queue. + +Note: once the `_read()` method is called, it will not be called again until +the `push` method is called. + +The `size` argument is advisory. Implementations where a "read" is a +single call that returns data can use this to know how much data to +fetch. Implementations where that is not relevant, such as TCP or +TLS, may ignore this argument, and simply provide data whenever it +becomes available. There is no need, for example to "wait" until +`size` bytes are available before calling [`stream.push(chunk)`][]. + +#### readable.push(chunk[, encoding]) + +* `chunk` {Buffer | null | String} Chunk of data to push into the read queue +* `encoding` {String} Encoding of String chunks. Must be a valid + Buffer encoding, such as `'utf8'` or `'ascii'` +* return {Boolean} Whether or not more pushes should be performed + +Note: **This method should be called by Readable implementors, NOT +by consumers of Readable streams.** + +If a value other than null is passed, The `push()` method adds a chunk of data +into the queue for subsequent stream processors to consume. If `null` is +passed, it signals the end of the stream (EOF), after which no more data +can be written. + +The data added with `push` can be pulled out by calling the `read()` method +when the `'readable'`event fires. + +This API is designed to be as flexible as possible. For example, +you may be wrapping a lower-level source which has some sort of +pause/resume mechanism, and a data callback. In those cases, you +could wrap the low-level source object by doing something like this: + +```javascript +// source is an object with readStop() and readStart() methods, +// and an `ondata` member that gets called when it has data, and +// an `onend` member that gets called when the data is over. + +util.inherits(SourceWrapper, Readable); + +function SourceWrapper(options) { + Readable.call(this, options); + + this._source = getLowlevelSourceObject(); + var self = this; + + // Every time there's data, we push it into the internal buffer. + this._source.ondata = function(chunk) { + // if push() returns false, then we need to stop reading from source + if (!self.push(chunk)) + self._source.readStop(); + }; + + // When the source ends, we push the EOF-signaling `null` chunk + this._source.onend = function() { + self.push(null); + }; +} + +// _read will be called when the stream wants to pull more data in +// the advisory size argument is ignored in this case. +SourceWrapper.prototype._read = function(size) { + this._source.readStart(); +}; +``` + #### Example: A Counting Stream @@ -883,6 +1069,10 @@ SimpleProtocol.prototype._read = function(n) { // back into the read queue so that our consumer will see it. var b = chunk.slice(split); this.unshift(b); + // calling unshift by itself does not reset the reading state + // of the stream; since we're inside _read, doing an additional + // push('') will reset the state appropriately. + this.push(''); // and let them know that we are done parsing the header. this.emit('header', this.header); @@ -901,112 +1091,191 @@ SimpleProtocol.prototype._read = function(n) { // with the parsed header data. ``` +### Class: stream.Transform -#### new stream.Readable([options]) +A "transform" stream is a duplex stream where the output is causally +connected in some way to the input, such as a [zlib][] stream or a +[crypto][] stream. -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default=16kb, or 16 for `objectMode` streams - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default=null - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that stream.read(n) returns - a single value instead of a Buffer of size n. Default=false +There is no requirement that the output be the same size as the input, +the same number of chunks, or arrive at the same time. For example, a +Hash stream will only ever have a single chunk of output which is +provided when the input is ended. A zlib stream will produce output +that is either much smaller or much larger than its input. -In classes that extend the Readable class, make sure to call the -Readable constructor so that the buffering settings can be properly +Rather than implement the [`_read()`][] and [`_write()`][] methods, Transform +classes must implement the `_transform()` method, and may optionally +also implement the `_flush()` method. (See below.) + +#### new stream.Transform([options]) + +* `options` {Object} Passed to both Writable and Readable + constructors. + +In classes that extend the Transform class, make sure to call the +constructor so that the buffering settings can be properly initialized. -#### readable.\_read(size) +#### Events: 'finish' and 'end' -* `size` {Number} Number of bytes to read asynchronously +The [`finish`][] and [`end`][] events are from the parent Writable +and Readable classes respectively. The `finish` event is fired after +`.end()` is called and all chunks have been processed by `_transform`, +`end` is fired after all data has been output which is after the callback +in `_flush` has been called. -Note: **Implement this function, but do NOT call it directly.** +#### transform.\_flush(callback) -This function should NOT be called directly. It should be implemented -by child classes, and only called by the internal Readable class -methods. +* `callback` {Function} Call this function (optionally with an error + argument) when you are done flushing any remaining data. -All Readable stream implementations must provide a `_read` method to -fetch data from the underlying resource. +Note: **This function MUST NOT be called directly.** It MAY be implemented +by child classes, and if so, will be called by the internal Transform +class methods only. + +In some cases, your transform operation may need to emit a bit more +data at the end of the stream. For example, a `Zlib` compression +stream will store up some internal state so that it can optimally +compress the output. At the end, however, it needs to do the best it +can with what is left, so that the data will be complete. + +In those cases, you can implement a `_flush` method, which will be +called at the very end, after all the written data is consumed, but +before emitting `end` to signal the end of the readable side. Just +like with `_transform`, call `transform.push(chunk)` zero or more +times, as appropriate, and call `callback` when the flush operation is +complete. This method is prefixed with an underscore because it is internal to the class that defines it, and should not be called directly by user programs. However, you **are** expected to override this method in your own extension classes. -When data is available, put it into the read queue by calling -`readable.push(chunk)`. If `push` returns false, then you should stop -reading. When `_read` is called again, you should start pushing more -data. +#### transform.\_transform(chunk, encoding, callback) -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling [`stream.push(chunk)`][]. +* `chunk` {Buffer | String} The chunk to be transformed. Will **always** + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. If chunk is a buffer, then this is the special + value - 'buffer', ignore it in this case. +* `callback` {Function} Call this function (optionally with an error + argument and data) when you are done processing the supplied chunk. -#### readable.push(chunk[, encoding]) +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Transform +class methods only. -* `chunk` {Buffer | null | String} Chunk of data to push into the read queue -* `encoding` {String} Encoding of String chunks. Must be a valid - Buffer encoding, such as `'utf8'` or `'ascii'` -* return {Boolean} Whether or not more pushes should be performed +All Transform stream implementations must provide a `_transform` +method to accept input and produce output. -Note: **This function should be called by Readable implementors, NOT -by consumers of Readable streams.** +`_transform` should do whatever has to be done in this specific +Transform class, to handle the bytes being written, and pass them off +to the readable portion of the interface. Do asynchronous I/O, +process things, and so on. -The `_read()` function will not be called again until at least one -`push(chunk)` call is made. +Call `transform.push(outputChunk)` 0 or more times to generate output +from this input chunk, depending on how much data you want to output +as a result of this chunk. -The `Readable` class works by putting data into a read queue to be -pulled out later by calling the `read()` method when the `'readable'` -event fires. - -The `push()` method will explicitly insert some data into the read -queue. If it is called with `null` then it will signal the end of the -data (EOF). - -This API is designed to be as flexible as possible. For example, -you may be wrapping a lower-level source which has some sort of -pause/resume mechanism, and a data callback. In those cases, you -could wrap the low-level source object by doing something like this: +Call the callback function only when the current chunk is completely +consumed. Note that there may or may not be output as a result of any +particular input chunk. If you supply a second argument to the callback +it will be passed to the push method. In other words the following are +equivalent: ```javascript -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. +transform.prototype._transform = function (data, encoding, callback) { + this.push(data); + callback(); +}; -util.inherits(SourceWrapper, Readable); - -function SourceWrapper(options) { - Readable.call(this, options); - - this._source = getLowlevelSourceObject(); - var self = this; - - // Every time there's data, we push it into the internal buffer. - this._source.ondata = function(chunk) { - // if push() returns false, then we need to stop reading from source - if (!self.push(chunk)) - self._source.readStop(); - }; - - // When the source ends, we push the EOF-signaling `null` chunk - this._source.onend = function() { - self.push(null); - }; -} - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -SourceWrapper.prototype._read = function(size) { - this._source.readStart(); +transform.prototype._transform = function (data, encoding, callback) { + callback(null, data); }; ``` +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +#### Example: `SimpleProtocol` parser v2 + +The example above of a simple protocol parser can be implemented +simply by using the higher level [Transform][] stream class, similar to +the `parseHeader` and `SimpleProtocol v1` examples above. + +In this example, rather than providing the input as an argument, it +would be piped into the parser, which is a more idiomatic Node.js stream +approach. + +```javascript +var util = require('util'); +var Transform = require('stream').Transform; +util.inherits(SimpleProtocol, Transform); + +function SimpleProtocol(options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Transform.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype._transform = function(chunk, encoding, done) { + if (!this._inBody) { + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // and let them know that we are done parsing the header. + this.emit('header', this.header); + + // now, because we got some extra data, emit this first. + this.push(chunk.slice(split)); + } + } else { + // from there on, just provide the data to our consumer as-is. + this.push(chunk); + } + done(); +}; + +// Usage: +// var parser = new SimpleProtocol(); +// source.pipe(parser) +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` ### Class: stream.Writable @@ -1083,239 +1352,7 @@ unnecessary. If implemented, it will be called with all the chunks that are buffered in the write queue. -### Class: stream.Duplex - - - -A "duplex" stream is one that is both Readable and Writable, such as a -TCP socket connection. - -Note that `stream.Duplex` is an abstract class designed to be extended -with an underlying implementation of the `_read(size)` and -[`_write(chunk, encoding, callback)`][] methods as you would with a -Readable or Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this -class prototypally inherits from Readable, and then parasitically from -Writable. It is thus up to the user to implement both the lowlevel -`_read(n)` method as well as the lowlevel -[`_write(chunk, encoding, callback)`][] method on extension duplex classes. - -#### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - * `readableObjectMode` {Boolean} Default=false. Sets `objectMode` - for readable side of the stream. Has no effect if `objectMode` - is `true`. - * `writableObjectMode` {Boolean} Default=false. Sets `objectMode` - for writable side of the stream. Has no effect if `objectMode` - is `true`. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - - -### Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a [zlib][] stream or a -[crypto][] stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will produce output -that is either much smaller or much larger than its input. - -Rather than implement the [`_read()`][] and [`_write()`][] methods, Transform -classes must implement the `_transform()` method, and may optionally -also implement the `_flush()` method. (See below.) - -#### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be transformed. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument and data) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -`_transform` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. If you supply output as the second argument to the -callback, it will be passed to push method, in other words the following are -equivalent: - -```javascript -transform.prototype._transform = function (data, encoding, callback) { - this.push(data); - callback(); -} - -transform.prototype._transform = function (data, encoding, callback) { - callback(null, data); -} -``` - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush` method, which will be -called at the very end, after all the written data is consumed, but -before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `transform.push(chunk)` zero or more -times, as appropriate, and call `callback` when the flush operation is -complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### Events: 'finish' and 'end' - -The [`finish`][] and [`end`][] events are from the parent Writable -and Readable classes respectively. The `finish` event is fired after -`.end()` is called and all chunks have been processed by `_transform`, -`end` is fired after all data has been output which is after the callback -in `_flush` has been called. - -#### Example: `SimpleProtocol` parser v2 - -The example above of a simple protocol parser can be implemented -simply by using the higher level [Transform][] stream class, similar to -the `parseHeader` and `SimpleProtocol v1` examples above. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic io.js stream -approach. - -```javascript -var util = require('util'); -var Transform = require('stream').Transform; -util.inherits(SimpleProtocol, Transform); - -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(chunk.slice(split)); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(chunk); - } - done(); -}; - -// Usage: -// var parser = new SimpleProtocol(); -// source.pipe(parser) -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - - -### Class: stream.PassThrough - -This is a trivial implementation of a [Transform][] stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy as a building block for novel sorts of streams. - - -## Simplified Constructor API +## Simplified Constructor API @@ -1325,40 +1362,21 @@ This can be done by passing the appropriate methods as constructor options: Examples: -### Readable -```javascript -var readable = new stream.Readable({ - read: function(n) { - // sets this._read under the hood - } -}); -``` - -### Writable -```javascript -var writable = new stream.Writable({ - write: function(chunk, encoding, next) { - // sets this._write under the hood - } -}); - -// or - -var writable = new stream.Writable({ - writev: function(chunks, next) { - // sets this._writev under the hood - } -}); -``` - ### Duplex ```javascript var duplex = new stream.Duplex({ read: function(n) { // sets this._read under the hood + + // push data onto the read queue, passing null + // will signal the end of the stream (EOF) + this.push(chunk); }, write: function(chunk, encoding, next) { // sets this._write under the hood + + // An optional error can be passed as the first argument + next() } }); @@ -1367,9 +1385,29 @@ var duplex = new stream.Duplex({ var duplex = new stream.Duplex({ read: function(n) { // sets this._read under the hood + + // push data onto the read queue, passing null + // will signal the end of the stream (EOF) + this.push(chunk); }, writev: function(chunks, next) { // sets this._writev under the hood + + // An optional error can be passed as the first argument + next() + } +}); +``` + +### Readable +```javascript +var readable = new stream.Readable({ + read: function(n) { + // sets this._read under the hood + + // push data onto the read queue, passing null + // will signal the end of the stream (EOF) + this.push(chunk); } }); ``` @@ -1379,9 +1417,43 @@ var duplex = new stream.Duplex({ var transform = new stream.Transform({ transform: function(chunk, encoding, next) { // sets this._transform under the hood + + // generate output as many times as needed + // this.push(chunk); + + // call when the current chunk is consumed + next(); }, flush: function(done) { // sets this._flush under the hood + + // generate output as many times as needed + // this.push(chunk); + + done(); + } +}); +``` + +### Writable +```javascript +var writable = new stream.Writable({ + write: function(chunk, encoding, next) { + // sets this._write under the hood + + // An optional error can be passed as the first argument + next() + } +}); + +// or + +var writable = new stream.Writable({ + writev: function(chunks, next) { + // sets this._writev under the hood + + // An optional error can be passed as the first argument + next() } }); ``` @@ -1395,8 +1467,8 @@ var transform = new stream.Transform({ Both Writable and Readable streams will buffer data on an internal -object called `_writableState.buffer` or `_readableState.buffer`, -respectively. +object which can be retrieved from `_writableState.getBuffer()` or +`_readableState.buffer`, respectively. The amount of data that will potentially be buffered depends on the `highWaterMark` option which is passed into the constructor. @@ -1413,40 +1485,6 @@ The purpose of streams, especially with the `pipe()` method, is to limit the buffering of data to acceptable levels, so that sources and destinations of varying speed will not overwhelm the available memory. -### `stream.read(0)` - -There are some cases where you want to trigger a refresh of the -underlying readable stream mechanisms, without actually consuming any -data. In that case, you can call `stream.read(0)`, which will always -return null. - -If the internal read buffer is below the `highWaterMark`, and the -stream is not currently reading, then calling `read(0)` will trigger -a low-level `_read` call. - -There is almost never a need to do this. However, you will see some -cases in io.js's internals where this is done, particularly in the -Readable stream class internals. - -### `stream.push('')` - -Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an -interesting side effect. Because it *is* a call to -[`stream.push()`][], it will end the `reading` process. However, it -does *not* add any data to the readable buffer, so there's nothing for -a user to consume. - -Very rarely, there are cases where you have no data to provide now, -but the consumer of your stream (or, perhaps, another bit of your own -code) will know when to check again, by calling `stream.read(0)`. In -those cases, you *may* call `stream.push('')`. - -So far, the only use case for this functionality is in the -[tls.CryptoStream][] class, which is deprecated in io.js v1.0. If you -find that you have to use `stream.push('')`, please consider another -approach, because it almost certainly indicates that something is -horribly wrong. - ### Compatibility with Older Node.js Versions @@ -1462,7 +1500,7 @@ simpler, but also less powerful and less useful. meant that you still had to be prepared to receive `'data'` events even when the stream was in a paused state. -In io.js v1.0 and Node.js v0.10, the Readable class described below was added. +In Node.js v0.10, the Readable class described below was added. For backwards compatibility with older Node.js programs, Readable streams switch into "flowing mode" when a `'data'` event handler is added, or when the [`resume()`][] method is called. The effect is that, even if @@ -1492,7 +1530,7 @@ net.createServer(function(socket) { ``` In versions of Node.js prior to v0.10, the incoming message data would be -simply discarded. However, in io.js v1.0 and Node.js v0.10 and beyond, +simply discarded. However, in Node.js v0.10 and beyond, the socket will remain paused forever. The workaround in this situation is to call the `resume()` method to @@ -1539,7 +1577,7 @@ return value from `stream.read()` indicates that there is no more data, and [`stream.push(null)`][] will signal the end of stream data (`EOF`). -No streams in io.js core are object mode streams. This pattern is only +No streams in Node.js core are object mode streams. This pattern is only used by userland streaming libraries. You should set `objectMode` in your stream child class constructor on @@ -1604,25 +1642,66 @@ JSONParseStream.prototype._flush = function(cb) { }; ``` +### `stream.read(0)` -[EventEmitter]: https://iojs.org/dist/v2.3.0/doc/api/events.html#events_class_events_eventemitter +There are some cases where you want to trigger a refresh of the +underlying readable stream mechanisms, without actually consuming any +data. In that case, you can call `stream.read(0)`, which will always +return null. + +If the internal read buffer is below the `highWaterMark`, and the +stream is not currently reading, then calling `read(0)` will trigger +a low-level `_read` call. + +There is almost never a need to do this. However, you will see some +cases in Node.js's internals where this is done, particularly in the +Readable stream class internals. + +### `stream.push('')` + +Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an +interesting side effect. Because it *is* a call to +[`stream.push()`][], it will end the `reading` process. However, it +does *not* add any data to the readable buffer, so there's nothing for +a user to consume. + +Very rarely, there are cases where you have no data to provide now, +but the consumer of your stream (or, perhaps, another bit of your own +code) will know when to check again, by calling `stream.read(0)`. In +those cases, you *may* call `stream.push('')`. + +So far, the only use case for this functionality is in the +[tls.CryptoStream][] class, which is deprecated in Node.js/io.js v1.0. If you +find that you have to use `stream.push('')`, please consider another +approach, because it almost certainly indicates that something is +horribly wrong. + +[request to an HTTP server]: https://nodejs.org/docs/v5.1.0/api/http.html#http_http_incomingmessage +[EventEmitter]: https://nodejs.org/docs/v5.1.0/api/events.html#events_class_events_eventemitter [Object mode]: #stream_object_mode [`stream.push(chunk)`]: #stream_readable_push_chunk_encoding [`stream.push(null)`]: #stream_readable_push_chunk_encoding [`stream.push()`]: #stream_readable_push_chunk_encoding [`unpipe()`]: #stream_readable_unpipe_destination [unpiped]: #stream_readable_unpipe_destination -[tcp sockets]: https://iojs.org/dist/v2.3.0/doc/api/net.html#net_class_net_socket +[tcp sockets]: https://nodejs.org/docs/v5.1.0/api/net.html#net_class_net_socket +[http responses, on the client]: https://nodejs.org/docs/v5.1.0/api/http.html#http_http_incomingmessage +[http requests, on the server]: https://nodejs.org/docs/v5.1.0/api/http.html#http_http_incomingmessage +[http requests, on the client]: https://nodejs.org/docs/v5.1.0/api/http.html#http_class_http_clientrequest +[http responses, on the server]: https://nodejs.org/docs/v5.1.0/api/http.html#http_class_http_serverresponse +[fs read streams]: https://nodejs.org/docs/v5.1.0/api/fs.html#fs_class_fs_readstream +[fs write streams]: https://nodejs.org/docs/v5.1.0/api/fs.html#fs_class_fs_writestream [zlib streams]: zlib.html [zlib]: zlib.html [crypto streams]: crypto.html [crypto]: crypto.html -[tls.CryptoStream]: https://iojs.org/dist/v2.3.0/doc/api/tls.html#tls_class_cryptostream -[process.stdin]: https://iojs.org/dist/v2.3.0/doc/api/process.html#process_process_stdin -[stdout]: https://iojs.org/dist/v2.3.0/doc/api/process.html#process_process_stdout -[process.stdout]: https://iojs.org/dist/v2.3.0/doc/api/process.html#process_process_stdout -[process.stderr]: https://iojs.org/dist/v2.3.0/doc/api/process.html#process_process_stderr -[child process stdout and stderr]: https://iojs.org/dist/v2.3.0/doc/api/child_process.html#child_process_child_stdout +[tls.CryptoStream]: https://nodejs.org/docs/v5.1.0/api/tls.html#tls_class_cryptostream +[process.stdin]: https://nodejs.org/docs/v5.1.0/api/process.html#process_process_stdin +[stdout]: https://nodejs.org/docs/v5.1.0/api/process.html#process_process_stdout +[process.stdout]: https://nodejs.org/docs/v5.1.0/api/process.html#process_process_stdout +[process.stderr]: https://nodejs.org/docs/v5.1.0/api/process.html#process_process_stderr +[child process stdout and stderr]: https://nodejs.org/docs/v5.1.0/api/child_process.html#child_process_child_stdout +[child process stdin]: https://nodejs.org/docs/v5.1.0/api/child_process.html#child_process_child_stdin [API for Stream Consumers]: #stream_api_for_stream_consumers [API for Stream Implementors]: #stream_api_for_stream_implementors [Readable]: #stream_class_stream_readable @@ -1641,7 +1720,7 @@ JSONParseStream.prototype._flush = function(cb) { [`_write(chunk, encoding, callback)`]: #stream_writable_write_chunk_encoding_callback_1 [`_write()`]: #stream_writable_write_chunk_encoding_callback_1 [_write]: #stream_writable_write_chunk_encoding_callback_1 -[`util.inherits`]: https://iojs.org/dist/v2.3.0/doc/api/util.html#util_util_inherits_constructor_superconstructor +[`util.inherits`]: https://nodejs.org/docs/v5.1.0/api/util.html#util_util_inherits_constructor_superconstructor [`end()`]: #stream_writable_end_chunk_encoding_callback [`'data'` event]: #stream_event_data [`resume()`]: #stream_readable_resume diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/lib/_stream_readable.js index eef3d82..50852ae 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/lib/_stream_readable.js @@ -18,10 +18,10 @@ var Buffer = require('buffer').Buffer; Readable.ReadableState = ReadableState; -var EE = require('events').EventEmitter; +var EE = require('events'); /**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { +var EElistenerCount = function(emitter, type) { return emitter.listeners(type).length; }; /**/ @@ -48,9 +48,10 @@ util.inherits = require('inherits'); /**/ -var debug = require('util'); -if (debug && debug.debuglog) { - debug = debug.debuglog('stream'); +var debugUtil = require('util'); +var debug; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); } else { debug = function () {}; } @@ -60,8 +61,9 @@ var StringDecoder; util.inherits(Readable, Stream); +var Duplex; function ReadableState(options, stream) { - var Duplex = require('./_stream_duplex'); + Duplex = Duplex || require('./_stream_duplex'); options = options || {}; @@ -127,8 +129,9 @@ function ReadableState(options, stream) { } } +var Duplex; function Readable(options) { - var Duplex = require('./_stream_duplex'); + Duplex = Duplex || require('./_stream_duplex'); if (!(this instanceof Readable)) return new Readable(options); @@ -219,7 +222,6 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) { } - // if it's past the high water mark, we can push in some more. // Also, if we have no data yet, we can stand some // more bytes. This is to work around cases where hwm=0, @@ -243,15 +245,19 @@ Readable.prototype.setEncoding = function(enc) { return this; }; -// Don't raise the hwm > 128MB +// Don't raise the hwm > 8MB var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { +function computeNewHighWaterMark(n) { if (n >= MAX_HWM) { n = MAX_HWM; } else { // Get the next highest power of 2 n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; n++; } return n; @@ -280,7 +286,7 @@ function howMuchToRead(n, state) { // power of 2, to prevent increasing it excessively in tiny // amounts. if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); + state.highWaterMark = computeNewHighWaterMark(n); // don't have that much. return null, unless we've ended. if (n > state.length) { @@ -546,6 +552,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { var ondrain = pipeOnDrain(src); dest.on('drain', ondrain); + var cleanedUp = false; function cleanup() { debug('cleanup'); // cleanup event handlers once the pipe is broken @@ -558,6 +565,8 @@ Readable.prototype.pipe = function(dest, pipeOpts) { src.removeListener('end', cleanup); src.removeListener('data', ondata); + cleanedUp = true; + // if the reader is waiting for a drain event from this // specific writer, then it would cause it to never start // flowing again. @@ -573,9 +582,16 @@ Readable.prototype.pipe = function(dest, pipeOpts) { debug('ondata'); var ret = dest.write(chunk); if (false === ret) { - debug('false write response, pause', - src._readableState.awaitDrain); - src._readableState.awaitDrain++; + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + if (state.pipesCount === 1 && + state.pipes[0] === dest && + src.listenerCount('data') === 1 && + !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + } src.pause(); } } @@ -586,7 +602,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { debug('onerror', er); unpipe(); dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); } // This is a brutally ugly hack to make sure that our error handler @@ -599,7 +615,6 @@ Readable.prototype.pipe = function(dest, pipeOpts) { dest._events.error = [onerror, dest._events.error]; - // Both close and finish should trigger unpipe, but only once. function onclose() { dest.removeListener('finish', onfinish); @@ -636,7 +651,7 @@ function pipeOnDrain(src) { debug('pipeOnDrain', state.awaitDrain); if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { state.flowing = true; flow(src); } @@ -852,7 +867,6 @@ Readable.prototype.wrap = function(stream) { }; - // exposed for testing purposes only. Readable._fromList = fromList; @@ -877,6 +891,8 @@ function fromList(n, state) { // read it all, truncate the array. if (stringMode) ret = list.join(''); + else if (list.length === 1) + ret = list[0]; else ret = Buffer.concat(list, length); list.length = 0; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/lib/_stream_writable.js index b232952..1fa5eb6 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/lib/_stream_writable.js @@ -1,5 +1,5 @@ // A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all +// Implement an async ._write(chunk, encoding, cb), and it'll handle all // the drain event emission and buffering. 'use strict'; @@ -24,6 +24,13 @@ util.inherits = require('inherits'); /**/ +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + + /**/ var Stream; @@ -48,8 +55,9 @@ function WriteReq(chunk, encoding, cb) { this.next = null; } +var Duplex; function WritableState(options, stream) { - var Duplex = require('./_stream_duplex'); + Duplex = Duplex || require('./_stream_duplex'); options = options || {}; @@ -149,16 +157,17 @@ WritableState.prototype.getBuffer = function writableStateGetBuffer() { (function (){try { Object.defineProperty(WritableState.prototype, 'buffer', { - get: require('util-deprecate')(function() { + get: internalUtil.deprecate(function() { return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use ' + - '_writableState.getBuffer() instead.') + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + + 'instead.') }); }catch(_){}}()); +var Duplex; function Writable(options) { - var Duplex = require('./_stream_duplex'); + Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, though they're not // instanceof Writable, they're instanceof Readable. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/LICENSE new file mode 100644 index 0000000..d8d7f94 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/lib/util.js index 9074e8e..ff4c851 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/lib/util.js @@ -21,8 +21,12 @@ // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; } exports.isArray = isArray; @@ -62,7 +66,7 @@ function isUndefined(arg) { exports.isUndefined = isUndefined; function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; + return objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; @@ -72,13 +76,12 @@ function isObject(arg) { exports.isObject = isObject; function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; + return objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); + return (objectToString(e) === '[object Error]' || e instanceof Error); } exports.isError = isError; @@ -97,11 +100,8 @@ function isPrimitive(arg) { } exports.isPrimitive = isPrimitive; -function isBuffer(arg) { - return Buffer.isBuffer(arg); -} -exports.isBuffer = isBuffer; +exports.isBuffer = Buffer.isBuffer; function objectToString(o) { return Object.prototype.toString.call(o); -} \ No newline at end of file +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/package.json index 2155d11..9d7d088 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/package.json @@ -1,11 +1,11 @@ { "name": "core-util-is", - "version": "1.0.1", + "version": "1.0.2", "description": "The `util.is*` functions introduced in Node v0.12.", "main": "lib/util.js", "repository": { "type": "git", - "url": "git://github.com/isaacs/core-util-is" + "url": "git://github.com/isaacs/core-util-is.git" }, "keywords": [ "util", @@ -27,20 +27,27 @@ "bugs": { "url": "https://github.com/isaacs/core-util-is/issues" }, - "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/isaacs/core-util-is", - "_id": "core-util-is@1.0.1", - "dist": { - "shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", - "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + "scripts": { + "test": "tap test.js" }, - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_npmVersion": "1.3.23", + "devDependencies": { + "tap": "^2.3.0" + }, + "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", + "homepage": "https://github.com/isaacs/core-util-is#readme", + "_id": "core-util-is@1.0.2", + "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "_from": "core-util-is@~1.0.0", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, + "dist": { + "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, "maintainers": [ { "name": "isaacs", @@ -48,6 +55,5 @@ } ], "directories": {}, - "_shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/test.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/test.js new file mode 100644 index 0000000..1a490c6 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml index 5ac9885..36201b1 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml @@ -4,4 +4,9 @@ node_js: - "0.10" - "0.11" - "0.12" - - "iojs" + - "1.7.1" + - 1 + - 2 + - 3 + - 4 + - 5 diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/index.js index 049521c..571c276 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/index.js @@ -1,5 +1,12 @@ 'use strict'; -module.exports = nextTick; + +if (!process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = nextTick; +} else { + module.exports = process.nextTick; +} function nextTick(fn) { var args = new Array(arguments.length - 1); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/package.json index e440c57..f900d76 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/process-nextick-args/package.json @@ -1,6 +1,6 @@ { "name": "process-nextick-args", - "version": "1.0.3", + "version": "1.0.6", "description": "process.nextTick but always with args", "main": "index.js", "scripts": { @@ -19,19 +19,19 @@ "devDependencies": { "tap": "~0.2.6" }, - "gitHead": "e855846a69662b9489f1ad3dde1ebf2ccc4370b8", - "_id": "process-nextick-args@1.0.3", - "_shasum": "e272eed825d5e9f4ea74d8d73b1fe311c3beb630", - "_from": "process-nextick-args@>=1.0.0 <1.1.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "2.5.0", + "gitHead": "e85787b05a8c3c1adb714f332d822e9162699c78", + "_id": "process-nextick-args@1.0.6", + "_shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05", + "_from": "process-nextick-args@~1.0.6", + "_npmVersion": "2.14.4", + "_nodeVersion": "4.1.1", "_npmUser": { "name": "cwmma", "email": "calvin.metcalf@gmail.com" }, "dist": { - "shasum": "e272eed825d5e9f4ea74d8d73b1fe311c3beb630", - "tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz" + "shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05", + "tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz" }, "maintainers": [ { @@ -40,5 +40,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz" + "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/string_decoder/package.json index 21c9cd5..379f735 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -28,7 +28,7 @@ }, "_id": "string_decoder@0.10.31", "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_from": "string_decoder@>=0.10.0 <0.11.0", + "_from": "string_decoder@~0.10.x", "_npmVersion": "1.4.23", "_npmUser": { "name": "rvagg", diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/History.md b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/History.md index ec01029..acc8675 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/History.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/History.md @@ -1,4 +1,9 @@ +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + 1.0.1 / 2014-11-25 ================== diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/browser.js b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/browser.js index 55fa5a4..549ae2f 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/browser.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/browser.js @@ -55,7 +55,12 @@ function deprecate (fn, msg) { */ function config (name) { - if (!global.localStorage) return false; + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } var val = global.localStorage[name]; if (null == val) return false; return String(val).toLowerCase() === 'true'; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/package.json index eb23ba5..d84f860 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/util-deprecate/package.json @@ -1,6 +1,6 @@ { "name": "util-deprecate", - "version": "1.0.1", + "version": "1.0.2", "description": "The Node.js `util.deprecate()` function with browser support", "main": "node.js", "browser": "browser.js", @@ -28,11 +28,12 @@ "url": "https://github.com/TooTallNate/util-deprecate/issues" }, "homepage": "https://github.com/TooTallNate/util-deprecate", - "gitHead": "6e923f7d98a0afbe5b9c7db9d0f0029c1936746c", - "_id": "util-deprecate@1.0.1", - "_shasum": "3556a3d13c4c6aa7983d7e2425478197199b7881", - "_from": "util-deprecate@>=1.0.1 <1.1.0", - "_npmVersion": "1.4.28", + "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", + "_id": "util-deprecate@1.0.2", + "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "_from": "util-deprecate@~1.0.1", + "_npmVersion": "2.14.4", + "_nodeVersion": "4.1.2", "_npmUser": { "name": "tootallnate", "email": "nathan@tootallnate.net" @@ -44,9 +45,9 @@ } ], "dist": { - "shasum": "3556a3d13c4c6aa7983d7e2425478197199b7881", - "tarball": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz" + "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "tarball": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz" + "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/package.json index f3667b9..63075af 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/package.json @@ -1,13 +1,13 @@ { "name": "readable-stream", - "version": "2.0.2", + "version": "2.0.5", "description": "Streams3, a user-land copy of the stream library from iojs v2.x", "main": "readable.js", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", "isarray": "0.0.1", - "process-nextick-args": "~1.0.0", + "process-nextick-args": "~1.0.6", "string_decoder": "~0.10.x", "util-deprecate": "~1.0.1" }, @@ -18,7 +18,8 @@ }, "scripts": { "test": "tap test/parallel/*.js", - "browser": "zuul --browser-name $BROWSER_NAME --browser-version $BROWSER_VERSION -- test/browser.js" + "browser": "npm run write-zuul && zuul -- test/browser.js", + "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" }, "repository": { "type": "git", @@ -33,23 +34,23 @@ "util": false }, "license": "MIT", - "gitHead": "1a70134a71196eeabb5e27bc7580faaa68d30513", + "gitHead": "a4f23d8e451267684a8160679ce16e16149fe72b", "bugs": { "url": "https://github.com/nodejs/readable-stream/issues" }, "homepage": "https://github.com/nodejs/readable-stream#readme", - "_id": "readable-stream@2.0.2", - "_shasum": "bec81beae8cf455168bc2e5b2b31f5bcfaed9b1b", - "_from": "readable-stream@>=2.0.2 <3.0.0", - "_npmVersion": "2.11.1", - "_nodeVersion": "2.3.0", + "_id": "readable-stream@2.0.5", + "_shasum": "a2426f8dcd4551c77a33f96edf2886a23c829669", + "_from": "readable-stream@^2.0.2", + "_npmVersion": "3.3.12", + "_nodeVersion": "5.1.1", "_npmUser": { "name": "cwmma", "email": "calvin.metcalf@gmail.com" }, "dist": { - "shasum": "bec81beae8cf455168bc2e5b2b31f5bcfaed9b1b", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz" + "shasum": "a2426f8dcd4551c77a33f96edf2886a23c829669", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.5.tgz" }, "maintainers": [ { @@ -70,5 +71,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz" + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.5.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/package.json index f88e754..db14a41 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/readdirp/package.json @@ -52,7 +52,7 @@ }, "_id": "readdirp@2.0.0", "_shasum": "cc09ba5d12d8feb864bc75f6e2ebc137060cbd82", - "_from": "readdirp@>=2.0.0 <3.0.0", + "_from": "readdirp@^2.0.0", "_npmVersion": "1.4.28", "_npmUser": { "name": "thlorenz", diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/package.json index 90e8360..0a2b8a6 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/package.json @@ -1,7 +1,7 @@ { "name": "chokidar", "description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.", - "version": "1.2.0", + "version": "1.4.2", "keywords": [ "fs", "watch", @@ -37,6 +37,7 @@ "coveralls": "^2.11.2", "istanbul": "^0.3.20", "mocha": "^2.0.0", + "rimraf": "^2.4.3", "sinon": "^1.10.3", "sinon-chai": "^2.6.0" }, @@ -44,30 +45,25 @@ "fsevents": "^1.0.0" }, "dependencies": { - "anymatch": "^1.1.0", - "arrify": "^1.0.0", - "async-each": "^0.1.5", + "anymatch": "^1.3.0", + "async-each": "^0.1.6", "glob-parent": "^2.0.0", + "inherits": "^2.0.1", "is-binary-path": "^1.0.0", "is-glob": "^2.0.0", - "lodash.flatten": "^3.0.2", "path-is-absolute": "^1.0.0", "readdirp": "^2.0.0", "fsevents": "^1.0.0" }, - "gitHead": "b0e122a984f731c0829973242d05b63e7c79176b", - "_id": "chokidar@1.2.0", - "_shasum": "d7cc02d05e94092ddfacad488ebebe588ff2ff30", - "_from": "chokidar@>=1.0.1 <2.0.0", - "_npmVersion": "2.14.2", - "_nodeVersion": "4.0.0", + "gitHead": "1df57f2631849db749ce56c4125e050937c82106", + "_id": "chokidar@1.4.2", + "_shasum": "3eaea6c2898fa7208184a453d4889a9addf567d2", + "_from": "chokidar@^1.0.1", + "_npmVersion": "3.3.12", + "_nodeVersion": "5.1.1", "_npmUser": { - "name": "es128", - "email": "elan.shanker+npm@gmail.com" - }, - "dist": { - "shasum": "d7cc02d05e94092ddfacad488ebebe588ff2ff30", - "tarball": "http://registry.npmjs.org/chokidar/-/chokidar-1.2.0.tgz" + "name": "paulmillr", + "email": "paul@paulmillr.com" }, "maintainers": [ { @@ -79,6 +75,10 @@ "email": "elan.shanker+npm@gmail.com" } ], + "dist": { + "shasum": "3eaea6c2898fa7208184a453d4889a9addf567d2", + "tarball": "http://registry.npmjs.org/chokidar/-/chokidar-1.4.2.tgz" + }, "directories": {}, - "_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.2.0.tgz" + "_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.4.2.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/LICENSE index 05a4010..19129e3 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/LICENSE +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/LICENSE @@ -1,23 +1,15 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. +The ISC License -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: +Copyright (c) Isaac Z. Schlueter and Contributors -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/README.md index 5b3967e..d458bc2 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/README.md @@ -7,8 +7,6 @@ A minimal matching utility. This is the matching library used internally by npm. -Eventually, it will replace the C binding in node-glob. - It works by converting glob expressions into JavaScript `RegExp` objects. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/minimatch.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/minimatch.js index 4761786..ec4c05c 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/minimatch.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/minimatch.js @@ -1,65 +1,36 @@ -;(function (require, exports, module, platform) { - -if (module) module.exports = minimatch -else exports.minimatch = minimatch - -if (!require) { - require = function (id) { - switch (id) { - case "sigmund": return function sigmund (obj) { - return JSON.stringify(obj) - } - case "path": return { basename: function (f) { - f = f.split(/[\/\\]/) - var e = f.pop() - if (!e) e = f.pop() - return e - }} - case "lru-cache": return function LRUCache () { - // not quite an LRU, but still space-limited. - var cache = {} - var cnt = 0 - this.set = function (k, v) { - cnt ++ - if (cnt >= 100) cache = {} - cache[k] = v - } - this.get = function (k) { return cache[k] } - } - } - } -} - +module.exports = minimatch minimatch.Minimatch = Minimatch -var LRU = require("lru-cache") - , cache = minimatch.cache = new LRU({max: 100}) - , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} - , sigmund = require("sigmund") +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} -var path = require("path") - // any single thing other than / - // don't need to escape / when using new RegExp() - , qmark = "[^/]" +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') - // * => any number of characters - , star = qmark + "*?" +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" +// * => any number of characters +var star = qmark + '*?' - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - // characters that need to be escaped in RegExp. - , reSpecials = charSet("().*{}+?[]^$\\!") +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') // "abc" -> { a:true, b:true, c:true } function charSet (s) { - return s.split("").reduce(function (set, c) { + return s.split('').reduce(function (set, c) { set[c] = true return set }, {}) @@ -110,51 +81,41 @@ Minimatch.defaults = function (def) { return minimatch.defaults(def).Minimatch } - function minimatch (p, pattern, options) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') } if (!options) options = {} // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { + if (!options.nocomment && pattern.charAt(0) === '#') { return false } // "" only matches "" - if (pattern.trim() === "") return p === "" + if (pattern.trim() === '') return p === '' return new Minimatch(pattern, options).match(p) } function Minimatch (pattern, options) { if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options, cache) + return new Minimatch(pattern, options) } - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') } if (!options) options = {} pattern = pattern.trim() - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - pattern = pattern.split("\\").join("/") + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') } - // lru storage. - // these things aren't particularly big, but walking down the string - // and turning it into a regexp can get pretty costly. - var cacheKey = pattern + "\n" + sigmund(options) - var cached = minimatch.cache.get(cacheKey) - if (cached) return cached - minimatch.cache.set(cacheKey, this) - this.options = options this.set = [] this.pattern = pattern @@ -167,7 +128,7 @@ function Minimatch (pattern, options) { this.make() } -Minimatch.prototype.debug = function() {} +Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { @@ -178,7 +139,7 @@ function make () { var options = this.options // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { + if (!options.nocomment && pattern.charAt(0) === '#') { this.comment = true return } @@ -217,7 +178,7 @@ function make () { // filter out everything that didn't compile properly. set = set.filter(function (s) { - return -1 === s.indexOf(false) + return s.indexOf(false) === -1 }) this.debug(this.pattern, set) @@ -228,17 +189,17 @@ function make () { Minimatch.prototype.parseNegate = parseNegate function parseNegate () { var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 + var negate = false + var options = this.options + var negateOffset = 0 if (options.nonegate) return - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { negate = !negate - negateOffset ++ + negateOffset++ } if (negateOffset) this.pattern = pattern.substr(negateOffset) @@ -256,213 +217,34 @@ function parseNegate () { // a{2..}b -> a{2..}b // a{b}c -> a{b}c minimatch.braceExpand = function (pattern, options) { - return new Minimatch(pattern, options).braceExpand() + return braceExpand(pattern, options) } Minimatch.prototype.braceExpand = braceExpand -function pad(n, width, z) { - z = z || '0'; - n = n + ''; - return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; -} - function braceExpand (pattern, options) { - options = options || this.options - pattern = typeof pattern === "undefined" + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') } if (options.nobrace || - !pattern.match(/\{.*\}/)) { + !pattern.match(/\{.*\}/)) { // shortcut. no need to expand. return [pattern] } - var escaping = false - - // examples and comments refer to this crazy pattern: - // a{b,c{d,e},{f,g}h}x{y,z} - // expected: - // abxy - // abxz - // acdxy - // acdxz - // acexy - // acexz - // afhxy - // afhxz - // aghxy - // aghxz - - // everything before the first \{ is just a prefix. - // So, we pluck that off, and work with the rest, - // and then prepend it to everything we find. - if (pattern.charAt(0) !== "{") { - this.debug(pattern) - var prefix = null - for (var i = 0, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - this.debug(i, c) - if (c === "\\") { - escaping = !escaping - } else if (c === "{" && !escaping) { - prefix = pattern.substr(0, i) - break - } - } - - // actually no sets, all { were escaped. - if (prefix === null) { - this.debug("no sets") - return [pattern] - } - - var tail = braceExpand.call(this, pattern.substr(i), options) - return tail.map(function (t) { - return prefix + t - }) - } - - // now we have something like: - // {b,c{d,e},{f,g}h}x{y,z} - // walk through the set, expanding each part, until - // the set ends. then, we'll expand the suffix. - // If the set only has a single member, then'll put the {} back - - // first, handle numeric sets, since they're easier - var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) - if (numset) { - this.debug("numset", numset[1], numset[2]) - var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) - , start = +numset[1] - , needPadding = numset[1][0] === '0' - , startWidth = numset[1].length - , padded - , end = +numset[2] - , inc = start > end ? -1 : 1 - , set = [] - - for (var i = start; i != (end + inc); i += inc) { - padded = needPadding ? pad(i, startWidth) : i + '' - // append all the suffixes - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - set.push(padded + suf[ii]) - } - } - return set - } - - // ok, walk through the set - // We hope, somewhat optimistically, that there - // will be a } at the end. - // If the closing brace isn't found, then the pattern is - // interpreted as braceExpand("\\" + pattern) so that - // the leading \{ will be interpreted literally. - var i = 1 // skip the \{ - , depth = 1 - , set = [] - , member = "" - , sawEnd = false - , escaping = false - - function addMember () { - set.push(member) - member = "" - } - - this.debug("Entering for") - FOR: for (i = 1, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - this.debug("", i, c) - - if (escaping) { - escaping = false - member += "\\" + c - } else { - switch (c) { - case "\\": - escaping = true - continue - - case "{": - depth ++ - member += "{" - continue - - case "}": - depth -- - // if this closes the actual set, then we're done - if (depth === 0) { - addMember() - // pluck off the close-brace - i ++ - break FOR - } else { - member += c - continue - } - - case ",": - if (depth === 1) { - addMember() - } else { - member += c - } - continue - - default: - member += c - continue - } // switch - } // else - } // for - - // now we've either finished the set, and the suffix is - // pattern.substr(i), or we have *not* closed the set, - // and need to escape the leading brace - if (depth !== 0) { - this.debug("didn't close", pattern) - return braceExpand.call(this, "\\" + pattern, options) - } - - // x{y,z} -> ["xy", "xz"] - this.debug("set", set) - this.debug("suffix", pattern.substr(i)) - var suf = braceExpand.call(this, pattern.substr(i), options) - // ["b", "c{d,e}","{f,g}h"] -> - // [["b"], ["cd", "ce"], ["fh", "gh"]] - var addBraces = set.length === 1 - this.debug("set pre-expanded", set) - set = set.map(function (p) { - return braceExpand.call(this, p, options) - }, this) - this.debug("set expanded", set) - - - // [["b"], ["cd", "ce"], ["fh", "gh"]] -> - // ["b", "cd", "ce", "fh", "gh"] - set = set.reduce(function (l, r) { - return l.concat(r) - }) - - if (addBraces) { - set = set.map(function (s) { - return "{" + s + "}" - }) - } - - // now attach the suffixes. - var ret = [] - for (var i = 0, l = set.length; i < l; i ++) { - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - ret.push(set[i] + suf[ii]) - } - } - return ret + return expand(pattern) } // parse a component of the expanded set. @@ -482,87 +264,87 @@ function parse (pattern, isSub) { var options = this.options // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - , self = this + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this function clearStateChar () { if (stateChar) { // we had some state-tracking character // that wasn't consumed by this pass. switch (stateChar) { - case "*": + case '*': re += star hasMagic = true - break - case "?": + break + case '?': re += qmark hasMagic = true - break + break default: - re += "\\"+stateChar - break + re += '\\' + stateChar + break } self.debug('clearStateChar %j %j', stateChar, re) stateChar = false } } - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { - - this.debug("%s\t%s %s %j", pattern, i, re, c) + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) // skip over any that are escaped. if (escaping && reSpecials[c]) { - re += "\\" + c + re += '\\' + c escaping = false continue } - SWITCH: switch (c) { - case "/": + switch (c) { + case '/': // completely not allowed, even escaped. // Should already be path-split by now. return false - case "\\": + case '\\': clearStateChar() escaping = true - continue + continue // the various stateChar values // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) // all of those are literals inside a class, except that // the glob [!a] means [^a] in regexp if (inClass) { this.debug(' in class') - if (c === "!" && i === classStart + 1) c = "^" + if (c === '!' && i === classStart + 1) c = '^' re += c continue } @@ -577,70 +359,77 @@ function parse (pattern, isSub) { // just clear the statechar *now*, rather than even diving into // the patternList stuff. if (options.noext) clearStateChar() - continue + continue - case "(": + case '(': if (inClass) { - re += "(" + re += '(' continue } if (!stateChar) { - re += "\\(" + re += '\\(' continue } plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' this.debug('plType %j %j', stateChar, re) stateChar = false - continue + continue - case ")": + case ')': if (inClass || !patternListStack.length) { - re += "\\)" + re += '\\)' continue } clearStateChar() hasMagic = true - re += ")" - plType = patternListStack.pop().type + re += ')' + var pl = patternListStack.pop() + plType = pl.type // negation is (?:(?!js)[^/]*) // The others are (?:) switch (plType) { - case "!": - re += "[^/]*?)" + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway } - continue + continue - case "|": + case '|': if (inClass || !patternListStack.length || escaping) { - re += "\\|" + re += '\\|' escaping = false continue } clearStateChar() - re += "|" - continue + re += '|' + continue // these are mostly the same in regexp and glob - case "[": + case '[': // swallow any state-tracking char before the [ clearStateChar() if (inClass) { - re += "\\" + c + re += '\\' + c continue } @@ -648,24 +437,47 @@ function parse (pattern, isSub) { classStart = i reClassStart = re.length re += c - continue + continue - case "]": + case ']': // a right bracket shall lose its special // meaning and represent itself in // a bracket expression if it occurs // first in the list. -- POSIX.2 2.8.3.2 if (i === classStart + 1 || !inClass) { - re += "\\" + c + re += '\\' + c escaping = false continue } + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + // finish up the class. hasMagic = true inClass = false re += c - continue + continue default: // swallow any state char that wasn't consumed @@ -675,8 +487,8 @@ function parse (pattern, isSub) { // no need escaping = false } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" + && !(c === '^' && inClass)) { + re += '\\' } re += c @@ -684,7 +496,6 @@ function parse (pattern, isSub) { } // switch } // for - // handle the case where we left a class open. // "[abc" is valid, equivalent to "\[abc" if (inClass) { @@ -692,9 +503,9 @@ function parse (pattern, isSub) { // this is a huge pita. We now have to re-walk // the contents of the would-be class to re-translate // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] hasMagic = hasMagic || sp[1] } @@ -704,14 +515,13 @@ function parse (pattern, isSub) { // and escape any | chars that were passed through as-is for the regexp. // Go through and escape them, taking care not to double-escape any // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + 3) // maybe some even number of \, then maybe 1 \, followed by a | tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { if (!$2) { // the | isn't already escaped, so escape it. - $2 = "\\" + $2 = '\\' } // need to escape all those slashes *again*, without escaping the @@ -720,46 +530,81 @@ function parse (pattern, isSub) { // it exactly after itself. That's why this trick works. // // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" + return $1 + $1 + $2 + '|' }) - this.debug("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail + re = re.slice(0, pl.reStart) + t + '\\(' + tail } // handle trailing things that only matter at the very end. clearStateChar() if (escaping) { // trailing \\ - re += "\\\\" + re += '\\\\' } // only need to apply the nodot start if the re starts with // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe } // if the re is not "" at this point, then we need to make sure // it doesn't match against an empty path part. // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } - if (addPatternStart) re = patternStart + re + if (addPatternStart) { + re = patternStart + re + } // parsing just a piece of a larger pattern. if (isSub === SUBPARSE) { - return [ re, hasMagic ] + return [re, hasMagic] } // skip the regexp for non-magical patterns @@ -769,8 +614,8 @@ function parse (pattern, isSub) { return globUnescape(pattern) } - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) regExp._glob = pattern regExp._src = re @@ -794,34 +639,38 @@ function makeRe () { // when you just want to work with a regex. var set = this.set - if (!set.length) return this.regexp = false + if (!set.length) { + this.regexp = false + return this.regexp + } var options = this.options var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' var re = set.map(function (pattern) { return pattern.map(function (p) { return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') // must match entire pattern // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" + re = '^(?:' + re + ')$' // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" + if (this.negate) re = '^(?!' + re + ').*$' try { - return this.regexp = new RegExp(re, flags) + this.regexp = new RegExp(re, flags) } catch (ex) { - return this.regexp = false + this.regexp = false } + return this.regexp } minimatch.match = function (list, pattern, options) { @@ -838,25 +687,24 @@ minimatch.match = function (list, pattern, options) { Minimatch.prototype.match = match function match (f, partial) { - this.debug("match", f, this.pattern) + this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. if (this.comment) return false - if (this.empty) return f === "" + if (this.empty) return f === '' - if (f === "/" && partial) return true + if (f === '/' && partial) return true var options = this.options // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - f = f.split("\\").join("/") + if (path.sep !== '/') { + f = f.split(path.sep).join('/') } // treat the test path as a set of pathparts. f = f.split(slashSplit) - this.debug(this.pattern, "split", f) + this.debug(this.pattern, 'split', f) // just ONE of the pattern sets in this.set needs to match // in order for it to be valid. If negating, then just one @@ -864,17 +712,19 @@ function match (f, partial) { // Either way, return on the first hit. var set = this.set - this.debug(this.pattern, "set", set) + this.debug(this.pattern, 'set', set) // Find the basename of the path by looking for the last non-empty segment - var filename; - for (var i = f.length - 1; i >= 0; i--) { + var filename + var i + for (i = f.length - 1; i >= 0; i--) { filename = f[i] if (filename) break } - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i], file = f + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f if (options.matchBase && pattern.length === 1) { file = [filename] } @@ -899,23 +749,20 @@ function match (f, partial) { Minimatch.prototype.matchOne = function (file, pattern, partial) { var options = this.options - this.debug("matchOne", - { "this": this - , file: file - , pattern: pattern }) + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) - this.debug("matchOne", file.length, pattern.length) + this.debug('matchOne', file.length, pattern.length) - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - this.debug("matchOne loop") + ; fi++, pi++) { + this.debug('matchOne loop') var p = pattern[pi] - , f = file[fi] + var f = file[fi] this.debug(pattern, p, f) @@ -949,7 +796,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // - matchOne(z/c, c) -> no // - matchOne(c, c) yes, hit var fr = fi - , pr = pi + 1 + var pr = pi + 1 if (pr === pl) { this.debug('** at the end') // a ** at the end will just swallow the rest. @@ -958,19 +805,18 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // options.dot is set. // . and .. are *never* matched by **, for explosively // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false } return true } // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { + while (fr < fl) { var swallowee = file[fr] - this.debug('\nglobstar while', - file, fr, pattern, pr, swallowee) + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) // XXX remove this slice. Just pass the start index. if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { @@ -980,23 +826,24 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { } else { // can't swallow "." or ".." ever. // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - this.debug("dot detected!", file, fr, pattern, pr) - break WHILE + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break } // ** swallows a segment, and continue. this.debug('globstar swallow a segment, and continue') - fr ++ + fr++ } } + // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then if (partial) { // ran out of file - this.debug("\n>>> no match, partial?", file, fr, pattern, pr) + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) if (fr === fl) return true } return false @@ -1006,16 +853,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // non-magic patterns just have to match exactly // patterns with magic have been turned into regexps. var hit - if (typeof p === "string") { + if (typeof p === 'string') { if (options.nocase) { hit = f.toLowerCase() === p.toLowerCase() } else { hit = f === p } - this.debug("string match", p, f, hit) + this.debug('string match', p, f, hit) } else { hit = f.match(p) - this.debug("pattern match", p, f, hit) + this.debug('pattern match', p, f, hit) } if (!hit) return false @@ -1047,27 +894,19 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') return emptyFileEnd } // should be unreachable. - throw new Error("wtf?") + throw new Error('wtf?') } - // replace stuff like \* with * function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") + return s.replace(/\\(.)/g, '$1') } - function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') } - -})( typeof require === "function" ? require : null, - this, - typeof module === "object" ? module : null, - typeof process === "object" ? process.platform : "win32" - ) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml index cc4dba2..6e5919d 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml @@ -1,4 +1,3 @@ language: node_js node_js: - - "0.8" - "0.10" diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md new file mode 100644 index 0000000..2cdc8e4 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md index 2aff0eb..421f3aa 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md @@ -47,6 +47,15 @@ If there's no match, `undefined` will be returned. If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`. +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]`. + ## Installation With [npm](https://npmjs.org) do: diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js index d165ae8..75f3d71 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -1,38 +1,50 @@ module.exports = balanced; function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; + var r = range(a, b, str); - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } - } - } - - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; - } - return m; - } + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i < str.length && i >= 0 && ! result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json index 031cda8..d6c572d 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -1,7 +1,7 @@ { "name": "balanced-match", "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "0.2.0", + "version": "0.3.0", "repository": { "type": "git", "url": "git://github.com/juliangruber/balanced-match.git" @@ -13,7 +13,7 @@ }, "dependencies": {}, "devDependencies": { - "tape": "~1.1.1" + "tape": "~4.2.2" }, "keywords": [ "match", @@ -44,29 +44,29 @@ "android-browser/4.2..latest" ] }, - "gitHead": "ba40ed78e7114a4a67c51da768a100184dead39c", + "gitHead": "a7114b0986554787e90b7ac595a043ca75ea77e5", "bugs": { "url": "https://github.com/juliangruber/balanced-match/issues" }, - "_id": "balanced-match@0.2.0", - "_shasum": "38f6730c03aab6d5edbb52bd934885e756d71674", - "_from": "balanced-match@>=0.2.0 <0.3.0", - "_npmVersion": "2.1.8", - "_nodeVersion": "0.10.32", + "_id": "balanced-match@0.3.0", + "_shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", + "_from": "balanced-match@^0.3.0", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.1", "_npmUser": { "name": "juliangruber", "email": "julian@juliangruber.com" }, + "dist": { + "shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", + "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz" + }, "maintainers": [ { "name": "juliangruber", "email": "julian@juliangruber.com" } ], - "dist": { - "shasum": "38f6730c03aab6d5edbb52bd934885e756d71674", - "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz" + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js index 36bfd39..f5e98e3 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js @@ -52,5 +52,33 @@ test('balanced', function(t) { body: 'innest', post: 'post' }); + t.deepEqual(balanced('{{', '}}', 'pre{{{in}}}post'), { + start: 3, + end: 9, + pre: 'pre', + body: '{in}', + post: 'post' + }); + t.deepEqual(balanced('{{{', '}}', 'pre{{{in}}}post'), { + start: 3, + end: 8, + pre: 'pre', + body: 'in', + post: '}post' + }); + t.deepEqual(balanced('{', '}', 'pre{{first}in{second}post'), { + start: 4, + end: 10, + pre: 'pre{', + body: 'first', + post: 'in{second}post' + }); + t.deepEqual(balanced('', 'prepost'), { + start: 3, + end: 4, + pre: 'pre', + body: '', + post: 'post' + }); t.end(); }); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/package.json index ae574a1..f15c2b2 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -1,7 +1,7 @@ { "name": "brace-expansion", "description": "Brace expansion as known from sh/bash", - "version": "1.1.1", + "version": "1.1.2", "repository": { "type": "git", "url": "git://github.com/juliangruber/brace-expansion.git" @@ -13,11 +13,11 @@ "gentest": "bash test/generate.sh" }, "dependencies": { - "balanced-match": "^0.2.0", + "balanced-match": "^0.3.0", "concat-map": "0.0.1" }, "devDependencies": { - "tape": "^3.0.3" + "tape": "4.2.2" }, "keywords": [], "author": { @@ -42,19 +42,23 @@ "android-browser/4.2..latest" ] }, - "gitHead": "f50da498166d76ea570cf3b30179f01f0f119612", + "gitHead": "b03773a30fa516b1374945b68e9acb6253d595fa", "bugs": { "url": "https://github.com/juliangruber/brace-expansion/issues" }, - "_id": "brace-expansion@1.1.1", - "_shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045", - "_from": "brace-expansion@>=1.0.0 <2.0.0", - "_npmVersion": "2.6.1", - "_nodeVersion": "0.10.36", + "_id": "brace-expansion@1.1.2", + "_shasum": "f21445d0488b658e2771efd870eff51df29f04ef", + "_from": "brace-expansion@^1.0.0", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.1", "_npmUser": { "name": "juliangruber", "email": "julian@juliangruber.com" }, + "dist": { + "shasum": "f21445d0488b658e2771efd870eff51df29f04ef", + "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz" + }, "maintainers": [ { "name": "juliangruber", @@ -65,10 +69,6 @@ "email": "isaacs@npmjs.com" } ], - "dist": { - "shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045", - "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz" + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/.npmignore b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/.npmignore deleted file mode 100644 index 07e6e47..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS deleted file mode 100644 index 4a0bc50..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +++ /dev/null @@ -1,14 +0,0 @@ -# Authors, sorted by whether or not they are me -Isaac Z. Schlueter -Brian Cottingham -Carlos Brito Lage -Jesse Dailey -Kevin O'Hara -Marco Rogers -Mark Cavage -Marko Mikulicic -Nathan Rajlich -Satheesh Natesan -Trent Mick -ashleybrener -n4kz diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/README.md deleted file mode 100644 index 82a6dab..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n) { return n * 2 } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = LRU(options) - , otherCache = LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n){return n.length}`. The default is - `function(n){return 1}`, which is fine if you want to store `n` - like-sized things. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. - -## API - -* `set(key, value, max)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. `max` is optional and overrides the - cache `max` option if provided. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. - -* `length()` - - Return total length of objects in cache taking into account - `length` options function. - -* `itemCount()` - - Return total quantity of objects currently in cache. Note, that - `stale` (see options) items are returned as part of this item - count. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js deleted file mode 100644 index d66e7a2..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +++ /dev/null @@ -1,274 +0,0 @@ -;(function () { // closure for web browsers - -if (typeof module === 'object' && module.exports) { - module.exports = LRUCache -} else { - // just set the global for non-node platforms. - this.LRUCache = LRUCache -} - -function hOP (obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key) -} - -function naiveLength () { return 1 } - -function LRUCache (options) { - if (!(this instanceof LRUCache)) - return new LRUCache(options) - - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - this._max = options.max - // Kind of weird to have a default max of Infinity, but oh well. - if (!this._max || !(typeof this._max === "number") || this._max <= 0 ) - this._max = Infinity - - this._lengthCalculator = options.length || naiveLength - if (typeof this._lengthCalculator !== "function") - this._lengthCalculator = naiveLength - - this._allowStale = options.stale || false - this._maxAge = options.maxAge || null - this._dispose = options.dispose - this.reset() -} - -// resize the cache when the max changes. -Object.defineProperty(LRUCache.prototype, "max", - { set : function (mL) { - if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity - this._max = mL - if (this._length > this._max) trim(this) - } - , get : function () { return this._max } - , enumerable : true - }) - -// resize the cache when the lengthCalculator changes. -Object.defineProperty(LRUCache.prototype, "lengthCalculator", - { set : function (lC) { - if (typeof lC !== "function") { - this._lengthCalculator = naiveLength - this._length = this._itemCount - for (var key in this._cache) { - this._cache[key].length = 1 - } - } else { - this._lengthCalculator = lC - this._length = 0 - for (var key in this._cache) { - this._cache[key].length = this._lengthCalculator(this._cache[key].value) - this._length += this._cache[key].length - } - } - - if (this._length > this._max) trim(this) - } - , get : function () { return this._lengthCalculator } - , enumerable : true - }) - -Object.defineProperty(LRUCache.prototype, "length", - { get : function () { return this._length } - , enumerable : true - }) - - -Object.defineProperty(LRUCache.prototype, "itemCount", - { get : function () { return this._itemCount } - , enumerable : true - }) - -LRUCache.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - var i = 0 - var itemCount = this._itemCount - - for (var k = this._mru - 1; k >= 0 && i < itemCount; k--) if (this._lruList[k]) { - i++ - var hit = this._lruList[k] - if (isStale(this, hit)) { - del(this, hit) - if (!this._allowStale) hit = undefined - } - if (hit) { - fn.call(thisp, hit.value, hit.key, this) - } - } -} - -LRUCache.prototype.keys = function () { - var keys = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - keys[i++] = hit.key - } - return keys -} - -LRUCache.prototype.values = function () { - var values = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - values[i++] = hit.value - } - return values -} - -LRUCache.prototype.reset = function () { - if (this._dispose && this._cache) { - for (var k in this._cache) { - this._dispose(k, this._cache[k].value) - } - } - - this._cache = Object.create(null) // hash of items by key - this._lruList = Object.create(null) // list of items in order of use recency - this._mru = 0 // most recently used - this._lru = 0 // least recently used - this._length = 0 // number of items in the list - this._itemCount = 0 -} - -// Provided for debugging/dev purposes only. No promises whatsoever that -// this API stays stable. -LRUCache.prototype.dump = function () { - return this._cache -} - -LRUCache.prototype.dumpLru = function () { - return this._lruList -} - -LRUCache.prototype.set = function (key, value, maxAge) { - maxAge = maxAge || this._maxAge - var now = maxAge ? Date.now() : 0 - - if (hOP(this._cache, key)) { - // dispose of the old one before overwriting - if (this._dispose) - this._dispose(key, this._cache[key].value) - - this._cache[key].now = now - this._cache[key].maxAge = maxAge - this._cache[key].value = value - this.get(key) - return true - } - - var len = this._lengthCalculator(value) - var hit = new Entry(key, value, this._mru++, len, now, maxAge) - - // oversized objects fall out of cache automatically. - if (hit.length > this._max) { - if (this._dispose) this._dispose(key, value) - return false - } - - this._length += hit.length - this._lruList[hit.lu] = this._cache[key] = hit - this._itemCount ++ - - if (this._length > this._max) - trim(this) - - return true -} - -LRUCache.prototype.has = function (key) { - if (!hOP(this._cache, key)) return false - var hit = this._cache[key] - if (isStale(this, hit)) { - return false - } - return true -} - -LRUCache.prototype.get = function (key) { - return get(this, key, true) -} - -LRUCache.prototype.peek = function (key) { - return get(this, key, false) -} - -LRUCache.prototype.pop = function () { - var hit = this._lruList[this._lru] - del(this, hit) - return hit || null -} - -LRUCache.prototype.del = function (key) { - del(this, this._cache[key]) -} - -function get (self, key, doUse) { - var hit = self._cache[key] - if (hit) { - if (isStale(self, hit)) { - del(self, hit) - if (!self._allowStale) hit = undefined - } else { - if (doUse) use(self, hit) - } - if (hit) hit = hit.value - } - return hit -} - -function isStale(self, hit) { - if (!hit || (!hit.maxAge && !self._maxAge)) return false - var stale = false; - var diff = Date.now() - hit.now - if (hit.maxAge) { - stale = diff > hit.maxAge - } else { - stale = self._maxAge && (diff > self._maxAge) - } - return stale; -} - -function use (self, hit) { - shiftLU(self, hit) - hit.lu = self._mru ++ - self._lruList[hit.lu] = hit -} - -function trim (self) { - while (self._lru < self._mru && self._length > self._max) - del(self, self._lruList[self._lru]) -} - -function shiftLU (self, hit) { - delete self._lruList[ hit.lu ] - while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ -} - -function del (self, hit) { - if (hit) { - if (self._dispose) self._dispose(hit.key, hit.value) - self._length -= hit.length - self._itemCount -- - delete self._cache[ hit.key ] - shiftLU(self, hit) - } -} - -// classy, since V8 prefers predictable objects. -function Entry (key, value, lu, length, now, maxAge) { - this.key = key - this.value = value - this.lu = lu - this.length = length - this.now = now - if (maxAge) this.maxAge = maxAge -} - -})() diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/package.json deleted file mode 100644 index f680462..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "2.6.4", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "keywords": [ - "mru", - "lru", - "cache" - ], - "scripts": { - "test": "tap test --gc" - }, - "main": "lib/lru-cache.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "devDependencies": { - "tap": "^0.7.1", - "weak": "" - }, - "license": "ISC", - "gitHead": "aea58fc0a12714c6e1422963e7ebea66460ec39e", - "bugs": { - "url": "https://github.com/isaacs/node-lru-cache/issues" - }, - "homepage": "https://github.com/isaacs/node-lru-cache#readme", - "_id": "lru-cache@2.6.4", - "_shasum": "2675190ccd1b0701ec2f652a4d0d3d400d76c0dd", - "_from": "lru-cache@>=2.0.0 <3.0.0", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "2675190ccd1b0701ec2f652a4d0d3d400d76c0dd", - "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.4.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/basic.js deleted file mode 100644 index 949113e..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/basic.js +++ /dev/null @@ -1,395 +0,0 @@ -var test = require("tap").test - , LRU = require("../") - -test("basic", function (t) { - var cache = new LRU({max: 10}) - cache.set("key", "value") - t.equal(cache.get("key"), "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.length, 1) - t.equal(cache.max, 10) - t.end() -}) - -test("least recently set", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.get("a") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), "A") - t.end() -}) - -test("del", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.del("a") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("max", function (t) { - var cache = new LRU(3) - - // test changing the max, verify that the LRU items get dropped. - cache.max = 100 - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - - // now remove the max restriction, and try again. - cache.max = "hello" - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - // should trigger an immediate resize - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - t.end() -}) - -test("reset", function (t) { - var cache = new LRU(10) - cache.set("a", "A") - cache.set("b", "B") - cache.reset() - t.equal(cache.length, 0) - t.equal(cache.max, 10) - t.equal(cache.get("a"), undefined) - t.equal(cache.get("b"), undefined) - t.end() -}) - - -// Note: `.dump()` is a debugging tool only. No guarantees are made -// about the format/layout of the response. -test("dump", function (t) { - var cache = new LRU(10) - var d = cache.dump(); - t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache") - cache.set("a", "A") - var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } } - t.ok(d.a) - t.equal(d.a.key, "a") - t.equal(d.a.value, "A") - t.equal(d.a.lu, 0) - - cache.set("b", "B") - cache.get("b") - d = cache.dump() - t.ok(d.b) - t.equal(d.b.key, "b") - t.equal(d.b.value, "B") - t.equal(d.b.lu, 2) - - t.end() -}) - - -test("basic with weighed length", function (t) { - var cache = new LRU({ - max: 100, - length: function (item) { return item.size } - }) - cache.set("key", {val: "value", size: 50}) - t.equal(cache.get("key").val, "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.lengthCalculator(cache.get("key")), 50) - t.equal(cache.length, 50) - t.equal(cache.max, 100) - t.end() -}) - - -test("weighed length item too large", function (t) { - var cache = new LRU({ - max: 10, - length: function (item) { return item.size } - }) - t.equal(cache.max, 10) - - // should fall out immediately - cache.set("key", {val: "value", size: 50}) - - t.equal(cache.length, 0) - t.equal(cache.get("key"), undefined) - t.end() -}) - -test("least recently set with weighed length", function (t) { - var cache = new LRU({ - max:8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.set("d", "DDDD") - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("c"), "CCC") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten with weighed length", function (t) { - var cache = new LRU({ - max: 8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.get("a") - cache.get("b") - cache.set("d", "DDDD") - t.equal(cache.get("c"), undefined) - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("b"), "BB") - t.equal(cache.get("a"), "A") - t.end() -}) - -test("set returns proper booleans", function(t) { - var cache = new LRU({ - max: 5, - length: function (item) { return item.length } - }) - - t.equal(cache.set("a", "A"), true) - - // should return false for max exceeded - t.equal(cache.set("b", "donuts"), false) - - t.equal(cache.set("b", "B"), true) - t.equal(cache.set("c", "CCCC"), true) - t.end() -}) - -test("drop the old items", function(t) { - var cache = new LRU({ - max: 5, - maxAge: 50 - }) - - cache.set("a", "A") - - setTimeout(function () { - cache.set("b", "b") - t.equal(cache.get("a"), "A") - }, 25) - - setTimeout(function () { - cache.set("c", "C") - // timed out - t.notOk(cache.get("a")) - }, 60 + 25) - - setTimeout(function () { - t.notOk(cache.get("b")) - t.equal(cache.get("c"), "C") - }, 90) - - setTimeout(function () { - t.notOk(cache.get("c")) - t.end() - }, 155) -}) - -test("individual item can have it's own maxAge", function(t) { - var cache = new LRU({ - max: 5, - maxAge: 50 - }) - - cache.set("a", "A", 20) - setTimeout(function () { - t.notOk(cache.get("a")) - t.end() - }, 25) -}) - -test("individual item can have it's own maxAge > cache's", function(t) { - var cache = new LRU({ - max: 5, - maxAge: 20 - }) - - cache.set("a", "A", 50) - setTimeout(function () { - t.equal(cache.get("a"), "A") - t.end() - }, 25) -}) - -test("disposal function", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - dispose: function (k, n) { - disposed = n - } - }) - - cache.set(1, 1) - cache.set(2, 2) - t.equal(disposed, 1) - cache.set(3, 3) - t.equal(disposed, 2) - cache.reset() - t.equal(disposed, 3) - t.end() -}) - -test("disposal function on too big of item", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - length: function (k) { - return k.length - }, - dispose: function (k, n) { - disposed = n - } - }) - var obj = [ 1, 2 ] - - t.equal(disposed, false) - cache.set("obj", obj) - t.equal(disposed, obj) - t.end() -}) - -test("has()", function(t) { - var cache = new LRU({ - max: 1, - maxAge: 10 - }) - - cache.set('foo', 'bar') - t.equal(cache.has('foo'), true) - cache.set('blu', 'baz') - t.equal(cache.has('foo'), false) - t.equal(cache.has('blu'), true) - setTimeout(function() { - t.equal(cache.has('blu'), false) - t.end() - }, 15) -}) - -test("stale", function(t) { - var cache = new LRU({ - maxAge: 10, - stale: true - }) - - cache.set('foo', 'bar') - t.equal(cache.get('foo'), 'bar') - t.equal(cache.has('foo'), true) - setTimeout(function() { - t.equal(cache.has('foo'), false) - t.equal(cache.get('foo'), 'bar') - t.equal(cache.get('foo'), undefined) - t.end() - }, 15) -}) - -test("lru update via set", function(t) { - var cache = LRU({ max: 2 }); - - cache.set('foo', 1); - cache.set('bar', 2); - cache.del('bar'); - cache.set('baz', 3); - cache.set('qux', 4); - - t.equal(cache.get('foo'), undefined) - t.equal(cache.get('bar'), undefined) - t.equal(cache.get('baz'), 3) - t.equal(cache.get('qux'), 4) - t.end() -}) - -test("least recently set w/ peek", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - t.equal(cache.peek("a"), "A") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("pop the least used item", function (t) { - var cache = new LRU(3) - , last - - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - - t.equal(cache.length, 3) - t.equal(cache.max, 3) - - // Ensure we pop a, c, b - cache.get("b", "B") - - last = cache.pop() - t.equal(last.key, "a") - t.equal(last.value, "A") - t.equal(cache.length, 2) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "c") - t.equal(last.value, "C") - t.equal(cache.length, 1) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "b") - t.equal(last.value, "B") - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last, null) - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - t.end() -}) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/foreach.js deleted file mode 100644 index 429ebc1..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +++ /dev/null @@ -1,121 +0,0 @@ -var test = require('tap').test -var LRU = require('../') - -test('forEach', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - var i = 9 - l.forEach(function (val, key, cache) { - t.equal(cache, l) - t.equal(key, i.toString()) - t.equal(val, i.toString(2)) - i -= 1 - }) - - // get in order of most recently used - l.get(6) - l.get(8) - - var order = [ 8, 6, 9, 7, 5 ] - var i = 0 - - l.forEach(function (val, key, cache) { - var j = order[i ++] - t.equal(cache, l) - t.equal(key, j.toString()) - t.equal(val, j.toString(2)) - }) - t.equal(i, order.length); - - t.end() -}) - -test('keys() and values()', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - t.similar(l.keys(), ['9', '8', '7', '6', '5']) - t.similar(l.values(), ['1001', '1000', '111', '110', '101']) - - // get in order of most recently used - l.get(6) - l.get(8) - - t.similar(l.keys(), ['8', '6', '9', '7', '5']) - t.similar(l.values(), ['1000', '110', '1001', '111', '101']) - - t.end() -}) - -test('all entries are iterated over', function(t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - var i = 0 - l.forEach(function (val, key, cache) { - if (i > 0) { - cache.del(key) - } - i += 1 - }) - - t.equal(i, 5) - t.equal(l.keys().length, 1) - - t.end() -}) - -test('all stale entries are removed', function(t) { - var l = new LRU({ max: 5, maxAge: -5, stale: true }) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - var i = 0 - l.forEach(function () { - i += 1 - }) - - t.equal(i, 5) - t.equal(l.keys().length, 0) - - t.end() -}) - -test('expires', function (t) { - var l = new LRU({ - max: 10, - maxAge: 50 - }) - for (var i = 0; i < 10; i++) { - l.set(i.toString(), i.toString(2), ((i % 2) ? 25 : undefined)) - } - - var i = 0 - var order = [ 8, 6, 4, 2, 0 ] - setTimeout(function () { - l.forEach(function (val, key, cache) { - var j = order[i++] - t.equal(cache, l) - t.equal(key, j.toString()) - t.equal(val, j.toString(2)) - }) - t.equal(i, order.length); - t.end() - - setTimeout(function () { - var count = 0; - l.forEach(function (val, key, cache) { count++; }) - t.equal(0, count); - t.end() - }, 25) - - }, 26) -}) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js deleted file mode 100644 index 7af45b0..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node --expose_gc - -var weak = require('weak'); -var test = require('tap').test -var LRU = require('../') -var l = new LRU({ max: 10 }) -var refs = 0 -function X() { - refs ++ - weak(this, deref) -} - -function deref() { - refs -- -} - -test('no leaks', function (t) { - // fill up the cache - for (var i = 0; i < 100; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var start = process.memoryUsage() - - // capture the memory - var startRefs = refs - - // do it again, but more - for (var i = 0; i < 10000; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var end = process.memoryUsage() - t.equal(refs, startRefs, 'no leaky refs') - - console.error('start: %j\n' + - 'end: %j', start, end); - t.pass(); - t.end(); -}) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/README.md b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/README.md deleted file mode 100644 index 25a38a5..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# sigmund - -Quick and dirty signatures for Objects. - -This is like a much faster `deepEquals` comparison, which returns a -string key suitable for caches and the like. - -## Usage - -```javascript -function doSomething (someObj) { - var key = sigmund(someObj, maxDepth) // max depth defaults to 10 - var cached = cache.get(key) - if (cached) return cached - - var result = expensiveCalculation(someObj) - cache.set(key, result) - return result -} -``` - -The resulting key will be as unique and reproducible as calling -`JSON.stringify` or `util.inspect` on the object, but is much faster. -In order to achieve this speed, some differences are glossed over. -For example, the object `{0:'foo'}` will be treated identically to the -array `['foo']`. - -Also, just as there is no way to summon the soul from the scribblings -of a cocaine-addled psychoanalyst, there is no way to revive the object -from the signature string that sigmund gives you. In fact, it's -barely even readable. - -As with `util.inspect` and `JSON.stringify`, larger objects will -produce larger signature strings. - -Because sigmund is a bit less strict than the more thorough -alternatives, the strings will be shorter, and also there is a -slightly higher chance for collisions. For example, these objects -have the same signature: - - var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} - var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -Like a good Freudian, sigmund is most effective when you already have -some understanding of what you're looking for. It can help you help -yourself, but you must be willing to do some work as well. - -Cycles are handled, and cyclical objects are silently omitted (though -the key is included in the signature output.) - -The second argument is the maximum depth, which defaults to 10, -because that is the maximum object traversal depth covered by most -insurance carriers. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/bench.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/bench.js deleted file mode 100644 index 5acfd6d..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/bench.js +++ /dev/null @@ -1,283 +0,0 @@ -// different ways to id objects -// use a req/res pair, since it's crazy deep and cyclical - -// sparseFE10 and sigmund are usually pretty close, which is to be expected, -// since they are essentially the same algorithm, except that sigmund handles -// regular expression objects properly. - - -var http = require('http') -var util = require('util') -var sigmund = require('./sigmund.js') -var sreq, sres, creq, cres, test - -http.createServer(function (q, s) { - sreq = q - sres = s - sres.end('ok') - this.close(function () { setTimeout(function () { - start() - }, 200) }) -}).listen(1337, function () { - creq = http.get({ port: 1337 }) - creq.on('response', function (s) { cres = s }) -}) - -function start () { - test = [sreq, sres, creq, cres] - // test = sreq - // sreq.sres = sres - // sreq.creq = creq - // sreq.cres = cres - - for (var i in exports.compare) { - console.log(i) - var hash = exports.compare[i]() - console.log(hash) - console.log(hash.length) - console.log('') - } - - require('bench').runMain() -} - -function customWs (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '') - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return customWs(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + customWs(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function custom (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return '' + obj - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return custom(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + custom(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function sparseFE2 (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k + ':' - ch(v[k], depth + 1) - }) - soFar += '}' - } - ch(obj, 0) - return soFar -} - -function sparseFE (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k - ch(v[k], depth + 1) - }) - } - ch(obj, 0) - return soFar -} - -function sparse (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k - ch(v[k], depth + 1) - } - } - ch(obj, 0) - return soFar -} - -function noCommas (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - - -function flatten (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - soFar += ',' - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - -exports.compare = -{ - // 'custom 2': function () { - // return custom(test, 2, 0) - // }, - // 'customWs 2': function () { - // return customWs(test, 2, 0) - // }, - 'JSON.stringify (guarded)': function () { - var seen = [] - return JSON.stringify(test, function (k, v) { - if (typeof v !== 'object' || !v) return v - if (seen.indexOf(v) !== -1) return undefined - seen.push(v) - return v - }) - }, - - 'flatten 10': function () { - return flatten(test, 10) - }, - - // 'flattenFE 10': function () { - // return flattenFE(test, 10) - // }, - - 'noCommas 10': function () { - return noCommas(test, 10) - }, - - 'sparse 10': function () { - return sparse(test, 10) - }, - - 'sparseFE 10': function () { - return sparseFE(test, 10) - }, - - 'sparseFE2 10': function () { - return sparseFE2(test, 10) - }, - - sigmund: function() { - return sigmund(test, 10) - }, - - - // 'util.inspect 1': function () { - // return util.inspect(test, false, 1, false) - // }, - // 'util.inspect undefined': function () { - // util.inspect(test) - // }, - // 'util.inspect 2': function () { - // util.inspect(test, false, 2, false) - // }, - // 'util.inspect 3': function () { - // util.inspect(test, false, 3, false) - // }, - // 'util.inspect 4': function () { - // util.inspect(test, false, 4, false) - // }, - // 'util.inspect Infinity': function () { - // util.inspect(test, false, Infinity, false) - // } -} - -/** results -**/ diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/package.json deleted file mode 100644 index 4255e77..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "sigmund", - "version": "1.0.1", - "description": "Quick and dirty signatures for Objects.", - "main": "sigmund.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.3.0" - }, - "scripts": { - "test": "tap test/*.js", - "bench": "node bench.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/sigmund.git" - }, - "keywords": [ - "object", - "signature", - "key", - "data", - "psychoanalysis" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "gitHead": "527f97aa5bb253d927348698c0cd3bb267d098c6", - "bugs": { - "url": "https://github.com/isaacs/sigmund/issues" - }, - "homepage": "https://github.com/isaacs/sigmund#readme", - "_id": "sigmund@1.0.1", - "_shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590", - "_from": "sigmund@>=1.0.0 <1.1.0", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590", - "tarball": "http://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/sigmund.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/sigmund.js deleted file mode 100644 index 82c7ab8..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/sigmund.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = sigmund -function sigmund (subject, maxSessions) { - maxSessions = maxSessions || 10; - var notes = []; - var analysis = ''; - var RE = RegExp; - - function psychoAnalyze (subject, session) { - if (session > maxSessions) return; - - if (typeof subject === 'function' || - typeof subject === 'undefined') { - return; - } - - if (typeof subject !== 'object' || !subject || - (subject instanceof RE)) { - analysis += subject; - return; - } - - if (notes.indexOf(subject) !== -1 || session === maxSessions) return; - - notes.push(subject); - analysis += '{'; - Object.keys(subject).forEach(function (issue, _, __) { - // pseudo-private values. skip those. - if (issue.charAt(0) === '_') return; - var to = typeof subject[issue]; - if (to === 'function' || to === 'undefined') return; - analysis += issue; - psychoAnalyze(subject[issue], session + 1); - }); - } - psychoAnalyze(subject, 0); - return analysis; -} - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/test/basic.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/test/basic.js deleted file mode 100644 index 50c53a1..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/test/basic.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test -var sigmund = require('../sigmund.js') - - -// occasionally there are duplicates -// that's an acceptable edge-case. JSON.stringify and util.inspect -// have some collision potential as well, though less, and collision -// detection is expensive. -var hash = '{abc/def/g{0h1i2{jkl' -var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} -var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -var obj3 = JSON.parse(JSON.stringify(obj1)) -obj3.c = /def/ -obj3.g[2].cycle = obj3 -var cycleHash = '{abc/def/g{0h1i2{jklcycle' - -test('basic', function (t) { - t.equal(sigmund(obj1), hash) - t.equal(sigmund(obj2), hash) - t.equal(sigmund(obj3), cycleHash) - t.end() -}) - diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/package.json index b19f668..bfe9e78 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/package.json @@ -6,37 +6,57 @@ }, "name": "minimatch", "description": "a glob matcher in javascript", - "version": "1.0.0", + "version": "2.0.10", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" }, "main": "minimatch.js", "scripts": { - "test": "tap test/*.js" + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js", + "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare" }, "engines": { "node": "*" }, "dependencies": { - "lru-cache": "2", - "sigmund": "~1.0.0" + "brace-expansion": "^1.0.0" }, "devDependencies": { - "tap": "" + "browserify": "^9.0.3", + "standard": "^3.7.2", + "tap": "^1.2.0" }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" - }, - "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself if this option is set. When not set, an empty list\nis returned if there are no matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", - "readmeFilename": "README.md", + "license": "ISC", + "files": [ + "minimatch.js", + "browser.js" + ], + "gitHead": "6afb85f0c324b321f76a38df81891e562693e257", "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, "homepage": "https://github.com/isaacs/minimatch#readme", - "_id": "minimatch@1.0.0", - "_shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", - "_from": "minimatch@>=1.0.0 <1.1.0" + "_id": "minimatch@2.0.10", + "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", + "_from": "minimatch@~2.0.0", + "_npmVersion": "3.1.0", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/basic.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/basic.js deleted file mode 100644 index ae7ac73..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/basic.js +++ /dev/null @@ -1,399 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - - -var patterns = - [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - // https://github.com/isaacs/minimatch/issues/5 - , function () { - files = [ 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' - , 'a/b/.x' - , 'a/b/.x/' - , 'a/.x/b' - , '.x' - , '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b/.x/c' - , '.x/.x' ] - } - , ["**/.x/**", [ '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b' - , 'a/b/.x/' - , 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' ] ] - - ] - -var regexps = - [ '/^(?:(?=.)a[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:\\*)$/', - '/^(?:(?=.)\\*[^/]*?)$/', - '/^(?:\\*\\*)$/', - '/^(?:(?=.)b[^/]*?\\/)$/', - '/^(?:(?=.)c[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/', - '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/', - '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/', - '/^(?:(?=.)a[^/]*?[^c])$/', - '/^(?:(?=.)a[X-]b)$/', - '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/', - '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[^/]c)$/', - '/^(?:a\\*c)$/', - 'false', - '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/', - '/^(?:man\\/man1\\/bash\\.1)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?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/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/', - '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/', - '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/', - '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/', - '/^(?:(?=.)a[^/]b)$/', - '/^(?:(?=.)#[^/]*?)$/', - '/^(?!^(?:(?=.)a[^/]*?)$).*$/', - '/^(?:(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)a[^/]*?)$/', - '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ] -var re = 0; - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - patterns.forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var m = new mm.Minimatch(pattern, options) - var r = m.makeRe() - var expectRe = regexps[re++] - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - - t.equal(tapOpts.re, expectRe, tapOpts) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/brace-expand.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/brace-expand.js deleted file mode 100644 index e63d3f6..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/brace-expand.js +++ /dev/null @@ -1,40 +0,0 @@ -var tap = require("tap") - , minimatch = require("../") - -tap.test("brace expansion", function (t) { - // [ pattern, [expanded] ] - ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" - , [ "abxy" - , "abxz" - , "acdxy" - , "acdxz" - , "acexy" - , "acexz" - , "afhxy" - , "afhxz" - , "aghxy" - , "aghxz" ] ] - , [ "a{1..5}b" - , [ "a1b" - , "a2b" - , "a3b" - , "a4b" - , "a5b" ] ] - , [ "a{b}c", ["a{b}c"] ] - , [ "a{00..05}b" - , ["a00b" - ,"a01b" - ,"a02b" - ,"a03b" - ,"a04b" - ,"a05b" ] ] - ].forEach(function (tc) { - var p = tc[0] - , expect = tc[1] - t.equivalent(minimatch.braceExpand(p), expect, p) - }) - console.error("ending") - t.end() -}) - - diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/caching.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/caching.js deleted file mode 100644 index 0fec4b0..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/caching.js +++ /dev/null @@ -1,14 +0,0 @@ -var Minimatch = require("../minimatch.js").Minimatch -var tap = require("tap") -tap.test("cache test", function (t) { - var mm1 = new Minimatch("a?b") - var mm2 = new Minimatch("a?b") - t.equal(mm1, mm2, "should get the same object") - // the lru should drop it after 100 entries - for (var i = 0; i < 100; i ++) { - new Minimatch("a"+i) - } - mm2 = new Minimatch("a?b") - t.notEqual(mm1, mm2, "cache should have dropped") - t.end() -}) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/defaults.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/defaults.js deleted file mode 100644 index 75e0571..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/defaults.js +++ /dev/null @@ -1,274 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - ; [ "http://www.bashcookbook.com/bashinfo" + - "/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - ].forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var Class = mm.defaults(options).Minimatch - var m = new Class(pattern, {}) - var r = m.makeRe() - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/extglob-ending-with-state-char.js b/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/extglob-ending-with-state-char.js deleted file mode 100644 index 6676e26..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/test/extglob-ending-with-state-char.js +++ /dev/null @@ -1,8 +0,0 @@ -var test = require('tap').test -var minimatch = require('../') - -test('extglob ending with statechar', function(t) { - t.notOk(minimatch('ax', 'a?(b*)')) - t.ok(minimatch('ax', '?(a*|b)')) - t.end() -}) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/.gitignore b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/.gitignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/.gitignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/package.json index 0046472..615d4a0 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/package.json @@ -34,14 +34,30 @@ "email": "mail@substack.net", "url": "http://substack.net" }, - "readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n", - "readmeFilename": "README.markdown", + "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d", "bugs": { "url": "https://github.com/substack/node-wordwrap/issues" }, "homepage": "https://github.com/substack/node-wordwrap#readme", "_id": "wordwrap@0.0.3", "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", + "_from": "wordwrap@>=0.0.1 <0.1.0", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", + "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "_from": "wordwrap@>=0.0.1 <0.1.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/node_modules/optimist/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/node_modules/optimist/package.json index 8cbe088..fc2106d 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/node_modules/optimist/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/node_modules/optimist/package.json @@ -20,7 +20,7 @@ }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/substack/node-optimist.git" + "url": "git://github.com/substack/node-optimist.git" }, "keywords": [ "argument", @@ -40,14 +40,29 @@ "engine": { "node": ">=0.4" }, - "readme": "optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", - "readmeFilename": "README.markdown", - "bugs": { - "url": "https://github.com/substack/node-optimist/issues" + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" }, - "homepage": "https://github.com/substack/node-optimist#readme", "_id": "optimist@0.2.8", + "engines": { + "node": "*" + }, + "_engineSupported": true, + "_npmVersion": "1.0.99", + "_nodeVersion": "v0.4.12", + "_defaultsLoaded": true, + "dist": { + "shasum": "e981ab7e268b457948593b55674c099a815cac31", + "tarball": "http://registry.npmjs.org/optimist/-/optimist-0.2.8.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], "_shasum": "e981ab7e268b457948593b55674c099a815cac31", - "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.2.8.tgz", - "_from": "optimist@>=0.2.0 <0.3.0" + "_from": "optimist@0.2", + "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.2.8.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/package.json index 8cd75e2..0315abf 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/package.json @@ -5,7 +5,7 @@ "homepage": "http://github.com/dominictarr/event-stream", "repository": { "type": "git", - "url": "git+https://github.com/dominictarr/event-stream.git" + "url": "git://github.com/dominictarr/event-stream.git" }, "dependencies": { "optimist": "0.2" @@ -20,13 +20,30 @@ "email": "dominic.tarr@gmail.com", "url": "http://bit.ly/dominictarr" }, - "readme": "# EventStream\n\n[Streams](http://nodejs.org/api/streams.html \"Stream\") are nodes best and most misunderstood idea, and \n_EventStream_ is a toolkit to make creating and working with streams easy. \n\nNormally, streams are only used of IO, \nbut in event stream we send all kinds of objects down the pipe. \nIf your application's input and output are streams, \nshouldn't the throughput be a stream too? \n\nThe *EventStream* functions resemble the array functions, \nbecause Streams are like Arrays, but laid out in time, rather than in memory. \n\nAll the `event-stream` functions return instances of `Stream`.\n\nStream API docs: [nodejs.org/api/streams](http://nodejs.org/api/streams.html \"Stream\")\n\nNOTE: I shall use the term \"through stream\" to refer to a stream that is writable and readable. \n\n###[simple example](https://github.com/dominictarr/event-stream/blob/master/examples/pretty.js):\n\n``` js\n\n//pretty.js\n\nif(!module.parent) {\n var es = require('event-stream')\n es.connect( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n }\n```\nrun it ...\n\n``` bash \ncurl -sS registry.npmjs.org/event-stream | node pretty.js\n```\n \n[test are in event-stream_tests](https://github.com/dominictarr/event-stream_tests)\n\n[node Stream documentation](http://nodejs.org/api/streams.html)\n\n##map (asyncFunction)\n\nCreate a through stream from an asyncronous function. \n\n``` js\nvar es = require('event-stream')\n\nes.map(function (data, callback) {\n //transform data\n // ...\n callback(null, data)\n})\n\n```\n\nEach map MUST call the callback. It may callback with data, with an error or with no arguments, \n\n * `callback()` drop this data. \n this makes the map work like `filter`, \n note:`callback(null,null)` is not the same, and will emit `null`\n\n * `callback(null, newData)` turn data into newData\n \n * `callback(error)` emit an error for this item.\n\n>Note: if a callback is not called, `map` will think that it is still being processed, \n>every call must be answered or the stream will not know when to end. \n>\n>Also, if the callback is called more than once, every call but the first will be ignored.\n\n##readable (asyncFunction) \n\ncreate a readable stream (that respects pause) from an async function. \nwhile the stream is not paused, \nthe function will be polled with `(count, callback)`, \nand `this` will be the readable stream.\n\n``` js\n\nes.readable(function (count, callback) {\n if(streamHasEnded)\n return this.emit('end')\n \n //...\n \n this.emit('data', data) //use this way to emit multiple chunks per call.\n \n callback() // you MUST always call the callback eventually.\n // the function will not be called again until you do this.\n})\n```\nyou can also pass the data and the error to the callback. \nyou may only call the callback once. \ncalling the same callback more than once will have no effect. \n\n##readArray (array)\n\nCreate a readable stream from an Array.\n\nJust emit each item as a data event, respecting `pause` and `resume`.\n\n``` js\n var es = require('event-stream')\n , reader = es.readArray([1,2,3])\n\n reader.pipe(...)\n```\n\n## writeArray (callback)\n\ncreate a writeable stream from a callback, \nall `data` events are stored in an array, which is passed to the callback when the stream ends.\n\n``` js\n var es = require('event-stream')\n , reader = es.readArray([1, 2, 3])\n , writer = es.writeArray(function (err, array){\n //array deepEqual [1, 2, 3]\n })\n\n reader.pipe(writer)\n```\n\n## split ()\n\nBreak up a stream and reassemble it so that each line is a chunk. \n\nExample, read every line in a file ...\n\n``` js\n es.connect(\n fs.createReadStream(file, {flags: 'r'}),\n es.split(),\n es.map(function (line, cb) {\n //do something with the line \n cb(null, line)\n })\n )\n\n```\n\n## connect (stream1,...,streamN)\n\nConnect multiple Streams together into one stream. \n`connect` will return a Stream. This stream will write to the first stream,\nand will emit data from the last stream. \n\nListening for 'error' will recieve errors from all streams inside the pipe.\n\n``` js\n\n es.connect( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n```\n\n## gate (isShut=true) \n\nIf the gate is `shut`, buffer the stream. \nAll calls to write will return false (pause upstream), \nand end will not be sent downstream. \n\nIf the gate is open, let the stream through. \n\nNamed `shut` instead of close, because close is already kinda meaningful with streams. \n\nGate is useful for holding off processing a stream until some resource (i.e. a database, or network connection) is ready. \n\n``` js\n\n var gate = es.gate()\n \n gate.open() //allow the gate to stream\n \n gate.close() //buffer the stream, also do not allow 'end' \n\n```\n\n## duplex\n\nTakes a writable stream and a readable stream and makes them appear as a readable writable stream.\n\nIt is assumed that the two streams are connected to each other in some way. \n\n(This is used by `connect` and `child`.)\n\n``` js\n var grep = cp.exec('grep Stream')\n\n es.duplex(grep.stdin, grep.stdout)\n```\n\n## child (child_process)\n\nCreate a through stream from a child process ...\n\n``` js\n var cp = require('child_process')\n\n es.child(cp.exec('grep Stream')) // a through stream\n\n```\n\n## pipeable (streamCreatorFunction,...)\n\nThe arguments to pipable must be functions that return \ninstances of Stream or async functions. \n(If a function is returned, it will be turned into a Stream \nwith `es.map`.)\n\nHere is the first example rewritten to use `pipeable`.\n\n``` js\n//examples/pretty_pipeable.js\nvar inspect = require('util').inspect\n\nif(!module.parent)\n require('event-stream').pipeable(function () {\n return function (data, callback) {\n try {\n data = JSON.parse(data)\n } catch (err) {} //pass non JSON straight through!\n callback(null, inspect(data))\n }\n }) \n })\n```\n\n``` bash\n\ncurl -sS registry.npmjs.org/event-stream | node pipeable_pretty.js\n\n## or, turn the pipe into a server!\n\nnode pipeable_pretty.js --port 4646\n\ncurl -sS registry.npmjs.org/event-stream | curl -sSNT- localhost:4646\n\n```\n## compatible modules:\n\n * https://github.com/felixge/node-growing-file \n stream changes on file that is being appended to. just like `tail -f`\n\n * https://github.com/isaacs/sax-js \n streaming xml parser\n\n * https://github.com/mikeal/request \n make http requests. request() returns a through stream!\n\n * https://github.com/TooTallNate/node-throttle \n throttle streams on a bytes per second basis (binary streams only, of course)\n \n * https://github.com/mikeal/morestreams \n buffer input until connected to a pipe.\n \n * https://github.com/TooTallNate/node-gzip-stack \n compress and decompress raw streams.\n\n * https://github.com/Floby/node-json-streams \n parse json without buffering it first\n \n * https://github.com/floby/node-tokenizer \n tokenizer\n \n * https://github.com/floby/node-parser \n general mechanisms for custom parsers\n \n * https://github.com/dodo/node-bufferstream \n buffer streams until you say (written in C)\n\n * https://github.com/tim-smart/node-filter \n `filter` pipeable string.replace\n \n\n## almost compatible modules: (1+ these issues)\n\n * https://github.com/fictorial/json-line-protocol/issues/1 \n line reader\n \n * https://github.com/jahewson/node-byline/issues/1 \n line reader\n\n * https://github.com/AvianFlu/ntwitter/issues/3 \n twitter client\n\n * https://github.com/swdyh/node-chirpstream/issues/1 \n twitter client\n \n * https://github.com/polotek/evented-twitter/issues/22 \n twitter client\n\n\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/event-stream/issues" + "_npmUser": { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" }, "_id": "event-stream@0.5.3", + "engines": { + "node": "*" + }, + "_engineSupported": true, + "_npmVersion": "1.0.101", + "_nodeVersion": "v0.4.10", + "_defaultsLoaded": true, + "dist": { + "shasum": "b77b9309f7107addfeab63f0c0eafd8db0bd8c1c", + "tarball": "http://registry.npmjs.org/event-stream/-/event-stream-0.5.3.tgz" + }, + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "directories": {}, "_shasum": "b77b9309f7107addfeab63f0c0eafd8db0bd8c1c", - "_resolved": "https://registry.npmjs.org/event-stream/-/event-stream-0.5.3.tgz", - "_from": "event-stream@>=0.5.0 <0.6.0" + "_from": "event-stream@~0.5", + "_resolved": "https://registry.npmjs.org/event-stream/-/event-stream-0.5.3.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/test/.gitignore b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/test/.gitignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/node_modules/event-stream/test/.gitignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/package.json index 7ae8224..b944683 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/package.json +++ b/node_modules/forever/node_modules/forever-monitor/node_modules/ps-tree/package.json @@ -5,7 +5,7 @@ "homepage": "http://github.com/indexzero/ps-tree", "repository": { "type": "git", - "url": "git+https://github.com/indexzero/ps-tree.git" + "url": "https://github.com/indexzero/ps-tree.git" }, "dependencies": { "event-stream": "~0.5" @@ -13,13 +13,28 @@ "author": { "name": "Charlie Robbins" }, - "readme": "#ps-tree\n\nsometimes you cannot kill child processes like you would expect, \nthis a feature of UNIX.\n\n>in UNIX, a process may terminate by using the exit call, and it's parent process may wait for that event by using the wait system call. the wait system call returns the process identifier of a terminated child, so that the parent tell which of the possibly many children has terminated. If the parent terminates, however, all it's children have assigned as their new parent the init process. Thus, the children still have a parent to collect their status and execution statistics. \n> (from \"operating system concepts\")\n\nsolution: use `ps-tree` to get all processes that a child_process may have started, so that they may all be terminated.\n\n``` js\n var cp = require('child_process'),\n psTree = require('ps-tree')\n \n var child = cp.exec(\"node -e 'while (true);'\",function () {...})\n\n child.kill() //this will not actually kill the child it will kill the `sh` process.\n\n```\n\nwtf? it's because exec actually works like this:\n\n``` js\nfunction exec (cmd, cb) {\n spawn('sh', ['-c', cmd])\n ...\n}\n\n```\n\nsh starts parses the command string and starts processes, and waits for them to terminate. \nbut exec returns a process object with the pid of the sh process. \nbut since it is in `wait` mode killing it does not kill the children.\n\nused ps tree like this:\n\n``` js\n\n var cp = require('child_process'),\n psTree = require('ps-tree')\n \n var child = cp.exec(\"node -e 'while (true);'\",function () {...})\n\n psTree(child.pid, function (err, children) {\n cp.spawn('kill', ['-9'].concat(children.map(function (p) {return p.PID})))\n })\n\n```", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/indexzero/ps-tree/issues" - }, "_id": "ps-tree@0.0.3", + "dist": { + "shasum": "dbf8d752a7fe22fa7d58635689499610e9276ddc", + "tarball": "http://registry.npmjs.org/ps-tree/-/ps-tree-0.0.3.tgz" + }, + "_npmVersion": "1.1.66", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], + "directories": {}, "_shasum": "dbf8d752a7fe22fa7d58635689499610e9276ddc", - "_resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-0.0.3.tgz", - "_from": "ps-tree@>=0.0.0 <0.1.0" + "_from": "ps-tree@0.0.x", + "_resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-0.0.3.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/LICENSE b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/LICENSE deleted file mode 100644 index a4a9aee..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/cli.js b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/cli.js deleted file mode 100755 index deec465..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/cli.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var argv = require('minimist')(process.argv.slice(2)) -var exec = require('child_process').exec -var watch = require('./main.js') - -if(argv._.length === 0) { - console.error('Usage: watch [directory] [--wait=]') - process.exit() -} - -var command = argv._[0] -var dir = argv._[1] || process.cwd() -var waitTime = Number(argv.wait || argv.w) - -console.error('> Watching', dir) - -var wait = false - -watch.watchTree(dir, function (f, curr, prev) { - if(wait) return - - var run = exec(command) - run.stdout.pipe(process.stdout) - run.stderr.pipe(process.stderr) - - if(waitTime > 0) { - wait = true - setTimeout(function () { - wait = false - }, waitTime * 1000) - } -}) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/main.js b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/main.js deleted file mode 100644 index b919a28..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/main.js +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2010-2011 Mikeal Rogers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -var sys = require('util') - , fs = require('fs') - , path = require('path') - , events = require('events') - ; - -function walk (dir, options, callback) { - if (!callback) {callback = options; options = {}} - if (!callback.files) callback.files = {}; - if (!callback.pending) callback.pending = 0; - callback.pending += 1; - fs.stat(dir, function (err, stat) { - if (err) return callback(err); - callback.files[dir] = stat; - fs.readdir(dir, function (err, files) { - if (err) { - if(err.code === 'EACCES' && options.ignoreUnreadableDir) return callback(); - return callback(err); - } - callback.pending -= 1; - files.forEach(function (f, index) { - f = path.join(dir, f); - callback.pending += 1; - fs.stat(f, function (err, stat) { - var enoent = false - , done = false; - - if (err) { - if (err.code !== 'ENOENT') { - return callback(err); - } else { - enoent = true; - } - } - callback.pending -= 1; - done = callback.pending === 0; - if (!enoent) { - if (options.ignoreDotFiles && path.basename(f)[0] === '.') return done && callback(null, callback.files); - if (options.filter && !options.filter(f, stat)) return done && callback(null, callback.files); - callback.files[f] = stat; - if (stat.isDirectory() && !(options.ignoreDirectoryPattern && options.ignoreDirectoryPattern.test(f))) walk(f, options, callback); - done = callback.pending === 0; - if (done) callback(null, callback.files); - } - }) - }) - if (callback.pending === 0) callback(null, callback.files); - }) - if (callback.pending === 0) callback(null, callback.files); - }) - -} - -var watchedFiles = Object.create(null); - -exports.watchTree = function ( root, options, callback ) { - if (!callback) {callback = options; options = {}} - walk(root, options, function (err, files) { - if (err) throw err; - var fileWatcher = function (f) { - fs.watchFile(f, options, function (c, p) { - // Check if anything actually changed in stat - if (files[f] && !files[f].isDirectory() && c.nlink !== 0 && files[f].mtime.getTime() == c.mtime.getTime()) return; - files[f] = c; - if (!files[f].isDirectory()) callback(f, c, p); - else { - fs.readdir(f, function (err, nfiles) { - if (err) return; - nfiles.forEach(function (b) { - var file = path.join(f, b); - if (!files[file] && (options.ignoreDotFiles !== true || b[0] != '.')) { - fs.stat(file, function (err, stat) { - if (options.filter && !options.filter(file, stat)) return; - callback(file, stat, null); - files[file] = stat; - fileWatcher(file); - }) - } - }) - }) - } - if (c.nlink === 0) { - // unwatch removed files. - delete files[f] - fs.unwatchFile(f); - } - }) - } - fileWatcher(root); - for (var i in files) { - fileWatcher(i); - } - watchedFiles[root] = files; - callback(files, null, null); - }) -} - -exports.unwatchTree = function (root) { - if (!watchedFiles[root]) return; - Object.keys(watchedFiles[root]).forEach(fs.unwatchFile); - watchedFiles[root] = false; -}; - -exports.createMonitor = function (root, options, cb) { - if (!cb) {cb = options; options = {}} - var monitor = new events.EventEmitter(); - monitor.stop = exports.unwatchTree.bind(null, root); - - var prevFile = {file: null,action: null,stat: null}; - exports.watchTree(root, options, function (f, curr, prev) { - if (typeof f == "object" && prev == null && curr === null) { - monitor.files = f; - return cb(monitor); - } - if (prev === null && (prevFile.file != f || prevFile.action != "created")) { - prevFile = { file: f, action: "created", stat: curr }; - return monitor.emit("created", f, curr); - } - if (curr.nlink === 0 && (prevFile.file != f || prevFile.action != "removed")) { - prevFile = { file: f, action: "removed", stat: curr }; - return monitor.emit("removed", f, curr); - } - if (prevFile.file === null || prevFile.stat.mtime.getTime() !== curr.mtime.getTime()) { - monitor.emit("changed", f, curr, prev); - } - }) -} - -exports.walk = walk; diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/package.json deleted file mode 100644 index de06e01..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "minimist", - "version": "1.1.1", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "covert": "^1.0.0", - "tap": "~0.4.0", - "tape": "^3.5.0" - }, - "scripts": { - "test": "tap test/*.js", - "coverage": "covert test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a boolean, string or array of strings to always treat as\nbooleans. if `true` will treat all double hyphenated arguments without equal signs\nas boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n* `opts.stopEarly` - when true, populate `argv._` with everything after the\nfirst non-option\n* `opts['--']` - when true, populate `argv._` with everything before the `--`\nand `argv['--']` with everything after the `--`. Here's an example:\n* `opts.unknown` - a function which is invoked with a command line parameter not\ndefined in the `opts` configuration object. If the function returns `false`, the\nunknown option is not added to `argv`.\n\n```\n> require('./')('one two three -- four five --six'.split(' '), { '--': true })\n{ _: [ 'one', 'two', 'three' ],\n '--': [ 'four', 'five', '--six' ] }\n```\n\nNote that with `opts['--']` set, parsing for arguments still stops after the\n`--`.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@1.1.1", - "_shasum": "1bc2bc71658cdca5712475684363615b0b4f695b", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.1.tgz", - "_from": "minimist@>=1.1.0 <2.0.0" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/all_bool.js b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/all_bool.js deleted file mode 100644 index ac83548..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/all_bool.js +++ /dev/null @@ -1,32 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); - -test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/stop_early.js b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/stop_early.js deleted file mode 100644 index bdf9fbc..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/stop_early.js +++ /dev/null @@ -1,15 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true - }); - - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'] - }); - - t.end(); -}); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/unknown.js b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/unknown.js deleted file mode 100644 index 462a36b..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/unknown.js +++ /dev/null @@ -1,102 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'true', '--derp', 'true' ]; - var regular = [ '--herp', 'true', '-d', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [] - }); - t.end(); -}); - -test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; - var regular = [ '--herp', 'hello', '-d', 'moon' ]; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello' ]; - var regular = [ '--herp', 'hello' ]; - var opts = { - default: { 'h': 'bar' }, - alias: { 'h': 'herp' }, - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage -}); - -test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '--bad', '--', 'good', 'arg' ]; - var opts = { - '--': true, - unknown: unknownFn - }; - var argv = parse(aliased, opts); - - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - '_': [] - }) - t.end(); -}); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/package.json b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/package.json deleted file mode 100644 index a688fd0..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "watch", - "description": "Utilities for watching file trees.", - "tags": [ - "util", - "utility", - "fs", - "files" - ], - "bin": { - "watch": "./cli.js" - }, - "version": "0.13.0", - "homepage": "https://github.com/mikeal/watch", - "bugs": { - "url": "https://github.com/mikeal/watch/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/mikeal/watch.git" - }, - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com" - }, - "directories": { - "lib": "lib" - }, - "engines": [ - "node >=0.1.95" - ], - "main": "./main", - "dependencies": { - "minimist": "^1.1.0" - }, - "readme": "# watch -- Utilities for watching file trees in node.js\n\n## Install\n\n
\n  npm install watch\n
\n\n## Purpose\n\nThe intention of this module is provide tools that make managing the watching of file & directory trees easier.\n\n#### watch.watchTree(root, [options,] callback)\n\nThe first argument is the directory root you want to watch.\n\nThe options object is passed to fs.watchFile but can also be used to provide two additional watchTree specific options:\n\n* `'ignoreDotFiles'` - When true this option means that when the file tree is walked it will ignore files that being with \".\"\n* `'filter'` - You can use this option to provide a function that returns true or false for each file and directory to decide whether or not that file/directory is included in the watcher.\n* `'ignoreUnreadableDir'` - When true, this options means that when a file can't be read, this file is silently skipped.\n* `'ignoreDirectoryPattern'` - When a regex pattern is set, e.g. /node_modules/, these directories are silently skipped.\n\nThe callback takes 3 arguments. The first is the file that was modified. The second is the current stat object for that file and the third is the previous stat object.\n\nWhen a file is new the previous stat object is null.\n\nWhen watchTree is finished walking the tree and adding all the listeners it passes the file hash (keys are the file/directory names and the values are the current stat objects) as the first argument and null as both the previous and current stat object arguments.\n\n
\n  watch.watchTree('/home/mikeal', function (f, curr, prev) {\n    if (typeof f == \"object\" && prev === null && curr === null) {\n      // Finished walking the tree\n    } else if (prev === null) {\n      // f is a new file\n    } else if (curr.nlink === 0) {\n      // f was removed\n    } else {\n      // f was changed\n    }\n  })\n
\n\n### watch.unwatchTree(root)\n\nUnwatch a previously watched directory root using `watch.watchTree`.\n\n### watch.createMonitor(root, [options,] callback)\n\nThis function creates an EventEmitter that gives notifications for different changes that happen to the file and directory tree under the given root argument.\n\nThe options object is passed to watch.watchTree.\n\nThe callback receives the monitor object.\n\nThe monitor object contains a property, `files`, which is a hash of files and directories as keys with the current stat object as the value.\n\nThe monitor has the following events.\n\n* `'created'` - New file has been created. Two arguments, the filename and the stat object.\n* `'removed'` - A file has been moved or deleted. Two arguments, the filename and the stat object for the fd.\n* `'changed'` - A file has been changed. Three arguments, the filename, the current stat object, and the previous stat object.\n\nThe monitor can be stopped using `.stop` (calls `unwatchTree`).\n\n
\n  var watch = require('watch')\n  watch.createMonitor('/home/mikeal', function (monitor) {\n    monitor.files['/home/mikeal/.zshrc'] // Stat object for my zshrc.\n    monitor.on(\"created\", function (f, stat) {\n      // Handle new files\n    })\n    monitor.on(\"changed\", function (f, curr, prev) {\n      // Handle file changes\n    })\n    monitor.on(\"removed\", function (f, stat) {\n      // Handle removed files\n    })\n    monitor.stop(); // Stop watching\n  })\n
\n\n### CLI\n\nThis module includes a simple command line interface, which you can install with `npm install watch -g`.\n\n```\nUsage: watch [directory] [--wait=]\n```\n\nIt will watch the given directory (defaults to the current working directory) with `watchTree` and run\nthe given command every time a file changes. The optional `wait` parameter specifies a time in seconds\nthat the watching will be disabled after running a command.\n\n", - "readmeFilename": "readme.mkd", - "_id": "watch@0.13.0", - "_shasum": "fcc6d2b3f0e8c73482eb54239a19fd5bcf9a753c", - "_resolved": "https://registry.npmjs.org/watch/-/watch-0.13.0.tgz", - "_from": "watch@>=0.13.0 <0.14.0" -} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/readme.mkd b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/readme.mkd deleted file mode 100644 index 75cdc33..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/readme.mkd +++ /dev/null @@ -1,94 +0,0 @@ -# watch -- Utilities for watching file trees in node.js - -## Install - -
-  npm install watch
-
- -## Purpose - -The intention of this module is provide tools that make managing the watching of file & directory trees easier. - -#### watch.watchTree(root, [options,] callback) - -The first argument is the directory root you want to watch. - -The options object is passed to fs.watchFile but can also be used to provide two additional watchTree specific options: - -* `'ignoreDotFiles'` - When true this option means that when the file tree is walked it will ignore files that being with "." -* `'filter'` - You can use this option to provide a function that returns true or false for each file and directory to decide whether or not that file/directory is included in the watcher. -* `'ignoreUnreadableDir'` - When true, this options means that when a file can't be read, this file is silently skipped. -* `'ignoreDirectoryPattern'` - When a regex pattern is set, e.g. /node_modules/, these directories are silently skipped. - -The callback takes 3 arguments. The first is the file that was modified. The second is the current stat object for that file and the third is the previous stat object. - -When a file is new the previous stat object is null. - -When watchTree is finished walking the tree and adding all the listeners it passes the file hash (keys are the file/directory names and the values are the current stat objects) as the first argument and null as both the previous and current stat object arguments. - -
-  watch.watchTree('/home/mikeal', function (f, curr, prev) {
-    if (typeof f == "object" && prev === null && curr === null) {
-      // Finished walking the tree
-    } else if (prev === null) {
-      // f is a new file
-    } else if (curr.nlink === 0) {
-      // f was removed
-    } else {
-      // f was changed
-    }
-  })
-
- -### watch.unwatchTree(root) - -Unwatch a previously watched directory root using `watch.watchTree`. - -### watch.createMonitor(root, [options,] callback) - -This function creates an EventEmitter that gives notifications for different changes that happen to the file and directory tree under the given root argument. - -The options object is passed to watch.watchTree. - -The callback receives the monitor object. - -The monitor object contains a property, `files`, which is a hash of files and directories as keys with the current stat object as the value. - -The monitor has the following events. - -* `'created'` - New file has been created. Two arguments, the filename and the stat object. -* `'removed'` - A file has been moved or deleted. Two arguments, the filename and the stat object for the fd. -* `'changed'` - A file has been changed. Three arguments, the filename, the current stat object, and the previous stat object. - -The monitor can be stopped using `.stop` (calls `unwatchTree`). - -
-  var watch = require('watch')
-  watch.createMonitor('/home/mikeal', function (monitor) {
-    monitor.files['/home/mikeal/.zshrc'] // Stat object for my zshrc.
-    monitor.on("created", function (f, stat) {
-      // Handle new files
-    })
-    monitor.on("changed", function (f, curr, prev) {
-      // Handle file changes
-    })
-    monitor.on("removed", function (f, stat) {
-      // Handle removed files
-    })
-    monitor.stop(); // Stop watching
-  })
-
- -### CLI - -This module includes a simple command line interface, which you can install with `npm install watch -g`. - -``` -Usage: watch [directory] [--wait=] -``` - -It will watch the given directory (defaults to the current working directory) with `watchTree` and run -the given command every time a file changes. The optional `wait` parameter specifies a time in seconds -that the watching will be disabled after running a command. - diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/release.sh b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/release.sh deleted file mode 100755 index 05e7767..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/release.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -npm version minor && npm publish && npm version patch && git push --tags && git push origin master diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_monitor.js b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_monitor.js deleted file mode 100644 index 59e776d..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_monitor.js +++ /dev/null @@ -1,31 +0,0 @@ -var watch = require('../main') - , assert = require('assert') - , path = require('path') - , fs = require('fs') - , target = path.join(__dirname, "d/t") - ; - -function clearFile() { - fs.writeFileSync(target, '') -} - -clearFile() - -// test if changed event is fired correctly -watch.createMonitor(__dirname, { interval: 150 }, - function (monitor) { - monitor.once('changed', function (f) { - assert.equal(f, target); - clearFile(); - process.exit(0) - }) - - fs.writeFile(target, 'Test Write\n', function (err) { - if (err) throw err; - - setTimeout(function () { - // should have got the other assert done by now - assert.ok(false); - }, 300); - }) -}); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_monitorRootDirectory.js b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_monitorRootDirectory.js deleted file mode 100644 index e3df595..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_monitorRootDirectory.js +++ /dev/null @@ -1,28 +0,0 @@ -var fs, watch, watch_original; -watch = require('../main'); -watch_original = require('watch'); -fs = require('fs'); - -watch.createMonitor(__dirname, function (monitor) { - monitor.on("created", function (f, stat) { - console.log(f + " created"); - }); - monitor.on("changed", function (f, curr, prev) { - console.log(f + " changed"); - }); - monitor.on("removed", function (f, stat) { - console.log(f + " removed"); - }); -}); - -watch_original.createMonitor(__dirname, function (monitor) { - monitor.on("created", function (f, stat) { - console.log("ORIGINAL: " + f + " created"); - }); - monitor.on("changed", function (f, curr, prev) { - console.log("ORIGINAL: " + f + " changed"); - }); - monitor.on("removed", function (f, stat) { - console.log("ORIGINAL: " + f + " removed"); - }); -}); \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_watchTree.js b/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_watchTree.js deleted file mode 100644 index 727b22d..0000000 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/test/test_watchTree.js +++ /dev/null @@ -1,23 +0,0 @@ -var fs = require('fs') - , watch = require('../main') - , assert = require('assert') - ; - -// -// Demonstrate that the function of 'filter' is semantically inconsistent with -// usual convention, that returning true means 'keep this'. -// -function isDirOrQ(f, stat) { return stat.isDirectory() || f === 'Q'; } - -watch.watchTree(__dirname, { filter: isDirOrQ }, function (f, curr, prev) { - if (typeof f == 'object' && prev === null && curr === null) { - Object.keys(f).forEach(function(name) { - var stat = f[name]; - assert(isDirOrQ(name, stat)); - }); - - // If the process never exits then `unwatchTree` failed to unwatch all - // the files. - watch.unwatchTree(__dirname); - } -}); diff --git a/node_modules/forever/node_modules/forever-monitor/package.json b/node_modules/forever/node_modules/forever-monitor/package.json index f6d22b9..3cb7915 100644 --- a/node_modules/forever/node_modules/forever-monitor/package.json +++ b/node_modules/forever/node_modules/forever-monitor/package.json @@ -1,7 +1,7 @@ { "name": "forever-monitor", "description": "Core forever process monitor", - "version": "1.5.2", + "version": "1.6.0", "author": { "name": "Charlie Robbins", "email": "charlie.robbins@gmail.com" @@ -34,7 +34,7 @@ ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/nodejitsu/forever-monitor.git" + "url": "http://github.com/nodejitsu/forever-monitor.git" }, "keywords": [ "fault tolerant", @@ -43,9 +43,9 @@ ], "dependencies": { "broadway": "~0.3.6", - "minimatch": "~1.0.0", + "chokidar": "^1.0.1", + "minimatch": "~2.0.0", "ps-tree": "0.0.x", - "watch": "~0.13.0", "utile": "~0.2.1" }, "devDependencies": { @@ -56,17 +56,38 @@ "scripts": { "test": "vows test/**/*-test.js --spec -i" }, + "license": "MIT", "engines": { "node": ">= 0.8.x" }, - "readme": "# forever-monitor [![Build Status](https://secure.travis-ci.org/nodejitsu/forever-monitor.png)](http://travis-ci.org/nodejitsu/forever-monitor)\n\nThe core monitoring functionality of forever without the CLI\n\n## Usage\nYou can also use forever from inside your own node.js code.\n\n``` js\n var forever = require('forever-monitor');\n\n var child = new (forever.Monitor)('your-filename.js', {\n max: 3,\n silent: true,\n args: []\n });\n\n child.on('exit', function () {\n console.log('your-filename.js has exited after 3 restarts');\n });\n\n child.start();\n```\n\n### Spawning a non-node process\nYou can spawn non-node processes too. Either set the `command` key in the\n`options` hash or pass in an `Array` in place of the `file` argument like this:\n\n``` js\n var forever = require('forever-monitor');\n var child = forever.start([ 'perl', '-le', 'print \"moo\"' ], {\n max : 1,\n silent : true\n });\n```\n\n### Options available when using Forever in node.js\nThere are several options that you should be aware of when using forever. Most of this configuration is optional.\n\n``` js\n {\n //\n // Basic configuration options\n //\n 'silent': false, // Silences the output from stdout and stderr in the parent process\n 'uid': 'your-UID', // Custom uid for this forever process. (default: autogen)\n 'pidFile': 'path/to/a.pid', // Path to put pid information for the process(es) started\n 'max': 10, // Sets the maximum number of times a given script should run\n 'killTree': true, // Kills the entire child process tree on `exit`\n\n //\n // These options control how quickly forever restarts a child process\n // as well as when to kill a \"spinning\" process\n //\n 'minUptime': 2000, // Minimum time a child process has to be up. Forever will 'exit' otherwise.\n 'spinSleepTime': 1000, // Interval between restarts if a child is spinning (i.e. alive < minUptime).\n\n //\n // Command to spawn as well as options and other vars\n // (env, cwd, etc) to pass along\n //\n 'command': 'perl', // Binary to run (default: 'node')\n 'args': ['foo','bar'], // Additional arguments to pass to the script,\n 'sourceDir': 'script/path',// Directory that the source script is in\n\n //\n // Options for restarting on watched files.\n //\n 'watch': true, // Value indicating if we should watch files.\n 'watchIgnoreDotFiles': null, // Whether to ignore file starting with a '.'\n 'watchIgnorePatterns': null, // Ignore patterns to use when watching files.\n 'watchDirectory': null, // Top-level directory to watch from.\n\n //\n // All or nothing options passed along to `child_process.spawn`.\n //\n 'spawnWith': {\n customFds: [-1, -1, -1], // that forever spawns.\n setsid: false,\n uid: 0, // Custom UID\n gid: 0 // Custom GID\n },\n\n //\n // More specific options to pass along to `child_process.spawn` which\n // will override anything passed to the `spawnWith` option\n //\n 'env': { 'ADDITIONAL': 'CHILD ENV VARS' },\n 'cwd': '/path/to/child/working/directory',\n\n //\n // Log files and associated logging options for this instance\n //\n 'logFile': 'path/to/file', // Path to log output from forever process (when daemonized)\n 'outFile': 'path/to/file', // Path to log output from child stdout\n 'errFile': 'path/to/file', // Path to log output from child stderr\n\n //\n // ### function parseCommand (command, args)\n // #### @command {String} Command string to parse\n // #### @args {Array} Additional default arguments\n //\n // Returns the `command` and the `args` parsed from\n // any command. Use this to modify the default parsing\n // done by 'forever-monitor' around spaces.\n //\n 'parser': function (command, args) {\n return {\n command: command,\n args: args\n };\n }\n }\n```\n\n### Events available when using an instance of Forever in node.js\nEach forever object is an instance of the node.js core EventEmitter. There are several core events that you can listen for:\n\n* **error** _[err]:_ Raised when an error occurs\n* **start** _[process, data]:_ Raised when the target script is first started.\n* **stop** _[process]:_ Raised when the target script is stopped by the user\n* **restart** _[forever]:_ Raised each time the target script is restarted\n* **exit** _[forever]:_ Raised when the target script actually exits (permenantly).\n* **stdout** _[data]:_ Raised when data is received from the child process' stdout\n* **stderr** _[data]:_ Raised when data is received from the child process' stderr\n\n### Typical console output\n\nWhen running the forever CLI tool, it produces debug outputs about which files have changed / how processes exited / etc. To get a similar behaviour with `forever-monitor`, add the following event listeners:\n\n```js\nvar child = new (forever.Monitor)('your-filename.js');\n\nchild.on('watch:restart', function(info) {\n console.error('Restaring script because ' + info.file + ' changed');\n});\n\nchild.on('restart', function() {\n console.error('Forever restarting script for ' + child.times + ' time');\n});\n\nchild.on('exit:code', function(code) {\n console.error('Forever detected script exited with code ' + code);\n});\n```\n\n## Installation\n\n``` bash\n $ npm install forever-monitor\n```\n\n## Run Tests\n\n``` bash\n $ npm test\n```\n\n#### License: MIT\n#### Author: [Charlie Robbins](http://github.com/indexzero)\n#### Contributors: [Fedor Indutny](http://github.com/indutny), [James Halliday](http://substack.net/), [Charlie McConnell](http://github.com/avianflu), [Maciej Malecki](http://github.com/mmalecki)\n", - "readmeFilename": "README.md", + "gitHead": "2c449c52b36be8804ccf4ee7fa6bcdfc2c34b7d0", "bugs": { "url": "https://github.com/nodejitsu/forever-monitor/issues" }, - "homepage": "https://github.com/nodejitsu/forever-monitor#readme", - "_id": "forever-monitor@1.5.2", - "_shasum": "279388dfa93b085363d6b28a823ef0a6aeeb35d7", - "_resolved": "https://registry.npmjs.org/forever-monitor/-/forever-monitor-1.5.2.tgz", - "_from": "forever-monitor@>=1.5.1 <1.6.0" + "homepage": "https://github.com/nodejitsu/forever-monitor", + "_id": "forever-monitor@1.6.0", + "_shasum": "3de1afd3e49f25712987281a252c02cb2463ad40", + "_from": "forever-monitor@~1.6.0", + "_npmVersion": "2.7.5", + "_nodeVersion": "0.10.38", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + } + ], + "dist": { + "shasum": "3de1afd3e49f25712987281a252c02cb2463ad40", + "tarball": "http://registry.npmjs.org/forever-monitor/-/forever-monitor-1.6.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/forever-monitor/-/forever-monitor-1.6.0.tgz" } diff --git a/node_modules/forever/node_modules/forever-monitor/test/fixtures/watch/file b/node_modules/forever/node_modules/forever-monitor/test/fixtures/watch/file index 182a60a..6fb4867 100644 --- a/node_modules/forever/node_modules/forever-monitor/test/fixtures/watch/file +++ b/node_modules/forever/node_modules/forever-monitor/test/fixtures/watch/file @@ -1 +1 @@ -/* hello, I know nodejitsu. */ \ No newline at end of file +/* hello, I know nodejitsu. \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/test/plugins/watch-test.js b/node_modules/forever/node_modules/forever-monitor/test/plugins/watch-test.js index e965e26..d99b725 100644 --- a/node_modules/forever/node_modules/forever-monitor/test/plugins/watch-test.js +++ b/node_modules/forever/node_modules/forever-monitor/test/plugins/watch-test.js @@ -29,28 +29,69 @@ vows.describe('forever-monitor/plugins/watch').addBatch({ assert.isTrue(child.watchIgnoreDotFiles); assert.equal(watchDir, fs.realpathSync(child.watchDirectory)); }, - 'read .foreverignore file': { - 'and store ignore patterns': function (child) { - setTimeout(function () { - assert.deepEqual( - child.watchIgnorePatterns, - fs.readFileSync( - path.join(watchDir, '.foreverignore'), - 'utf8' - ).split("\n").filter(Boolean) - ); - }, 100); + 'read .foreverignore file and store ignore patterns': function (child) { + setTimeout(function () { + assert.deepEqual( + child.watchIgnorePatterns, + fs.readFileSync( + path.join(watchDir, '.foreverignore'), + 'utf8' + ).split("\n").filter(Boolean) + ); + }, 100); + } + } + } +}).addBatch({ + 'When using forever with watch enabled': { + 'when a file matching an ignore pattern is added': { + topic: function () { + var self = this; + this.filenames = [ + path.join(watchDir, 'ignore_newFile'), + path.join(watchDir, 'ignoredDir', 'ignore_subfile') + ]; + + // + // Setup a bad restart function + // + function badRestart() { + this.callback(new Error('Monitor restarted at incorrect time.')); } + + monitor.once('restart', badRestart); + this.filenames.forEach(function (filename) { + fs.writeFileSync(filename, ''); + }); + + // + // `chokidar` does not emit anything when ignored + // files have changed so we need a setTimeout here + // to prove that nothing has happened. + // + setTimeout(function () { + monitor.removeListener('restart', badRestart); + self.callback(); + }, 5000); }, - 'when file changes': { - topic: function (child) { - child.once('restart', this.callback); - fs.writeFileSync(path.join(watchDir, 'file'), '// hello, I know nodejitsu.'); - }, - 'restart the script': function (child, _) { - fs.writeFileSync(path.join(watchDir, 'file'), '/* hello, I know nodejitsu. */'); - } + 'do nothing': function (err) { + assert.isUndefined(err); + this.filenames.forEach(function (filename) { + fs.unlinkSync(filename); + }); + } + } + } +}).addBatch({ + 'When using forever with watch enabled': { + 'when file changes': { + topic: function (child) { + child.once('restart', this.callback); + fs.writeFileSync(path.join(watchDir, 'file'), '// hello, I know nodejitsu.'); }, + 'restart the script': function (child, _) { + fs.writeFileSync(path.join(watchDir, 'file'), '/* hello, I know nodejitsu. '); + } } } }).addBatch({ @@ -75,18 +116,7 @@ vows.describe('forever-monitor/plugins/watch').addBatch({ }, 'restart the script': function (child, _) { fs.writeFileSync(path.join(watchDir, 'removeMe'), ''); - } - } - } -}).addBatch({ - 'When using forever with watch enabled': { - 'when file in ignored dir is updated': { - topic: function (child) { - fs.writeFileSync(path.join(watchDir, 'ignore_newFile'), ''); - child.once('watch:ignore', this.callback); - }, - 'do nothing': function (child, _) { - fs.unlinkSync(path.join(watchDir, 'ignore_newFile')); + monitor.stop(); } } } diff --git a/node_modules/forever/node_modules/nconf/node_modules/async/package.json b/node_modules/forever/node_modules/nconf/node_modules/async/package.json index 9cd7ade..b8cf22d 100644 --- a/node_modules/forever/node_modules/nconf/node_modules/async/package.json +++ b/node_modules/forever/node_modules/nconf/node_modules/async/package.json @@ -8,7 +8,7 @@ "version": "0.2.9", "repository": { "type": "git", - "url": "git+https://github.com/caolan/async.git" + "url": "https://github.com/caolan/async.git" }, "bugs": { "url": "https://github.com/caolan/async/issues" @@ -35,11 +35,24 @@ "scripts": { "test": "nodeunit test/test-async.js" }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, each…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n\n\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n
\n\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8');\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async#readme", "_id": "async@0.2.9", + "dist": { + "shasum": "df63060fbf3d33286a76aaf6d55a2986d9ff8619", + "tarball": "http://registry.npmjs.org/async/-/async-0.2.9.tgz" + }, + "_from": "async@0.2.9", + "_npmVersion": "1.2.23", + "_npmUser": { + "name": "caolan", + "email": "caolan.mcmahon@gmail.com" + }, + "maintainers": [ + { + "name": "caolan", + "email": "caolan@caolanmcmahon.com" + } + ], + "directories": {}, "_shasum": "df63060fbf3d33286a76aaf6d55a2986d9ff8619", - "_resolved": "https://registry.npmjs.org/async/-/async-0.2.9.tgz", - "_from": "async@0.2.9" + "_resolved": "https://registry.npmjs.org/async/-/async-0.2.9.tgz" } diff --git a/node_modules/forever/node_modules/nconf/node_modules/ini/package.json b/node_modules/forever/node_modules/nconf/node_modules/ini/package.json index fefd27d..414327a 100644 --- a/node_modules/forever/node_modules/nconf/node_modules/ini/package.json +++ b/node_modules/forever/node_modules/nconf/node_modules/ini/package.json @@ -33,7 +33,7 @@ "homepage": "https://github.com/isaacs/ini#readme", "_id": "ini@1.3.4", "_shasum": "0537cb79daf59b59a1a517dff706c86ec039162e", - "_from": "ini@>=1.0.0 <2.0.0", + "_from": "ini@1.x.x", "_npmVersion": "2.10.1", "_nodeVersion": "2.0.1", "_npmUser": { @@ -51,6 +51,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" } diff --git a/node_modules/forever/node_modules/nconf/node_modules/optimist/node_modules/minimist/package.json b/node_modules/forever/node_modules/nconf/node_modules/optimist/node_modules/minimist/package.json index 09ecda8..54f611b 100644 --- a/node_modules/forever/node_modules/nconf/node_modules/optimist/node_modules/minimist/package.json +++ b/node_modules/forever/node_modules/nconf/node_modules/optimist/node_modules/minimist/package.json @@ -40,13 +40,28 @@ "url": "http://substack.net" }, "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/minimist/issues" }, "_id": "minimist@0.0.10", + "dist": { + "shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" + }, + "_from": "minimist@~0.0.1", + "_npmVersion": "1.4.3", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, "_shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "_from": "minimist@>=0.0.1 <0.1.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/nconf/node_modules/optimist/node_modules/wordwrap/package.json b/node_modules/forever/node_modules/nconf/node_modules/optimist/node_modules/wordwrap/package.json index 551b0f0..55055b4 100644 --- a/node_modules/forever/node_modules/nconf/node_modules/optimist/node_modules/wordwrap/package.json +++ b/node_modules/forever/node_modules/nconf/node_modules/optimist/node_modules/wordwrap/package.json @@ -34,14 +34,30 @@ "email": "mail@substack.net", "url": "http://substack.net" }, - "readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n", - "readmeFilename": "README.markdown", + "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d", "bugs": { "url": "https://github.com/substack/node-wordwrap/issues" }, "homepage": "https://github.com/substack/node-wordwrap#readme", "_id": "wordwrap@0.0.3", "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", + "_from": "wordwrap@~0.0.2", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", + "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "_from": "wordwrap@>=0.0.2 <0.1.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/nconf/node_modules/optimist/package.json b/node_modules/forever/node_modules/nconf/node_modules/optimist/package.json index 2331e40..f652afa 100644 --- a/node_modules/forever/node_modules/nconf/node_modules/optimist/package.json +++ b/node_modules/forever/node_modules/nconf/node_modules/optimist/package.json @@ -16,7 +16,7 @@ }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/substack/node-optimist.git" + "url": "http://github.com/substack/node-optimist.git" }, "keywords": [ "argument", @@ -36,14 +36,28 @@ "engine": { "node": ">=0.4" }, - "readme": "optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n { _: [],\n '$0': 'node ./examples/reflect.js',\n foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n $ node reflect.js -n123 -m456\n { '3': true,\n '6': true,\n _: [],\n '$0': 'node ./reflect.js',\n n: 123,\n m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", - "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/node-optimist/issues" }, - "homepage": "https://github.com/substack/node-optimist#readme", "_id": "optimist@0.6.0", + "dist": { + "shasum": "69424826f3405f79f142e6fc3d9ae58d4dbb9200", + "tarball": "http://registry.npmjs.org/optimist/-/optimist-0.6.0.tgz" + }, + "_from": "optimist@0.6.0", + "_npmVersion": "1.3.0", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, "_shasum": "69424826f3405f79f142e6fc3d9ae58d4dbb9200", "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.0.tgz", - "_from": "optimist@0.6.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/nconf/package.json b/node_modules/forever/node_modules/nconf/package.json index 2d64cae..90bd857 100644 --- a/node_modules/forever/node_modules/nconf/package.json +++ b/node_modules/forever/node_modules/nconf/package.json @@ -9,12 +9,20 @@ "maintainers": [ { "name": "indexzero", - "email": "charlie@nodejitsu.com" + "email": "charlie.robbins@gmail.com" + }, + { + "name": "mmalecki", + "email": "me@mmalecki.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" } ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/flatiron/nconf.git" + "url": "http://github.com/flatiron/nconf.git" }, "keywords": [ "configuration", @@ -36,14 +44,21 @@ "engines": { "node": ">= 0.4.0" }, - "readme": "# nconf [![Build Status](https://secure.travis-ci.org/flatiron/nconf.png)](http://travis-ci.org/flatiron/nconf)\n\nHierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.\n\n## Example\nUsing nconf is easy; it is designed to be a simple key-value store with support for both local and remote storage. Keys are namespaced and delimited by `:`. Lets dive right into sample usage:\n\n``` js\n var fs = require('fs'),\n nconf = require('nconf');\n\n //\n // Setup nconf to use (in-order):\n // 1. Command-line arguments\n // 2. Environment variables\n // 3. A file located at 'path/to/config.json'\n //\n nconf.argv()\n .env()\n .file({ file: 'path/to/config.json' });\n\n //\n // Set a few variables on `nconf`.\n //\n nconf.set('database:host', '127.0.0.1');\n nconf.set('database:port', 5984);\n\n //\n // Get the entire database object from nconf. This will output\n // { host: '127.0.0.1', port: 5984 }\n //\n console.log('foo: ' + nconf.get('foo'));\n console.log('NODE_ENV: ' + nconf.get('NODE_ENV'));\n console.log('database: ' + nconf.get('database'));\n\n //\n // Save the configuration object to disk\n //\n nconf.save(function (err) {\n fs.readFile('path/to/your/config.json', function (err, data) {\n console.dir(JSON.parse(data.toString()))\n });\n });\n```\n\nIf you run the above script:\n\n``` bash\n $ NODE_ENV=production sample.js --foo bar\n```\n\nThe output will be:\n\n```\n foo: bar\n NODE_ENV: production\n database: { host: '127.0.0.1', port: 5984 }\n```\n\n## Hierarchical configuration\n\nConfiguration management can get complicated very quickly for even trivial applications running in production. `nconf` addresses this problem by enabling you to setup a hierarchy for different sources of configuration with no defaults. **The order in which you attach these configuration sources determines their priority in the hierarchy.** Lets take a look at the options available to you\n\n 1. **nconf.argv(options)** Loads `process.argv` using optimist. If `options` is supplied it is passed along to optimist.\n 2. **nconf.env(options)** Loads `process.env` into the hierarchy.\n 3. **nconf.file(options)** Loads the configuration data at options.file into the hierarchy.\n 4. **nconf.defaults(options)** Loads the data in options.store into the hierarchy.\n 5. **nconf.overrides(options)** Loads the data in options.store into the hierarchy.\n\nA sane default for this could be:\n\n``` js\n var nconf = require('nconf');\n\n //\n // 1. any overrides\n //\n nconf.overrides({\n 'always': 'be this value'\n });\n\n //\n // 2. `process.env`\n // 3. `process.argv`\n //\n nconf.env().argv();\n\n //\n // 4. Values in `config.json`\n //\n nconf.file('/path/to/config.json');\n\n //\n // Or with a custom name\n //\n nconf.file('custom', '/path/to/config.json');\n\n //\n // Or searching from a base directory.\n // Note: `name` is optional.\n //\n nconf.file(name, {\n file: 'config.json',\n dir: 'search/from/here',\n search: true\n });\n\n //\n // 5. Any default values\n //\n nconf.defaults({\n 'if nothing else': 'use this value'\n });\n```\n\n## API Documentation\n\nThe top-level of `nconf` is an instance of the `nconf.Provider` abstracts this all for you into a simple API.\n\n### nconf.add(name, options)\nAdds a new store with the specified `name` and `options`. If `options.type` is not set, then `name` will be used instead:\n\n``` js\n nconf.add('user', { type: 'file', file: '/path/to/userconf.json' });\n nconf.add('global', { type: 'file', file: '/path/to/globalconf.json' });\n```\n\n### nconf.use(name, options)\nSimilar to `nconf.add`, except that it can replace an existing store if new options are provided\n\n``` js\n //\n // Load a file store onto nconf with the specified settings\n //\n nconf.use('file', { file: '/path/to/some/config-file.json' });\n\n //\n // Replace the file store with new settings\n //\n nconf.use('file', { file: 'path/to/a-new/config-file.json' });\n```\n\n### nconf.remove(name)\nRemoves the store with the specified `name.` The configuration stored at that level will no longer be used for lookup(s).\n\n``` js\n nconf.remove('file');\n```\n\n## Storage Engines\n\n### Memory\nA simple in-memory storage engine that stores a nested JSON representation of the configuration. To use this engine, just call `.use()` with the appropriate arguments. All calls to `.get()`, `.set()`, `.clear()`, `.reset()` methods are synchronous since we are only dealing with an in-memory object.\n\n``` js\n nconf.use('memory');\n```\n\n### Argv\nResponsible for loading the values parsed from `process.argv` by `optimist` into the configuration hierarchy. See the [optimist option docs](https://github.com/substack/node-optimist/#optionskey-opt) for more on the option format.\n\n``` js\n //\n // Can optionally also be an object literal to pass to `optimist`.\n //\n nconf.argv({\n \"x\": {\n alias: 'example',\n describe: 'Example description for usage generation',\n demand: true,\n default: 'some-value'\n }\n });\n```\n\n### Env\nResponsible for loading the values parsed from `process.env` into the configuration hierarchy.\n\n``` js\n //\n // Can optionally also be an Array of values to limit process.env to.\n //\n nconf.env(['only', 'load', 'these', 'values', 'from', 'process.env']);\n\n //\n // Can also specify a separator for nested keys (instead of the default ':')\n //\n nconf.env('__');\n // Get the value of the env variable 'database__host'\n var dbHost = nconf.get('database:host');\n\n //\n // Or use both options\n //\n nconf.env({\n separator: '__',\n whitelist: ['database__host', 'only', 'load', 'these', 'values']\n });\n var dbHost = nconf.get('database:host');\n```\n\n### Literal\nLoads a given object literal into the configuration hierarchy. Both `nconf.defaults()` and `nconf.overrides()` use the Literal store.\n\n``` js\n nconf.defaults({\n 'some': 'default value'\n });\n```\n\n### File\nBased on the Memory store, but provides additional methods `.save()` and `.load()` which allow you to read your configuration to and from file. As with the Memory store, all method calls are synchronous with the exception of `.save()` and `.load()` which take callback functions. It is important to note that setting keys in the File engine will not be persisted to disk until a call to `.save()` is made.\n\n``` js\n nconf.file('path/to/your/config.json');\n // add multiple files, hierarchically. notice the unique key for each file\n nconf.file('user', 'path/to/your/user.json');\n nconf.file('global', 'path/to/your/global.json');\n```\n\nThe file store is also extensible for multiple file formats, defaulting to `JSON`. To use a custom format, simply pass a format object to the `.use()` method. This object must have `.parse()` and `.stringify()` methods just like the native `JSON` object.\n\n### Redis\nThere is a separate Redis-based store available through [nconf-redis][0]. To install and use this store simply:\n\n``` bash\n $ npm install nconf\n $ npm install nconf-redis\n```\n\nOnce installing both `nconf` and `nconf-redis`, you must require both modules to use the Redis store:\n\n``` js\n var nconf = require('nconf');\n\n //\n // Requiring `nconf-redis` will extend the `nconf`\n // module.\n //\n require('nconf-redis');\n\n nconf.use('redis', { host: 'localhost', port: 6379, ttl: 60 * 60 * 1000 });\n```\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing nconf\n```\n [sudo] npm install nconf\n```\n\n## More Documentation\nThere is more documentation available through docco. I haven't gotten around to making a gh-pages branch so in the meantime if you clone the repository you can view the docs:\n\n```\n open docs/nconf.html\n```\n\n## Run Tests\nTests are written in vows and give complete coverage of all APIs and storage engines.\n\n``` bash\n $ npm test\n```\n\n#### Author: [Charlie Robbins](http://nodejitsu.com)\n#### License: MIT\n\n[0]: http://github.com/indexzero/nconf-redis\n", - "readmeFilename": "README.md", "bugs": { "url": "https://github.com/flatiron/nconf/issues" }, - "homepage": "https://github.com/flatiron/nconf#readme", "_id": "nconf@0.6.9", + "dist": { + "shasum": "9570ef15ed6f9ae6b2b3c8d5e71b66d3193cd661", + "tarball": "http://registry.npmjs.org/nconf/-/nconf-0.6.9.tgz" + }, + "_from": "nconf@~0.6.9", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + }, + "directories": {}, "_shasum": "9570ef15ed6f9ae6b2b3c8d5e71b66d3193cd661", - "_resolved": "https://registry.npmjs.org/nconf/-/nconf-0.6.9.tgz", - "_from": "nconf@>=0.6.9 <0.7.0" + "_resolved": "https://registry.npmjs.org/nconf/-/nconf-0.6.9.tgz" } diff --git a/node_modules/forever/node_modules/nssocket/node_modules/eventemitter2/package.json b/node_modules/forever/node_modules/nssocket/node_modules/eventemitter2/package.json index d4ac095..9c94c33 100644 --- a/node_modules/forever/node_modules/nssocket/node_modules/eventemitter2/package.json +++ b/node_modules/forever/node_modules/nssocket/node_modules/eventemitter2/package.json @@ -51,14 +51,32 @@ "lib/eventemitter2.js", "index.js" ], - "readme": "[![build-status](https://www.codeship.io/projects/3ad58940-4c7d-0131-15d5-5a8cd3f550f8/status)](https://www.codeship.io/projects/11259)\n\n# SYNOPSIS\n\nEventEmitter2 is an implementation of the EventEmitter found in Node.js\n\n# DESCRIPTION\n\n### FEATURES\n - Namespaces/Wildcards.\n - Times To Listen (TTL), extends the `once` concept with `many`.\n - Browser environment compatibility.\n - Demonstrates good performance in benchmarks\n\n```\nEventEmitterHeatUp x 3,728,965 ops/sec \\302\\2610.68% (60 runs sampled)\nEventEmitter x 2,822,904 ops/sec \\302\\2610.74% (63 runs sampled)\nEventEmitter2 x 7,251,227 ops/sec \\302\\2610.55% (58 runs sampled)\nEventEmitter2 (wild) x 3,220,268 ops/sec \\302\\2610.44% (65 runs sampled)\nFastest is EventEmitter2\n```\n\n### Differences (Non breaking, compatible with existing EventEmitter)\n\n - The constructor takes a configuration object.\n \n```javascript\n var EventEmitter2 = require('eventemitter2').EventEmitter2;\n var server = new EventEmitter2({\n\n //\n // use wildcards.\n //\n wildcard: true,\n\n //\n // the delimiter used to segment namespaces, defaults to `.`.\n //\n delimiter: '::', \n \n //\n // if you want to emit the newListener event set to true.\n //\n newListener: false, \n\n //\n // max listeners that can be assigned to an event, default 10.\n //\n maxListeners: 20\n });\n```\n\n - Getting the actual event that fired.\n\n```javascript\n server.on('foo.*', function(value1, value2) {\n console.log(this.event, value1, value2);\n });\n```\n\n - Fire an event N times and then remove it, an extension of the `once` concept.\n\n```javascript\n server.many('foo', 4, function() {\n console.log('hello');\n });\n```\n\n - Pass in a namespaced event as an array rather than a delimited string.\n\n```javascript\n server.many(['foo', 'bar', 'bazz'], function() {\n console.log('hello');\n });\n```\n\n\n# API\n\nWhen an `EventEmitter` instance experiences an error, the typical action is\nto emit an `error` event. Error events are treated as a special case.\nIf there is no listener for it, then the default action is to print a stack\ntrace and exit the program.\n\nAll EventEmitters emit the event `newListener` when new listeners are\nadded.\n\n\n**Namespaces** with **Wildcards**\nTo use namespaces/wildcards, pass the `wildcard` option into the EventEmitter \nconstructor. When namespaces/wildcards are enabled, events can either be \nstrings (`foo.bar`) separated by a delimiter or arrays (`['foo', 'bar']`). The \ndelimiter is also configurable as a constructor option.\n\nAn event name passed to any event emitter method can contain a wild card (the \n`*` character). If the event name is a string, a wildcard may appear as `foo.*`. \nIf the event name is an array, the wildcard may appear as `['foo', '*']`.\n\nIf either of the above described events were passed to the `on` method, \nsubsequent emits such as the following would be observed...\n\n```javascript\n emitter.emit('foo.bazz');\n emitter.emit(['foo', 'bar']);\n```\n\n\n### emitter.addListener(event, listener)\n### emitter.on(event, listener)\n\nAdds a listener to the end of the listeners array for the specified event.\n\n```javascript\n server.on('data', function(value1, value2, value3, ...) {\n console.log('The event was raised!');\n });\n```\n\n```javascript\n server.on('data', function(value) {\n console.log('The event was raised!');\n });\n```\n\n### emitter.onAny(listener)\n\nAdds a listener that will be fired when any event is emitted.\n\n```javascript\n server.onAny(function(value) {\n console.log('All events trigger this.');\n });\n```\n\n### emitter.offAny(listener)\n\nRemoves the listener that will be fired when any event is emitted.\n\n```javascript\n server.offAny(function(value) {\n console.log('The event was raised!');\n });\n```\n\n#### emitter.once(event, listener)\n\nAdds a **one time** listener for the event. The listener is invoked \nonly the first time the event is fired, after which it is removed.\n\n```javascript\n server.once('get', function (value) {\n console.log('Ah, we have our first value!');\n });\n```\n\n### emitter.many(event, timesToListen, listener)\n\nAdds a listener that will execute **n times** for the event before being\nremoved. The listener is invoked only the first **n times** the event is \nfired, after which it is removed.\n\n```javascript\n server.many('get', 4, function (value) {\n console.log('This event will be listened to exactly four times.');\n });\n```\n\n\n### emitter.removeListener(event, listener)\n### emitter.off(event, listener)\n\nRemove a listener from the listener array for the specified event. \n**Caution**: changes array indices in the listener array behind the listener.\n\n```javascript\n var callback = function(value) {\n console.log('someone connected!');\n };\n server.on('get', callback);\n // ...\n server.removeListener('get', callback);\n```\n\n\n### emitter.removeAllListeners([event])\n\nRemoves all listeners, or those of the specified event.\n\n\n### emitter.setMaxListeners(n)\n\nBy default EventEmitters will print a warning if more than 10 listeners \nare added to it. This is a useful default which helps finding memory leaks. \nObviously not all Emitters should be limited to 10. This function allows \nthat to be increased. Set to zero for unlimited.\n\n\n### emitter.listeners(event)\n\nReturns an array of listeners for the specified event. This array can be \nmanipulated, e.g. to remove listeners.\n\n```javascript\n server.on('get', function(value) {\n console.log('someone connected!');\n });\n console.log(server.listeners('get')); // [ [Function] ]\n```\n\n### emitter.listenersAny()\n\nReturns an array of listeners that are listening for any event that is \nspecified. This array can be manipulated, e.g. to remove listeners.\n\n```javascript\n server.onAny(function(value) {\n console.log('someone connected!');\n });\n console.log(server.listenersAny()[0]); // [ [Function] ]\n```\n\n### emitter.emit(event, [arg1], [arg2], [...])\n\nExecute each of the listeners that may be listening for the specified event \nname in order with the list of arguments.\n\n# LICENSE\n\n(The MIT License)\n\nCopyright (c) 2011 hij1nx \n\nPermission is hereby granted, free of charge, to any person obtaining a copy \nof this software and associated documentation files (the 'Software'), to deal \nin the Software without restriction, including without limitation the rights \nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell \ncopies of the Software, and to permit persons to whom the Software is furnished\nto do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR \nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION \nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", "bugs": { "url": "https://github.com/hij1nx/EventEmitter2/issues" }, - "homepage": "https://github.com/hij1nx/EventEmitter2#readme", + "homepage": "https://github.com/hij1nx/EventEmitter2", "_id": "eventemitter2@0.4.14", "_shasum": "8f61b75cde012b2e9eb284d4545583b5643b61ab", - "_resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "_from": "eventemitter2@>=0.4.14 <0.5.0" + "_from": "eventemitter2@~0.4.14", + "_npmVersion": "1.4.7", + "_npmUser": { + "name": "jasonkuhrt", + "email": "jasonkuhrt@me.com" + }, + "maintainers": [ + { + "name": "hij1nx", + "email": "hij1nx@me.com" + }, + { + "name": "jasonkuhrt", + "email": "jasonkuhrt@me.com" + } + ], + "dist": { + "shasum": "8f61b75cde012b2e9eb284d4545583b5643b61ab", + "tarball": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz" } diff --git a/node_modules/forever/node_modules/nssocket/node_modules/lazy/package.json b/node_modules/forever/node_modules/nssocket/node_modules/lazy/package.json index 932573b..288263b 100644 --- a/node_modules/forever/node_modules/nssocket/node_modules/lazy/package.json +++ b/node_modules/forever/node_modules/nssocket/node_modules/lazy/package.json @@ -17,7 +17,7 @@ }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/pkrumins/node-lazy.git" + "url": "http://github.com/pkrumins/node-lazy.git" }, "devDependencies": { "expresso": ">=0.7.5" @@ -30,12 +30,24 @@ }, "readme": "Lazy lists for node\n===================\n\n\n# Table of contents:\n\n[Introduction](#Introduction)\n \n[Documentation](#Documentation)\n\n\n# Introduction\nLazy comes really handy when you need to treat a stream of events like a list.\nThe best use case currently is returning a lazy list from an asynchronous\nfunction, and having data pumped into it via events. In asynchronous\nprogramming you can't just return a regular list because you don't yet have\ndata for it. The usual solution so far has been to provide a callback that gets\ncalled when the data is available. But doing it this way you lose the power of\nchaining functions and creating pipes, which leads to not that nice interfaces.\n(See the 2nd example below to see how it improved the interface in one of my\nmodules.)\n\nCheck out this toy example, first you create a Lazy object:\n```javascript\n var Lazy = require('lazy');\n\n var lazy = new Lazy;\n lazy\n .filter(function (item) {\n return item % 2 == 0\n })\n .take(5)\n .map(function (item) {\n return item*2;\n })\n .join(function (xs) {\n console.log(xs);\n });\n```\n\nThis code says that 'lazy' is going to be a lazy list that filters even\nnumbers, takes first five of them, then multiplies all of them by 2, and then\ncalls the join function (think of join as in threads) on the final list.\n\nAnd now you can emit 'data' events with data in them at some point later,\n```javascript\n [0,1,2,3,4,5,6,7,8,9,10].forEach(function (x) {\n lazy.emit('data', x);\n });\n```\n\nThe output will be produced by the 'join' function, which will output the\nexpected [0, 4, 8, 12, 16].\n\nAnd here is a real-world example. Some time ago I wrote a hash database for\nnode.js called node-supermarket (think of key-value store except greater). Now\nit had a similar interface as a list, you could .forEach on the stored\nelements, .filter them, etc. But being asynchronous in nature it lead to the\nfollowing code, littered with callbacks and temporary lists:\n```javascript\n var Store = require('supermarket');\n\n var db = new Store({ filename : 'users.db', json : true });\n\n var users_over_20 = [];\n db.filter(\n function (user, meta) {\n // predicate function\n return meta.age > 20;\n },\n function (err, user, meta) {\n // function that gets executed when predicate is true\n if (users_over_20.length < 5)\n users_over_20.push(meta);\n },\n function () {\n // done function, called when all records have been filtered\n\n // now do something with users_over_20\n }\n )\n```\nThis code selects first five users who are over 20 years old and stores them\nin users_over_20.\n\nBut now we changed the node-supermarket interface to return lazy lists, and\nthe code became:\n```javascript\n var Store = require('supermarket');\n\n var db = new Store({ filename : 'users.db', json : true });\n\n db.filter(function (user, meta) {\n return meta.age > 20;\n })\n .take(5)\n .join(function (xs) {\n // xs contains the first 5 users who are over 20!\n });\n```\nThis is so much nicer!\n\nHere is the latest feature: .lines. Given a stream of data that has \\n's in it,\n.lines converts that into a list of lines.\n\nHere is an example from node-iptables that I wrote the other week,\n```javascript\n var Lazy = require('lazy');\n var spawn = require('child_process').spawn;\n var iptables = spawn('iptables', ['-L', '-n', '-v']);\n\n Lazy(iptables.stdout)\n .lines\n .map(String)\n .skip(2) // skips the two lines that are iptables header\n .map(function (line) {\n // packets, bytes, target, pro, opt, in, out, src, dst, opts\n var fields = line.trim().split(/\\s+/, 9);\n return {\n parsed : {\n packets : fields[0],\n bytes : fields[1],\n target : fields[2],\n protocol : fields[3],\n opt : fields[4],\n in : fields[5],\n out : fields[6],\n src : fields[7],\n dst : fields[8]\n },\n raw : line.trim()\n };\n });\n```\nThis example takes the `iptables -L -n -v` command and uses .lines on its output.\nThen it .skip's two lines from input and maps a function on all other lines that\ncreates a data structure from the output.\n\n\n# Documentation\n\nSupports the following operations:\n\n* lazy.filter(f)\n* lazy.forEach(f)\n* lazy.map(f)\n* lazy.take(n)\n* lazy.takeWhile(f)\n* lazy.bucket(init, f)\n* lazy.lines\n* lazy.sum(f)\n* lazy.product(f)\n* lazy.foldr(op, i, f)\n* lazy.skip(n)\n* lazy.head(f)\n* lazy.tail(f)\n* lazy.join(f)\n\nThe Lazy object itself has a .range property for generating all the possible ranges.\n\nHere are several examples:\n\n* Lazy.range('10..') - infinite range starting from 10\n* Lazy.range('(10..') - infinite range starting from 11\n* Lazy.range(10) - range from 0 to 9\n* Lazy.range(-10, 10) - range from -10 to 9 (-10, -9, ... 0, 1, ... 9)\n* Lazy.range(-10, 10, 2) - range from -10 to 8, skipping every 2nd element (-10, -8, ... 0, 2, 4, 6, 8)\n* Lazy.range(10, 0, 2) - reverse range from 10 to 1, skipping every 2nd element (10, 8, 6, 4, 2)\n* Lazy.range(10, 0) - reverse range from 10 to 1\n* Lazy.range('5..50') - range from 5 to 49\n* Lazy.range('50..44') - range from 50 to 45\n* Lazy.range('1,1.1..4') - range from 1 to 4 with increment of 0.1 (1, 1.1, 1.2, ... 3.9)\n* Lazy.range('4,3.9..1') - reverse range from 4 to 1 with decerement of 0.1\n* Lazy.range('[1..10]') - range from 1 to 10 (all inclusive)\n* Lazy.range('[10..1]') - range from 10 to 1 (all inclusive)\n* Lazy.range('[1..10)') - range grom 1 to 9\n* Lazy.range('[10..1)') - range from 10 to 2\n* Lazy.range('(1..10]') - range from 2 to 10\n* Lazy.range('(10..1]') - range from 9 to 1\n* Lazy.range('(1..10)') - range from 2 to 9\n* Lazy.range('[5,10..50]') - range from 5 to 50 with a step of 5 (all inclusive)\n\nThen you can use other lazy functions on these ranges.\n\n\n", "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/pkrumins/node-lazy/issues" - }, - "homepage": "https://github.com/pkrumins/node-lazy#readme", "_id": "lazy@1.0.11", + "dist": { + "shasum": "daa068206282542c088288e975c297c1ae77b690", + "tarball": "http://registry.npmjs.org/lazy/-/lazy-1.0.11.tgz" + }, + "_from": "lazy@~1.0.11", + "_npmVersion": "1.2.14", + "_npmUser": { + "name": "pkrumins", + "email": "peteris.krumins@gmail.com" + }, + "maintainers": [ + { + "name": "pkrumins", + "email": "peteris.krumins@gmail.com" + } + ], + "directories": {}, "_shasum": "daa068206282542c088288e975c297c1ae77b690", - "_resolved": "https://registry.npmjs.org/lazy/-/lazy-1.0.11.tgz", - "_from": "lazy@>=1.0.11 <1.1.0" + "_resolved": "https://registry.npmjs.org/lazy/-/lazy-1.0.11.tgz" } diff --git a/node_modules/forever/node_modules/nssocket/package.json b/node_modules/forever/node_modules/nssocket/package.json index b8996a4..f947b32 100644 --- a/node_modules/forever/node_modules/nssocket/package.json +++ b/node_modules/forever/node_modules/nssocket/package.json @@ -8,8 +8,8 @@ }, "maintainers": [ { - "name": "hij1nx", - "email": "paolo@nodejitsu.com" + "name": "indexzero", + "email": "charlie.robbins@gmail.com" }, { "name": "genediazjr", @@ -18,7 +18,7 @@ ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/nodejitsu/nssocket.git" + "url": "http://github.com/nodejitsu/nssocket.git" }, "dependencies": { "eventemitter2": "~0.4.14", @@ -36,14 +36,24 @@ "test": "vows test/*-test.js --spec" }, "license": "MIT", - "readme": "# Synposis\nAn elegant way to define lightweight protocols on-top of TCP/TLS sockets in node.js \n\n# Motivation\nWorking within node.js it is very easy to write lightweight network protocols that communicate over TCP or TLS. The definition of such protocols often requires repeated (and tedious) parsing of individual TCP/TLS packets into a message header and some JSON body.\n\n# Build Status\n[![Build Status](https://secure.travis-ci.org/nodejitsu/nssocket.png)](http://travis-ci.org/nodejitsu/nssocket)\n\n# Installation\n```\n [sudo] npm install nssocket\n```\n\n# How it works\n\nWith `nssocket` this tedious bookkeeping work is done automatically for you in two ways:\n\n1. Leverages wildcard and namespaced events from [EventEmitter2][0]\n2. Automatically serializes messages passed to `.send()` and deserializes messages from `data` events.\n3. Implements default reconnect logic for potentially faulty connections.\n4. Automatically wraps TCP connections with TLS using [a known workaround][1]\n\n## Messages\nMessages in `nssocket` are serialized JSON arrays of the following form:\n\n``` js\n [\"namespace\", \"to\", \"event\", { \"this\": \"is\", \"the\": \"payload\" }]\n```\n\nAlthough this is not as optimal as other message formats (pure binary, msgpack) most of your applications are probably IO-bound, and not by the computation time needed for serialization / deserialization. When working with `NsSocket` instances, all events are namespaced under `data` to avoid collision with other events.\n\n## Simple Example\n``` js\n var nssocket = require('nssocket');\n\n //\n // Create an `nssocket` TCP server\n //\n var server = nssocket.createServer(function (socket) {\n //\n // Here `socket` will be an instance of `nssocket.NsSocket`.\n //\n socket.send(['you', 'there']);\n socket.data(['iam', 'here'], function (data) {\n //\n // Good! The socket speaks our language \n // (i.e. simple 'you::there', 'iam::here' protocol)\n //\n // { iam: true, indeedHere: true }\n //\n console.dir(data);\n })\n });\n \n //\n // Tell the server to listen on port `6785` and then connect to it\n // using another NsSocket instance.\n //\n server.listen(6785);\n \n var outbound = new nssocket.NsSocket();\n outbound.data(['you', 'there'], function () {\n outbound.send(['iam', 'here'], { iam: true, indeedHere: true });\n });\n \n outbound.connect(6785);\n```\n\n## Reconnect Example\n`nssocket` exposes simple options for enabling reconnection of the underlying socket. By default, these options are disabled. Lets look at a simple example:\n\n``` js\n var net = require('net'),\n nssocket = require('nssocket');\n \n net.createServer(function (socket) {\n //\n // Close the underlying socket after `1000ms`\n //\n setTimeout(function () {\n socket.destroy();\n }, 1000);\n }).listen(8345);\n \n //\n // Create an NsSocket instance with reconnect enabled\n //\n var socket = new nssocket.NsSocket({\n reconnect: true,\n type: 'tcp4',\n });\n \n socket.on('start', function () {\n //\n // The socket will emit this event periodically\n // as it attempts to reconnect\n //\n console.dir('start');\n });\n \n socket.connect(8345);\n```\n\n# API\n\n### socket.send(event, data) \nWrites `data` to the socket with the specified `event`, on the receiving end it will look like: `JSON.stringify([event, data])`.\n\n### socket.on(event, callback)\nEquivalent to the underlying `.addListener()` or `.on()` function on the underlying socket except that it will permit all `EventEmitter2` wildcards and namespaces.\n\n### socket.data(event, callback)\nHelper function for performing shorthand listeners namespaced under the `data` event. For example:\n\n``` js\n //\n // These two statements are equivalent\n //\n someSocket.on(['data', 'some', 'event'], function (data) { });\n someSocket.data(['some', 'event'], function (data) { });\n```\n\n### socket.end()\n Closes the current socket, emits `close` event, possibly also `error`\n\n### socket.destroy()\n Remove all listeners, destroys socket, clears buffer. It is recommended that you use `socket.end()`.\n\n## Tests\nAll tests are written with [vows][2] and should be run through [npm][3]:\n\n``` bash\n $ npm test\n```\n\n### Author: [Nodejitsu](http://www.nodejitsu.com)\n### Contributors: [Paolo Fragomeni](http://github.com/hij1nx), [Charlie Robbins](http://github.com/indexzero), [Jameson Lee](http://github.com/drjackal), [Gene Diaz Jr.](http://github.com/genediazjr)\n \n[0]: http://github.com/hij1nx/eventemitter2\n[1]: https://gist.github.com/848444\n[2]: http://vowsjs.org\n[3]: http://npmjs.org\n", - "readmeFilename": "README.md", + "gitHead": "ab705cee33b2683bb9dd36533e7166e53f5b46b9", "bugs": { "url": "https://github.com/nodejitsu/nssocket/issues" }, - "homepage": "https://github.com/nodejitsu/nssocket#readme", + "homepage": "https://github.com/nodejitsu/nssocket", "_id": "nssocket@0.5.3", "_shasum": "883ca2ec605f5ed64a4d5190b2625401928f8f8d", - "_resolved": "https://registry.npmjs.org/nssocket/-/nssocket-0.5.3.tgz", - "_from": "nssocket@>=0.5.1 <0.6.0" + "_from": "nssocket@~0.5.1", + "_npmVersion": "2.1.9", + "_nodeVersion": "0.10.33", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "dist": { + "shasum": "883ca2ec605f5ed64a4d5190b2625401928f8f8d", + "tarball": "http://registry.npmjs.org/nssocket/-/nssocket-0.5.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/nssocket/-/nssocket-0.5.3.tgz" } diff --git a/node_modules/forever/node_modules/object-assign/package.json b/node_modules/forever/node_modules/object-assign/package.json index 929c375..9ac2589 100644 --- a/node_modules/forever/node_modules/object-assign/package.json +++ b/node_modules/forever/node_modules/object-assign/package.json @@ -45,7 +45,7 @@ "homepage": "https://github.com/sindresorhus/object-assign", "_id": "object-assign@3.0.0", "_shasum": "9bedd5ca0897949bca47e7ff408062d549f587f2", - "_from": "object-assign@>=3.0.0 <4.0.0", + "_from": "object-assign@^3.0.0", "_npmVersion": "2.10.1", "_nodeVersion": "0.12.4", "_npmUser": { diff --git a/node_modules/forever/node_modules/optimist/node_modules/minimist/package.json b/node_modules/forever/node_modules/optimist/node_modules/minimist/package.json index 09ecda8..d33e585 100644 --- a/node_modules/forever/node_modules/optimist/node_modules/minimist/package.json +++ b/node_modules/forever/node_modules/optimist/node_modules/minimist/package.json @@ -40,13 +40,27 @@ "url": "http://substack.net" }, "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/minimist/issues" }, "_id": "minimist@0.0.10", + "dist": { + "shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" + }, + "_from": "minimist@~0.0.1", + "_npmVersion": "1.4.3", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, "_shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "_from": "minimist@>=0.0.1 <0.1.0" + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" } diff --git a/node_modules/forever/node_modules/optimist/node_modules/wordwrap/package.json b/node_modules/forever/node_modules/optimist/node_modules/wordwrap/package.json index 551b0f0..641bc00 100644 --- a/node_modules/forever/node_modules/optimist/node_modules/wordwrap/package.json +++ b/node_modules/forever/node_modules/optimist/node_modules/wordwrap/package.json @@ -34,14 +34,29 @@ "email": "mail@substack.net", "url": "http://substack.net" }, - "readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n", - "readmeFilename": "README.markdown", + "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d", "bugs": { "url": "https://github.com/substack/node-wordwrap/issues" }, "homepage": "https://github.com/substack/node-wordwrap#readme", "_id": "wordwrap@0.0.3", "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", - "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "_from": "wordwrap@>=0.0.2 <0.1.0" + "_from": "wordwrap@~0.0.2", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", + "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" } diff --git a/node_modules/forever/node_modules/optimist/package.json b/node_modules/forever/node_modules/optimist/package.json index 885c0ee..763101a 100644 --- a/node_modules/forever/node_modules/optimist/package.json +++ b/node_modules/forever/node_modules/optimist/package.json @@ -16,7 +16,7 @@ }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/substack/node-optimist.git" + "url": "http://github.com/substack/node-optimist.git" }, "keywords": [ "argument", @@ -36,14 +36,28 @@ "engine": { "node": ">=0.4" }, - "readme": "# DEPRECATION NOTICE\n\nI don't want to maintain this module anymore since I just use\n[minimist](https://npmjs.org/package/minimist), the argument parsing engine,\ndirectly instead nowadays.\n\nSee [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed\nsuccessor to optimist.\n\n[![yarrrrrrrgs!](http://i.imgur.com/4WFGVJ9.png)](https://github.com/chevex/yargs)\n\nYou should also consider [nomnom](https://github.com/harthur/nomnom).\n\noptimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n { _: [],\n '$0': 'node ./examples/reflect.js',\n foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n $ node reflect.js -n123 -m456\n { '3': true,\n '6': true,\n _: [],\n '$0': 'node ./reflect.js',\n n: 123,\n m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", - "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/node-optimist/issues" }, - "homepage": "https://github.com/substack/node-optimist#readme", + "homepage": "https://github.com/substack/node-optimist", "_id": "optimist@0.6.1", + "dist": { + "shasum": "da3ea74686fa21a19a111c326e90eb15a0196686", + "tarball": "http://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz" + }, + "_from": "optimist@~0.6.0", + "_npmVersion": "1.3.21", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, "_shasum": "da3ea74686fa21a19a111c326e90eb15a0196686", - "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "_from": "optimist@>=0.6.0 <0.7.0" + "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz" } diff --git a/node_modules/forever/node_modules/path-is-absolute/package.json b/node_modules/forever/node_modules/path-is-absolute/package.json index 3375339..280ec91 100644 --- a/node_modules/forever/node_modules/path-is-absolute/package.json +++ b/node_modules/forever/node_modules/path-is-absolute/package.json @@ -47,7 +47,7 @@ "homepage": "https://github.com/sindresorhus/path-is-absolute", "_id": "path-is-absolute@1.0.0", "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "_from": "path-is-absolute@>=1.0.0 <1.1.0", + "_from": "path-is-absolute@~1.0.0", "_npmVersion": "2.5.1", "_nodeVersion": "0.12.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/prettyjson/node_modules/colors/package.json b/node_modules/forever/node_modules/prettyjson/node_modules/colors/package.json index 36546b7..a9599b7 100644 --- a/node_modules/forever/node_modules/prettyjson/node_modules/colors/package.json +++ b/node_modules/forever/node_modules/prettyjson/node_modules/colors/package.json @@ -36,7 +36,7 @@ "gitHead": "8bf2ad9fa695dcb30b7e9fd83691b139fd6655c4", "_id": "colors@1.1.2", "_shasum": "168a4701756b6a7f51a12ce0c97bfa28c084ed63", - "_from": "colors@>=1.1.2 <2.0.0", + "_from": "colors@^1.1.2", "_npmVersion": "2.1.8", "_nodeVersion": "0.11.13", "_npmUser": { diff --git a/node_modules/forever/node_modules/prettyjson/node_modules/minimist/package.json b/node_modules/forever/node_modules/prettyjson/node_modules/minimist/package.json index b822350..28ffe78 100644 --- a/node_modules/forever/node_modules/prettyjson/node_modules/minimist/package.json +++ b/node_modules/forever/node_modules/prettyjson/node_modules/minimist/package.json @@ -48,7 +48,7 @@ }, "_id": "minimist@1.2.0", "_shasum": "a35008b20f41383eec1fb914f4cd5df79a264284", - "_from": "minimist@>=1.1.3 <2.0.0", + "_from": "minimist@^1.1.3", "_npmVersion": "3.2.2", "_nodeVersion": "2.4.0", "_npmUser": { diff --git a/node_modules/forever/node_modules/prettyjson/package.json b/node_modules/forever/node_modules/prettyjson/package.json index bf92d77..831a908 100644 --- a/node_modules/forever/node_modules/prettyjson/package.json +++ b/node_modules/forever/node_modules/prettyjson/package.json @@ -49,7 +49,7 @@ "gitHead": "99dac22baba027875536f543f8dbe5b4f9d9f986", "_id": "prettyjson@1.1.3", "_shasum": "d0787f732c9c3a566f4165fa4f1176fd67e6b263", - "_from": "prettyjson@>=1.1.2 <2.0.0", + "_from": "prettyjson@^1.1.2", "_npmVersion": "2.11.3", "_nodeVersion": "0.12.7", "_npmUser": { diff --git a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/deep-equal/package.json b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/deep-equal/package.json index 7a0875c..99e4ecd 100644 --- a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/deep-equal/package.json +++ b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/deep-equal/package.json @@ -64,7 +64,7 @@ "shasum": "b246c2b80a570a47c11be1d9bd1070ec878b87ce", "tarball": "http://registry.npmjs.org/deep-equal/-/deep-equal-0.1.2.tgz" }, - "_from": "deep-equal@>=0.1.0 <0.2.0", + "_from": "deep-equal@~0.1.0", "_npmVersion": "1.3.21", "_npmUser": { "name": "substack", diff --git a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/defined/package.json b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/defined/package.json index 3f28541..3ee0fc7 100644 --- a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/defined/package.json +++ b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/defined/package.json @@ -51,6 +51,6 @@ } ], "_shasum": "f35eea7d705e933baf13b2f03b3f83d921403b3e", - "_resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz", - "_from": "defined@>=0.0.0 <0.1.0" + "_from": "defined@~0.0.0", + "_resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz" } diff --git a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/inherits/package.json b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/inherits/package.json index 93d5078..292dc68 100644 --- a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/inherits/package.json +++ b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/inherits/package.json @@ -16,7 +16,7 @@ "browser": "./inherits_browser.js", "repository": { "type": "git", - "url": "git://github.com/isaacs/inherits.git" + "url": "git://github.com/isaacs/inherits" }, "license": "ISC", "scripts": { @@ -30,7 +30,7 @@ "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" }, - "_from": "inherits@>=2.0.1 <2.1.0", + "_from": "inherits@~2.0.1", "_npmVersion": "1.3.8", "_npmUser": { "name": "isaacs", @@ -45,6 +45,5 @@ "directories": {}, "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/isaacs/inherits#readme" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/jsonify/package.json b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/jsonify/package.json index 0ad78d1..e4f19d0 100644 --- a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/jsonify/package.json +++ b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/jsonify/package.json @@ -47,6 +47,6 @@ } ], "_shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73", - "_resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "_from": "jsonify@>=0.0.0 <0.1.0" + "_from": "jsonify@~0.0.0", + "_resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" } diff --git a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/resumer/package.json b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/resumer/package.json index 6c6e5fb..f27a116 100644 --- a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/resumer/package.json +++ b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/resumer/package.json @@ -50,7 +50,7 @@ "shasum": "f1e8f461e4064ba39e82af3cdc2a8c893d076759", "tarball": "http://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz" }, - "_from": "resumer@>=0.0.0 <0.1.0", + "_from": "resumer@~0.0.0", "_npmVersion": "1.2.2", "_npmUser": { "name": "substack", diff --git a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/through/package.json b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/through/package.json index c6433ea..c742fcf 100644 --- a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/through/package.json +++ b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/node_modules/through/package.json @@ -43,7 +43,7 @@ }, "_id": "through@2.3.8", "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "_from": "through@>=2.3.4 <2.4.0", + "_from": "through@~2.3.4", "_npmVersion": "2.12.0", "_nodeVersion": "2.3.1", "_npmUser": { diff --git a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/package.json b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/package.json index 418d225..2fed88f 100644 --- a/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/package.json +++ b/node_modules/forever/node_modules/shush/node_modules/caller/node_modules/tape/package.json @@ -63,7 +63,7 @@ "shasum": "2e7ce0a31df09f8d6851664a71842e0ca5057af7", "tarball": "http://registry.npmjs.org/tape/-/tape-2.3.3.tgz" }, - "_from": "tape@>=2.3.2 <2.4.0", + "_from": "tape@~2.3.2", "_npmVersion": "1.4.6", "_npmUser": { "name": "substack", diff --git a/node_modules/forever/node_modules/shush/node_modules/caller/package.json b/node_modules/forever/node_modules/shush/node_modules/caller/package.json index 3032727..7825464 100644 --- a/node_modules/forever/node_modules/shush/node_modules/caller/package.json +++ b/node_modules/forever/node_modules/shush/node_modules/caller/package.json @@ -39,7 +39,7 @@ "shasum": "f37a1d6ea10e829d94721ae29a90bb4fb52ab767", "tarball": "http://registry.npmjs.org/caller/-/caller-0.0.1.tgz" }, - "_from": "caller@>=0.0.1 <0.1.0", + "_from": "caller@~0.0.1", "_npmVersion": "1.3.17", "_npmUser": { "name": "totherik", diff --git a/node_modules/forever/node_modules/shush/node_modules/strip-json-comments/package.json b/node_modules/forever/node_modules/shush/node_modules/strip-json-comments/package.json index 77bf207..4a6f8b5 100644 --- a/node_modules/forever/node_modules/shush/node_modules/strip-json-comments/package.json +++ b/node_modules/forever/node_modules/shush/node_modules/strip-json-comments/package.json @@ -55,7 +55,7 @@ "homepage": "https://github.com/sindresorhus/strip-json-comments", "_id": "strip-json-comments@0.1.3", "_shasum": "164c64e370a8a3cc00c9e01b539e569823f0ee54", - "_from": "strip-json-comments@>=0.1.1 <0.2.0", + "_from": "strip-json-comments@~0.1.1", "_npmVersion": "1.4.13", "_npmUser": { "name": "sindresorhus", diff --git a/node_modules/forever/node_modules/shush/package.json b/node_modules/forever/node_modules/shush/package.json index 2795805..57f8a76 100644 --- a/node_modules/forever/node_modules/shush/package.json +++ b/node_modules/forever/node_modules/shush/package.json @@ -34,7 +34,7 @@ "gitHead": "a6f3f35ad650ae744ed1aa1cb8be68f86bcba706", "_id": "shush@1.0.0", "_shasum": "c27415a9e458f2fed39b27cf8eb37c003782b431", - "_from": "shush@>=1.0.0 <2.0.0", + "_from": "shush@^1.0.0", "_npmVersion": "2.8.1", "_nodeVersion": "0.12.2", "_npmUser": { diff --git a/node_modules/forever/node_modules/timespan/package.json b/node_modules/forever/node_modules/timespan/package.json index 7f110ac..aa85171 100644 --- a/node_modules/forever/node_modules/timespan/package.json +++ b/node_modules/forever/node_modules/timespan/package.json @@ -14,7 +14,7 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/indexzero/TimeSpan.js.git" + "url": "https://github.com/indexzero/TimeSpan.js.git" }, "keywords": [ "time", @@ -34,12 +34,24 @@ }, "readme": "# timespan\n\nA simple implementation of TimeSpans in Javascript.\n\n## Installation in node.js\n\n### Installing npm (node package manager)\n``` bash\n $ curl http://npmjs.org/install.sh | sh\n```\n\n### Installing timespan\n``` bash\n [sudo] npm install timespan\n```\n\n## Usage \nYou have two options when creating a new TimeSpan object: either explicitly instantiate it using the TimeSpan constructor function or use a helper method to create from a specific length of time.\n\n### Using the new constructor\n\n``` js\n var timespan = require('timespan');\n var ts = new timespan.TimeSpan();\n```\n\nThe constructor takes 5 parameters, all which are optional and which can be used to initialize the TimeSpan to a given value. These parameters are: `milliseconds`, `seconds`, `minutes`, `hours`, `days`.\n\n``` js\n //\n // Initializes the TimeSpan to 4 Minutes, 16 Seconds and 0 Milliseconds.\n //\n var ts = new TimeSpan(0,16,4)\n\n //\n // Initializes the TimeSpan to 3 hours, 4 minutes, 10 seconds and 0 msecs.\n //\n var ts = new TimeSpan(0,10,64,2);\n```\n\n### Using Construction Helper Method(s) \nYou can initialize a new TimeSpan by calling one of these Functions:\n\n``` js\n timespan.FromSeconds(/* seconds */);\n timespan.FromMinutes(/* minutes */);\n timespan.FromHours(/* hours */);\n timespan.FromDays(/* hours */);\n \n //\n // This behaves differently, see below\n //\n timespan.FromDates(start, end);\n```\n\nThe first four helper methods take a single numeric parameter and create a new TimeSpan instance. e.g. `timespan.FromSeconds(45)` is equivalent to `new TimeSpan(0,45)`. If the parameter is invalid/not a number, it will just be treated as 0 no error will be thrown.\n\n`timespan.FromDates()` is different as it takes two dates. The TimeSpan will be the difference between these dates.\n\nIf the second date is earlier than the first date, the TimeSpan will have a negative value. You can pass in \"true\" as the third parameter to force the TimeSpan to be positive always.\n\n``` js\n var date1 = new Date(2010, 3, 1, 10, 10, 5, 0);\n var date2 = new Date(2010, 3, 1, 10, 10, 10, 0);\n var ts = TimeSpan.FromDates(date2, date1);\n var ts2 = TimeSpan.FromDates(date2, date1, true);\n \n //\n // -5, because we put the later date first\n //\n console.log(ts.totalSeconds()); \n \n //\n // 5, because we passed true as third parameter\n //\n console.log(ts2.totalSeconds()); \n```\n\n\n### Adding / Subtracting TimeSpans\nThere are several functions to add or subtract time:\n\n``` js\n ts.addMilliseconds()\n ts.addSeconds()\n ts.addMinutes()\n ts.addHours()\n ts.addDays()\n ts.subtractMilliseconds()\n ts.subtractSeconds()\n ts.subtractMinutes()\n ts.subtractHours()\n ts.subtractDays()\n```\n\nAll these functions take a single numeric parameter. If the parameter is invalid, not a number, or missing it will be ignored and no Error is thrown.\n\n``` js\n var ts = new TimeSpan();\n ts.addSeconds(30);\n ts.addMinutes(2);\n ts.subtractSeconds(60);\n \n //\n // ts will now be a timespan of 1 minute and 30 seconds\n //\n```\n\nThe parameter can be negative to negate the operation `ts.addSeconds(-30)` is equivalent to `ts.subtractSeconds(30)`.\n\n### Interacting with Other TimeSpan instances\nThese are the functions that interact with another TimeSpan:\n\n``` js\n ts.add()\n ts.subtract()\n ts.equals()\n```\n\nadd and subtract add/subtract the other TimeSpan to the current one:\n\n``` js\n var ts = TimeSpan.FromSeconds(30);\n var ts2 = TimeSpan.FromMinutes(2);\n ts.add(ts2);\n \n //\n // ts is now a TimeSpan of 2 Minutes, 30 Seconds\n // ts2 is unchanged\n //\n```\n\nequals checks if two TimeSpans have the same time:\n\n``` js\n var ts = TimeSpan.FromSeconds(30);\n var ts2 = TimeSpan.FromSeconds(30);\n var eq = ts.equals(ts2); // true\n ts2.addSeconds(1);\n var eq2 = ts.equals(ts2); // false\n```\n\n### Retrieving the Value of a TimeSpan\nThere are two sets of functions to retreive the function of the TimeSpan: those that deal with the full value in various measurements and another that gets the individual components.\n\n#### Retrieve the full value\n\n``` js\n ts.totalMilliseconds()\n ts.totalSeconds()\n ts.totalMinutes()\n ts.totalHours()\n ts.totalDays()\n```\n\nThese functions convert the value to the given format and return it. The result can be a floating point number. These functions take a single parameter roundDown which can be set to true to round the value down to an Integer.\n\n``` js\n var ts = TimeSpan.fromSeconds(90);\n console.log(ts.totalMilliseconds()); // 90000\n console.log(ts.totalSeconds()); // 90\n console.log(ts.totalMinutes()); // 1.5\n console.log(ts.totalMinutes(true)); // 1\n```\n\n#### Retrieve a component of the TimeSpan\n\n``` js\n ts.milliseconds\n ts.seconds\n ts.minutes\n ts.hours\n ts.days\n```\n\nThese functions return a component of the TimeSpan that could be used to represent a clock. \n\n``` js\n var ts = TimeSpan.FromSeconds(90);\n console.log(ts.seconds()); // 30\n console.log(ts.minutes()); // 1\n```\n\nBasically these value never \"overflow\" - seconds will only return 0 to 59, hours only 0 to 23 etc. Days could grow infinitely. All of these functions automatically round down the result:\n\n``` js\n var ts = TimeSpan.FromDays(2);\n ts.addHours(12);\n console.log(ts.days()); // 2\n console.log(ts.hours()); // 12\n```\n\n## Remark about Backwards Compatibility\nVersion 0.2.x was designed to work with [node.js][0] and backwards compatibility to the browser-based usage was not considered a high priority. This will be fixed in future versions, but for now if you need to use this in the browser, you can find the 0.1.x code under `/browser`.\n\n#### Author: [Michael Stum](http://www.stum.de)\n#### Contributors: [Charlie Robbins](http://github.com/indexzero)\n\n[0]: http://nodejs.org ", "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/indexzero/TimeSpan.js/issues" - }, - "homepage": "https://github.com/indexzero/TimeSpan.js#readme", "_id": "timespan@2.3.0", + "dist": { + "shasum": "4902ce040bd13d845c8f59b27e9d59bad6f39929", + "tarball": "http://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz" + }, + "_from": "timespan@~2.3.0", + "_npmVersion": "1.2.14", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], + "directories": {}, "_shasum": "4902ce040bd13d845c8f59b27e9d59bad6f39929", - "_resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", - "_from": "timespan@>=2.3.0 <2.4.0" + "_resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/async/package.json b/node_modules/forever/node_modules/utile/node_modules/async/package.json index 54fe38c..ddd7d57 100644 --- a/node_modules/forever/node_modules/utile/node_modules/async/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/async/package.json @@ -8,7 +8,7 @@ "version": "0.2.10", "repository": { "type": "git", - "url": "git+https://github.com/caolan/async.git" + "url": "https://github.com/caolan/async.git" }, "bugs": { "url": "https://github.com/caolan/async/issues" @@ -35,11 +35,24 @@ "scripts": { "test": "nodeunit test/test-async.js" }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, each…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n\n\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [eachSeries](#eachSeries)\n* [eachLimit](#eachLimit)\n* [map](#map)\n* [mapSeries](#mapSeries)\n* [mapLimit](#mapLimit)\n* [filter](#filter)\n* [filterSeries](#filterSeries)\n* [reject](#reject)\n* [rejectSeries](#rejectSeries)\n* [reduce](#reduce)\n* [reduceRight](#reduceRight)\n* [detect](#detect)\n* [detectSeries](#detectSeries)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n* [concatSeries](#concatSeries)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [parallelLimit](#parallellimittasks-limit-callback)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [applyEachSeries](#applyEachSeries)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async#readme", "_id": "async@0.2.10", + "dist": { + "shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1", + "tarball": "http://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "_from": "async@~0.2.9", + "_npmVersion": "1.3.2", + "_npmUser": { + "name": "caolan", + "email": "caolan.mcmahon@gmail.com" + }, + "maintainers": [ + { + "name": "caolan", + "email": "caolan@caolanmcmahon.com" + } + ], + "directories": {}, "_shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1", - "_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "_from": "async@>=0.2.9 <0.3.0" + "_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/deep-equal/.travis.yml b/node_modules/forever/node_modules/utile/node_modules/deep-equal/.travis.yml index f1d0f13..4af02b3 100644 --- a/node_modules/forever/node_modules/utile/node_modules/deep-equal/.travis.yml +++ b/node_modules/forever/node_modules/utile/node_modules/deep-equal/.travis.yml @@ -1,4 +1,8 @@ language: node_js node_js: - - 0.4 - - 0.6 + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/node_modules/forever/node_modules/utile/node_modules/deep-equal/index.js b/node_modules/forever/node_modules/utile/node_modules/deep-equal/index.js index dbc11f2..0772f8c 100644 --- a/node_modules/forever/node_modules/utile/node_modules/deep-equal/index.js +++ b/node_modules/forever/node_modules/utile/node_modules/deep-equal/index.js @@ -13,7 +13,7 @@ var deepEqual = module.exports = function (actual, expected, opts) { // 7.3. Other pairs that do not both pass typeof value == 'object', // equivalence is determined by ==. - } else if (typeof actual != 'object' && typeof expected != 'object') { + } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') { return opts.strict ? actual === expected : actual == expected; // 7.4. For all other Object pairs, including Array objects, equivalence is diff --git a/node_modules/forever/node_modules/utile/node_modules/deep-equal/package.json b/node_modules/forever/node_modules/utile/node_modules/deep-equal/package.json index 386d180..78693f0 100644 --- a/node_modules/forever/node_modules/utile/node_modules/deep-equal/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/deep-equal/package.json @@ -1,6 +1,6 @@ { "name": "deep-equal", - "version": "1.0.0", + "version": "1.0.1", "description": "node's assert.deepEqual algorithm", "main": "index.js", "directories": { @@ -55,14 +55,29 @@ ] } }, - "readme": "# deep-equal\n\nNode's `assert.deepEqual() algorithm` as a standalone module.\n\nThis module is around [5 times faster](https://gist.github.com/2790507)\nthan wrapping `assert.deepEqual()` in a `try/catch`.\n\n[![browser support](https://ci.testling.com/substack/node-deep-equal.png)](https://ci.testling.com/substack/node-deep-equal)\n\n[![build status](https://secure.travis-ci.org/substack/node-deep-equal.png)](https://travis-ci.org/substack/node-deep-equal)\n\n# example\n\n``` js\nvar equal = require('deep-equal');\nconsole.dir([\n equal(\n { a : [ 2, 3 ], b : [ 4 ] },\n { a : [ 2, 3 ], b : [ 4 ] }\n ),\n equal(\n { x : 5, y : [6] },\n { x : 5, y : 6 }\n )\n]);\n```\n\n# methods\n\n``` js\nvar deepEqual = require('deep-equal')\n```\n\n## deepEqual(a, b, opts)\n\nCompare objects `a` and `b`, returning whether they are equal according to a\nrecursive equality algorithm.\n\nIf `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes.\nThe default is to use coercive equality (`==`) because that's how\n`assert.deepEqual()` works by default.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install deep-equal\n```\n\n# test\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm test\n```\n\n# license\n\nMIT. Derived largely from node's assert module.\n", - "readmeFilename": "readme.markdown", + "gitHead": "59c511f5aeae19e3dd1de054077a789d7302be34", "bugs": { "url": "https://github.com/substack/node-deep-equal/issues" }, "homepage": "https://github.com/substack/node-deep-equal#readme", - "_id": "deep-equal@1.0.0", - "_shasum": "d4564f07d2f0ab3e46110bec16592abd7dc2e326", - "_resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.0.tgz", - "_from": "deep-equal@*" + "_id": "deep-equal@1.0.1", + "_shasum": "f5d260292b660e084eff4cdbc9f08ad3247448b5", + "_from": "deep-equal@*", + "_npmVersion": "3.2.2", + "_nodeVersion": "2.4.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "f5d260292b660e084eff4cdbc9f08ad3247448b5", + "tarball": "http://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "_resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/deep-equal/test/cmp.js b/node_modules/forever/node_modules/utile/node_modules/deep-equal/test/cmp.js index d141256..2aab5f9 100644 --- a/node_modules/forever/node_modules/utile/node_modules/deep-equal/test/cmp.js +++ b/node_modules/forever/node_modules/utile/node_modules/deep-equal/test/cmp.js @@ -87,3 +87,9 @@ test('booleans and arrays', function (t) { t.notOk(equal(true, [])); t.end(); }) + +test('null == undefined', function (t) { + t.ok(equal(null, undefined)) + t.notOk(equal(null, undefined, { strict: true })) + t.end() +}) diff --git a/node_modules/forever/node_modules/utile/node_modules/i/package.json b/node_modules/forever/node_modules/utile/node_modules/i/package.json index 8485d7b..14ae6e5 100644 --- a/node_modules/forever/node_modules/utile/node_modules/i/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/i/package.json @@ -54,10 +54,25 @@ "url": "https://github.com/pksunkara/inflect/raw/master/LICENSE" } ], - "readme": "# inflect\n\ncustomizable inflections for nodejs\n\n## Installation\n\n```bash\nnpm install i\n```\n\n## Usage\n\nRequire the module before using\n\n```js\nvar inflect = require('i')();\n```\n\nAll the below api functions can be called directly on a string\n\n```js\ninflect.titleize('messages to store') // === 'Messages To Store'\n'messages to store'.titleize // === 'Messages To Store'\n```\n\nonly if `true` is passed while initiating\n\n```js\nvar inflect = require('i')(true);\n```\n\n### Pluralize\n\n```js\ninflect.pluralize('person'); // === 'people'\ninflect.pluralize('octopus'); // === 'octopi'\ninflect.pluralize('Hat'); // === 'Hats'\n```\n\n### Singularize\n\n```js\ninflect.singularize('people'); // === 'person'\ninflect.singularize('octopi'); // === 'octopus'\ninflect.singularize('Hats'); // === 'Hat'\n```\n\n### Camelize\n\n```js\ninflect.camelize('message_properties'); // === 'MessageProperties'\ninflect.camelize('message_properties', false); // === 'messageProperties'\n```\n\n### Underscore\n\n```js\ninflect.underscore('MessageProperties'); // === 'message_properties'\ninflect.underscore('messageProperties'); // === 'message_properties'\n```\n\n### Humanize\n\n```js\ninflect.humanize('message_id'); // === 'Message'\n```\n\n### Dasherize\n\n```js\ninflect.dasherize('message_properties'); // === 'message-properties'\ninflect.dasherize('Message Properties'); // === 'Message Properties'\n```\n\n### Titleize\n\n```js\ninflect.titleize('message_properties'); // === 'Message Properties'\ninflect.titleize('message properties to keep'); // === 'Message Properties to Keep'\n```\n\n### Demodulize\n\n```js\ninflect.demodulize('Message.Bus.Properties'); // === 'Properties'\n```\n\n### Tableize\n\n```js\ninflect.tableize('MessageBusProperty'); // === 'message_bus_properties'\n```\n\n### Classify\n\n```js\ninflect.classify('message_bus_properties'); // === 'MessageBusProperty'\n```\n\n### Foreign key\n\n```js\ninflect.foreign_key('MessageBusProperty'); // === 'message_bus_property_id'\ninflect.foreign_key('MessageBusProperty', false); // === 'message_bus_propertyid'\n```\n\n### Ordinalize\n\n```js\ninflect.ordinalize( '1' ); // === '1st'\n```\n\n## Custom rules for inflection\n\n### Custom plural\n\nWe can use regexp in any of these custom rules\n\n```js\ninflect.inflections.plural('person', 'guys');\ninflect.pluralize('person'); // === 'guys'\ninflect.singularize('guys'); // === 'guy'\n```\n\n### Custom singular\n\n```js\ninflect.inflections.singular('guys', 'person')\ninflect.singularize('guys'); // === 'person'\ninflect.pluralize('person'); // === 'people'\n```\n\n### Custom irregular\n\n```js\ninflect.inflections.irregular('person', 'guys')\ninflect.pluralize('person'); // === 'guys'\ninflect.singularize('guys'); // === 'person'\n```\n\n### Custom human\n\n```js\ninflect.inflections.human(/^(.*)_cnt$/i, '$1_count');\ninflect.inflections.humanize('jargon_cnt'); // === 'Jargon count'\n```\n\n### Custom uncountable\n\n```js\ninflect.inflections.uncountable('oil')\ninflect.pluralize('oil'); // === 'oil'\ninflect.singularize('oil'); // === 'oil'\n```\n\n## Contributors\nHere is a list of [Contributors](http://github.com/pksunkara/inflect/contributors)\n\n### TODO\n\n- More obscure test cases\n\n__I accept pull requests and guarantee a reply back within a day__\n\n## License\nMIT/X11\n\n## Bug Reports\nReport [here](http://github.com/pksunkara/inflect/issues). __Guaranteed reply within a day__.\n\n## Contact\nPavan Kumar Sunkara (pavan.sss1991@gmail.com)\n\nFollow me on [github](https://github.com/users/follow?target=pksunkara), [twitter](http://twitter.com/pksunkara)\n", - "readmeFilename": "README.md", + "gitHead": "f6495e42873fe5b3ca80b060bc274662c3ed610b", "_id": "i@0.3.3", "_shasum": "0ff9a5eb743504aa8ac26a84f84c641287ff24cd", - "_resolved": "https://registry.npmjs.org/i/-/i-0.3.3.tgz", - "_from": "i@>=0.3.0 <0.4.0" + "_from": "i@0.3.x", + "_npmVersion": "2.0.0", + "_npmUser": { + "name": "pksunkara", + "email": "pavan.sss1991@gmail.com" + }, + "maintainers": [ + { + "name": "pksunkara", + "email": "pavan.sss1991@gmail.com" + } + ], + "dist": { + "shasum": "0ff9a5eb743504aa8ac26a84f84c641287ff24cd", + "tarball": "http://registry.npmjs.org/i/-/i-0.3.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/i/-/i-0.3.3.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/mkdirp/node_modules/minimist/package.json b/node_modules/forever/node_modules/utile/node_modules/mkdirp/node_modules/minimist/package.json index 09e9ec4..7cd80f4 100644 --- a/node_modules/forever/node_modules/utile/node_modules/mkdirp/node_modules/minimist/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/mkdirp/node_modules/minimist/package.json @@ -62,6 +62,5 @@ ], "directories": {}, "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/mkdirp/package.json b/node_modules/forever/node_modules/utile/node_modules/mkdirp/package.json index 2cb8273..2878812 100644 --- a/node_modules/forever/node_modules/utile/node_modules/mkdirp/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/mkdirp/package.json @@ -30,14 +30,30 @@ "mkdirp": "bin/cmd.js" }, "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, opts, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `opts.mode`. If `opts` is a non-object, it will be treated as\nthe `opts.mode`.\n\nIf `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\nYou can optionally pass in an alternate `fs` implementation by passing in\n`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and\n`opts.fs.stat(path, cb)`.\n\n## mkdirp.sync(dir, opts)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `opts.mode`. If `opts` is a non-object, it will be\ntreated as the `opts.mode`.\n\nIf `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\nYou can optionally pass in an alternate `fs` implementation by passing in\n`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and\n`opts.fs.statSync(path)`.\n\n# usage\n\nThis package also ships with a `mkdirp` command.\n\n```\nusage: mkdirp [DIR1,DIR2..] {OPTIONS}\n\n Create each supplied directory including any necessary parent directories that\n don't yet exist.\n \n If the directory already exists, do nothing.\n\nOPTIONS are:\n\n -m, --mode If a directory needs to be created, set the mode as an octal\n permission string.\n\n```\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\nto get the library, or\n\n```\nnpm install -g mkdirp\n```\n\nto get the command.\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", + "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7", "bugs": { "url": "https://github.com/substack/node-mkdirp/issues" }, "homepage": "https://github.com/substack/node-mkdirp#readme", "_id": "mkdirp@0.5.1", "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", - "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "_from": "mkdirp@>=0.0.0 <1.0.0" + "_from": "mkdirp@0.x.x", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/ncp/package.json b/node_modules/forever/node_modules/utile/node_modules/ncp/package.json index c2ab520..80062a2 100644 --- a/node_modules/forever/node_modules/utile/node_modules/ncp/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/ncp/package.json @@ -17,7 +17,7 @@ "main": "./lib/ncp.js", "repository": { "type": "git", - "url": "git+https://github.com/AvianFlu/ncp.git" + "url": "https://github.com/AvianFlu/ncp.git" }, "keywords": [ "cli", @@ -30,14 +30,24 @@ "scripts": { "test": "vows --isolate --spec" }, - "readme": "# ncp - Asynchronous recursive file & directory copying\n\n[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp)\n\nThink `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically.\n\n## Command Line usage\n\nUsage is simple: `ncp [source] [dest] [--limit=concurrency limit]\n[--filter=filter] --stopOnErr`\n\nThe 'filter' is a Regular Expression - matched files will be copied.\n\nThe 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time.\n\n'stopOnErr' is a boolean flag that will tell `ncp` to stop immediately if any\nerrors arise, rather than attempting to continue while logging errors.\n\nIf there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue.\n\n## Programmatic usage\n\nProgrammatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error. \n\n```javascript\nvar ncp = require('ncp').ncp;\n\nncp.limit = 16;\n\nncp(source, destination, function (err) {\n if (err) {\n return console.error(err);\n }\n console.log('done!');\n});\n```\n\nYou can also call ncp like `ncp(source, destination, options, callback)`. \n`options` should be a dictionary. Currently, such options are available:\n\n * `options.filter` - a `RegExp` instance, against which each file name is\n tested to determine whether to copy it or not, or a function taking single\n parameter: copied file name, returning `true` or `false`, determining\n whether to copy file or not.\n\n * `options.transform` - a function: `function (read, write) { read.pipe(write) }`\n used to apply streaming transforms while copying.\n\n * `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite \n destination files that already exist.\n\nPlease open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/AvianFlu/ncp/issues" - }, - "homepage": "https://github.com/AvianFlu/ncp#readme", "_id": "ncp@0.4.2", + "dist": { + "shasum": "abcc6cbd3ec2ed2a729ff6e7c1fa8f01784a8574", + "tarball": "http://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz" + }, + "_from": "ncp@0.4.x", + "_npmVersion": "1.2.2", + "_npmUser": { + "name": "avianflu", + "email": "charlie@charlieistheman.com" + }, + "maintainers": [ + { + "name": "avianflu", + "email": "charlie@charlieistheman.com" + } + ], + "directories": {}, "_shasum": "abcc6cbd3ec2ed2a729ff6e7c1fa8f01784a8574", - "_resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", - "_from": "ncp@>=0.4.0 <0.5.0" + "_resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/README.md b/node_modules/forever/node_modules/utile/node_modules/rimraf/README.md index 58e7ac3..24fdb73 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/README.md +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/README.md @@ -1,10 +1,17 @@ -The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. +[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) + +The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. Install with `npm install rimraf`, or just drop rimraf.js somewhere. ## API -`rimraf(f, callback)` +`rimraf(f, [opts], callback)` + +The first parameter will be interpreted as a globbing pattern for files. If you +want to disable globbing you can do so with `opts.disableGlob` (defaults to +`false`). This might be handy, for instance, if you have filenames that contain +globbing wildcard characters. The callback will be called with an error if there is one. Certain errors are handled for you: @@ -20,6 +27,64 @@ errors are handled for you: async case, rimraf will gradually back off with timeouts up to `opts.emfileWait` ms, which defaults to 1000. +## options + +* unlink, chmod, stat, lstat, rmdir, readdir + unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync + + In order to use a custom file system library, you can override + specific fs functions on the options object. + + If any of these functions are present on the options object, then + the supplied function will be used instead of the default fs + method. + + Sync methods are only relevant for `rimraf.sync()`, of course. + + For example: + + ```javascript + var myCustomFS = require('some-custom-fs') + + rimraf('some-thing', myCustomFS, callback) + ``` + +* maxBusyTries + + If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered + on Windows systems, then rimraf will retry with a linear backoff + wait of 100ms longer on each try. The default maxBusyTries is 3. + + Only relevant for async usage. + +* emfileWait + + If an `EMFILE` error is encountered, then rimraf will retry + repeatedly with a linear backoff of 1ms longer on each try, until + the timeout counter hits this max. The default limit is 1000. + + If you repeatedly encounter `EMFILE` errors, then consider using + [graceful-fs](http://npm.im/graceful-fs) in your program. + + Only relevant for async usage. + +* glob + + Set to `false` to disable [glob](http://npm.im/glob) pattern + matching. + + Set to an object to pass options to the glob module. The default + glob options are `{ nosort: true, silent: true }`. + + Glob version 6 is used in this module. + + Relevant for both sync and async usage. + +* disableGlob + + Set to any non-falsey value to disable globbing entirely. + (Equivalent to setting `glob: false`.) + ## rimraf.sync It can remove stuff synchronously, too. But that's not so good. Use @@ -28,7 +93,7 @@ the async API. It's better. ## CLI If installed with `npm install rimraf -g` it can be used as a global -command `rimraf ` which is useful for cross platform support. +command `rimraf [ ...]` which is useful for cross platform support. ## mkdirp diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/bin.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/bin.js index 29bfa8a..1bd5a0d 100755 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/bin.js +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/bin.js @@ -18,7 +18,7 @@ var args = process.argv.slice(2).filter(function(arg) { if (help || args.length === 0) { // If they didn't ask for help, then this is not a "success" var log = help ? console.log : console.error - log('Usage: rimraf ') + log('Usage: rimraf [ ...]') log('') log(' Deletes all files and folders at "path" recursively.') log('') @@ -26,8 +26,15 @@ if (help || args.length === 0) { log('') log(' -h, --help Display this usage info') process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) +} else + go(0) + +function go (n) { + if (n >= args.length) + return + rimraf(args[n], function (er) { + if (er) + throw er + go(n+1) }) } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/README.md b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/README.md index 258257e..9206683 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/README.md +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/README.md @@ -74,13 +74,6 @@ slashes in it, then it will seek for any file anywhere in the tree with a matching basename. For example, `*.js` would match `test/simple/basic.js`. -### Negation - -The intent for negation would be for a pattern starting with `!` to -match everything that *doesn't* match the supplied pattern. However, -the implementation is weird, and for the time being, this should be -avoided. The behavior will change or be deprecated in version 5. - ### Empty Sets If no matching files are found, then an empty array is returned. This @@ -113,19 +106,19 @@ options. ## glob(pattern, [options], cb) -* `pattern` {String} Pattern to be matched -* `options` {Object} -* `cb` {Function} - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* `cb` `{Function}` + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern Perform an asynchronous glob search. ## glob.sync(pattern, [options]) -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* return: `{Array}` filenames found matching the pattern Perform a synchronous glob search. @@ -143,11 +136,11 @@ immediately. ### new glob.Glob(pattern, [options], [cb]) -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern +* `pattern` `{String}` pattern to search for +* `options` `{Object}` +* `cb` `{Function}` Called when an error occurs, or matches are found + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern Note that if the `sync` flag is set in the options, then matches will be immediately available on the `g.found` member. @@ -159,14 +152,12 @@ be immediately available on the `g.found` member. * `aborted` Boolean which is set to true when calling `abort()`. There is no way at this time to continue a glob search after aborting, but you can re-use the statCache to avoid having to duplicate syscalls. -* `statCache` Collection of all the stat results the glob search - performed. * `cache` Convenience object. Each field has the following possible values: * `false` - Path does not exist * `true` - Path exists - * `'DIR'` - Path exists, and is not a directory - * `'FILE'` - Path exists, and is a directory + * `'FILE'` - Path exists, and is not a directory + * `'DIR'` - Path exists, and is a directory * `[file, entries, ...]` - Path exists, is a directory, and the array value is the results of `fs.readdir` * `statCache` Cache of `fs.stat` results, to prevent statting the same @@ -183,7 +174,8 @@ be immediately available on the `g.found` member. matches found. If the `nonull` option is set, and no match was found, then the `matches` list contains the original pattern. The matches are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. +* `match` Every time a match is found, this is emitted with the specific + thing that matched. It is not deduplicated or resolved to a realpath. * `error` Emitted when an unexpected error is encountered, or whenever any fs error occurs if `options.strict` is set. * `abort` When `abort()` is called, this event is raised. @@ -263,12 +255,11 @@ the filesystem. * `matchBase` Perform a basename-only match if the pattern does not contain any slash characters. That is, `*.js` would be treated as equivalent to `**/*.js`, matching all js files in all directories. -* `nonegate` Suppress `negate` behavior. (See below.) -* `nocomment` Suppress `comment` behavior. (See below.) -* `nonull` Return the pattern when no matches are found. * `nodir` Do not match directories, only files. (Note: to match *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of patterns to exclude matches. +* `ignore` Add a pattern or an array of glob patterns to exclude matches. + Note: `ignore` patterns are *always* in `dot:true` mode, regardless + of any other settings. * `follow` Follow symlinked directories when expanding `**` patterns. Note that this can result in a lot of duplicate references in the presence of cyclic links. @@ -283,17 +274,6 @@ While strict compliance with the existing standards is a worthwhile goal, some discrepancies exist between node-glob and other implementations, and are intentional. -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - The double-star character `**` is supported by default, unless the `noglobstar` flag is set. This is supported in the manner of bsdglob and bash 4.3, where `**` only has special significance if it is the only @@ -317,6 +297,16 @@ other interpretation of the glob pattern. Thus, a pattern like **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are checked for validity. Since those two are valid, matching proceeds. +### Comments and Negation + +Previously, this module let you mark a pattern as a "comment" if it +started with a `#` character, or a "negated" pattern if it started +with a `!` character. + +These options were deprecated in version 5, and removed in version 6. + +To specify things that should not match, use the `ignore` option. + ## Windows **Please only use forward-slashes in glob expressions.** diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/common.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/common.js index cd7c824..c9127eb 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/common.js +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/common.js @@ -1,6 +1,5 @@ exports.alphasort = alphasort exports.alphasorti = alphasorti -exports.isAbsolute = process.platform === "win32" ? absWin : absUnix exports.setopts = setopts exports.ownProp = ownProp exports.makeAbs = makeAbs @@ -15,26 +14,9 @@ function ownProp (obj, field) { var path = require("path") var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") var Minimatch = minimatch.Minimatch -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ - var result = splitDeviceRe.exec(p) - var device = result[1] || '' - var isUnc = device && device.charAt(1) !== ':' - var isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} - function alphasorti (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()) } @@ -54,15 +36,16 @@ function setupIgnores (self, options) { } } +// ignore patterns are always in dot:true mode. function ignoreMap (pattern) { var gmatcher = null if (pattern.slice(-3) === '/**') { var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { nonegate: true }) + gmatcher = new Minimatch(gpattern, { dot: true }) } return { - matcher: new Minimatch(pattern, { nonegate: true }), + matcher: new Minimatch(pattern, { dot: true }), gmatcher: gmatcher } } @@ -79,6 +62,7 @@ function setopts (self, pattern, options) { pattern = "**/" + pattern } + self.silent = !!options.silent self.pattern = pattern self.strict = options.strict !== false self.realpath = !!options.realpath @@ -120,6 +104,11 @@ function setopts (self, pattern, options) { self.nomount = !!options.nomount + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + self.minimatch = new Minimatch(pattern, options) self.options = self.minimatch.options } @@ -205,11 +194,11 @@ function makeAbs (self, f) { var abs = f if (f.charAt(0) === '/') { abs = path.join(self.root, f) - } else if (exports.isAbsolute(f)) { + } else if (isAbsolute(f) || f === '') { abs = f } else if (self.changedCwd) { abs = path.resolve(self.cwd, f) - } else if (self.realpath) { + } else { abs = path.resolve(f) } return abs diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/glob.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/glob.js index eac0693..022d2ac 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/glob.js +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/glob.js @@ -47,16 +47,17 @@ var inherits = require('inherits') var EE = require('events').EventEmitter var path = require('path') var assert = require('assert') +var isAbsolute = require('path-is-absolute') var globSync = require('./sync.js') var common = require('./common.js') var alphasort = common.alphasort var alphasorti = common.alphasorti -var isAbsolute = common.isAbsolute var setopts = common.setopts var ownProp = common.ownProp var inflight = require('inflight') var util = require('util') var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored var once = require('once') @@ -432,6 +433,9 @@ Glob.prototype._emitMatch = function (index, e) { if (this.matches[index][e]) return + if (isIgnored(this, e)) + return + if (this.paused) { this._emitQueue.push([index, e]) return @@ -552,6 +556,7 @@ Glob.prototype._readdirError = function (f, er, cb) { // handle errors, and cache the information switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 case 'ENOTDIR': // totally normal. means it *does* exist. this.cache[this._makeAbs(f)] = 'FILE' break @@ -565,10 +570,17 @@ Glob.prototype._readdirError = function (f, er, cb) { default: // some unusual error. Treat as failure. this.cache[this._makeAbs(f)] = false - if (this.strict) return this.emit('error', er) - if (!this.silent) console.error('glob error', er) + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) break } + return cb() } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json index 2b8e311..178c5a5 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json @@ -15,7 +15,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/npm/wrappy.git" + "url": "https://github.com/npm/wrappy" }, "author": { "name": "Isaac Z. Schlueter", @@ -27,10 +27,25 @@ "url": "https://github.com/npm/wrappy/issues" }, "homepage": "https://github.com/npm/wrappy", - "readme": "# wrappy\n\nCallback wrapping utility\n\n## USAGE\n\n```javascript\nvar wrappy = require(\"wrappy\")\n\n// var wrapper = wrappy(wrapperFunction)\n\n// make sure a cb is called only once\n// See also: http://npm.im/once for this specific use case\nvar once = wrappy(function (cb) {\n var called = false\n return function () {\n if (called) return\n called = true\n return cb.apply(this, arguments)\n }\n})\n\nfunction printBoo () {\n console.log('boo')\n}\n// has some rando property\nprintBoo.iAmBooPrinter = true\n\nvar onlyPrintOnce = once(printBoo)\n\nonlyPrintOnce() // prints 'boo'\nonlyPrintOnce() // does nothing\n\n// random property is retained!\nassert.equal(onlyPrintOnce.iAmBooPrinter, true)\n```\n", - "readmeFilename": "README.md", + "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", "_id": "wrappy@1.0.1", "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", - "_from": "wrappy@>=1.0.0 <2.0.0" + "_from": "wrappy@1", + "_npmVersion": "2.0.0", + "_nodeVersion": "0.10.31", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + }, + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json index 20386c8..a6ae3f3 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json @@ -15,7 +15,7 @@ }, "repository": { "type": "git", - "url": "git://github.com/isaacs/inflight.git" + "url": "git://github.com/isaacs/inflight" }, "author": { "name": "Isaac Z. Schlueter", @@ -27,10 +27,34 @@ }, "homepage": "https://github.com/isaacs/inflight", "license": "ISC", - "readme": "# inflight\n\nAdd callbacks to requests in flight to avoid async duplication\n\n## USAGE\n\n```javascript\nvar inflight = require('inflight')\n\n// some request that does some stuff\nfunction req(key, callback) {\n // key is any random string. like a url or filename or whatever.\n //\n // will return either a falsey value, indicating that the\n // request for this key is already in flight, or a new callback\n // which when called will call all callbacks passed to inflightk\n // with the same key\n callback = inflight(key, callback)\n\n // If we got a falsey value back, then there's already a req going\n if (!callback) return\n\n // this is where you'd fetch the url or whatever\n // callback is also once()-ified, so it can safely be assigned\n // to multiple events etc. First call wins.\n setTimeout(function() {\n callback(null, key)\n }, 100)\n}\n\n// only assigns a single setTimeout\n// when it dings, all cbs get called\nreq('foo', cb1)\nreq('foo', cb2)\nreq('foo', cb3)\nreq('foo', cb4)\n```\n", - "readmeFilename": "README.md", + "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", "_id": "inflight@1.0.4", "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", - "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", - "_from": "inflight@>=1.0.4 <2.0.0" + "_from": "inflight@^1.0.4", + "_npmVersion": "2.1.3", + "_nodeVersion": "0.10.32", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "dist": { + "shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "tarball": "http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json index 8c08a43..f601343 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json @@ -16,20 +16,33 @@ "browser": "./inherits_browser.js", "repository": { "type": "git", - "url": "git://github.com/isaacs/inherits.git" + "url": "git://github.com/isaacs/inherits" }, "license": "ISC", "scripts": { "test": "node test" }, - "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", - "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/inherits/issues" }, - "homepage": "https://github.com/isaacs/inherits#readme", "_id": "inherits@2.0.1", + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "_from": "inherits@^2.0.1", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "_from": "inherits@>=2.0.0 <3.0.0" + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js index 5e13d6d..ec4c05c 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js @@ -272,6 +272,7 @@ function parse (pattern, isSub) { var escaping = false // ? => one single character var patternListStack = [] + var negativeLists = [] var plType var stateChar var inClass = false @@ -372,9 +373,13 @@ function parse (pattern, isSub) { } plType = stateChar - patternListStack.push({ type: plType, start: i - 1, reStart: re.length }) + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!' : '(?:' + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' this.debug('plType %j %j', stateChar, re) stateChar = false continue @@ -388,12 +393,15 @@ function parse (pattern, isSub) { clearStateChar() hasMagic = true re += ')' - plType = patternListStack.pop().type + var pl = patternListStack.pop() + plType = pl.type // negation is (?:(?!js)[^/]*) // The others are (?:) switch (plType) { case '!': - re += '[^/]*?)' + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length break case '?': case '+': @@ -507,7 +515,7 @@ function parse (pattern, isSub) { // and escape any | chars that were passed through as-is for the regexp. // Go through and escape them, taking care not to double-escape any // | chars that were already escaped. - for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + 3) // maybe some even number of \, then maybe 1 \, followed by a | tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { @@ -550,12 +558,49 @@ function parse (pattern, isSub) { case '(': addPatternStart = true } + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + // if the re is not "" at this point, then we need to make sure // it doesn't match against an empty path part. // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) re = '(?=.)' + re + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } - if (addPatternStart) re = patternStart + re + if (addPatternStart) { + re = patternStart + re + } // parsing just a piece of a larger pattern. if (isSub === SUBPARSE) { diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore index 249bc20..353546a 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore @@ -1,2 +1,3 @@ -node_modules -*.sw* +test +.gitignore +.travis.yml diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md index 62bc7ba..1793929 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md @@ -4,6 +4,7 @@ as known from sh/bash, in JavaScript. [![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) [![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml index cc4dba2..6e5919d 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml @@ -1,4 +1,3 @@ language: node_js node_js: - - "0.8" - "0.10" diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md new file mode 100644 index 0000000..2cdc8e4 --- /dev/null +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md index 2aff0eb..421f3aa 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md @@ -47,6 +47,15 @@ If there's no match, `undefined` will be returned. If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`. +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]`. + ## Installation With [npm](https://npmjs.org) do: diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js index d165ae8..75f3d71 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -1,38 +1,50 @@ module.exports = balanced; function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; + var r = range(a, b, str); - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } - } - } - - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; - } - return m; - } + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i < str.length && i >= 0 && ! result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json index 35332a3..cadce13 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -1,7 +1,7 @@ { "name": "balanced-match", "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "0.2.0", + "version": "0.3.0", "repository": { "type": "git", "url": "git://github.com/juliangruber/balanced-match.git" @@ -13,7 +13,7 @@ }, "dependencies": {}, "devDependencies": { - "tape": "~1.1.1" + "tape": "~4.2.2" }, "keywords": [ "match", @@ -44,13 +44,30 @@ "android-browser/4.2..latest" ] }, - "readme": "# balanced-match\n\nMatch balanced string pairs, like `{` and `}` or `` and ``.\n\n[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)\n[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)\n\n[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)\n\n## Example\n\nGet the first matching pair of braces:\n\n```js\nvar balanced = require('balanced-match');\n\nconsole.log(balanced('{', '}', 'pre{in{nested}}post'));\nconsole.log(balanced('{', '}', 'pre{first}between{second}post'));\n```\n\nThe matches are:\n\n```bash\n$ node example.js\n{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }\n{ start: 3,\n end: 9,\n pre: 'pre',\n body: 'first',\n post: 'between{second}post' }\n```\n\n## API\n\n### var m = balanced(a, b, str)\n\nFor the first non-nested matching pair of `a` and `b` in `str`, return an\nobject with those keys:\n\n* **start** the index of the first match of `a`\n* **end** the index of the matching `b`\n* **pre** the preamble, `a` and `b` not included\n* **body** the match, `a` and `b` not included\n* **post** the postscript, `a` and `b` not included\n\nIf there's no match, `undefined` will be returned.\n\nIf the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.\n\n## Installation\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install balanced-match\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", + "gitHead": "a7114b0986554787e90b7ac595a043ca75ea77e5", "bugs": { "url": "https://github.com/juliangruber/balanced-match/issues" }, - "_id": "balanced-match@0.2.0", - "_shasum": "38f6730c03aab6d5edbb52bd934885e756d71674", - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz", - "_from": "balanced-match@>=0.2.0 <0.3.0" + "_id": "balanced-match@0.3.0", + "_shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", + "_from": "balanced-match@^0.3.0", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "dist": { + "shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", + "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js index 36bfd39..f5e98e3 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js @@ -52,5 +52,33 @@ test('balanced', function(t) { body: 'innest', post: 'post' }); + t.deepEqual(balanced('{{', '}}', 'pre{{{in}}}post'), { + start: 3, + end: 9, + pre: 'pre', + body: '{in}', + post: 'post' + }); + t.deepEqual(balanced('{{{', '}}', 'pre{{{in}}}post'), { + start: 3, + end: 8, + pre: 'pre', + body: 'in', + post: '}post' + }); + t.deepEqual(balanced('{', '}', 'pre{{first}in{second}post'), { + start: 4, + end: 10, + pre: 'pre{', + body: 'first', + post: 'in{second}post' + }); + t.deepEqual(balanced('', 'prepost'), { + start: 3, + end: 4, + pre: 'pre', + body: '', + post: 'post' + }); t.end(); }); diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json index 50cc7b5..b516138 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json @@ -56,14 +56,28 @@ ] } }, - "readme": "concat-map\n==========\n\nConcatenative mapdashery.\n\n[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)\n\n[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)\n\nexample\n=======\n\n``` js\nvar concatMap = require('concat-map');\nvar xs = [ 1, 2, 3, 4, 5, 6 ];\nvar ys = concatMap(xs, function (x) {\n return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];\n});\nconsole.dir(ys);\n```\n\n***\n\n```\n[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]\n```\n\nmethods\n=======\n\n``` js\nvar concatMap = require('concat-map')\n```\n\nconcatMap(xs, fn)\n-----------------\n\nReturn an array of concatenated elements by calling `fn(x, i)` for each element\n`x` and each index `i` in the array `xs`.\n\nWhen `fn(x, i)` returns an array, its result will be concatenated with the\nresult array. If `fn(x, i)` returns anything else, that value will be pushed\nonto the end of the result array.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install concat-map\n```\n\nlicense\n=======\n\nMIT\n\nnotes\n=====\n\nThis module was written while sitting high above the ground in a tree.\n", - "readmeFilename": "README.markdown", "bugs": { "url": "https://github.com/substack/node-concat-map/issues" }, - "homepage": "https://github.com/substack/node-concat-map#readme", + "homepage": "https://github.com/substack/node-concat-map", "_id": "concat-map@0.0.1", + "dist": { + "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "_from": "concat-map@0.0.1", + "_npmVersion": "1.3.21", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "_from": "concat-map@0.0.1" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json index ba78e62..15fc2d0 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -1,7 +1,7 @@ { "name": "brace-expansion", "description": "Brace expansion as known from sh/bash", - "version": "1.1.0", + "version": "1.1.2", "repository": { "type": "git", "url": "git://github.com/juliangruber/brace-expansion.git" @@ -13,11 +13,11 @@ "gentest": "bash test/generate.sh" }, "dependencies": { - "balanced-match": "^0.2.0", + "balanced-match": "^0.3.0", "concat-map": "0.0.1" }, "devDependencies": { - "tape": "^3.0.3" + "tape": "4.2.2" }, "keywords": [], "author": { @@ -42,13 +42,34 @@ "android-browser/4.2..latest" ] }, - "readme": "# brace-expansion\n\n[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), \nas known from sh/bash, in JavaScript.\n\n[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)\n\n[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)\n\n## Example\n\n```js\nvar expand = require('brace-expansion');\n\nexpand('file-{a,b,c}.jpg')\n// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']\n\nexpand('-v{,,}')\n// => ['-v', '-v', '-v']\n\nexpand('file{0..2}.jpg')\n// => ['file0.jpg', 'file1.jpg', 'file2.jpg']\n\nexpand('file-{a..c}.jpg')\n// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']\n\nexpand('file{2..0}.jpg')\n// => ['file2.jpg', 'file1.jpg', 'file0.jpg']\n\nexpand('file{0..4..2}.jpg')\n// => ['file0.jpg', 'file2.jpg', 'file4.jpg']\n\nexpand('file-{a..e..2}.jpg')\n// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']\n\nexpand('file{00..10..5}.jpg')\n// => ['file00.jpg', 'file05.jpg', 'file10.jpg']\n\nexpand('{{A..C},{a..c}}')\n// => ['A', 'B', 'C', 'a', 'b', 'c']\n\nexpand('ppp{,config,oe{,conf}}')\n// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']\n```\n\n## API\n\n```js\nvar expand = require('brace-expansion');\n```\n\n### var expanded = expand(str)\n\nReturn an array of all possible and valid expansions of `str`. If none are\nfound, `[str]` is returned.\n\nValid expansions are:\n\n```js\n/^(.*,)+(.+)?$/\n// {a,b,...}\n```\n\nA comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.\n\n```js\n/^-?\\d+\\.\\.-?\\d+(\\.\\.-?\\d+)?$/\n// {x..y[..incr]}\n```\n\nA numeric sequence from `x` to `y` inclusive, with optional increment.\nIf `x` or `y` start with a leading `0`, all the numbers will be padded\nto have equal length. Negative numbers and backwards iteration work too.\n\n```js\n/^-?\\d+\\.\\.-?\\d+(\\.\\.-?\\d+)?$/\n// {x..y[..incr]}\n```\n\nAn alphabetic sequence from `x` to `y` inclusive, with optional increment.\n`x` and `y` must be exactly one character, and if given, `incr` must be a\nnumber.\n\nFor compatibility reasons, the string `${` is not eligible for brace expansion.\n\n## Installation\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install brace-expansion\n```\n\n## Contributors\n\n- [Julian Gruber](https://github.com/juliangruber)\n- [Isaac Z. Schlueter](https://github.com/isaacs)\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", + "gitHead": "b03773a30fa516b1374945b68e9acb6253d595fa", "bugs": { "url": "https://github.com/juliangruber/brace-expansion/issues" }, - "_id": "brace-expansion@1.1.0", - "_shasum": "c9b7d03c03f37bc704be100e522b40db8f6cfcd9", - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz", - "_from": "brace-expansion@>=1.0.0 <2.0.0" + "_id": "brace-expansion@1.1.2", + "_shasum": "f21445d0488b658e2771efd870eff51df29f04ef", + "_from": "brace-expansion@^1.0.0", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "dist": { + "shasum": "f21445d0488b658e2771efd870eff51df29f04ef", + "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js deleted file mode 100644 index 5fe2b8a..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('tape'); -var expand = require('..'); -var fs = require('fs'); -var resfile = __dirname + '/bash-results.txt'; -var cases = fs.readFileSync(resfile, 'utf8').split('><><><><'); - -// throw away the EOF marker -cases.pop() - -test('matches bash expansions', function(t) { - cases.forEach(function(testcase) { - var set = testcase.split('\n'); - var pattern = set.shift(); - var actual = expand(pattern); - - // If it expands to the empty string, then it's actually - // just nothing, but Bash is a singly typed language, so - // "nothing" is the same as "". - if (set.length === 1 && set[0] === '') { - set = [] - } else { - // otherwise, strip off the [] that were added so that - // "" expansions would be preserved properly. - set = set.map(function (s) { - return s.replace(/^\[|\]$/g, '') - }) - } - - t.same(actual, set, pattern); - }); - t.end(); -}) diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt deleted file mode 100644 index 958148d..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +++ /dev/null @@ -1,1075 +0,0 @@ -A{b,{d,e},{f,g}}Z -[AbZ] -[AdZ] -[AeZ] -[AfZ] -[AgZ]><><><><><><><\{a,b}{{a,b},a,b} -[{a,b}a] -[{a,b}b] -[{a,b}a] -[{a,b}b]><><><><{{a,b} -[{a] -[{b]><><><><{a,b}} -[a}] -[b}]><><><><{,} -><><><><><><><{,}b -[b] -[b]><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><{-01..5} -[-01] -[000] -[001] -[002] -[003] -[004] -[005]><><><><{-05..100..5} -[-05] -[000] -[005] -[010] -[015] -[020] -[025] -[030] -[035] -[040] -[045] -[050] -[055] -[060] -[065] -[070] -[075] -[080] -[085] -[090] -[095] -[100]><><><><{-05..100} -[-05] -[-04] -[-03] -[-02] -[-01] -[000] -[001] -[002] -[003] -[004] -[005] -[006] -[007] -[008] -[009] -[010] -[011] -[012] -[013] -[014] -[015] -[016] -[017] -[018] -[019] -[020] -[021] -[022] -[023] -[024] -[025] -[026] -[027] -[028] -[029] -[030] -[031] -[032] -[033] -[034] -[035] -[036] -[037] -[038] -[039] -[040] -[041] -[042] -[043] -[044] -[045] -[046] -[047] -[048] -[049] -[050] -[051] -[052] -[053] -[054] -[055] -[056] -[057] -[058] -[059] -[060] -[061] -[062] -[063] -[064] -[065] -[066] -[067] -[068] -[069] -[070] -[071] -[072] -[073] -[074] -[075] -[076] -[077] -[078] -[079] -[080] -[081] -[082] -[083] -[084] -[085] -[086] -[087] -[088] -[089] -[090] -[091] -[092] -[093] -[094] -[095] -[096] -[097] -[098] -[099] -[100]><><><><{0..5..2} -[0] -[2] -[4]><><><><{0001..05..2} -[0001] -[0003] -[0005]><><><><{0001..-5..2} -[0001] -[-001] -[-003] -[-005]><><><><{0001..-5..-2} -[0001] -[-001] -[-003] -[-005]><><><><{0001..5..-2} -[0001] -[0003] -[0005]><><><><{01..5} -[01] -[02] -[03] -[04] -[05]><><><><{1..05} -[01] -[02] -[03] -[04] -[05]><><><><{1..05..3} -[01] -[04]><><><><{05..100} -[005] -[006] -[007] -[008] -[009] -[010] -[011] -[012] -[013] -[014] -[015] -[016] -[017] -[018] -[019] -[020] -[021] -[022] -[023] -[024] -[025] -[026] -[027] -[028] -[029] -[030] -[031] -[032] -[033] -[034] -[035] -[036] -[037] -[038] -[039] -[040] -[041] -[042] -[043] -[044] -[045] -[046] -[047] -[048] -[049] -[050] -[051] -[052] -[053] -[054] -[055] -[056] -[057] -[058] -[059] -[060] -[061] -[062] -[063] -[064] -[065] -[066] -[067] -[068] -[069] -[070] -[071] -[072] -[073] -[074] -[075] -[076] -[077] -[078] -[079] -[080] -[081] -[082] -[083] -[084] -[085] -[086] -[087] -[088] -[089] -[090] -[091] -[092] -[093] -[094] -[095] -[096] -[097] -[098] -[099] -[100]><><><><{0a..0z} -[{0a..0z}]><><><><{a,b\}c,d} -[a] -[b}c] -[d]><><><><{a,b{c,d} -[{a,bc] -[{a,bd]><><><><{a,b}c,d} -[ac,d}] -[bc,d}]><><><><{a..F} -[a] -[`] -[_] -[^] -[]] -[] -[[] -[Z] -[Y] -[X] -[W] -[V] -[U] -[T] -[S] -[R] -[Q] -[P] -[O] -[N] -[M] -[L] -[K] -[J] -[I] -[H] -[G] -[F]><><><><{A..f} -[A] -[B] -[C] -[D] -[E] -[F] -[G] -[H] -[I] -[J] -[K] -[L] -[M] -[N] -[O] -[P] -[Q] -[R] -[S] -[T] -[U] -[V] -[W] -[X] -[Y] -[Z] -[[] -[] -[]] -[^] -[_] -[`] -[a] -[b] -[c] -[d] -[e] -[f]><><><><{a..Z} -[a] -[`] -[_] -[^] -[]] -[] -[[] -[Z]><><><><{A..z} -[A] -[B] -[C] -[D] -[E] -[F] -[G] -[H] -[I] -[J] -[K] -[L] -[M] -[N] -[O] -[P] -[Q] -[R] -[S] -[T] -[U] -[V] -[W] -[X] -[Y] -[Z] -[[] -[] -[]] -[^] -[_] -[`] -[a] -[b] -[c] -[d] -[e] -[f] -[g] -[h] -[i] -[j] -[k] -[l] -[m] -[n] -[o] -[p] -[q] -[r] -[s] -[t] -[u] -[v] -[w] -[x] -[y] -[z]><><><><{z..A} -[z] -[y] -[x] -[w] -[v] -[u] -[t] -[s] -[r] -[q] -[p] -[o] -[n] -[m] -[l] -[k] -[j] -[i] -[h] -[g] -[f] -[e] -[d] -[c] -[b] -[a] -[`] -[_] -[^] -[]] -[] -[[] -[Z] -[Y] -[X] -[W] -[V] -[U] -[T] -[S] -[R] -[Q] -[P] -[O] -[N] -[M] -[L] -[K] -[J] -[I] -[H] -[G] -[F] -[E] -[D] -[C] -[B] -[A]><><><><{Z..a} -[Z] -[[] -[] -[]] -[^] -[_] -[`] -[a]><><><><{a..F..2} -[a] -[_] -[]] -[[] -[Y] -[W] -[U] -[S] -[Q] -[O] -[M] -[K] -[I] -[G]><><><><{A..f..02} -[A] -[C] -[E] -[G] -[I] -[K] -[M] -[O] -[Q] -[S] -[U] -[W] -[Y] -[[] -[]] -[_] -[a] -[c] -[e]><><><><{a..Z..5} -[a] -[]><><><><><><><{A..z..10} -[A] -[K] -[U] -[_] -[i] -[s]><><><><{z..A..-2} -[z] -[x] -[v] -[t] -[r] -[p] -[n] -[l] -[j] -[h] -[f] -[d] -[b] -[`] -[^] -[] -[Z] -[X] -[V] -[T] -[R] -[P] -[N] -[L] -[J] -[H] -[F] -[D] -[B]><><><><{Z..a..20} -[Z]><><><><{a{,b} -[{a] -[{ab]><><><><{a},b} -[a}] -[b]><><><><{x,y{,}g} -[x] -[yg] -[yg]><><><><{x,y{}g} -[x] -[y{}g]><><><><{{a,b} -[{a] -[{b]><><><><{{a,b},c} -[a] -[b] -[c]><><><><{{a,b}c} -[{ac}] -[{bc}]><><><><{{a,b},} -[a] -[b]><><><><><><><{{a,b},}c -[ac] -[bc] -[c]><><><><{{a,b}.} -[{a.}] -[{b.}]><><><><{{a,b}} -[{a}] -[{b}]><><><><><><>< -><><><><{-10..00} -[-10] -[-09] -[-08] -[-07] -[-06] -[-05] -[-04] -[-03] -[-02] -[-01] -[000]><><><><{a,\\{a,b}c} -[a] -[\ac] -[\bc]><><><><{a,\{a,b}c} -[ac}] -[{ac}] -[bc}]><><><><><><><{-10.\.00} -[{-10..00}]><><><><><><><><><><{l,n,m}xyz -[lxyz] -[nxyz] -[mxyz]><><><><{abc\,def} -[{abc,def}]><><><><{abc} -[{abc}]><><><><{x\,y,\{abc\},trie} -[x,y] -[{abc}] -[trie]><><><><{} -[{}]><><><><} -[}]><><><><{ -[{]><><><><><><><{1..10} -[1] -[2] -[3] -[4] -[5] -[6] -[7] -[8] -[9] -[10]><><><><{0..10,braces} -[0..10] -[braces]><><><><{{0..10},braces} -[0] -[1] -[2] -[3] -[4] -[5] -[6] -[7] -[8] -[9] -[10] -[braces]><><><><><><><{3..3} -[3]><><><><><><><{10..1} -[10] -[9] -[8] -[7] -[6] -[5] -[4] -[3] -[2] -[1]><><><><{10..1}y -[10y] -[9y] -[8y] -[7y] -[6y] -[5y] -[4y] -[3y] -[2y] -[1y]><><><><><><><{a..f} -[a] -[b] -[c] -[d] -[e] -[f]><><><><{f..a} -[f] -[e] -[d] -[c] -[b] -[a]><><><><{a..A} -[a] -[`] -[_] -[^] -[]] -[] -[[] -[Z] -[Y] -[X] -[W] -[V] -[U] -[T] -[S] -[R] -[Q] -[P] -[O] -[N] -[M] -[L] -[K] -[J] -[I] -[H] -[G] -[F] -[E] -[D] -[C] -[B] -[A]><><><><{A..a} -[A] -[B] -[C] -[D] -[E] -[F] -[G] -[H] -[I] -[J] -[K] -[L] -[M] -[N] -[O] -[P] -[Q] -[R] -[S] -[T] -[U] -[V] -[W] -[X] -[Y] -[Z] -[[] -[] -[]] -[^] -[_] -[`] -[a]><><><><{f..f} -[f]><><><><{1..f} -[{1..f}]><><><><{f..1} -[{f..1}]><><><><{-1..-10} -[-1] -[-2] -[-3] -[-4] -[-5] -[-6] -[-7] -[-8] -[-9] -[-10]><><><><{-20..0} -[-20] -[-19] -[-18] -[-17] -[-16] -[-15] -[-14] -[-13] -[-12] -[-11] -[-10] -[-9] -[-8] -[-7] -[-6] -[-5] -[-4] -[-3] -[-2] -[-1] -[0]><><><><><><><><><><{klklkl}{1,2,3} -[{klklkl}1] -[{klklkl}2] -[{klklkl}3]><><><><{1..10..2} -[1] -[3] -[5] -[7] -[9]><><><><{-1..-10..2} -[-1] -[-3] -[-5] -[-7] -[-9]><><><><{-1..-10..-2} -[-1] -[-3] -[-5] -[-7] -[-9]><><><><{10..1..-2} -[10] -[8] -[6] -[4] -[2]><><><><{10..1..2} -[10] -[8] -[6] -[4] -[2]><><><><{1..20..2} -[1] -[3] -[5] -[7] -[9] -[11] -[13] -[15] -[17] -[19]><><><><{1..20..20} -[1]><><><><{100..0..5} -[100] -[95] -[90] -[85] -[80] -[75] -[70] -[65] -[60] -[55] -[50] -[45] -[40] -[35] -[30] -[25] -[20] -[15] -[10] -[5] -[0]><><><><{100..0..-5} -[100] -[95] -[90] -[85] -[80] -[75] -[70] -[65] -[60] -[55] -[50] -[45] -[40] -[35] -[30] -[25] -[20] -[15] -[10] -[5] -[0]><><><><{a..z} -[a] -[b] -[c] -[d] -[e] -[f] -[g] -[h] -[i] -[j] -[k] -[l] -[m] -[n] -[o] -[p] -[q] -[r] -[s] -[t] -[u] -[v] -[w] -[x] -[y] -[z]><><><><{a..z..2} -[a] -[c] -[e] -[g] -[i] -[k] -[m] -[o] -[q] -[s] -[u] -[w] -[y]><><><><{z..a..-2} -[z] -[x] -[v] -[t] -[r] -[p] -[n] -[l] -[j] -[h] -[f] -[d] -[b]><><><><{2147483645..2147483649} -[2147483645] -[2147483646] -[2147483647] -[2147483648] -[2147483649]><><><><{10..0..2} -[10] -[8] -[6] -[4] -[2] -[0]><><><><{10..0..-2} -[10] -[8] -[6] -[4] -[2] -[0]><><><><{-50..-0..5} -[-50] -[-45] -[-40] -[-35] -[-30] -[-25] -[-20] -[-15] -[-10] -[-5] -[0]><><><><{1..10.f} -[{1..10.f}]><><><><{1..ff} -[{1..ff}]><><><><{1..10..ff} -[{1..10..ff}]><><><><{1.20..2} -[{1.20..2}]><><><><{1..20..f2} -[{1..20..f2}]><><><><{1..20..2f} -[{1..20..2f}]><><><><{1..2f..2} -[{1..2f..2}]><><><><{1..ff..2} -[{1..ff..2}]><><><><{1..ff} -[{1..ff}]><><><><{1..f} -[{1..f}]><><><><{1..0f} -[{1..0f}]><><><><{1..10f} -[{1..10f}]><><><><{1..10.f} -[{1..10.f}]><><><><{1..10.f} -[{1..10.f}]><><><>< \ No newline at end of file diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt deleted file mode 100644 index e5161c3..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +++ /dev/null @@ -1,182 +0,0 @@ -# skip quotes for now -# "{x,x}" -# {"x,x"} -# {x","x} -# '{a,b}{{a,b},a,b}' -A{b,{d,e},{f,g}}Z -PRE-{a,b}{{a,b},a,b}-POST -\\{a,b}{{a,b},a,b} -{{a,b} -{a,b}} -{,} -a{,} -{,}b -a{,}b -a{b}c -a{1..5}b -a{01..5}b -a{-01..5}b -a{-01..5..3}b -a{001..9}b -a{b,c{d,e},{f,g}h}x{y,z -a{b,c{d,e},{f,g}h}x{y,z\\} -a{b,c{d,e},{f,g}h}x{y,z} -a{b{c{d,e}f{x,y{{g}h -a{b{c{d,e}f{x,y{}g}h -a{b{c{d,e}f{x,y}}g}h -a{b{c{d,e}f}g}h -a{{x,y},z}b -f{x,y{g,z}}h -f{x,y{{g,z}}h -f{x,y{{g,z}}h} -f{x,y{{g}h -f{x,y{{g}}h -f{x,y{}g}h -z{a,b{,c}d -z{a,b},c}d -{-01..5} -{-05..100..5} -{-05..100} -{0..5..2} -{0001..05..2} -{0001..-5..2} -{0001..-5..-2} -{0001..5..-2} -{01..5} -{1..05} -{1..05..3} -{05..100} -{0a..0z} -{a,b\\}c,d} -{a,b{c,d} -{a,b}c,d} -{a..F} -{A..f} -{a..Z} -{A..z} -{z..A} -{Z..a} -{a..F..2} -{A..f..02} -{a..Z..5} -d{a..Z..5}b -{A..z..10} -{z..A..-2} -{Z..a..20} -{a{,b} -{a},b} -{x,y{,}g} -{x,y{}g} -{{a,b} -{{a,b},c} -{{a,b}c} -{{a,b},} -X{{a,b},}X -{{a,b},}c -{{a,b}.} -{{a,b}} -X{a..#}X -# this next one is an empty string - -{-10..00} -# Need to escape slashes in here for reasons i guess. -{a,\\\\{a,b}c} -{a,\\{a,b}c} -a,\\{b,c} -{-10.\\.00} -#### bash tests/braces.tests -# Note that some tests are edited out because some features of -# bash are intentionally not supported in this brace expander. -ff{c,b,a} -f{d,e,f}g -{l,n,m}xyz -{abc\\,def} -{abc} -{x\\,y,\\{abc\\},trie} -# not impementing back-ticks obviously -# XXXX\\{`echo a b c | tr ' ' ','`\\} -{} -# We only ever have to worry about parsing a single argument, -# not a command line, so spaces have a different meaning than bash. -# { } -} -{ -abcd{efgh -# spaces -# foo {1,2} bar -# not impementing back-ticks obviously -# `zecho foo {1,2} bar` -# $(zecho foo {1,2} bar) -# ${var} is not a variable here, like it is in bash. omit. -# foo{bar,${var}.} -# foo{bar,${var}} -# isaacs: skip quotes for now -# "${var}"{x,y} -# $var{x,y} -# ${var}{x,y} -# new sequence brace operators -{1..10} -# this doesn't work yet -{0..10,braces} -# but this does -{{0..10},braces} -x{{0..10},braces}y -{3..3} -x{3..3}y -{10..1} -{10..1}y -x{10..1}y -{a..f} -{f..a} -{a..A} -{A..a} -{f..f} -# mixes are incorrectly-formed brace expansions -{1..f} -{f..1} -# spaces -# 0{1..9} {10..20} -# do negative numbers work? -{-1..-10} -{-20..0} -# weirdly-formed brace expansions -- fixed in post-bash-3.1 -a-{b{d,e}}-c -a-{bdef-{g,i}-c -# isaacs: skip quotes for now -# {"klklkl"}{1,2,3} -# isaacs: this is a valid test, though -{klklkl}{1,2,3} -# {"x,x"} -{1..10..2} -{-1..-10..2} -{-1..-10..-2} -{10..1..-2} -{10..1..2} -{1..20..2} -{1..20..20} -{100..0..5} -{100..0..-5} -{a..z} -{a..z..2} -{z..a..-2} -# make sure brace expansion handles ints > 2**31 - 1 using intmax_t -{2147483645..2147483649} -# unwanted zero-padding -- fixed post-bash-4.0 -{10..0..2} -{10..0..-2} -{-50..-0..5} -# bad -{1..10.f} -{1..ff} -{1..10..ff} -{1.20..2} -{1..20..f2} -{1..20..2f} -{1..2f..2} -{1..ff..2} -{1..ff} -{1..f} -{1..0f} -{1..10f} -{1..10.f} -{1..10.f} diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js deleted file mode 100644 index 3fcc185..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('ignores ${', function(t) { - t.deepEqual(expand('${1..3}'), ['${1..3}']); - t.deepEqual(expand('${a,b}${c,d}'), ['${a,b}${c,d}']); - t.deepEqual(expand('x${a,b}x${c,d}x'), ['x${a,b}x${c,d}x']); - t.end(); -}); diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js deleted file mode 100644 index e429121..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('empty option', function(t) { - t.deepEqual(expand('-v{,,,,}'), [ - '-v', '-v', '-v', '-v', '-v' - ]); - t.end(); -}); - diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh deleted file mode 100644 index e040e66..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# Bash 4.3 because of arbitrary need to pick a single standard. - -if [ "${BASH_VERSINFO[0]}" != "4" ] || [ "${BASH_VERSINFO[1]}" != "3" ]; then - echo "this script requires bash 4.3" >&2 - exit 1 -fi - -CDPATH= cd "$(dirname "$0")" - -js='require("./")(process.argv[1]).join(" ")' - -cat cases.txt | \ - while read case; do - if [ "${case:0:1}" = "#" ]; then - continue; - fi; - b="$($BASH -c 'for c in '"$case"'; do echo ["$c"]; done')" - echo "$case" - echo -n "$b><><><><"; - done > bash-results.txt diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js deleted file mode 100644 index 8d434c2..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('negative increment', function(t) { - t.deepEqual(expand('{3..1}'), ['3', '2', '1']); - t.deepEqual(expand('{10..8}'), ['10', '9', '8']); - t.deepEqual(expand('{10..08}'), ['10', '09', '08']); - t.deepEqual(expand('{c..a}'), ['c', 'b', 'a']); - - t.deepEqual(expand('{4..0..2}'), ['4', '2', '0']); - t.deepEqual(expand('{4..0..-2}'), ['4', '2', '0']); - t.deepEqual(expand('{e..a..2}'), ['e', 'c', 'a']); - - t.end(); -}); diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js deleted file mode 100644 index 0862dc5..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +++ /dev/null @@ -1,16 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('nested', function(t) { - t.deepEqual(expand('{a,b{1..3},c}'), [ - 'a', 'b1', 'b2', 'b3', 'c' - ]); - t.deepEqual(expand('{{A..Z},{a..z}}'), - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('') - ); - t.deepEqual(expand('ppp{,config,oe{,conf}}'), [ - 'ppp', 'pppconfig', 'pppoe', 'pppoeconf' - ]); - t.end(); -}); - diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js deleted file mode 100644 index c00ad15..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('order', function(t) { - t.deepEqual(expand('a{d,c,b}e'), [ - 'ade', 'ace', 'abe' - ]); - t.end(); -}); - diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js deleted file mode 100644 index e415877..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('pad', function(t) { - t.deepEqual(expand('{9..11}'), [ - '9', '10', '11' - ]); - t.deepEqual(expand('{09..11}'), [ - '09', '10', '11' - ]); - t.end(); -}); - diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js deleted file mode 100644 index 3038fba..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +++ /dev/null @@ -1,7 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('x and y of same type', function(t) { - t.deepEqual(expand('{a..9}'), ['{a..9}']); - t.end(); -}); diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js deleted file mode 100644 index f73a957..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +++ /dev/null @@ -1,50 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('numeric sequences', function(t) { - t.deepEqual(expand('a{1..2}b{2..3}c'), [ - 'a1b2c', 'a1b3c', 'a2b2c', 'a2b3c' - ]); - t.deepEqual(expand('{1..2}{2..3}'), [ - '12', '13', '22', '23' - ]); - t.end(); -}); - -test('numeric sequences with step count', function(t) { - t.deepEqual(expand('{0..8..2}'), [ - '0', '2', '4', '6', '8' - ]); - t.deepEqual(expand('{1..8..2}'), [ - '1', '3', '5', '7' - ]); - t.end(); -}); - -test('numeric sequence with negative x / y', function(t) { - t.deepEqual(expand('{3..-2}'), [ - '3', '2', '1', '0', '-1', '-2' - ]); - t.end(); -}); - -test('alphabetic sequences', function(t) { - t.deepEqual(expand('1{a..b}2{b..c}3'), [ - '1a2b3', '1a2c3', '1b2b3', '1b2c3' - ]); - t.deepEqual(expand('{a..b}{b..c}'), [ - 'ab', 'ac', 'bb', 'bc' - ]); - t.end(); -}); - -test('alphabetic sequences with step count', function(t) { - t.deepEqual(expand('{a..k..2}'), [ - 'a', 'c', 'e', 'g', 'i', 'k' - ]); - t.deepEqual(expand('{b..k..2}'), [ - 'b', 'd', 'f', 'h', 'j' - ]); - t.end(); -}); - diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json index de2ff5f..99ec7c0 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json @@ -6,16 +6,15 @@ }, "name": "minimatch", "description": "a glob matcher in javascript", - "version": "2.0.8", + "version": "3.0.0", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" }, "main": "minimatch.js", "scripts": { - "pretest": "standard minimatch.js test/*.js", - "test": "tap test/*.js", - "prepublish": "browserify -o browser.js -e minimatch.js --bare" + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js" }, "engines": { "node": "*" @@ -24,23 +23,37 @@ "brace-expansion": "^1.0.0" }, "devDependencies": { - "browserify": "^9.0.3", "standard": "^3.7.2", - "tap": "" + "tap": "^1.2.0" }, "license": "ISC", "files": [ - "minimatch.js", - "browser.js" + "minimatch.js" ], - "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself if this option is set. When not set, an empty list\nis returned if there are no matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", - "readmeFilename": "README.md", + "gitHead": "270dbea567f0af6918cb18103e98c612aa717a20", "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, "homepage": "https://github.com/isaacs/minimatch#readme", - "_id": "minimatch@2.0.8", - "_shasum": "0bc20f6bf3570a698ef0ddff902063c6cabda6bf", - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.8.tgz", - "_from": "minimatch@>=2.0.1 <3.0.0" + "_id": "minimatch@3.0.0", + "_shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", + "_from": "minimatch@2 || 3", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json index 2b8e311..178c5a5 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json @@ -15,7 +15,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/npm/wrappy.git" + "url": "https://github.com/npm/wrappy" }, "author": { "name": "Isaac Z. Schlueter", @@ -27,10 +27,25 @@ "url": "https://github.com/npm/wrappy/issues" }, "homepage": "https://github.com/npm/wrappy", - "readme": "# wrappy\n\nCallback wrapping utility\n\n## USAGE\n\n```javascript\nvar wrappy = require(\"wrappy\")\n\n// var wrapper = wrappy(wrapperFunction)\n\n// make sure a cb is called only once\n// See also: http://npm.im/once for this specific use case\nvar once = wrappy(function (cb) {\n var called = false\n return function () {\n if (called) return\n called = true\n return cb.apply(this, arguments)\n }\n})\n\nfunction printBoo () {\n console.log('boo')\n}\n// has some rando property\nprintBoo.iAmBooPrinter = true\n\nvar onlyPrintOnce = once(printBoo)\n\nonlyPrintOnce() // prints 'boo'\nonlyPrintOnce() // does nothing\n\n// random property is retained!\nassert.equal(onlyPrintOnce.iAmBooPrinter, true)\n```\n", - "readmeFilename": "README.md", + "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", "_id": "wrappy@1.0.1", "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", - "_from": "wrappy@>=1.0.0 <2.0.0" + "_from": "wrappy@1", + "_npmVersion": "2.0.0", + "_nodeVersion": "0.10.31", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + }, + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/package.json index 5b64a1b..91402d6 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/package.json @@ -1,6 +1,6 @@ { "name": "once", - "version": "1.3.2", + "version": "1.3.3", "description": "Run a function exactly one time", "main": "once.js", "directories": { @@ -10,11 +10,14 @@ "wrappy": "1" }, "devDependencies": { - "tap": "~0.3.0" + "tap": "^1.2.0" }, "scripts": { "test": "tap test/*.js" }, + "files": [ + "once.js" + ], "repository": { "type": "git", "url": "git://github.com/isaacs/once.git" @@ -31,14 +34,29 @@ "url": "http://blog.izs.me/" }, "license": "ISC", - "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n", - "readmeFilename": "README.md", + "gitHead": "2ad558657e17fafd24803217ba854762842e4178", "bugs": { "url": "https://github.com/isaacs/once/issues" }, "homepage": "https://github.com/isaacs/once#readme", - "_id": "once@1.3.2", - "_shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", - "_resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", - "_from": "once@>=1.3.0 <2.0.0" + "_id": "once@1.3.3", + "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", + "_from": "once@^1.3.0", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", + "tarball": "http://registry.npmjs.org/once/-/once-1.3.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js deleted file mode 100644 index c618360..0000000 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js +++ /dev/null @@ -1,23 +0,0 @@ -var test = require('tap').test -var once = require('../once.js') - -test('once', function (t) { - var f = 0 - function fn (g) { - t.equal(f, 0) - f ++ - return f + g + this - } - fn.ownProperty = {} - var foo = once(fn) - t.equal(fn.ownProperty, foo.ownProperty) - t.notOk(foo.called) - for (var i = 0; i < 1E3; i++) { - t.same(f, i === 0 ? 0 : 1) - var g = foo.call(1, 1) - t.ok(foo.called) - t.same(g, 3) - t.same(f, 1) - } - t.end() -}) diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/package.json index acae7aa..ec6b87c 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/package.json @@ -6,7 +6,7 @@ }, "name": "glob", "description": "a little globber", - "version": "4.5.3", + "version": "6.0.3", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -23,33 +23,50 @@ "dependencies": { "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "devDependencies": { "mkdirp": "0", "rimraf": "^2.2.8", - "tap": "^0.5.0", + "tap": "^1.1.4", "tick": "0.0.6" }, "scripts": { "prepublish": "npm run benchclean", "profclean": "rm -f v8.log profile.txt", - "test": "npm run profclean && tap test/*.js", + "test": "tap test/*.js --cov", "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", "bench": "bash benchmark.sh", "prof": "bash prof.sh && cat profile.txt", - "benchclean": "bash benchclean.sh" + "benchclean": "node benchclean.js" }, "license": "ISC", - "readme": "[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)\n\n# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n![](oh-my-glob.gif)\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Glob Primer\n\n\"Globs\" are the patterns you type when you do stuff like `ls *.js` on\nthe command line, or put `build/*` in a `.gitignore` file.\n\nBefore parsing the path part patterns, braced sections are expanded\ninto a set. Braced sections start with `{` and end with `}`, with any\nnumber of comma-delimited sections within. Braced sections may contain\nslash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.\n\nThe following characters have special magic meaning when used in a\npath portion:\n\n* `*` Matches 0 or more characters in a single path portion\n* `?` Matches 1 character\n* `[...]` Matches a range of characters, similar to a RegExp range.\n If the first character of the range is `!` or `^` then it matches\n any character not in the range.\n* `!(pattern|pattern|pattern)` Matches anything that does not match\n any of the patterns provided.\n* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the\n patterns provided.\n* `+(pattern|pattern|pattern)` Matches one or more occurrences of the\n patterns provided.\n* `*(a|b|c)` Matches zero or more occurrences of the patterns provided\n* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns\n provided\n* `**` If a \"globstar\" is alone in a path portion, then it matches\n zero or more directories and subdirectories searching for matches.\n It does not crawl symlinked directories.\n\n### Dots\n\nIf a file or directory path portion has a `.` as the first character,\nthen it will not match any glob pattern unless that pattern's\ncorresponding path part also has a `.` as its first character.\n\nFor example, the pattern `a/.*/c` would match the file at `a/.b/c`.\nHowever the pattern `a/*/c` would not, because `*` does not start with\na dot character.\n\nYou can make glob treat dots as normal characters by setting\n`dot:true` in the options.\n\n### Basename Matching\n\nIf you set `matchBase:true` in the options, and the pattern has no\nslashes in it, then it will seek for any file anywhere in the tree\nwith a matching basename. For example, `*.js` would match\n`test/simple/basic.js`.\n\n### Negation\n\nThe intent for negation would be for a pattern starting with `!` to\nmatch everything that *doesn't* match the supplied pattern. However,\nthe implementation is weird, and for the time being, this should be\navoided. The behavior will change or be deprecated in version 5.\n\n### Empty Sets\n\nIf no matching files are found, then an empty array is returned. This\ndiffers from the shell, where the pattern itself is returned. For\nexample:\n\n $ echo a*s*d*f\n a*s*d*f\n\nTo get the bash-style behavior, set the `nonull:true` in the options.\n\n### See Also:\n\n* `man sh`\n* `man bash` (Search for \"Pattern Matching\")\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob.hasMagic(pattern, [options])\n\nReturns `true` if there are any special characters in the pattern, and\n`false` otherwise.\n\nNote that the options affect the results. If `noext:true` is set in\nthe options object, then `+(a|b)` will not be considered a magic\npattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`\nthen that is considered magical, unless `nobrace:true` is set in the\noptions.\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instantiating the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `'DIR'` - Path exists, and is not a directory\n * `'FILE'` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n* `statCache` Cache of `fs.stat` results, to prevent statting the same\n path multiple times.\n* `symlinks` A record of which paths are symbolic links, which is\n relevant in resolving `**` patterns.\n* `realpathCache` An optional object which is passed to `fs.realpath`\n to minimize unnecessary syscalls. It is stored on the instantiated\n Glob object, and may be re-used.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `pause` Temporarily stop the search\n* `resume` Resume the search\n* `abort` Stop the search forever\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the Glob object, as well.\n\nIf you are running many `glob` operations, you can pass a Glob object\nas the `options` argument to a subsequent operation to shortcut some\n`stat` and `readdir` calls. At the very least, you may pass in shared\n`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that\nparallel glob operations will be sped up by sharing information about\nthe filesystem.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence.\n* `silent` When an unusual error is encountered when attempting to\n read a directory, a warning will be printed to stderr. Set the\n `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered when attempting to\n read a directory, the process will just continue on in search of\n other matches. Set the `strict` option to raise an error in these\n cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary\n to set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `symlinks` A cache of known symbolic links. You may pass in a\n previously generated `symlinks` object to save `lstat` calls when\n resolving `**` matches.\n* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set. Set this\n flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `debug` Set to enable debug logging in minimatch and glob.\n* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.\n* `noglobstar` Do not match `**` against multiple filenames. (Ie,\n treat it as a normal `*` instead.)\n* `noext` Do not match `+(a|b)` \"extglob\" patterns.\n* `nocase` Perform a case-insensitive match. Note: on\n case-insensitive filesystems, non-magic patterns will match by\n default, since `stat` and `readdir` will not raise errors.\n* `matchBase` Perform a basename-only match if the pattern does not\n contain any slash characters. That is, `*.js` would be treated as\n equivalent to `**/*.js`, matching all js files in all directories.\n* `nonegate` Suppress `negate` behavior. (See below.)\n* `nocomment` Suppress `comment` behavior. (See below.)\n* `nonull` Return the pattern when no matches are found.\n* `nodir` Do not match directories, only files. (Note: to match\n *only* directories, simply put a `/` at the end of the pattern.)\n* `ignore` Add a pattern or an array of patterns to exclude matches.\n* `follow` Follow symlinked directories when expanding `**` patterns.\n Note that this can result in a lot of duplicate references in the\n presence of cyclic links.\n* `realpath` Set to true to call `fs.realpath` on all of the results.\n In the case of a symlink that cannot be resolved, the full absolute\n path to the matched entry is returned (though it will usually be a\n broken symlink)\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.3, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nNote that symlinked directories are not crawled as part of a `**`,\nthough their contents may match against subsequent portions of the\npattern. This prevents infinite loops and duplicates and the like.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n\n## Contributing\n\nAny change to behavior (including bugfixes) must come with a test.\n\nPatches that fail tests or reduce performance will be rejected.\n\n```\n# to run tests\nnpm test\n\n# to re-generate test fixtures\nnpm run test-regen\n\n# to benchmark against bash/zsh\nnpm run bench\n\n# to profile javascript\nnpm run prof\n```\n", - "readmeFilename": "README.md", + "gitHead": "dd5b255ff9b161d23f81c4d0a381ca46a97d049a", "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, "homepage": "https://github.com/isaacs/node-glob#readme", - "_id": "glob@4.5.3", - "_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f", - "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "_from": "glob@>=4.4.2 <5.0.0" + "_id": "glob@6.0.3", + "_shasum": "5f02cd89587ce58b154ae0855de02a2e63986fca", + "_from": "glob@^6.0.1", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "5f02cd89587ce58b154ae0855de02a2e63986fca", + "tarball": "http://registry.npmjs.org/glob/-/glob-6.0.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/glob/-/glob-6.0.3.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/sync.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/sync.js index f4f5e36..09883d2 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/sync.js +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/sync.js @@ -8,10 +8,10 @@ var Glob = require('./glob.js').Glob var util = require('util') var path = require('path') var assert = require('assert') +var isAbsolute = require('path-is-absolute') var common = require('./common.js') var alphasort = common.alphasort var alphasorti = common.alphasorti -var isAbsolute = common.isAbsolute var setopts = common.setopts var ownProp = common.ownProp var childrenIgnored = common.childrenIgnored @@ -57,7 +57,7 @@ GlobSync.prototype._finish = function () { for (var p in matchset) { try { p = self._makeAbs(p) - var real = fs.realpathSync(p, this.realpathCache) + var real = fs.realpathSync(p, self.realpathCache) set[real] = true } catch (er) { if (er.syscall === 'stat') @@ -303,6 +303,7 @@ GlobSync.prototype._readdirEntries = function (abs, entries) { GlobSync.prototype._readdirError = function (f, er) { // handle errors, and cache the information switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 case 'ENOTDIR': // totally normal. means it *does* exist. this.cache[this._makeAbs(f)] = 'FILE' break @@ -316,8 +317,10 @@ GlobSync.prototype._readdirError = function (f, er) { default: // some unusual error. Treat as failure. this.cache[this._makeAbs(f)] = false - if (this.strict) throw er - if (!this.silent) console.error('glob error', er) + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) break } } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/package.json b/node_modules/forever/node_modules/utile/node_modules/rimraf/package.json index 2503014..44eb4f1 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/package.json +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/package.json @@ -1,6 +1,6 @@ { "name": "rimraf", - "version": "2.4.0", + "version": "2.5.0", "main": "rimraf.js", "description": "A deep deletion module for node (like `rm -rf`)", "author": { @@ -20,35 +20,35 @@ "rimraf": "./bin.js" }, "dependencies": { - "glob": "^4.4.2" + "glob": "^6.0.1" }, "files": [ - "bin.js", - "rimraf.js", "LICENSE", - "README.md" + "README.md", + "bin.js", + "rimraf.js" ], "devDependencies": { "mkdirp": "^0.5.1", - "tap": "^1.2.0" + "tap": "^2.3.4" }, - "gitHead": "2128f0b9ade05a81394dd21a383fa309dd9eca94", + "gitHead": "c42412ca7a4c9fcf1a219bdfef2283bd7dcbc1d2", "bugs": { "url": "https://github.com/isaacs/rimraf/issues" }, "homepage": "https://github.com/isaacs/rimraf#readme", - "_id": "rimraf@2.4.0", - "_shasum": "40ba0416037d8511ecb50f6b07cf8d18e658a864", - "_from": "rimraf@>=2.0.0 <3.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "2.0.1", + "_id": "rimraf@2.5.0", + "_shasum": "30c096cdf772e26bf3e1d2cff84c2196541a9bb6", + "_from": "rimraf@2.x.x", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", "_npmUser": { "name": "isaacs", - "email": "isaacs@npmjs.com" + "email": "i@izs.me" }, "dist": { - "shasum": "40ba0416037d8511ecb50f6b07cf8d18e658a864", - "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.4.0.tgz" + "shasum": "30c096cdf772e26bf3e1d2cff84c2196541a9bb6", + "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.5.0.tgz" }, "maintainers": [ { @@ -57,6 +57,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.0.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.0.tgz" } diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/rimraf.js b/node_modules/forever/node_modules/utile/node_modules/rimraf/rimraf.js index 447705a..c01d13b 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/rimraf.js +++ b/node_modules/forever/node_modules/utile/node_modules/rimraf/rimraf.js @@ -6,10 +6,8 @@ var path = require("path") var fs = require("fs") var glob = require("glob") -var globOpts = { +var defaultGlobOpts = { nosort: true, - nocomment: true, - nonegate: true, silent: true } @@ -35,7 +33,11 @@ function defaults (options) { options.maxBusyTries = options.maxBusyTries || 3 options.emfileWait = options.emfileWait || 1000 + if (options.glob === false) { + options.disableGlob = true + } options.disableGlob = options.disableGlob || false + options.glob = options.glob || defaultGlobOpts } function rimraf (p, options, cb) { @@ -63,7 +65,7 @@ function rimraf (p, options, cb) { if (!er) return afterGlob(null, [p]) - glob(p, globOpts, afterGlob) + glob(p, options.glob, afterGlob) }) function next (er) { @@ -83,7 +85,7 @@ function rimraf (p, options, cb) { results.forEach(function (p) { rimraf_(p, options, function CB (er) { if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && + if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) { busyTries ++ var time = busyTries * 100 @@ -270,7 +272,7 @@ function rimrafSync (p, options) { fs.lstatSync(p) results = [p] } catch (er) { - results = glob.sync(p, globOpts) + results = glob.sync(p, options.glob) } } diff --git a/node_modules/forever/node_modules/utile/package.json b/node_modules/forever/node_modules/utile/package.json index 404e904..45e0ce4 100644 --- a/node_modules/forever/node_modules/utile/package.json +++ b/node_modules/forever/node_modules/utile/package.json @@ -9,12 +9,20 @@ "maintainers": [ { "name": "indexzero", - "email": "charlie@nodejitsu.com" + "email": "charlie.robbins@gmail.com" + }, + { + "name": "mmalecki", + "email": "me@mmalecki.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" } ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/flatiron/utile.git" + "url": "http://github.com/flatiron/utile.git" }, "dependencies": { "async": "~0.2.9", @@ -34,14 +42,21 @@ "engines": { "node": ">= 0.6.4" }, - "readme": "# utile [![Build Status](https://secure.travis-ci.org/flatiron/utile.png)](http://travis-ci.org/flatiron/utile)\n\nA drop-in replacement for `util` with some additional advantageous functions\n\n## Motivation\nJavascript is definitely a \"batteries not included language\" when compared to languages like Ruby or Python. Node.js has a simple utility library which exposes some basic (but important) functionality:\n\n```\n$ node\n> var util = require('util');\n> util.\n(...)\n\nutil.debug util.error util.exec util.inherits util.inspect\nutil.log util.p util.print util.pump util.puts\n```\n\nWhen one considers their own utility library, why ever bother requiring `util` again? That is the approach taken by this module. To compare:\n\n```\n$ node\n> var utile = require('./lib')\n> utile.\n(...)\n\nutile.async utile.capitalize utile.clone utile.cpr utile.createPath utile.debug\nutile.each utile.error utile.exec utile.file utile.filter utile.find\nutile.inherits utile.log utile.mixin utile.mkdirp utile.p utile.path\nutile.print utile.pump utile.puts utile.randomString utile.requireDir uile.requireDirLazy\nutile.rimraf\n```\n\nAs you can see all of the original methods from `util` are there, but there are several new methods specific to `utile`. A note about implementation: _no node.js native modules are modified by utile, it simply copies those methods._\n\n## Methods\nThe `utile` modules exposes some simple utility methods:\n\n* `.each(obj, iterator)`: Iterate over the keys of an object.\n* `.mixin(target [source0, source1, ...])`: Copies enumerable properties from `source0 ... sourceN` onto `target` and returns the resulting object.\n* `.clone(obj)`: Shallow clones the specified object.\n* `.capitalize(str)`: Capitalizes the specified `str`.\n* `.randomString(length)`: randomString returns a pseudo-random ASCII string (subset) the return value is a string of length ⌈bits/6⌉ of characters from the base64 alphabet.\n* `.filter(obj, test)`: return an object with the properties that `test` returns true on.\n* `.args(arguments)`: Converts function arguments into actual array with special `callback`, `cb`, `array`, and `last` properties. Also supports *optional* argument contracts. See [the example](https://github.com/flatiron/utile/blob/master/examples/utile-args.js) for more details.\n* `.requireDir(directory)`: Requires all files and directories from `directory`, returning an object with keys being filenames (without trailing `.js`) and respective values being return values of `require(filename)`.\n* `.requireDirLazy(directory)`: Lazily requires all files and directories from `directory`, returning an object with keys being filenames (without trailing `.js`) and respective values (getters) being return values of `require(filename)`.\n* `.format([string] text, [array] formats, [array] replacements)`: Replace `formats` in `text` with `replacements`. This will fall back to the original `util.format` command if it is called improperly.\n\n## Packaged Dependencies\nIn addition to the methods that are built-in, utile includes a number of commonly used dependencies to reduce the number of includes in your package.json. These modules _are not eagerly loaded to be respectful of startup time,_ but instead are lazy-loaded getters on the `utile` object\n\n* `.async`: [Async utilities for node and the browser][0]\n* `.inflect`: [Customizable inflections for node.js][6]\n* `.mkdirp`: [Recursively mkdir, like mkdir -p, but in node.js][1]\n* `.rimraf`: [A rm -rf util for nodejs][2]\n* `.cpr`: [Asynchronous recursive file copying with Node.js][3]\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing utile\n```\n [sudo] npm install utile\n```\n\n## Tests\nAll tests are written with [vows][4] and should be run with [npm][5]:\n\n``` bash\n $ npm test\n```\n\n#### Author: [Nodejitsu Inc.](http://www.nodejitsu.com)\n#### Contributors: [Charlie Robbins](http://github.com/indexzero), [Dominic Tarr](http://github.com/dominictarr)\n#### License: MIT\n\n[0]: https://github.com/caolan/async\n[1]: https://github.com/substack/node-mkdirp\n[2]: https://github.com/isaacs/rimraf\n[3]: https://github.com/avianflu/ncp\n[4]: https://vowsjs.org\n[5]: https://npmjs.org\n[6]: https://github.com/pksunkara/inflect\n", - "readmeFilename": "README.md", "bugs": { "url": "https://github.com/flatiron/utile/issues" }, - "homepage": "https://github.com/flatiron/utile#readme", "_id": "utile@0.2.1", + "dist": { + "shasum": "930c88e99098d6220834c356cbd9a770522d90d7", + "tarball": "http://registry.npmjs.org/utile/-/utile-0.2.1.tgz" + }, + "_from": "utile@~0.2.1", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + }, + "directories": {}, "_shasum": "930c88e99098d6220834c356cbd9a770522d90d7", - "_resolved": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz", - "_from": "utile@>=0.2.1 <0.3.0" + "_resolved": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz" } diff --git a/node_modules/forever/node_modules/winston/node_modules/async/package.json b/node_modules/forever/node_modules/winston/node_modules/async/package.json index 54fe38c..5bfc09c 100644 --- a/node_modules/forever/node_modules/winston/node_modules/async/package.json +++ b/node_modules/forever/node_modules/winston/node_modules/async/package.json @@ -8,7 +8,7 @@ "version": "0.2.10", "repository": { "type": "git", - "url": "git+https://github.com/caolan/async.git" + "url": "https://github.com/caolan/async.git" }, "bugs": { "url": "https://github.com/caolan/async/issues" @@ -35,11 +35,25 @@ "scripts": { "test": "nodeunit test/test-async.js" }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, each…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n\n\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [eachSeries](#eachSeries)\n* [eachLimit](#eachLimit)\n* [map](#map)\n* [mapSeries](#mapSeries)\n* [mapLimit](#mapLimit)\n* [filter](#filter)\n* [filterSeries](#filterSeries)\n* [reject](#reject)\n* [rejectSeries](#rejectSeries)\n* [reduce](#reduce)\n* [reduceRight](#reduceRight)\n* [detect](#detect)\n* [detectSeries](#detectSeries)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n* [concatSeries](#concatSeries)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [parallelLimit](#parallellimittasks-limit-callback)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [applyEachSeries](#applyEachSeries)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async#readme", "_id": "async@0.2.10", + "dist": { + "shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1", + "tarball": "http://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "_from": "async@0.2.x", + "_npmVersion": "1.3.2", + "_npmUser": { + "name": "caolan", + "email": "caolan.mcmahon@gmail.com" + }, + "maintainers": [ + { + "name": "caolan", + "email": "caolan@caolanmcmahon.com" + } + ], + "directories": {}, "_shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1", "_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "_from": "async@>=0.2.9 <0.3.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/winston/node_modules/cycle/package.json b/node_modules/forever/node_modules/winston/node_modules/cycle/package.json index d0b5275..fa45ec9 100644 --- a/node_modules/forever/node_modules/winston/node_modules/cycle/package.json +++ b/node_modules/forever/node_modules/winston/node_modules/cycle/package.json @@ -7,7 +7,7 @@ "homepage": "https://github.com/douglascrockford/JSON-js", "repository": { "type": "git", - "url": "git+ssh://git@github.com/dscape/cycle.git" + "url": "http://github.com/dscape/cycle.git" }, "bugs": { "url": "http://github.com/douglascrockford/JSON-js/issues" @@ -24,7 +24,23 @@ "readme": "Fork of https://github.com/douglascrockford/JSON-js, maintained in npm as `cycle`.\n\n# Contributors\n\n* Douglas Crockford\n* Nuno Job\n* Justin Warkentin\n\n# JSON in JavaScript\n\nDouglas Crockford\ndouglas@crockford.com\n\n2010-11-18\n\n\nJSON is a light-weight, language independent, data interchange format.\nSee http://www.JSON.org/\n\nThe files in this collection implement JSON encoders/decoders in JavaScript.\n\nJSON became a built-in feature of JavaScript when the ECMAScript Programming\nLanguage Standard - Fifth Edition was adopted by the ECMA General Assembly\nin December 2009. Most of the files in this collection are for applications\nthat are expected to run in obsolete web browsers. For most purposes, json2.js\nis the best choice.\n\n\njson2.js: This file creates a JSON property in the global object, if there\nisn't already one, setting its value to an object containing a stringify\nmethod and a parse method. The parse method uses the eval method to do the\nparsing, guarding it with several regular expressions to defend against\naccidental code execution hazards. On current browsers, this file does nothing,\nprefering the built-in JSON object.\n\njson.js: This file does everything that json2.js does. It also adds a\ntoJSONString method and a parseJSON method to Object.prototype. Use of this\nfile is not recommended.\n\njson_parse.js: This file contains an alternative JSON parse function that\nuses recursive descent instead of eval.\n\njson_parse_state.js: This files contains an alternative JSON parse function that\nuses a state machine instead of eval.\n\ncycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,\nwhich make it possible to encode cyclical structures and dags in JSON, and to\nthen recover them. JSONPath is used to represent the links.\nhttp://GOESSNER.net/articles/JsonPath/\n", "readmeFilename": "README.md", "_id": "cycle@1.0.3", + "dist": { + "shasum": "21e80b2be8580f98b468f379430662b046c34ad2", + "tarball": "http://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz" + }, + "_from": "cycle@1.0.x", + "_npmVersion": "1.2.32", + "_npmUser": { + "name": "dscape", + "email": "nunojobpinto@gmail.com" + }, + "maintainers": [ + { + "name": "dscape", + "email": "nunojobpinto@gmail.com" + } + ], + "directories": {}, "_shasum": "21e80b2be8580f98b468f379430662b046c34ad2", - "_resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "_from": "cycle@>=1.0.0 <1.1.0" + "_resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz" } diff --git a/node_modules/forever/node_modules/winston/node_modules/eyes/package.json b/node_modules/forever/node_modules/winston/node_modules/eyes/package.json index 19f85bc..5db1dbe 100644 --- a/node_modules/forever/node_modules/winston/node_modules/eyes/package.json +++ b/node_modules/forever/node_modules/winston/node_modules/eyes/package.json @@ -33,10 +33,28 @@ "engines": { "node": "> 0.1.90" }, - "readme": "eyes\n====\n\na customizable value inspector for Node.js\n\nsynopsis\n--------\n\nI was tired of looking at cluttered output in the console -- something needed to be done,\n`sys.inspect()` didn't display regexps correctly, and was too verbose, and I had an hour or two to spare. \nSo I decided to have some fun. _eyes_ were born.\n\n![eyes-ss](http://dl.dropbox.com/u/251849/eyes-js-ss.gif)\n\n_example of the output of a user-customized eyes.js inspector_\n\n*eyes* also deals with circular objects in an intelligent way, and can pretty-print object literals.\n\nusage\n-----\n\n var inspect = require('eyes').inspector({styles: {all: 'magenta'}});\n\n inspect(something); // inspect with the settings passed to `inspector`\n\nor\n\n var eyes = require('eyes');\n\n eyes.inspect(something); // inspect with the default settings\n\nyou can pass a _label_ to `inspect()`, to keep track of your inspections:\n\n eyes.inspect(something, \"a random value\");\n\nIf you want to return the output of eyes without printing it, you can set it up this way:\n\n var inspect = require('eyes').inspector({ stream: null });\n\n sys.puts(inspect({ something: 42 }));\n\ncustomization\n-------------\n\nThese are the default styles and settings used by _eyes_.\n\n styles: { // Styles applied to stdout\n all: 'cyan', // Overall style applied to everything\n label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`\n other: 'inverted', // Objects which don't have a literal representation, such as functions\n key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`\n special: 'grey', // null, undefined...\n string: 'green',\n number: 'magenta',\n bool: 'blue', // true false\n regexp: 'green', // /\\d+/\n },\n \n pretty: true, // Indent object literals\n hideFunctions: false, // Don't output functions at all\n stream: process.stdout, // Stream to write to, or null\n maxLength: 2048 // Truncate output if longer\n\nYou can overwrite them with your own, by passing a similar object to `inspector()` or `inspect()`.\n\n var inspect = require('eyes').inspector({\n styles: {\n all: 'magenta',\n special: 'bold'\n },\n maxLength: 512\n });\n\n", - "readmeFilename": "README.md", "_id": "eyes@0.1.8", + "dist": { + "shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "tarball": "http://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + }, + "_npmVersion": "1.1.53", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "cloudhead", + "email": "self@cloudhead.net" + }, + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], "_shasum": "62cf120234c683785d902348a800ef3e0cc20bc0", + "_from": "eyes@0.1.x", "_resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "_from": "eyes@>=0.1.8 <0.2.0" + "readme": "ERROR: No README data found!" } diff --git a/node_modules/forever/node_modules/winston/node_modules/isstream/package.json b/node_modules/forever/node_modules/winston/node_modules/isstream/package.json index 4661e68..5a493fe 100644 --- a/node_modules/forever/node_modules/winston/node_modules/isstream/package.json +++ b/node_modules/forever/node_modules/winston/node_modules/isstream/package.json @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rvagg/isstream.git" + "url": "https://github.com/rvagg/isstream.git" }, "keywords": [ "stream", @@ -33,10 +33,26 @@ "url": "https://github.com/rvagg/isstream/issues" }, "homepage": "https://github.com/rvagg/isstream", - "readme": "# isStream\n\n[![Build Status](https://secure.travis-ci.org/rvagg/isstream.png)](http://travis-ci.org/rvagg/isstream)\n\n**Test if an object is a `Stream`**\n\n[![NPM](https://nodei.co/npm/isstream.svg)](https://nodei.co/npm/isstream/)\n\nThe missing `Stream.isStream(obj)`: determine if an object is standard Node.js `Stream`. Works for Node-core `Stream` objects (for 0.8, 0.10, 0.11, and in theory, older and newer versions) and all versions of **[readable-stream](https://github.com/isaacs/readable-stream)**.\n\n## Usage:\n\n```js\nvar isStream = require('isstream')\nvar Stream = require('stream')\n\nisStream(new Stream()) // true\n\nisStream({}) // false\n\nisStream(new Stream.Readable()) // true\nisStream(new Stream.Writable()) // true\nisStream(new Stream.Duplex()) // true\nisStream(new Stream.Transform()) // true\nisStream(new Stream.PassThrough()) // true\n```\n\n## But wait! There's more!\n\nYou can also test for `isReadable(obj)`, `isWritable(obj)` and `isDuplex(obj)` to test for implementations of Streams2 (and Streams3) base classes.\n\n```js\nvar isReadable = require('isstream').isReadable\nvar isWritable = require('isstream').isWritable\nvar isDuplex = require('isstream').isDuplex\nvar Stream = require('stream')\n\nisReadable(new Stream()) // false\nisWritable(new Stream()) // false\nisDuplex(new Stream()) // false\n\nisReadable(new Stream.Readable()) // true\nisReadable(new Stream.Writable()) // false\nisReadable(new Stream.Duplex()) // true\nisReadable(new Stream.Transform()) // true\nisReadable(new Stream.PassThrough()) // true\n\nisWritable(new Stream.Readable()) // false\nisWritable(new Stream.Writable()) // true\nisWritable(new Stream.Duplex()) // true\nisWritable(new Stream.Transform()) // true\nisWritable(new Stream.PassThrough()) // true\n\nisDuplex(new Stream.Readable()) // false\nisDuplex(new Stream.Writable()) // false\nisDuplex(new Stream.Duplex()) // true\nisDuplex(new Stream.Transform()) // true\nisDuplex(new Stream.PassThrough()) // true\n```\n\n*Reminder: when implementing your own streams, please [use **readable-stream** rather than core streams](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).*\n\n\n## License\n\n**isStream** is Copyright (c) 2015 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.\n", - "readmeFilename": "README.md", + "gitHead": "cd39cba6da939b4fc9110825203adc506422c3dc", "_id": "isstream@0.1.2", "_shasum": "47e63f7af55afa6f92e1500e690eb8b8529c099a", - "_resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "_from": "isstream@>=0.1.0 <0.2.0" + "_from": "isstream@0.1.x", + "_npmVersion": "2.6.1", + "_nodeVersion": "1.4.3", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "47e63f7af55afa6f92e1500e690eb8b8529c099a", + "tarball": "http://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" } diff --git a/node_modules/forever/node_modules/winston/node_modules/pkginfo/README.md b/node_modules/forever/node_modules/winston/node_modules/pkginfo/README.md index 332704e..7a363bf 100644 --- a/node_modules/forever/node_modules/winston/node_modules/pkginfo/README.md +++ b/node_modules/forever/node_modules/winston/node_modules/pkginfo/README.md @@ -26,7 +26,7 @@ How often when writing node.js modules have you written the following line(s) of * Programmatically expose the version from the package.json ``` js - exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version; + exports.version = require('/path/to/package.json').version; ``` In other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!** @@ -83,4 +83,4 @@ Tests are written in [vows][1] and give complete coverage of all APIs. [1]: http://vowsjs.org #### Author: [Charlie Robbins](http://nodejitsu.com) -#### License: MIT \ No newline at end of file +#### License: MIT diff --git a/node_modules/forever/node_modules/winston/node_modules/pkginfo/package.json b/node_modules/forever/node_modules/winston/node_modules/pkginfo/package.json index 416d062..6456ddb 100644 --- a/node_modules/forever/node_modules/winston/node_modules/pkginfo/package.json +++ b/node_modules/forever/node_modules/winston/node_modules/pkginfo/package.json @@ -1,6 +1,7 @@ { "name": "pkginfo", - "version": "0.3.0", + "version": "0.3.1", + "license": "MIT", "description": "An easy way to expose properties on a module from a package.json", "author": { "name": "Charlie Robbins", @@ -10,6 +11,9 @@ "type": "git", "url": "git+ssh://git@github.com/indexzero/node-pkginfo.git" }, + "bugs": { + "url": "https://github.com/indexzero/node-pkginfo/issues" + }, "keywords": [ "info", "tools", @@ -18,21 +22,34 @@ "devDependencies": { "vows": "0.7.x" }, - "main": "./lib/pkginfo", + "main": "./lib/pkginfo.js", "scripts": { "test": "vows test/*-test.js --spec" }, "engines": { "node": ">= 0.4.0" }, - "readme": "# node-pkginfo\n\nAn easy way to expose properties on a module from a package.json\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing pkginfo\n```\n [sudo] npm install pkginfo\n```\n\n## Motivation\nHow often when writing node.js modules have you written the following line(s) of code? \n\n* Hard code your version string into your code\n\n``` js\n exports.version = '0.1.0';\n```\n\n* Programmatically expose the version from the package.json\n\n``` js\n exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version;\n```\n\nIn other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!**\n\n## Usage\n\nUsing `pkginfo` is idiot-proof, just require and invoke it. \n\n``` js\n var pkginfo = require('pkginfo')(module);\n \n console.dir(module.exports);\n```\n\nBy invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). \n\nHere's a sample of the output:\n\n```\n { name: 'simple-app',\n description: 'A test fixture for pkginfo',\n version: '0.1.0',\n author: 'Charlie Robbins ',\n keywords: [ 'test', 'fixture' ],\n main: './index.js',\n scripts: { test: 'vows test/*-test.js --spec' },\n engines: { node: '>= 0.4.0' } }\n```\n\n### Expose specific properties\nIf you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function:\n\n``` js\n var pkginfo = require('pkginfo')(module, 'version', 'author');\n \n console.dir(module.exports);\n```\n\n```\n { version: '0.1.0',\n author: 'Charlie Robbins ' }\n```\n\nIf you're looking for further usage see the [examples][0] included in this repository. \n\n## Run Tests\nTests are written in [vows][1] and give complete coverage of all APIs.\n\n```\n vows test/*-test.js --spec\n```\n\n[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples\n[1]: http://vowsjs.org\n\n#### Author: [Charlie Robbins](http://nodejitsu.com)\n#### License: MIT", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/indexzero/node-pkginfo/issues" - }, + "gitHead": "630fcf486543ee48b4c16afc575c0421fe039f26", "homepage": "https://github.com/indexzero/node-pkginfo#readme", - "_id": "pkginfo@0.3.0", - "_shasum": "726411401039fe9b009eea86614295d5f3a54276", - "_resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", - "_from": "pkginfo@>=0.3.0 <0.4.0" + "_id": "pkginfo@0.3.1", + "_shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21", + "_from": "pkginfo@0.3.x", + "_npmVersion": "2.14.1", + "_nodeVersion": "0.10.38", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + } + ], + "dist": { + "shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21", + "tarball": "http://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz" } diff --git a/node_modules/forever/node_modules/winston/node_modules/stack-trace/package.json b/node_modules/forever/node_modules/winston/node_modules/stack-trace/package.json index 71410c7..e6ccaaa 100644 --- a/node_modules/forever/node_modules/winston/node_modules/stack-trace/package.json +++ b/node_modules/forever/node_modules/winston/node_modules/stack-trace/package.json @@ -21,13 +21,35 @@ "far": "0.0.3", "long-stack-traces": "0.1.2" }, - "readme": "# stack-trace\n\nGet v8 stack traces as an array of CallSite objects.\n\n## Install\n\n``` bash\nnpm install stack-trace\n```\n\n## Usage\n\nThe stack-trace module makes it easy for you to capture the current stack:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar trace = stackTrace.get();\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nHowever, sometimes you have already popped the stack you are interested in,\nand all you have left is an `Error` object. This module can help:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar err = new Error('something went wrong');\nvar trace = stackTrace.parse(err);\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nPlease note that parsing the `Error#stack` property is not perfect, only\ncertain properties can be retrieved with it as noted in the API docs below.\n\n## Long stack traces\n\nstack-trace works great with [long-stack-traces][], when parsing an `err.stack`\nthat has crossed the event loop boundary, a `CallSite` object returning\n`'----------------------------------------'` for `getFileName()` is created.\nAll other methods of the event loop boundary call site return `null`.\n\n[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces\n\n## API\n\n### stackTrace.get([belowFn])\n\nReturns an array of `CallSite` objects, where element `0` is the current call\nsite.\n\nWhen passing a function on the current stack as the `belowFn` parameter, the\nreturned array will only include `CallSite` objects below this function.\n\n### stackTrace.parse(err)\n\nParses the `err.stack` property of an `Error` object into an array compatible\nwith those returned by `stackTrace.get()`. However, only the following methods\nare implemented on the returned `CallSite` objects.\n\n* getTypeName\n* getFunctionName\n* getMethodName\n* getFileName\n* getLineNumber\n* getColumnNumber\n* isNative\n\nNote: Except `getFunctionName()`, all of the above methods return exactly the\nsame values as you would get from `stackTrace.get()`. `getFunctionName()`\nis sometimes a little different, but still useful.\n\n### CallSite\n\nThe official v8 CallSite object API can be found [here][v8stackapi]. A quick\nexcerpt:\n\n> A CallSite object defines the following methods:\n>\n> * **getThis**: returns the value of this\n> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.\n> * **getFunction**: returns the current function\n> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.\n> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function\n> * **getFileName**: if this function was defined in a script returns the name of the script\n> * **getLineNumber**: if this function was defined in a script returns the current line number\n> * **getColumnNumber**: if this function was defined in a script returns the current column number\n> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called\n> * **isToplevel**: is this a toplevel invocation, that is, is this the global object?\n> * **isEval**: does this call take place in code defined by a call to eval?\n> * **isNative**: is this call in native V8 code?\n> * **isConstructor**: is this a constructor call?\n\n[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\n\n## License\n\nstack-trace is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/felixge/node-stack-trace/issues" }, "_id": "stack-trace@0.0.9", + "dist": { + "shasum": "a8f6eaeca90674c333e7c43953f275b451510695", + "tarball": "http://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz" + }, + "_from": "stack-trace@0.0.x", + "_npmVersion": "1.3.24", + "_npmUser": { + "name": "sebastianhoitz", + "email": "hoitz@komola.de" + }, + "maintainers": [ + { + "name": "felixge", + "email": "felix@debuggable.com" + }, + { + "name": "tim-smart", + "email": "tim@fostle.com" + }, + { + "name": "sebastianhoitz", + "email": "hoitz@komola.de" + } + ], + "directories": {}, "_shasum": "a8f6eaeca90674c333e7c43953f275b451510695", - "_resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", - "_from": "stack-trace@>=0.0.0 <0.1.0" + "_resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz" } diff --git a/node_modules/forever/node_modules/winston/package.json b/node_modules/forever/node_modules/winston/package.json index 6bf8c4e..744791f 100644 --- a/node_modules/forever/node_modules/winston/package.json +++ b/node_modules/forever/node_modules/winston/package.json @@ -9,12 +9,24 @@ "maintainers": [ { "name": "indexzero", - "email": "charlie@nodejitsu.com" + "email": "charlie.robbins@gmail.com" + }, + { + "name": "chjj", + "email": "chjjeffrey@gmail.com" + }, + { + "name": "V1", + "email": "info@3rd-Eden.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" } ], "repository": { "type": "git", - "url": "git+https://github.com/flatiron/winston.git" + "url": "https://github.com/flatiron/winston.git" }, "keywords": [ "logging", @@ -46,14 +58,24 @@ "url": "https://raw.github.com/flatiron/winston/master/LICENSE" } ], - "readme": "# winston [![Build Status](https://secure.travis-ci.org/flatiron/winston.png?branch=master)](http://travis-ci.org/flatiron/winston)\n\nA multi-transport async logging library for node.js. "CHILL WINSTON! ... I put it in the logs."\n\n## Motivation\nWinston is designed to be a simple and universal logging library with support for multiple transports. A transport is essentially a storage device for your logs. Each instance of a winston logger can have multiple transports configured at different levels. For example, one may want error logs to be stored in a persistent remote location (like a database), but all logs output to the console or a local file.\n\nThere also seemed to be a lot of logging libraries out there that coupled their implementation of logging (i.e. how the logs are stored / indexed) to the API that they exposed to the programmer. This library aims to decouple those parts of the process to make it more flexible and extensible.\n\n## Installation\n\n```bash\nnpm install winston\n```\n\n## Usage\nThere are two different ways to use winston: directly via the default logger, or by instantiating your own Logger. The former is merely intended to be a convenient shared logger to use throughout your application if you so choose.\n\n* [Logging](#logging)\n * [Using the Default Logger](#using-the-default-logger)\n * [Instantiating your own Logger](#instantiating-your-own-logger)\n * [Logging with Metadata](#logging-with-metadata)\n * [String interpolation ](#string-interpolation)\n* [Transports](https://github.com/flatiron/winston/blob/master/docs/transports.md)\n* [Profiling](#profiling)\n* [Streaming Logs](#streaming-logs)\n* [Querying Logs](#querying-logs)\n* [Exceptions](#exceptions)\n * [Handling Uncaught Exceptions with winston](#handling-uncaught-exceptions-with-winston)\n * [To Exit or Not to Exit](#to-exit-or-not-to-exit)\n* [Logging Levels](#logging-levels)\n * [Using Logging Levels](#using-logging-levels)\n * [Using Custom Logging Levels](#using-custom-logging-levels)\n* [Further Reading](#further-reading)\n * [Events and Callbacks in Winston](#events-and-callbacks-in-winston)\n * [Working with multiple Loggers in winston](#working-with-multiple-loggers-in-winston)\n * [Using winston in a CLI tool](#using-winston-in-a-cli-tool)\n * [Extending another object with Logging](#extending-another-object-with-logging)\n* [Working with transports](#working-with-transports)\n\t* [Adding Custom Transports](#adding-custom-transports)\n* [Installation](#installation)\n* [Run Tests](#run-tests)\n\n\n## Logging\n\n### Using the Default Logger\nThe default logger is accessible through the winston module directly. Any method that you could call on an instance of a logger is available on the default logger:\n\n``` js\n var winston = require('winston');\n\n winston.log('info', 'Hello distributed log files!');\n winston.info('Hello again distributed logs');\n```\n\nBy default, only the Console transport is set on the default logger. You can add or remove transports via the add() and remove() methods:\n\n``` js\n winston.add(winston.transports.File, { filename: 'somefile.log' });\n winston.remove(winston.transports.Console);\n```\n\nFor more documentation about working with each individual transport supported by Winston see the [Working with transports](#working-with-transports) section below.\n\n### Instantiating your own Logger\nIf you would prefer to manage the object lifetime of loggers you are free to instantiate them yourself:\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)(),\n new (winston.transports.File)({ filename: 'somefile.log' })\n ]\n });\n```\n\nYou can work with this logger in the same way that you work with the default logger:\n\n``` js\n //\n // Logging\n //\n logger.log('info', 'Hello distributed log files!');\n logger.info('Hello again distributed logs');\n\n //\n // Adding / Removing Transports\n // (Yes It's chainable)\n //\n logger.add(winston.transports.File)\n .remove(winston.transports.Console);\n```\n\n### Logging with Metadata\nIn addition to logging string messages, winston will also optionally log additional JSON metadata objects. Adding metadata is simple:\n\n``` js\n winston.log('info', 'Test Log Message', { anything: 'This is metadata' });\n```\n\nThe way these objects are stored varies from transport to transport (to best support the storage mechanisms offered). Here's a quick summary of how each transports handles metadata:\n\n1. __Console:__ Logged via util.inspect(meta)\n2. __File:__ Logged via util.inspect(meta)\n\n## Profiling\nIn addition to logging messages and metadata, winston also has a simple profiling mechanism implemented for any logger:\n\n``` js\n //\n // Start profile of 'test'\n // Remark: Consider using Date.now() with async operations\n //\n winston.profile('test');\n\n setTimeout(function () {\n //\n // Stop profile of 'test'. Logging will now take place:\n // \"17 Jan 21:00:00 - info: test duration=1000ms\"\n //\n winston.profile('test');\n }, 1000);\n```\n\nAll profile messages are set to the 'info' by default and both message and metadata are optional There are no plans in the Roadmap to make this configurable, but I'm open to suggestions / issues.\n\n### String interpolation\nThe `log` method provides the same string interpolation methods like [`util.format`][10].\n\nThis allows for the following log messages.\n``` js\nlogger.log('info', 'test message %s', 'my string');\n// info: test message my string\n\nlogger.log('info', 'test message %d', 123);\n// info: test message 123\n\nlogger.log('info', 'test message %j', {number: 123}, {});\n// info: test message {\"number\":123}\n// meta = {}\n\nlogger.log('info', 'test message %s, %s', 'first', 'second', {number: 123});\n// info: test message first, second\n// meta = {number: 123}\n\nlogger.log('info', 'test message', 'first', 'second', {number: 123});\n// info: test message first second\n// meta = {number: 123}\n\nlogger.log('info', 'test message %s, %s', 'first', 'second', {number: 123}, function(){});\n// info: test message first, second\n// meta = {numer: 123}\n// callback = function(){}\n\nlogger.log('info', 'test message', 'first', 'second', {number: 123}, function(){});\n// info: test message first second\n// meta = {numer: 123}\n// callback = function(){}\n```\n\n\n\n\n\n## Querying Logs\nWinston supports querying of logs with Loggly-like options. [See Loggly Search API](http://wiki.loggly.com/retrieve_events#optional).\nSpecifically: `File`, `Couchdb`, `Redis`, `Loggly`, `Nssocket`, and `Http`.\n\n``` js\n var options = {\n from: new Date - 24 * 60 * 60 * 1000,\n until: new Date,\n limit: 10,\n start: 0,\n order: 'desc',\n fields: ['message']\n };\n\n //\n // Find items logged between today and yesterday.\n //\n winston.query(options, function (err, results) {\n if (err) {\n throw err;\n }\n\n console.log(results);\n });\n```\n\n## Streaming Logs\nStreaming allows you to stream your logs back from your chosen transport.\n\n``` js\n //\n // Start at the end.\n //\n winston.stream({ start: -1 }).on('log', function(log) {\n console.log(log);\n });\n```\n\n## Exceptions\n\n### Handling Uncaught Exceptions with winston\n\nWith `winston`, it is possible to catch and log `uncaughtException` events from your process. There are two distinct ways of enabling this functionality either through the default winston logger or your own logger instance.\n\nIf you want to use this feature with the default logger simply call `.handleExceptions()` with a transport instance.\n\n``` js\n //\n // You can add a separate exception logger by passing it to `.handleExceptions`\n //\n winston.handleExceptions(new winston.transports.File({ filename: 'path/to/exceptions.log' }))\n\n //\n // Alternatively you can set `.handleExceptions` to true when adding transports to winston\n //\n winston.add(winston.transports.File, {\n filename: 'path/to/all-logs.log',\n handleExceptions: true\n });\n```\n\n### To Exit or Not to Exit\n\nBy default, winston will exit after logging an uncaughtException. if this is not the behavior you want,\nset `exitOnError = false`\n\n``` js\n var logger = new (winston.Logger)({ exitOnError: false });\n\n //\n // or, like this:\n //\n logger.exitOnError = false;\n```\n\nWhen working with custom logger instances, you can pass in separate transports to the `exceptionHandlers` property or set `.handleExceptions` on any transport.\n\nExample 1\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new winston.transports.File({ filename: 'path/to/all-logs.log' })\n ],\n exceptionHandlers: [\n new winston.transports.File({ filename: 'path/to/exceptions.log' })\n ]\n });\n```\n\nExample 2\n\n```\nvar logger = new winston.Logger({\n transports: [\n new winston.transports.Console({\n handleExceptions: true,\n json: true\n })\n ],\n exitOnError: false\n});\n```\n\nThe `exitOnError` option can also be a function to prevent exit on only certain types of errors:\n\n``` js\n function ignoreEpipe(err) {\n return err.code !== 'EPIPE';\n }\n\n var logger = new (winston.Logger)({ exitOnError: ignoreEpipe });\n\n //\n // or, like this:\n //\n logger.exitOnError = ignoreEpipe;\n```\n\n## Logging Levels\n\n### Using Logging Levels\nSetting the level for your logging message can be accomplished in one of two ways. You can pass a string representing the logging level to the log() method or use the level specified methods defined on every winston Logger.\n\n``` js\n //\n // Any logger instance\n //\n logger.log('silly', \"127.0.0.1 - there's no place like home\");\n logger.log('debug', \"127.0.0.1 - there's no place like home\");\n logger.log('verbose', \"127.0.0.1 - there's no place like home\");\n logger.log('info', \"127.0.0.1 - there's no place like home\");\n logger.log('warn', \"127.0.0.1 - there's no place like home\");\n logger.log('error', \"127.0.0.1 - there's no place like home\");\n logger.info(\"127.0.0.1 - there's no place like home\");\n logger.warn(\"127.0.0.1 - there's no place like home\");\n logger.error(\"127.0.0.1 - there's no place like home\");\n\n //\n // Default logger\n //\n winston.log('info', \"127.0.0.1 - there's no place like home\");\n winston.info(\"127.0.0.1 - there's no place like home\");\n```\n\nWinston allows you to set a `level` on each transport that specifies the level of messages this transport should log. For example, you could log only errors to the console, with the full logs in a file (note that the default level of a transport is `info`):\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)({ level: 'error' }),\n new (winston.transports.File)({ filename: 'somefile.log' })\n ]\n });\n```\n\nYou may also dynamically change the log level of a transport:\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)({ level: 'warn' }),\n new (winston.transports.File)({ filename: 'somefile.log', level: 'error' })\n ]\n });\n logger.debug(\"Will not be logged in either transport!\");\n logger.transports.console.level = 'debug';\n logger.transports.file.level = 'verbose';\n logger.verbose(\"Will be logged in both transports!\");\n```\n\nAs of 0.2.0, winston supports customizable logging levels, defaulting to [npm][0] style logging levels. Changing logging levels is easy:\n\n``` js\n //\n // Change levels on the default winston logger\n //\n winston.setLevels(winston.config.syslog.levels);\n\n //\n // Change levels on an instance of a logger\n //\n logger.setLevels(winston.config.syslog.levels);\n```\n\nCalling `.setLevels` on a logger will remove all of the previous helper methods for the old levels and define helper methods for the new levels. Thus, you should be careful about the logging statements you use when changing levels. For example, if you ran this code after changing to the syslog levels:\n\n``` js\n //\n // Logger does not have 'silly' defined since that level is not in the syslog levels\n //\n logger.silly('some silly message');\n```\n\n### Using Custom Logging Levels\nIn addition to the predefined `npm` and `syslog` levels available in Winston, you can also choose to define your own:\n\n``` js\n var myCustomLevels = {\n levels: {\n foo: 0,\n bar: 1,\n baz: 2,\n foobar: 3\n },\n colors: {\n foo: 'blue',\n bar: 'green',\n baz: 'yellow',\n foobar: 'red'\n }\n };\n\n var customLevelLogger = new (winston.Logger)({ levels: myCustomLevels.levels });\n customLevelLogger.foobar('some foobar level-ed message');\n```\n\nAlthough there is slight repetition in this data structure, it enables simple encapsulation if you not to have colors. If you do wish to have colors, in addition to passing the levels to the Logger itself, you must make winston aware of them:\n\n``` js\n //\n // Make winston aware of these colors\n //\n winston.addColors(myCustomLevels.colors);\n```\n\nThis enables transports with the 'colorize' option set to appropriately color the output of custom levels.\n\n## Further Reading\n\n### Events and Callbacks in Winston\nEach instance of winston.Logger is also an instance of an [EventEmitter][1]. A log event will be raised each time a transport successfully logs a message:\n\n``` js\n logger.on('logging', function (transport, level, msg, meta) {\n // [msg] and [meta] have now been logged at [level] to [transport]\n });\n\n logger.info('CHILL WINSTON!', { seriously: true });\n```\n\nIt is also worth mentioning that the logger also emits an 'error' event which you should handle or suppress if you don't want unhandled exceptions:\n\n``` js\n //\n // Handle errors\n //\n logger.on('error', function (err) { /* Do Something */ });\n\n //\n // Or just suppress them.\n //\n logger.emitErrs = false;\n```\n\nEvery logging method described in the previous section also takes an optional callback which will be called only when all of the transports have logged the specified message.\n\n``` js\n logger.info('CHILL WINSTON!', { seriously: true }, function (err, level, msg, meta) {\n // [msg] and [meta] have now been logged at [level] to **every** transport.\n });\n```\n\n### Working with multiple Loggers in winston\n\nOften in larger, more complex applications it is necessary to have multiple logger instances with different settings. Each logger is responsible for a different feature area (or category). This is exposed in `winston` in two ways: through `winston.loggers` and instances of `winston.Container`. In fact, `winston.loggers` is just a predefined instance of `winston.Container`:\n\n``` js\n var winston = require('winston');\n\n //\n // Configure the logger for `category1`\n //\n winston.loggers.add('category1', {\n console: {\n level: 'silly',\n colorize: 'true',\n label: 'category one'\n },\n file: {\n filename: '/path/to/some/file'\n }\n });\n\n //\n // Configure the logger for `category2`\n //\n winston.loggers.add('category2', {\n couchdb: {\n host: '127.0.0.1',\n port: 5984\n }\n });\n```\n\nNow that your loggers are setup you can require winston _in any file in your application_ and access these pre-configured loggers:\n\n``` js\n var winston = require('winston');\n\n //\n // Grab your preconfigured logger\n //\n var category1 = winston.loggers.get('category1');\n\n category1.info('logging from your IoC container-based logger');\n```\n\nIf you prefer to manage the `Container` yourself you can simply instantiate one:\n\n``` js\n var winston = require('winston'),\n container = new winston.Container();\n\n container.add('category1', {\n console: {\n level: 'silly',\n colorize: 'true'\n },\n file: {\n filename: '/path/to/some/file'\n }\n });\n```\n\n### Sharing transports between Loggers in winston\n\n``` js\n var winston = require('winston');\n\n //\n // Setup transports to be shared across all loggers\n // in three ways:\n //\n // 1. By setting it on the default Container\n // 2. By passing `transports` into the constructor function of winston.Container\n // 3. By passing `transports` into the `.get()` or `.add()` methods\n //\n\n //\n // 1. By setting it on the default Container\n //\n winston.loggers.options.transports = [\n // Setup your shared transports here\n ];\n\n //\n // 2. By passing `transports` into the constructor function of winston.Container\n //\n var container = new winston.Container({\n transports: [\n // Setup your shared transports here\n ]\n });\n\n //\n // 3. By passing `transports` into the `.get()` or `.add()` methods\n //\n winston.loggers.add('some-category', {\n transports: [\n // Setup your shared transports here\n ]\n });\n\n container.add('some-category', {\n transports: [\n // Setup your shared transports here\n ]\n });\n```\n\n### Using winston in a CLI tool\nA common use-case for logging is output to a CLI tool. Winston has a special helper method which will pretty print output from your CLI tool. Here's an example from the [require-analyzer][2] written by [Nodejitsu][3]:\n\n```\n info: require-analyzer starting in /Users/Charlie/Nodejitsu/require-analyzer\n info: Found existing dependencies\n data: {\n data: colors: '0.x.x',\n data: eyes: '0.1.x',\n data: findit: '0.0.x',\n data: npm: '1.0.x',\n data: optimist: '0.2.x',\n data: semver: '1.0.x',\n data: winston: '0.2.x'\n data: }\n info: Analyzing dependencies...\n info: Done analyzing raw dependencies\n info: Retrieved packages from npm\n warn: No additional dependencies found\n```\n\nConfiguring output for this style is easy, just use the `.cli()` method on `winston` or an instance of `winston.Logger`:\n\n``` js\n var winston = require('winston');\n\n //\n // Configure CLI output on the default logger\n //\n winston.cli();\n\n //\n // Configure CLI on an instance of winston.Logger\n //\n var logger = new winston.Logger({\n transports: [\n new (winston.transports.Console)()\n ]\n });\n\n logger.cli();\n```\n\n### Extending another object with Logging\nOften in a given code base with lots of Loggers it is useful to add logging methods to a different object so that these methods can be called with less syntax. Winston exposes this functionality via the 'extend' method:\n\n``` js\n var myObject = {};\n\n logger.extend(myObject);\n\n //\n // You can now call logger methods on 'myObject'\n //\n myObject.info(\"127.0.0.1 - there's no place like home\");\n```\n\n## Working with Transports\nThere are many transports supported by winston core. If you have a transport you would like to add either open an issue or fork and submit a pull request. Commits are welcome, but I'll give you extra street cred if you __add tests too :D__\n\n\n### Console Transport\n``` js\n winston.add(winston.transports.Console, options)\n```\n\nThe Console transport takes a few simple options:\n\n* __level:__ Level of messages that this transport should log (default 'info').\n* __silent:__ Boolean flag indicating whether to suppress output (default false).\n* __colorize:__ Boolean flag indicating if we should colorize output (default false).\n* __timestamp:__ Boolean flag indicating if we should prepend output with timestamps (default false). If function is specified, its return value will be used instead of timestamps.\n\n*Metadata:* Logged via util.inspect(meta);\n\n### File Transport\n``` js\n winston.add(winston.transports.File, options)\n```\n\nThe File transport should really be the 'Stream' transport since it will accept any [WritableStream][14]. It is named such because it will also accept filenames via the 'filename' option:\n\n* __level:__ Level of messages that this transport should log.\n* __silent:__ Boolean flag indicating whether to suppress output.\n* __colorize:__ Boolean flag indicating if we should colorize output.\n* __timestamp:__ Boolean flag indicating if we should prepend output with timestamps (default true). If function is specified, its return value will be used instead of timestamps.\n* __filename:__ The filename of the logfile to write output to.\n* __maxsize:__ Max size in bytes of the logfile, if the size is exceeded then a new file is created.\n* __maxFiles:__ Limit the number of files created when the size of the logfile is exceeded.\n* __stream:__ The WriteableStream to write output to.\n* __json:__ If true, messages will be logged as JSON (default true).\n* __logstash:__ If true, messages will be logged as JSON and formatted for logstash (default false).\n\n*Metadata:* Logged via util.inspect(meta);\n\n### Loggly Transport\n``` js\n var Loggly = require('winston-loggly').Loggly\n winston.add(Loggly, options);\n```\n\nThe Loggly transport is based on [Nodejitsu's][3] [node-loggly][6] implementation of the [Loggly][7] API. If you haven't heard of Loggly before, you should probably read their [value proposition][8]. The Loggly transport takes the following options. Either 'inputToken' or 'inputName' is required:\n\n* __level:__ Level of messages that this transport should log.\n* __subdomain:__ The subdomain of your Loggly account. *[required]*\n* __auth__: The authentication information for your Loggly account. *[required with inputName]*\n* __inputName:__ The name of the input this instance should log to.\n* __inputToken:__ The input token of the input this instance should log to.\n* __json:__ If true, messages will be sent to Loggly as JSON.\n\n*Metadata:* Logged in suggested [Loggly format][2]\n\n### Riak Transport\nAs of `0.3.0` the Riak transport has been broken out into a new module: [winston-riak][17]. Using it is just as easy:\n\n``` js\n var Riak = require('winston-riak').Riak;\n winston.add(Riak, options);\n```\n\nIn addition to the options accepted by the [riak-js][3] [client][4], the Riak transport also accepts the following options. It is worth noting that the riak-js debug option is set to *false* by default:\n\n* __level:__ Level of messages that this transport should log.\n* __bucket:__ The name of the Riak bucket you wish your logs to be in or a function to generate bucket names dynamically.\n\n``` js\n // Use a single bucket for all your logs\n var singleBucketTransport = new (Riak)({ bucket: 'some-logs-go-here' });\n\n // Generate a dynamic bucket based on the date and level\n var dynamicBucketTransport = new (Riak)({\n bucket: function (level, msg, meta, now) {\n var d = new Date(now);\n return level + [d.getDate(), d.getMonth(), d.getFullYear()].join('-');\n }\n });\n```\n\n*Metadata:* Logged as JSON literal in Riak\n\n### MongoDB Transport\nAs of `0.3.0` the MongoDB transport has been broken out into a new module: [winston-mongodb][16]. Using it is just as easy:\n\n``` js\n var MongoDB = require('winston-mongodb').MongoDB;\n winston.add(MongoDB, options);\n```\n\nFor more information about its arguments, check [winston-mongodb's README][16].\n\n### SimpleDB Transport\n\nThe [winston-simpledb][18] transport is just as easy:\n\n``` js\n var SimpleDB = require('winston-simpledb').SimpleDB;\n winston.add(SimpleDB, options);\n```\n\nThe SimpleDB transport takes the following options. All items marked with an asterisk are required:\n\n* __awsAccessKey__:* your AWS Access Key\n* __secretAccessKey__:* your AWS Secret Access Key\n* __awsAccountId__:* your AWS Account Id\n* __domainName__:* a string or function that returns the domain name to log to\n* __region__:* the region your domain resides in\n* __itemName__: a string ('uuid', 'epoch', 'timestamp') or function that returns the item name to log\n\n*Metadata:* Logged as a native JSON object to the 'meta' attribute of the item.\n\n### Mail Transport\n\nThe [winston-mail][19] is an email transport:\n\n``` js\n var Mail = require('winston-mail').Mail;\n winston.add(Mail, options);\n```\n\nThe Mail transport uses [emailjs](https://github.com/eleith/emailjs) behind the scenes. Options are the following:\n\n* __to:__ The address(es) you want to send to. *[required]*\n* __from:__ The address you want to send from. (default: `winston@[server-host-name]`)\n* __host:__ SMTP server hostname (default: localhost)\n* __port:__ SMTP port (default: 587 or 25)\n* __username__ User for server auth\n* __password__ Password for server auth\n* __ssl:__ Use SSL (boolean or object { key, ca, cert })\n* __tls:__ Boolean (if true, use starttls)\n* __level:__ Level of messages that this transport should log.\n* __silent:__ Boolean flag indicating whether to suppress output.\n\n*Metadata:* Stringified as JSON in email.\n\n### Amazon SNS (Simple Notification System) Transport\n\nThe [winston-sns][21] transport uses amazon SNS to send emails, texts, or a bunch of other notifications.\n\n``` js\n require('winston-sns').SNS;\n winston.add(winston.transports.SNS, options);\n```\n\nOptions:\n\n* __aws_key:__ Your Amazon Web Services Key. *[required]*\n* __aws_secret:__ Your Amazon Web Services Secret. *[required]*\n* __subscriber:__ Subscriber number - found in your SNS AWS Console, after clicking on a topic. Same as AWS Account ID. *[required]*\n* __topic_arn:__ Also found in SNS AWS Console - listed under a topic as Topic ARN. *[required]*\n* __region:__ AWS Region to use. Can be one of: `us-east-1`,`us-west-1`,`eu-west-1`,`ap-southeast-1`,`ap-northeast-1`,`us-gov-west-1`,`sa-east-1`. (default: `us-east-1`)\n* __subject:__ Subject for notifications. (default: \"Winston Error Report\")\n* __message:__ Message of notifications. Uses placeholders for level (%l), error message (%e), and metadata (%m). (default: \"Level '%l' Error:\\n%e\\n\\nMetadata:\\n%m\")\n* __level:__ lowest level this transport will log. (default: `info`)\n\n### Graylog2 Transport\n\n[winston-graylog2][22] is a Graylog2 transport:\n\n``` js\n var Graylog2 = require('winston-graylog2').Graylog2;\n winston.add(Graylog2, options);\n```\n\nThe Graylog2 transport connects to a Graylog2 server over UDP using the following options:\n\n* __level:__ Level of messages this transport should log. (default: info)\n* __silent:__ Boolean flag indicating whether to suppress output. (default: false)\n\n* __graylogHost:__ IP address or hostname of the graylog2 server. (default: localhost)\n* __graylogPort:__ Port to send messages to on the graylog2 server. (default: 12201)\n* __graylogHostname:__ The hostname associated with graylog2 messages. (default: require('os').hostname())\n* __graylogFacility:__ The graylog2 facility to send log messages.. (default: nodejs)\n\n*Metadata:* Stringified as JSON in the full message GELF field.\n\n### Papertrail Transport\n\n[winston-papertrail][23] is a Papertrail transport:\n\n``` js\n var Papertrail = require('winston-papertrail').Papertrail;\n winston.add(Papertrail, options);\n```\n\nThe Papertrail transport connects to a [PapertrailApp log destination](https://papertrailapp.com) over TCP (TLS) using the following options:\n\n* __level:__ Level of messages this transport should log. (default: info)\n* __host:__ FQDN or IP address of the Papertrail endpoint.\n* __port:__ Port for the Papertrail log destination.\n* __hostname:__ The hostname associated with messages. (default: require('os').hostname())\n* __program:__ The facility to send log messages.. (default: default)\n* __logFormat:__ a log formatting function with the signature `function(level, message)`, which allows custom formatting of the level or message prior to delivery\n\n*Metadata:* Logged as a native JSON object to the 'meta' attribute of the item.\n\n### Cassandra Transport\n\n[winston-cassandra][24] is a Cassandra transport:\n\n``` js\n var Cassandra = require('winston-cassandra').Cassandra;\n winston.add(Cassandra, options);\n```\n\nThe Cassandra transport connects to a cluster using the native protocol with the following options:\n\n* __level:__ Level of messages that this transport should log (default: `'info'`).\n* __table:__ The name of the Cassandra column family you want to store log messages in (default: `'logs'`).\n* __partitionBy:__ How you want the logs to be partitioned. Possible values `'hour'` and `'day'`(Default).\n* __consistency:__ The consistency of the insert query (default: `quorum`).\n\nIn addition to the options accepted by the [Node.js Cassandra driver](https://github.com/jorgebay/node-cassandra-cql) Client.\n\n* __hosts:__ Cluster nodes that will handle the write requests:\nArray of strings containing the hosts, for example `['host1', 'host2']` (required).\n* __keyspace:__ The name of the keyspace that will contain the logs table (required). The keyspace should be already created in the cluster.\n\n### Adding Custom Transports\nAdding a custom transport (say for one of the datastore on the Roadmap) is actually pretty easy. All you need to do is accept a couple of options, set a name, implement a log() method, and add it to the set of transports exposed by winston.\n\n``` js\n var util = require('util'),\n winston = require('winston');\n\n var CustomLogger = winston.transports.CustomerLogger = function (options) {\n //\n // Name this logger\n //\n this.name = 'customLogger';\n\n //\n // Set the level from your options\n //\n this.level = options.level || 'info';\n\n //\n // Configure your storage backing as you see fit\n //\n };\n\n //\n // Inherit from `winston.Transport` so you can take advantage\n // of the base functionality and `.handleExceptions()`.\n //\n util.inherits(CustomLogger, winston.Transport);\n\n CustomLogger.prototype.log = function (level, msg, meta, callback) {\n //\n // Store this message and metadata, maybe use some custom logic\n // then callback indicating success.\n //\n callback(null, true);\n };\n```\n\n### Inspirations\n1. [npm][0]\n2. [log.js][4]\n3. [socket.io][5]\n4. [node-rlog][6]\n5. [BigBrother][7]\n6. [Loggly][8]\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing winston\n```\n [sudo] npm install winston\n```\n\n## Run Tests\nAll of the winston tests are written in [vows][9], and designed to be run with npm.\n\n``` bash\n $ npm test\n```\n\n#### Author: [Charlie Robbins](http://twitter.com/indexzero)\n#### Contributors: [Matthew Bergman](http://github.com/fotoverite), [Marak Squires](http://github.com/marak)\n\n[0]: https://github.com/npm/npmlog/blob/master/log.js\n[1]: http://nodejs.org/docs/v0.3.5/api/events.html#events.EventEmitter\n[2]: http://github.com/nodejitsu/require-analyzer\n[3]: http://nodejitsu.com\n[4]: https://github.com/visionmedia/log.js\n[5]: http://socket.io\n[6]: https://github.com/jbrisbin/node-rlog\n[7]: https://github.com/feisty/BigBrother\n[8]: http://loggly.com\n[9]: http://vowsjs.org\n[10]: http://nodejs.org/api/util.html#util_util_format_format\n[14]: http://nodejs.org/api/stream.html#stream_class_stream_writable\n[16]: https://github.com/indexzero/winston-mongodb\n[17]: https://github.com/indexzero/winston-riak\n[18]: https://github.com/appsattic/winston-simpledb\n[19]: https://github.com/wavded/winston-mail\n[21]: https://github.com/jesseditson/winston-sns\n[22]: https://github.com/flite/winston-graylog2\n[23]: https://github.com/kenperkins/winston-papertrail\n[24]: https://github.com/jorgebay/winston-cassandra\n", - "readmeFilename": "README.md", + "gitHead": "d12b2688d7d82557a5f5d490217e3c516bb661cb", "bugs": { "url": "https://github.com/flatiron/winston/issues" }, - "homepage": "https://github.com/flatiron/winston#readme", + "homepage": "https://github.com/flatiron/winston", "_id": "winston@0.8.3", "_shasum": "64b6abf4cd01adcaefd5009393b1d8e8bec19db0", - "_resolved": "https://registry.npmjs.org/winston/-/winston-0.8.3.tgz", - "_from": "winston@>=0.8.1 <0.9.0" + "_from": "winston@~0.8.1", + "_npmVersion": "2.1.6", + "_nodeVersion": "0.10.32", + "_npmUser": { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + }, + "dist": { + "shasum": "64b6abf4cd01adcaefd5009393b1d8e8bec19db0", + "tarball": "http://registry.npmjs.org/winston/-/winston-0.8.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/winston/-/winston-0.8.3.tgz" } diff --git a/node_modules/forever/package.json b/node_modules/forever/package.json index 2196ea3..cbbe7dc 100644 --- a/node_modules/forever/package.json +++ b/node_modules/forever/package.json @@ -2,24 +2,36 @@ "name": "forever", "preferGlobal": "true", "description": "A simple CLI tool for ensuring that a given node script runs continuously (i.e. forever)", - "version": "0.14.1", + "version": "0.15.1", "author": { "name": "Charlie Robbins", "email": "charlie.robbins@gmail.com" }, "maintainers": [ { - "name": "mmalecki", - "email": "me@mmalecki.com" + "name": "indexzero", + "email": "charlie.robbins@gmail.com" }, { - "name": "avianflu", - "email": "charlie@charlieistheman.com" + "name": "bradleymeck", + "email": "bradley.meck@gmail.com" + }, + { + "name": "julianduque", + "email": "julianduquej@gmail.com" + }, + { + "name": "jeffsu", + "email": "me@jeffsu.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" } ], "repository": { "type": "git", - "url": "git+ssh://git@github.com/nodejitsu/forever.git" + "url": "http://github.com/nodejitsu/forever.git" }, "keywords": [ "cli", @@ -28,13 +40,18 @@ "tools" ], "dependencies": { - "colors": "~0.6.2", "cliff": "~0.1.9", + "clone": "^1.0.2", + "colors": "~0.6.2", "flatiron": "~0.4.2", - "forever-monitor": "~1.5.1", + "forever-monitor": "~1.6.0", "nconf": "~0.6.9", "nssocket": "~0.5.1", + "object-assign": "^3.0.0", "optimist": "~0.6.0", + "path-is-absolute": "~1.0.0", + "prettyjson": "^1.1.2", + "shush": "^1.0.0", "timespan": "~2.3.0", "utile": "~0.2.1", "winston": "~0.8.1" @@ -55,14 +72,25 @@ "engines": { "node": ">= 0.8.x" }, - "readme": "# forever [![Build Status](https://api.travis-ci.org/foreverjs/forever.svg)](https://travis-ci.org/foreverjs/forever) [![Inline docs](http://inch-ci.org/github/foreverjs/forever.svg?branch=master)](http://inch-ci.org/github/foreverjs/forever)\n\nA simple CLI tool for ensuring that a given script runs continuously (i.e. forever).\n\n## Installation\n\n``` bash\n $ [sudo] npm install forever -g\n```\n\n**Note:** If you are using forever _programmatically_ you should install [forever-monitor][0].\n\n``` bash\n $ cd /path/to/your/project\n $ [sudo] npm install forever-monitor\n```\n\n## Usage\nThere are two distinct ways to use forever: through the command line interface, or by requiring the forever module in your own code. **Note:** If you are using forever _programatically_ you should install [forever-monitor][0].\n\n### Using forever from the command line\nYou can use forever to run any kind of script continuously (whether it is written in node.js or not). The usage options are simple:\n\n```\n $ forever --help\n usage: forever [action] [options] SCRIPT [script-options]\n\n Monitors the script specified in the current process or as a daemon\n\n actions:\n start Start SCRIPT as a daemon\n stop Stop the daemon SCRIPT by Id|Uid|Pid|Index|Script\n stopall Stop all running forever scripts\n restart Restart the daemon SCRIPT\n restartall Restart all running forever scripts\n list List all running forever scripts\n config Lists all forever user configuration\n set Sets the specified forever config \n clear Clears the specified forever config \n logs Lists log files for all forever processes\n logs Tails the logs for \n columns add Adds the specified column to the output in `forever list`\n columns rm Removed the specified column from the output in `forever list`\n columns set Set all columns for the output in `forever list`\n cleanlogs [CAREFUL] Deletes all historical forever log files\n\n options:\n -m MAX Only run the specified script MAX times\n -l LOGFILE Logs the forever output to LOGFILE\n -o OUTFILE Logs stdout from child script to OUTFILE\n -e ERRFILE Logs stderr from child script to ERRFILE\n -p PATH Base path for all forever related files (pid files, etc.)\n -c COMMAND COMMAND to execute (defaults to node)\n -a, --append Append logs\n -f, --fifo Stream logs to stdout\n -n, --number Number of log lines to print\n --pidFile The pid file\n --uid Process uid, useful as a namespace for processes (must wrap in a string)\n e.g. forever start --uid \"production\" app.js\n forever stop production\n --sourceDir The source directory for which SCRIPT is relative to\n --workingDir The working directory in which SCRIPT will execute\n --minUptime Minimum uptime (millis) for a script to not be considered \"spinning\"\n --spinSleepTime Time to wait (millis) between launches of a spinning script.\n --colors --no-colors will disable output coloring\n --plain Disable command line colors\n -d, --debug Forces forever to log debug output\n -v, --verbose Turns on the verbose messages from Forever\n -s, --silent Run the child script silencing stdout and stderr\n -w, --watch Watch for file changes\n --watchDirectory Top-level directory to watch from\n --watchIgnore To ignore pattern when watch is enabled (multiple option is allowed)\n --killSignal Support exit signal customization (default is SIGKILL),\n used for restarting script gracefully e.g. --killSignal=SIGTERM\n -h, --help You're staring at it\n\n [Long Running Process]\n The forever process will continue to run outputting log messages to the console.\n ex. forever -o out.log -e err.log my-script.js\n\n [Daemon]\n The forever process will run as a daemon which will make the target process start\n in the background. This is extremely useful for remote starting simple node.js scripts\n without using nohup. It is recommended to run start with -o -l, & -e.\n ex. forever start -l forever.log -o out.log -e err.log my-daemon.js\n forever stop my-daemon.js\n```\n\nThere are [several examples][1] designed to test the fault tolerance of forever. Here's a simple usage example:\n\n``` bash\n $ forever -m 5 examples/error-on-timer.js\n```\n\n### Changing where forever writes files\n\nBy default `forever` places all of the files it needs into `/$HOME/.forever`. If you would like to change that location just set the `FOREVER_ROOT` environment variable when you are running forever:\n\n```\nFOREVER_ROOT=/etc/forever forever start index.js\n```\n\nMake sure that the user running the process has the appropriate privileges to read & write to this directory.\n\n## Using forever module from node.js\nIn addition to using a Forever object, the forever module also exposes some useful methods. Each method returns an instance of an EventEmitter which emits when complete. See the [forever cli commands][2] for sample usage.\n\n**Remark:** As of `forever@0.6.0` processes will not automatically be available in `forever.list()`. In order to get your processes into `forever.list()` or `forever list` you must instantiate the `forever` socket server:\n\n``` js\n forever.startServer(child);\n```\n\nThis method takes multiple `forever.Monitor` instances which are defined in the `forever-monitor` dependency.\n\n### forever.load (config)\n_Synchronously_ sets the specified configuration (config) for the forever module. There are two important options:\n\nOption | Description   | Default\n------- | ------------------------------------------------- | ---------\nroot | Directory to put all default forever log files | `forever.root`\npidPath | Directory to put all forever *.pid files | `[root]/pids`\nsockPath | Directory for sockets for IPC between workers | `[root]/sock`\nloglength | Number of logs to return in `forever tail` | 100\ncolumns | Array of columns to display when `format` is true | `forever.config.get('columns')`\ndebug | Boolean value indicating to run in debug mode | false\nstream | Boolean value indicating if logs will be streamed | false\n\n### forever.start (file, options)\nStarts a script with forever. The `options` object is what is expected by the `Monitor` of `forever-monitor`.\n\n### forever.startDaemon (file, options)\nStarts a script with forever as a daemon. WARNING: Will daemonize the current process. The `options` object is what is expected by the `Monitor` of `forever-monitor`.\n\n### forever.stop (index)\nStops the forever daemon script at the specified index. These indices are the same as those returned by forever.list(). This method returns an EventEmitter that raises the 'stop' event when complete.\n\n### forever.stopAll (format)\nStops all forever scripts currently running. This method returns an EventEmitter that raises the 'stopAll' event when complete.\n\nThe `format` parameter is a boolean value indicating whether the returned values should be formatted according to the configured columns which can set with `forever columns` or programmatically `forever.config.set('columns')`.\n\n### forever.list (format, callback)\nReturns a list of metadata objects about each process that is being run using forever. This method will return the list of metadata as such. Only processes which have invoked `forever.startServer()` will be available from `forever.list()`\n\nThe `format` parameter is a boolean value indicating whether the returned values should be formatted according to the configured columns which can set with `forever columns` or programmatically `forever.config.set('columns')`.\n\n### forever.tail (target, options, callback)\nResponds with the logs from the target script(s) from `tail`. There are two options:\n\n* `length` (numeric): is is used as the `-n` parameter to `tail`.\n* `stream` (boolean): is is used as the `-f` parameter to `tail`.\n\n### forever.cleanUp ()\nCleans up any extraneous forever *.pid files that are on the target system. This method returns an EventEmitter that raises the 'cleanUp' event when complete.\n\n### forever.cleanLogsSync (processes)\nRemoves all log files from the root forever directory that do not belong to current running forever processes. Processes are the value returned from `Monitor.data` in `forever-monitor`.\n\n### forever.startServer (monitor0, monitor1, ..., monitorN)\nStarts the `forever` HTTP server for communication with the forever CLI. **NOTE:** This will change your `process.title`. This method takes multiple `forever.Monitor` instances which are defined in the `forever-monitor` dependency.\n\n## Run Tests\n\n``` bash\n $ npm test\n```\n\n#### License: MIT\n#### Author: [Charlie Robbins](https://github.com/indexzero)\n#### Contributors: [Fedor Indutny](https://github.com/indutny), [James Halliday](http://substack.net/), [Charlie McConnell](https://github.com/avianflu), [Maciej Malecki](https://github.com/mmalecki), [John Lancaster](http://jlank.com)\n\n[0]: https://github.com/foreverjs/forever-monitor\n[1]: https://github.com/foreverjs/forever-monitor/tree/master/examples\n[2]: https://github.com/foreverjs/forever/blob/master/lib/forever/cli.js\n", - "readmeFilename": "README.md", + "license": "MIT", + "gitHead": "6c157fafe909eb555b9e73028338377b05d51f51", "bugs": { "url": "https://github.com/nodejitsu/forever/issues" }, - "homepage": "https://github.com/nodejitsu/forever#readme", - "_id": "forever@0.14.1", - "_shasum": "48bed8c2b215be5c1a3bf429275514a4dca1158a", - "_resolved": "https://registry.npmjs.org/forever/-/forever-0.14.1.tgz", - "_from": "forever@*" + "homepage": "https://github.com/nodejitsu/forever", + "_id": "forever@0.15.1", + "_shasum": "5e4e3d4ef946bef88ddcb9cc7412e478ad19e04e", + "_from": "forever@", + "_npmVersion": "2.6.1", + "_nodeVersion": "0.10.40", + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "dist": { + "shasum": "5e4e3d4ef946bef88ddcb9cc7412e478ad19e04e", + "tarball": "http://registry.npmjs.org/forever/-/forever-0.15.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/forever/-/forever-0.15.1.tgz" } diff --git a/node_modules/forever/test/core/daemonic-inheritance-test.js b/node_modules/forever/test/core/daemonic-inheritance-test.js index 027f530..ce1bd70 100644 --- a/node_modules/forever/test/core/daemonic-inheritance-test.js +++ b/node_modules/forever/test/core/daemonic-inheritance-test.js @@ -9,7 +9,6 @@ var assert = require('assert'), path = require('path'), fs = require('fs'), - spawn = require('child_process').spawn, vows = require('vows'), forever = require('../../lib/forever'); @@ -59,4 +58,4 @@ vows.describe('forever/core/startDaemon').addBatch({ } } } -}).export(module); \ No newline at end of file +}).export(module); diff --git a/node_modules/forever/test/core/start-stop-relative-test.js b/node_modules/forever/test/core/start-stop-relative-test.js index 56190f4..10cb96c 100644 --- a/node_modules/forever/test/core/start-stop-relative-test.js +++ b/node_modules/forever/test/core/start-stop-relative-test.js @@ -1,5 +1,5 @@ /* - * start-stop-relative.js: start or stop forever using relative paths, the script path could be start with './', '../' ... + * start-stop-relative-test.js: start or stop forever using relative paths, the script path could be start with './', '../' ... * * (C) 2010 Charlie Robbins & the Contributors * MIT LICENCE @@ -9,20 +9,11 @@ var assert = require('assert'), path = require('path'), fs = require('fs'), - spawn = require('child_process').spawn, vows = require('vows'), - forever = require('../../lib/forever'); + forever = require('../../lib/forever'), + runCmd = require('../helpers').runCmd; -function runCmd(cmd, args) { - var proc = spawn(process.execPath, [ - path.resolve(__dirname, '../../', 'bin/forever'), - cmd - ].concat(args), {detached: true}); - - proc.unref(); -} - -vows.describe('forever/core/start-stop-peaceful').addBatch({ +vows.describe('forever/core/start-stop-relative').addBatch({ "When using forever" : { "to run script with relative script path" : { topic: function () { @@ -57,4 +48,4 @@ vows.describe('forever/core/start-stop-peaceful').addBatch({ } } } - }).export(module); \ No newline at end of file + }).export(module); diff --git a/node_modules/forever/test/core/stopbypid-peaceful-test.js b/node_modules/forever/test/core/stopbypid-peaceful-test.js index f20ba75..19da87d 100644 --- a/node_modules/forever/test/core/stopbypid-peaceful-test.js +++ b/node_modules/forever/test/core/stopbypid-peaceful-test.js @@ -7,20 +7,11 @@ */ var assert = require('assert'), - path = require('path'), - fs = require('fs'), - spawn = require('child_process').spawn, - vows = require('vows'), - forever = require('../../lib/forever'); - -function runCmd(cmd, args) { - var proc = spawn(process.execPath, [ - path.resolve(__dirname, '../../', 'bin/forever'), - cmd - ].concat(args), {detached: true}); - proc.unref(); - return proc; -} + path = require('path'), + fs = require('fs'), + vows = require('vows'), + forever = require('../../lib/forever'), + runCmd = require('../helpers').runCmd; vows.describe('forever/core/stopbypid-peaceful').addBatch({ "When using forever" : { @@ -75,4 +66,4 @@ vows.describe('forever/core/stopbypid-peaceful').addBatch({ } } } -}).export(module); \ No newline at end of file +}).export(module); diff --git a/node_modules/forever/test/fixtures/server.js b/node_modules/forever/test/fixtures/server.js index a386de2..2054f19 100644 --- a/node_modules/forever/test/fixtures/server.js +++ b/node_modules/forever/test/fixtures/server.js @@ -2,12 +2,12 @@ var util = require('util'), http = require('http'), argv = require('optimist').argv; -var port = argv.p || argv.port || 80; +var port = argv.p || argv.port || 8080; http.createServer(function (req, res) { console.log(req.method + ' request: ' + req.url); res.writeHead(200, {'Content-Type': 'text/plain'}); - res.write('hello, i know nodejitsu.'); + res.write(JSON.stringify(argv)); res.end(); }).listen(port); diff --git a/node_modules/forever/test/worker/multiple-workers-test.js b/node_modules/forever/test/worker/multiple-workers-test.js index de995bb..72f545a 100644 --- a/node_modules/forever/test/worker/multiple-workers-test.js +++ b/node_modules/forever/test/worker/multiple-workers-test.js @@ -22,12 +22,12 @@ var children = [], function assertRunning(port, i) { return { topic: function () { - request('http://127.0.0.1:' + port, this.callback); + request({ uri: 'http://127.0.0.1:' + port, json: true }, this.callback); }, "should respond with `i know nodejitsu`": function (err, res, body) { assert.isNull(err); assert.equal(res.statusCode, 200); - assert.equal(body, 'hello, i know nodejitsu.'); + assert.equal(body.port, port); }, "stop the child process": function () { children[i].stop(); diff --git a/node_modules/glob-base/LICENSE b/node_modules/glob-base/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/glob-base/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/glob-base/README.md b/node_modules/glob-base/README.md new file mode 100644 index 0000000..1da2e82 --- /dev/null +++ b/node_modules/glob-base/README.md @@ -0,0 +1,158 @@ +# glob-base [![NPM version](https://badge.fury.io/js/glob-base.svg)](http://badge.fury.io/js/glob-base) [![Build Status](https://travis-ci.org/jonschlinkert/glob-base.svg)](https://travis-ci.org/jonschlinkert/glob-base) + +> Returns an object with the (non-glob) base path and the actual pattern. + +Use [glob-parent](https://github.com/es128/glob-parent) if you just want the base path. + +## Install with [npm](npmjs.org) + +```bash +npm i glob-base --save +``` + +## Related projects +* [glob-parent](https://github.com/es128/glob-parent): Strips glob magic from a string to provide the parent path +* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. +* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. +* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. +* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. +* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to use. +* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. + +## Usage + +```js +var globBase = require('glob-base'); + +globBase('a/b/.git/'); +//=> { base: 'a/b/.git/', isGlob: false, glob: '' }) + +globBase('a/b/**/e'); +//=> { base: 'a/b', isGlob: true, glob: '**/e' } + +globBase('a/b/*.{foo,bar}'); +//=> { base: 'a/b', isGlob: true, glob: '*.{foo,bar}' } + +globBase('a/b/.git/**'); +//=> { base: 'a/b/.git', isGlob: true, glob: '**' } + +globBase('a/b/c/*.md'); +//=> { base: 'a/b/c', isGlob: true, glob: '*.md' } + +globBase('a/b/c/.*.md'); +//=> { base: 'a/b/c', isGlob: true, glob: '.*.md' } + +globBase('a/b/{c,d}'); +//=> { base: 'a/b', isGlob: true, glob: '{c,d}' } + +globBase('!*.min.js'); +//=> { base: '.', isGlob: true, glob: '!*.min.js' } + +globBase('!foo'); +//=> { base: '.', isGlob: true, glob: '!foo' } + +globBase('!foo/(a|b).min.js'); +//=> { base: '.', isGlob: true, glob: '!foo/(a|b).min.js' } + +globBase(''); +//=> { base: '.', isGlob: false, glob: '' } + +globBase('**/*.md'); +//=> { base: '.', isGlob: true, glob: '**/*.md' } + +globBase('**/*.min.js'); +//=> { base: '.', isGlob: true, glob: '**/*.min.js' } + +globBase('**/.*'); +//=> { base: '.', isGlob: true, glob: '**/.*' } + +globBase('**/d'); +//=> { base: '.', isGlob: true, glob: '**/d' } + +globBase('*.*'); +//=> { base: '.', isGlob: true, glob: '*.*' } + +globBase('*.min.js'); +//=> { base: '.', isGlob: true, glob: '*.min.js' } + +globBase('*/*'); +//=> { base: '.', isGlob: true, glob: '*/*' } + +globBase('*b'); +//=> { base: '.', isGlob: true, glob: '*b' } + +globBase('.'); +//=> { base: '.', isGlob: false, glob: '.' } + +globBase('.*'); +//=> { base: '.', isGlob: true, glob: '.*' } + +globBase('./*'); +//=> { base: '.', isGlob: true, glob: '*' } + +globBase('/a'); +//=> { base: '/', isGlob: false, glob: 'a' } + +globBase('@(a|b)/e.f.g/'); +//=> { base: '.', isGlob: true, glob: '@(a|b)/e.f.g/' } + +globBase('[a-c]b*'); +//=> { base: '.', isGlob: true, glob: '[a-c]b*' } + +globBase('a'); +//=> { base: '.', isGlob: false, glob: 'a' } + +globBase('a.min.js'); +//=> { base: '.', isGlob: false, glob: 'a.min.js' } + +globBase('a/'); +//=> { base: 'a/', isGlob: false, glob: '' } + +globBase('a/**/j/**/z/*.md'); +//=> { base: 'a', isGlob: true, glob: '**/j/**/z/*.md' } + +globBase('a/*/c/*.md'); +//=> { base: 'a', isGlob: true, glob: '*/c/*.md' } + +globBase('a/?/c.md'); +//=> { base: 'a', isGlob: true, glob: '?/c.md' } + +globBase('a/??/c.js'); +//=> { base: 'a', isGlob: true, glob: '??/c.js' } + +globBase('a?b'); +//=> { base: '.', isGlob: true, glob: 'a?b' } + +globBase('bb'); +//=> { base: '.', isGlob: false, glob: 'bb' } + +globBase('c.md'); +//=> { base: '.', isGlob: false, glob: 'c.md' } +``` + +## Running tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/glob-base/issues) + + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 08, 2015._ diff --git a/node_modules/glob-base/index.js b/node_modules/glob-base/index.js new file mode 100644 index 0000000..564b4a8 --- /dev/null +++ b/node_modules/glob-base/index.js @@ -0,0 +1,51 @@ +/*! + * glob-base + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var path = require('path'); +var parent = require('glob-parent'); +var isGlob = require('is-glob'); + +module.exports = function globBase(pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('glob-base expects a string.'); + } + + var res = {}; + res.base = parent(pattern); + res.isGlob = isGlob(pattern); + + if (res.base !== '.') { + res.glob = pattern.substr(res.base.length); + if (res.glob.charAt(0) === '/') { + res.glob = res.glob.substr(1); + } + } else { + res.glob = pattern; + } + + if (!res.isGlob) { + res.base = dirname(pattern); + res.glob = res.base !== '.' + ? pattern.substr(res.base.length) + : pattern; + } + + if (res.glob.substr(0, 2) === './') { + res.glob = res.glob.substr(2); + } + if (res.glob.charAt(0) === '/') { + res.glob = res.glob.substr(1); + } + return res; +}; + +function dirname(glob) { + if (glob.slice(-1) === '/') return glob; + return path.dirname(glob); +} diff --git a/node_modules/glob-base/package.json b/node_modules/glob-base/package.json new file mode 100644 index 0000000..d444678 --- /dev/null +++ b/node_modules/glob-base/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "glob-base@^0.3.0", + "/home/mywebsite/node_modules/parse-glob" + ] + ], + "_from": "glob-base@>=0.3.0 <0.4.0", + "_id": "glob-base@0.3.0", + "_inCache": true, + "_installable": true, + "_location": "/glob-base", + "_nodeVersion": "0.12.7", + "_npmUser": { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "name": "glob-base", + "raw": "glob-base@^0.3.0", + "rawSpec": "^0.3.0", + "scope": null, + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-glob" + ], + "_resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "_shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", + "_shrinkwrap": null, + "_spec": "glob-base@^0.3.0", + "_where": "/home/mywebsite/node_modules/parse-glob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/glob-base/issues" + }, + "dependencies": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "description": "Returns an object with the (non-glob) base path and the actual pattern.", + "devDependencies": { + "mocha": "*", + "should": "^5.1.0" + }, + "directories": {}, + "dist": { + "shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", + "tarball": "http://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "adbc0ab07ec8a85f76ffd1b54dd41cdb9d1d0b83", + "homepage": "https://github.com/jonschlinkert/glob-base", + "keywords": [ + "base", + "directory", + "dirname", + "expression", + "glob", + "parent", + "path", + "pattern", + "regex", + "regular", + "root" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/glob-base/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + }, + { + "name": "es128", + "email": "elan.shanker+npm@gmail.com" + }, + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "glob-base", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/glob-base.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.3.0" +} diff --git a/node_modules/glob-parent/.npmignore b/node_modules/glob-parent/.npmignore new file mode 100644 index 0000000..33e391f --- /dev/null +++ b/node_modules/glob-parent/.npmignore @@ -0,0 +1,4 @@ +node_modules +.DS_Store +npm-debug.log +coverage diff --git a/node_modules/glob-parent/.travis.yml b/node_modules/glob-parent/.travis.yml new file mode 100644 index 0000000..18fc42f --- /dev/null +++ b/node_modules/glob-parent/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "4" + - "iojs-v3" + - "iojs-v2" + - "iojs-v1" + - "0.12" + - "0.10" diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE new file mode 100644 index 0000000..734076d --- /dev/null +++ b/node_modules/glob-parent/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2015 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md new file mode 100644 index 0000000..ff5310d --- /dev/null +++ b/node_modules/glob-parent/README.md @@ -0,0 +1,43 @@ +glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) +====== +Javascript module to extract the non-magic parent path from a glob string. + +[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) +[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) + +Usage +----- +```sh +npm install glob-parent --save +``` + +```js +var globParent = require('glob-parent'); + +globParent('path/to/*.js'); // 'path/to' +globParent('/root/path/to/*.js'); // '/root/path/to' +globParent('/*.js'); // '/' +globParent('*.js'); // '.' +globParent('**/*.js'); // '.' +globParent('path/{to,from}'); // 'path' +globParent('path/!(to|from)'); // 'path' +globParent('path/?(to|from)'); // 'path' +globParent('path/+(to|from)'); // 'path' +globParent('path/*(to|from)'); // 'path' +globParent('path/@(to|from)'); // 'path' +globParent('path/**/*'); // 'path' + +// if provided a non-glob path, returns the nearest dir +globParent('path/foo/bar.js'); // 'path/foo' +globParent('path/foo/'); // 'path/foo' +globParent('path/foo'); // 'path' (see issue #3 for details) + +``` + +Change Log +---------- +[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) + +License +------- +[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js new file mode 100644 index 0000000..61615f1 --- /dev/null +++ b/node_modules/glob-parent/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var path = require('path'); +var isglob = require('is-glob'); + +module.exports = function globParent(str) { + str += 'a'; // preserves full path in case of trailing path separator + do {str = path.dirname(str)} while (isglob(str)); + return str; +}; diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json new file mode 100644 index 0000000..5f0ee98 --- /dev/null +++ b/node_modules/glob-parent/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "glob-parent@^2.0.0", + "/home/mywebsite/node_modules/chokidar" + ] + ], + "_from": "glob-parent@>=2.0.0 <3.0.0", + "_id": "glob-parent@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/glob-parent", + "_nodeVersion": "3.0.0", + "_npmUser": { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + "_npmVersion": "2.13.3", + "_phantomChildren": {}, + "_requested": { + "name": "glob-parent", + "raw": "glob-parent@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar", + "/glob-base" + ], + "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "_shasum": "81383d72db054fcccf5336daa902f182f6edbb28", + "_shrinkwrap": null, + "_spec": "glob-parent@^2.0.0", + "_where": "/home/mywebsite/node_modules/chokidar", + "author": { + "name": "Elan Shanker" + }, + "bugs": { + "url": "https://github.com/es128/glob-parent/issues" + }, + "dependencies": { + "is-glob": "^2.0.0" + }, + "description": "Strips glob magic from a string to provide the parent path", + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.5", + "mocha": "^2.1.0" + }, + "directories": {}, + "dist": { + "shasum": "81383d72db054fcccf5336daa902f182f6edbb28", + "tarball": "http://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" + }, + "gitHead": "a956910c7ccb5eafd1b3fe900ceb6335cc5b6d3d", + "homepage": "https://github.com/es128/glob-parent", + "keywords": [ + "base", + "directory", + "glob", + "parent", + "path", + "strip" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "es128", + "email": "elan.shanker+npm@gmail.com" + } + ], + "name": "glob-parent", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/es128/glob-parent.git" + }, + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "version": "2.0.0" +} diff --git a/node_modules/glob-parent/test.js b/node_modules/glob-parent/test.js new file mode 100644 index 0000000..01156d2 --- /dev/null +++ b/node_modules/glob-parent/test.js @@ -0,0 +1,28 @@ +'use strict'; + +var gp = require('./'); +var assert = require('assert'); + +describe('glob-parent', function() { + it('should strip glob magic to return parent path', function() { + assert.equal(gp('path/to/*.js'), 'path/to'); + assert.equal(gp('/root/path/to/*.js'), '/root/path/to'); + assert.equal(gp('/*.js'), '/'); + assert.equal(gp('*.js'), '.'); + assert.equal(gp('**/*.js'), '.'); + assert.equal(gp('path/{to,from}'), 'path'); + assert.equal(gp('path/!(to|from)'), 'path'); + assert.equal(gp('path/?(to|from)'), 'path'); + assert.equal(gp('path/+(to|from)'), 'path'); + assert.equal(gp('path/*(to|from)'), 'path'); + assert.equal(gp('path/@(to|from)'), 'path'); + assert.equal(gp('path/**/*'), 'path'); + assert.equal(gp('path/**/subdir/foo.*'), 'path'); + }); + + it('should return parent dirname from non-glob paths', function() { + assert.equal(gp('path/foo/bar.js'), 'path/foo'); + assert.equal(gp('path/foo/'), 'path/foo'); + assert.equal(gp('path/foo'), 'path'); + }); +}); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/LICENSE b/node_modules/glob/LICENSE similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/lru-cache/LICENSE rename to node_modules/glob/LICENSE diff --git a/node_modules/glob/README.md b/node_modules/glob/README.md new file mode 100644 index 0000000..9206683 --- /dev/null +++ b/node_modules/glob/README.md @@ -0,0 +1,359 @@ +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies) + +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![](oh-my-glob.gif) + +## Usage + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* `cb` `{Function}` + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* return: `{Array}` filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` `{String}` pattern to search for +* `options` `{Object}` +* `cb` `{Function}` Called when an error occurs, or matches are found + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'FILE'` - Path exists, and is not a directory + * `'DIR'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the specific + thing that matched. It is not deduplicated or resolved to a realpath. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of glob patterns to exclude matches. + Note: `ignore` patterns are *always* in `dot:true` mode, regardless + of any other settings. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +Previously, this module let you mark a pattern as a "comment" if it +started with a `#` character, or a "negated" pattern if it started +with a `!` character. + +These options were deprecated in version 5, and removed in version 6. + +To specify things that should not match, use the `ignore` option. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` diff --git a/node_modules/glob/common.js b/node_modules/glob/common.js new file mode 100644 index 0000000..c9127eb --- /dev/null +++ b/node_modules/glob/common.js @@ -0,0 +1,226 @@ +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = options.cwd + self.changedCwd = path.resolve(options.cwd) !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + return !(/\/$/.test(e)) + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js new file mode 100644 index 0000000..022d2ac --- /dev/null +++ b/node_modules/glob/glob.js @@ -0,0 +1,752 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +glob.hasMagic = function (pattern, options_) { + var options = util._extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + var n = this.minimatch.set.length + this._processing = 0 + this.matches = new Array(n) + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + + function done () { + --self._processing + if (self._processing <= 0) + self._finish() + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + fs.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (this.matches[index][e]) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = this._makeAbs(e) + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + if (this.mark) + e = this._mark(e) + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er) + return cb() + + var isSym = lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && !stat.isDirectory()) + return cb(null, false, stat) + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return cb() + + return cb(null, c, stat) +} diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json new file mode 100644 index 0000000..631276b --- /dev/null +++ b/node_modules/glob/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "glob@^6.0.1", + "/home/mywebsite/node_modules/rimraf" + ] + ], + "_from": "glob@>=6.0.1 <7.0.0", + "_id": "glob@6.0.3", + "_inCache": true, + "_installable": true, + "_location": "/glob", + "_nodeVersion": "4.0.0", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "name": "glob", + "raw": "glob@^6.0.1", + "rawSpec": "^6.0.1", + "scope": null, + "spec": ">=6.0.1 <7.0.0", + "type": "range" + }, + "_requiredBy": [ + "/rimraf" + ], + "_resolved": "https://registry.npmjs.org/glob/-/glob-6.0.3.tgz", + "_shasum": "5f02cd89587ce58b154ae0855de02a2e63986fca", + "_shrinkwrap": null, + "_spec": "glob@^6.0.1", + "_where": "/home/mywebsite/node_modules/rimraf", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "description": "a little globber", + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^1.1.4", + "tick": "0.0.6" + }, + "directories": {}, + "dist": { + "shasum": "5f02cd89587ce58b154ae0855de02a2e63986fca", + "tarball": "http://registry.npmjs.org/glob/-/glob-6.0.3.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "common.js", + "glob.js", + "sync.js" + ], + "gitHead": "dd5b255ff9b161d23f81c4d0a381ca46a97d049a", + "homepage": "https://github.com/isaacs/node-glob#readme", + "license": "ISC", + "main": "glob.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "glob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "scripts": { + "bench": "bash benchmark.sh", + "benchclean": "node benchclean.js", + "prepublish": "npm run benchclean", + "prof": "bash prof.sh && cat profile.txt", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" + }, + "version": "6.0.3" +} diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js new file mode 100644 index 0000000..09883d2 --- /dev/null +++ b/node_modules/glob/sync.js @@ -0,0 +1,460 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = fs.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this.matches[index][e] = true + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + var abs = this._makeAbs(e) + if (this.mark) + e = this._mark(e) + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[this._makeAbs(e)] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + // lstat failed, doesn't exist + return null + } + + var isSym = lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this.matches[index][prefix] = true +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + return false + } + + if (lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/node_modules/graceful-fs/LICENSE b/node_modules/graceful-fs/LICENSE new file mode 100644 index 0000000..9d2c803 --- /dev/null +++ b/node_modules/graceful-fs/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/graceful-fs/README.md b/node_modules/graceful-fs/README.md new file mode 100644 index 0000000..13a2e86 --- /dev/null +++ b/node_modules/graceful-fs/README.md @@ -0,0 +1,36 @@ +# graceful-fs + +graceful-fs functions as a drop-in replacement for the fs module, +making various improvements. + +The improvements are meant to normalize behavior across different +platforms and environments, and to make filesystem access more +resilient to errors. + +## Improvements over [fs module](http://api.nodejs.org/fs.html) + +graceful-fs: + +* Queues up `open` and `readdir` calls, and retries them once + something closes if there is an EMFILE error from too many file + descriptors. +* fixes `lchmod` for Node versions prior to 0.6.2. +* implements `fs.lutimes` if possible. Otherwise it becomes a noop. +* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or + `lchown` if the user isn't root. +* makes `lchmod` and `lchown` become noops, if not available. +* retries reading a file if `read` results in EAGAIN error. + +On Windows, it retries renaming a file for up to one second if `EACCESS` +or `EPERM` error occurs, likely because antivirus software has locked +the directory. + +## USAGE + +```javascript +// use just like fs +var fs = require('graceful-fs') + +// now go and do stuff with it... +fs.readFileSync('some-file-or-whatever') +``` diff --git a/node_modules/graceful-fs/fs.js b/node_modules/graceful-fs/fs.js new file mode 100644 index 0000000..8ad4a38 --- /dev/null +++ b/node_modules/graceful-fs/fs.js @@ -0,0 +1,21 @@ +'use strict' + +var fs = require('fs') + +module.exports = clone(fs) + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: obj.__proto__ } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js new file mode 100644 index 0000000..fe3b17c --- /dev/null +++ b/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,251 @@ +var fs = require('fs') +var polyfills = require('./polyfills.js') +var legacy = require('./legacy-streams.js') +var queue = [] + +var util = require('util') + +function noop () {} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(queue) + require('assert').equal(queue.length, 0) + }) +} + +module.exports = patch(require('./fs.js')) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { + module.exports = patch(fs) +} + +// Always patch fs.close/closeSync, because we want to +// retry() whenever a close happens *anywhere* in the program. +// This is essential when multiple graceful-fs instances are +// in play at the same time. +fs.close = (function (fs$close) { return function (fd, cb) { + return fs$close.call(fs, fd, function (err) { + if (!err) + retry() + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) +}})(fs.close) + +fs.closeSync = (function (fs$closeSync) { return function (fd) { + // Note that graceful-fs also retries when fs.closeSync() fails. + // Looks like a bug to me, although it's probably a harmless one. + var rval = fs$closeSync.apply(fs, arguments) + retry() + return rval +}})(fs.closeSync) + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + fs.FileReadStream = ReadStream; // Legacy name. + fs.FileWriteStream = WriteStream; // Legacy name. + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, cb) { + return go$readdir(path, cb) + + function go$readdir () { + return fs$readdir(path, function (err, files) { + if (files && files.sort) + files.sort(); // Backwards compatibility with graceful-fs. + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [path, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + + var fs$WriteStream = fs.WriteStream + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + + fs.ReadStream = ReadStream + fs.WriteStream = WriteStream + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + queue.push(elem) +} + +function retry () { + var elem = queue.shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} diff --git a/node_modules/graceful-fs/legacy-streams.js b/node_modules/graceful-fs/legacy-streams.js new file mode 100644 index 0000000..d617b50 --- /dev/null +++ b/node_modules/graceful-fs/legacy-streams.js @@ -0,0 +1,118 @@ +var Stream = require('stream').Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json new file mode 100644 index 0000000..aa81ab3 --- /dev/null +++ b/node_modules/graceful-fs/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + "graceful-fs@^4.1.2", + "/home/mywebsite/node_modules/readdirp" + ] + ], + "_from": "graceful-fs@>=4.1.2 <5.0.0", + "_id": "graceful-fs@4.1.2", + "_inCache": true, + "_installable": true, + "_location": "/graceful-fs", + "_nodeVersion": "2.2.1", + "_npmUser": { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + "_npmVersion": "3.0.0", + "_phantomChildren": {}, + "_requested": { + "name": "graceful-fs", + "raw": "graceful-fs@^4.1.2", + "rawSpec": "^4.1.2", + "scope": null, + "spec": ">=4.1.2 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/readdirp" + ], + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.2.tgz", + "_shasum": "fe2239b7574972e67e41f808823f9bfa4a991e37", + "_shrinkwrap": null, + "_spec": "graceful-fs@^4.1.2", + "_where": "/home/mywebsite/node_modules/readdirp", + "bugs": { + "url": "https://github.com/isaacs/node-graceful-fs/issues" + }, + "dependencies": {}, + "description": "A drop-in replacement for fs, making various improvements.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^1.2.0" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "fe2239b7574972e67e41f808823f9bfa4a991e37", + "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.2.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js" + ], + "gitHead": "c286080071b6be9aa9ba108b0bb9b44ff122926d", + "homepage": "https://github.com/isaacs/node-graceful-fs#readme", + "keywords": [ + "EACCESS", + "EAGAIN", + "EINVAL", + "EMFILE", + "EPERM", + "error", + "errors", + "fs", + "handling", + "module", + "queue", + "reading", + "retries", + "retry" + ], + "license": "ISC", + "main": "graceful-fs.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "graceful-fs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/node-graceful-fs.git" + }, + "scripts": { + "test": "node test.js | tap -" + }, + "version": "4.1.2" +} diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js new file mode 100644 index 0000000..5e4f480 --- /dev/null +++ b/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,252 @@ +var fs = require('./fs.js') +var constants = require('constants') + +var origCwd = process.cwd +var cwd = null +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chownFix(fs.chmod) + fs.fchmod = chownFix(fs.fchmod) + fs.lchmod = chownFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chownFix(fs.chmodSync) + fs.fchmodSync = chownFix(fs.fchmodSync) + fs.lchmodSync = chownFix(fs.lchmodSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 1 second. + if (process.platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 1000) { + return fs$rename(from, to, CB) + } + if (cb) cb(er) + }) + }})(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + }})(fs.read) + + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) +} + +function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + callback = callback || noop + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } +} + +function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + cb = cb || noop + if (er) return cb(er) + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + return cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } + fs.lutimesSync = function () {} + } +} + +function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er, res) { + if (chownErOk(er)) er = null + cb(er, res) + }) + } +} + +function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } +} + +// ENOSYS means that the fs doesn't support the op. Just ignore +// that, because it doesn't matter. +// +// if there's no getuid, or if getuid() is something other +// than 0, and the error is EINVAL or EPERM, then just ignore +// it. +// +// This specific case is a silent failure in cp, install, tar, +// and most other unix tools that manage permissions. +// +// When running as root, or if other types of errors are +// encountered, then it's strict. +function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false +} diff --git a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/.npmignore b/node_modules/i/.npmignore similarity index 81% rename from node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/.npmignore rename to node_modules/i/.npmignore index 0db216b..435e4bb 100644 --- a/node_modules/forever/node_modules/flatiron/node_modules/prompt/node_modules/read/.npmignore +++ b/node_modules/i/.npmignore @@ -1,2 +1,3 @@ -npm-debug.log node_modules +npm-debug.log +*.swp diff --git a/node_modules/i/.travis.yml b/node_modules/i/.travis.yml new file mode 100644 index 0000000..24a76b0 --- /dev/null +++ b/node_modules/i/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - 0.4 + - 0.6 + - 0.7 +notifications: + irc: "irc.freenode.net#pksunkara" + email: + on_success: never diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/LICENSE b/node_modules/i/LICENSE similarity index 82% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/LICENSE rename to node_modules/i/LICENSE index 9cd87e5..c9b44cb 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/lodash.flatten/node_modules/lodash._baseflatten/node_modules/lodash.isarray/LICENSE +++ b/node_modules/i/LICENSE @@ -1,7 +1,3 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including diff --git a/node_modules/i/README.md b/node_modules/i/README.md new file mode 100644 index 0000000..dbfa6d4 --- /dev/null +++ b/node_modules/i/README.md @@ -0,0 +1,174 @@ +# inflect + +customizable inflections for nodejs + +## Installation + +```bash +npm install i +``` + +## Usage + +Require the module before using + +```js +var inflect = require('i')(); +``` + +All the below api functions can be called directly on a string + +```js +inflect.titleize('messages to store') // === 'Messages To Store' +'messages to store'.titleize // === 'Messages To Store' +``` + +only if `true` is passed while initiating + +```js +var inflect = require('i')(true); +``` + +### Pluralize + +```js +inflect.pluralize('person'); // === 'people' +inflect.pluralize('octopus'); // === 'octopi' +inflect.pluralize('Hat'); // === 'Hats' +``` + +### Singularize + +```js +inflect.singularize('people'); // === 'person' +inflect.singularize('octopi'); // === 'octopus' +inflect.singularize('Hats'); // === 'Hat' +``` + +### Camelize + +```js +inflect.camelize('message_properties'); // === 'MessageProperties' +inflect.camelize('message_properties', false); // === 'messageProperties' +``` + +### Underscore + +```js +inflect.underscore('MessageProperties'); // === 'message_properties' +inflect.underscore('messageProperties'); // === 'message_properties' +``` + +### Humanize + +```js +inflect.humanize('message_id'); // === 'Message' +``` + +### Dasherize + +```js +inflect.dasherize('message_properties'); // === 'message-properties' +inflect.dasherize('Message Properties'); // === 'Message Properties' +``` + +### Titleize + +```js +inflect.titleize('message_properties'); // === 'Message Properties' +inflect.titleize('message properties to keep'); // === 'Message Properties to Keep' +``` + +### Demodulize + +```js +inflect.demodulize('Message.Bus.Properties'); // === 'Properties' +``` + +### Tableize + +```js +inflect.tableize('MessageBusProperty'); // === 'message_bus_properties' +``` + +### Classify + +```js +inflect.classify('message_bus_properties'); // === 'MessageBusProperty' +``` + +### Foreign key + +```js +inflect.foreign_key('MessageBusProperty'); // === 'message_bus_property_id' +inflect.foreign_key('MessageBusProperty', false); // === 'message_bus_propertyid' +``` + +### Ordinalize + +```js +inflect.ordinalize( '1' ); // === '1st' +``` + +## Custom rules for inflection + +### Custom plural + +We can use regexp in any of these custom rules + +```js +inflect.inflections.plural('person', 'guys'); +inflect.pluralize('person'); // === 'guys' +inflect.singularize('guys'); // === 'guy' +``` + +### Custom singular + +```js +inflect.inflections.singular('guys', 'person') +inflect.singularize('guys'); // === 'person' +inflect.pluralize('person'); // === 'people' +``` + +### Custom irregular + +```js +inflect.inflections.irregular('person', 'guys') +inflect.pluralize('person'); // === 'guys' +inflect.singularize('guys'); // === 'person' +``` + +### Custom human + +```js +inflect.inflections.human(/^(.*)_cnt$/i, '$1_count'); +inflect.inflections.humanize('jargon_cnt'); // === 'Jargon count' +``` + +### Custom uncountable + +```js +inflect.inflections.uncountable('oil') +inflect.pluralize('oil'); // === 'oil' +inflect.singularize('oil'); // === 'oil' +``` + +## Contributors +Here is a list of [Contributors](http://github.com/pksunkara/inflect/contributors) + +### TODO + +- More obscure test cases + +__I accept pull requests and guarantee a reply back within a day__ + +## License +MIT/X11 + +## Bug Reports +Report [here](http://github.com/pksunkara/inflect/issues). __Guaranteed reply within a day__. + +## Contact +Pavan Kumar Sunkara (pavan.sss1991@gmail.com) + +Follow me on [github](https://github.com/users/follow?target=pksunkara), [twitter](http://twitter.com/pksunkara) diff --git a/node_modules/i/lib/defaults.js b/node_modules/i/lib/defaults.js new file mode 100644 index 0000000..ac26a50 --- /dev/null +++ b/node_modules/i/lib/defaults.js @@ -0,0 +1,63 @@ +// Default inflections +module.exports = function (inflect) { + + inflect.plural(/$/, 's'); + inflect.plural(/s$/i, 's'); + inflect.plural(/(ax|test)is$/i, '$1es'); + inflect.plural(/(octop|vir)us$/i, '$1i'); + inflect.plural(/(octop|vir)i$/i, '$1i'); + inflect.plural(/(alias|status)$/i, '$1es'); + inflect.plural(/(bu)s$/i, '$1ses'); + inflect.plural(/(buffal|tomat)o$/i, '$1oes'); + inflect.plural(/([ti])um$/i, '$1a'); + inflect.plural(/([ti])a$/i, '$1a'); + inflect.plural(/sis$/i, 'ses'); + inflect.plural(/(?:([^f])fe|([lr])f)$/i, '$1ves'); + inflect.plural(/(hive)$/i, '$1s'); + inflect.plural(/([^aeiouy]|qu)y$/i, '$1ies'); + inflect.plural(/(x|ch|ss|sh)$/i, '$1es'); + inflect.plural(/(matr|vert|ind)(?:ix|ex)$/i, '$1ices'); + inflect.plural(/([m|l])ouse$/i, '$1ice'); + inflect.plural(/([m|l])ice$/i, '$1ice'); + inflect.plural(/^(ox)$/i, '$1en'); + inflect.plural(/^(oxen)$/i, '$1'); + inflect.plural(/(quiz)$/i, '$1zes'); + + + inflect.singular(/s$/i, ''); + inflect.singular(/(n)ews$/i, '$1ews'); + inflect.singular(/([ti])a$/i, '$1um'); + inflect.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, '$1sis'); + inflect.singular(/(^analy)ses$/i, '$1sis'); + inflect.singular(/([^f])ves$/i, '$1fe'); + inflect.singular(/(hive)s$/i, '$1'); + inflect.singular(/(tive)s$/i, '$1'); + inflect.singular(/([lr])ves$/i, '$1f'); + inflect.singular(/([^aeiouy]|qu)ies$/i, '$1y'); + inflect.singular(/(s)eries$/i, '$1eries'); + inflect.singular(/(m)ovies$/i, '$1ovie'); + inflect.singular(/(x|ch|ss|sh)es$/i, '$1'); + inflect.singular(/([m|l])ice$/i, '$1ouse'); + inflect.singular(/(bus)es$/i, '$1'); + inflect.singular(/(o)es$/i, '$1'); + inflect.singular(/(shoe)s$/i, '$1'); + inflect.singular(/(cris|ax|test)es$/i, '$1is'); + inflect.singular(/(octop|vir)i$/i, '$1us'); + inflect.singular(/(alias|status)es$/i, '$1'); + inflect.singular(/^(ox)en/i, '$1'); + inflect.singular(/(vert|ind)ices$/i, '$1ex'); + inflect.singular(/(matr)ices$/i, '$1ix'); + inflect.singular(/(quiz)zes$/i, '$1'); + inflect.singular(/(database)s$/i, '$1'); + + inflect.irregular('child', 'children'); + inflect.irregular('person', 'people'); + inflect.irregular('man', 'men'); + inflect.irregular('child', 'children'); + inflect.irregular('sex', 'sexes'); + inflect.irregular('move', 'moves'); + inflect.irregular('cow', 'kine'); + inflect.irregular('zombie', 'zombies'); + + inflect.uncountable(['equipment', 'information', 'rice', 'money', 'species', 'series', 'fish', 'sheep', 'jeans']); +} diff --git a/node_modules/i/lib/inflect.js b/node_modules/i/lib/inflect.js new file mode 100644 index 0000000..5e0cc70 --- /dev/null +++ b/node_modules/i/lib/inflect.js @@ -0,0 +1,11 @@ +// Requiring modules + +module.exports = function (attach) { + var methods = require('./methods'); + + if (attach) { + require('./native')(methods); + } + + return methods +}; diff --git a/node_modules/i/lib/inflections.js b/node_modules/i/lib/inflections.js new file mode 100644 index 0000000..2808a48 --- /dev/null +++ b/node_modules/i/lib/inflections.js @@ -0,0 +1,116 @@ +// A singleton instance of this class is yielded by Inflector.inflections, which can then be used to specify additional +// inflection rules. Examples: +// +// BulletSupport.Inflector.inflect ($) -> +// $.plural /^(ox)$/i, '$1en' +// $.singular /^(ox)en/i, '$1' +// +// $.irregular 'octopus', 'octopi' +// +// $.uncountable "equipment" +// +// New rules are added at the top. So in the example above, the irregular rule for octopus will now be the first of the +// pluralization and singularization rules that is runs. This guarantees that your rules run before any of the rules that may +// already have been loaded. + +var util = require('./util'); + +var Inflections = function () { + this.plurals = []; + this.singulars = []; + this.uncountables = []; + this.humans = []; + require('./defaults')(this); + return this; +}; + +// Specifies a new pluralization rule and its replacement. The rule can either be a string or a regular expression. +// The replacement should always be a string that may include references to the matched data from the rule. +Inflections.prototype.plural = function (rule, replacement) { + if (typeof rule == 'string') { + this.uncountables = util.array.del(this.uncountables, rule); + } + this.uncountables = util.array.del(this.uncountables, replacement); + this.plurals.unshift([rule, replacement]); +}; + +// Specifies a new singularization rule and its replacement. The rule can either be a string or a regular expression. +// The replacement should always be a string that may include references to the matched data from the rule. +Inflections.prototype.singular = function (rule, replacement) { + if (typeof rule == 'string') { + this.uncountables = util.array.del(this.uncountables, rule); + } + this.uncountables = util.array.del(this.uncountables, replacement); + this.singulars.unshift([rule, replacement]); +}; + +// Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used +// for strings, not regular expressions. You simply pass the irregular in singular and plural form. +// +// irregular 'octopus', 'octopi' +// irregular 'person', 'people' +Inflections.prototype.irregular = function (singular, plural) { + this.uncountables = util.array.del(this.uncountables, singular); + this.uncountables = util.array.del(this.uncountables, plural); + if (singular[0].toUpperCase() == plural[0].toUpperCase()) { + this.plural(new RegExp("(" + singular[0] + ")" + singular.slice(1) + "$", "i"), '$1' + plural.slice(1)); + this.plural(new RegExp("(" + plural[0] + ")" + plural.slice(1) + "$", "i"), '$1' + plural.slice(1)); + this.singular(new RegExp("(" + plural[0] + ")" + plural.slice(1) + "$", "i"), '$1' + singular.slice(1)); + } else { + this.plural(new RegExp("" + (singular[0].toUpperCase()) + singular.slice(1) + "$"), plural[0].toUpperCase() + plural.slice(1)); + this.plural(new RegExp("" + (singular[0].toLowerCase()) + singular.slice(1) + "$"), plural[0].toLowerCase() + plural.slice(1)); + this.plural(new RegExp("" + (plural[0].toUpperCase()) + plural.slice(1) + "$"), plural[0].toUpperCase() + plural.slice(1)); + this.plural(new RegExp("" + (plural[0].toLowerCase()) + plural.slice(1) + "$"), plural[0].toLowerCase() + plural.slice(1)); + this.singular(new RegExp("" + (plural[0].toUpperCase()) + plural.slice(1) + "$"), singular[0].toUpperCase() + singular.slice(1)); + this.singular(new RegExp("" + (plural[0].toLowerCase()) + plural.slice(1) + "$"), singular[0].toLowerCase() + singular.slice(1)); + } +}; + +// Specifies a humanized form of a string by a regular expression rule or by a string mapping. +// When using a regular expression based replacement, the normal humanize formatting is called after the replacement. +// When a string is used, the human form should be specified as desired (example: 'The name', not 'the_name') +// +// human /(.*)_cnt$/i, '$1_count' +// human "legacy_col_person_name", "Name" +Inflections.prototype.human = function (rule, replacement) { + this.humans.unshift([rule, replacement]); +} + +// Add uncountable words that shouldn't be attempted inflected. +// +// uncountable "money" +// uncountable ["money", "information"] +Inflections.prototype.uncountable = function (words) { + this.uncountables = this.uncountables.concat(words); +} + +// Clears the loaded inflections within a given scope (default is _'all'_). +// Give the scope as a symbol of the inflection type, the options are: _'plurals'_, +// _'singulars'_, _'uncountables'_, _'humans'_. +// +// clear 'all' +// clear 'plurals' +Inflections.prototype.clear = function (scope) { + if (scope == null) scope = 'all'; + switch (scope) { + case 'all': + this.plurals = []; + this.singulars = []; + this.uncountables = []; + this.humans = []; + default: + this[scope] = []; + } +} + +// Clears the loaded inflections and initializes them to [default](../inflections.html) +Inflections.prototype.default = function () { + this.plurals = []; + this.singulars = []; + this.uncountables = []; + this.humans = []; + require('./defaults')(this); + return this; +}; + +module.exports = new Inflections(); diff --git a/node_modules/i/lib/methods.js b/node_modules/i/lib/methods.js new file mode 100644 index 0000000..293dd9d --- /dev/null +++ b/node_modules/i/lib/methods.js @@ -0,0 +1,233 @@ +// The Inflector transforms words from singular to plural, class names to table names, modularized class names to ones without, +// and class names to foreign keys. The default inflections for pluralization, singularization, and uncountable words are kept +// in inflections.coffee +// +// If you discover an incorrect inflection and require it for your application, you'll need +// to correct it yourself (explained below). + +var util = require('./util'); + +var inflect = module.exports; + +// Import [inflections](inflections.html) instance +inflect.inflections = require('./inflections') + +// Gives easy access to add inflections to this class +inflect.inflect = function (inflections_function) { + inflections_function(inflect.inflections); +}; + +// By default, _camelize_ converts strings to UpperCamelCase. If the argument to _camelize_ +// is set to _false_ then _camelize_ produces lowerCamelCase. +// +// _camelize_ will also convert '/' to '.' which is useful for converting paths to namespaces. +// +// "bullet_record".camelize() // => "BulletRecord" +// "bullet_record".camelize(false) // => "bulletRecord" +// "bullet_record/errors".camelize() // => "BulletRecord.Errors" +// "bullet_record/errors".camelize(false) // => "bulletRecord.Errors" +// +// As a rule of thumb you can think of _camelize_ as the inverse of _underscore_, +// though there are cases where that does not hold: +// +// "SSLError".underscore.camelize // => "SslError" +inflect.camelize = function(lower_case_and_underscored_word, first_letter_in_uppercase) { + var result; + if (first_letter_in_uppercase == null) first_letter_in_uppercase = true; + result = util.string.gsub(lower_case_and_underscored_word, /\/(.?)/, function($) { + return "." + (util.string.upcase($[1])); + }); + result = util.string.gsub(result, /(?:_)(.)/, function($) { + return util.string.upcase($[1]); + }); + if (first_letter_in_uppercase) { + return util.string.upcase(result); + } else { + return util.string.downcase(result); + } +}; + +// Makes an underscored, lowercase form from the expression in the string. +// +// Changes '.' to '/' to convert namespaces to paths. +// +// "BulletRecord".underscore() // => "bullet_record" +// "BulletRecord.Errors".underscore() // => "bullet_record/errors" +// +// As a rule of thumb you can think of +underscore+ as the inverse of +camelize+, +// though there are cases where that does not hold: +// +// "SSLError".underscore().camelize() // => "SslError" +inflect.underscore = function (camel_cased_word) { + var self; + self = util.string.gsub(camel_cased_word, /\./, '/'); + self = util.string.gsub(self, /([A-Z]+)([A-Z][a-z])/, "$1_$2"); + self = util.string.gsub(self, /([a-z\d])([A-Z])/, "$1_$2"); + self = util.string.gsub(self, /-/, '_'); + return self.toLowerCase(); +}; + +// Replaces underscores with dashes in the string. +// +// "puni_puni".dasherize() // => "puni-puni" +inflect.dasherize = function (underscored_word) { + return util.string.gsub(underscored_word, /_/, '-'); +}; + +// Removes the module part from the expression in the string. +// +// "BulletRecord.String.Inflections".demodulize() // => "Inflections" +// "Inflections".demodulize() // => "Inflections" +inflect.demodulize = function (class_name_in_module) { + return util.string.gsub(class_name_in_module, /^.*\./, ''); +}; + +// Creates a foreign key name from a class name. +// _separate_class_name_and_id_with_underscore_ sets whether +// the method should put '_' between the name and 'id'. +// +// "Message".foreign_key() // => "message_id" +// "Message".foreign_key(false) // => "messageid" +// "Admin::Post".foreign_key() // => "post_id" +inflect.foreign_key = function (class_name, separate_class_name_and_id_with_underscore) { + if (separate_class_name_and_id_with_underscore == null) { + separate_class_name_and_id_with_underscore = true; + } + return inflect.underscore(inflect.demodulize(class_name)) + (separate_class_name_and_id_with_underscore ? "_id" : "id"); +}; + +// Turns a number into an ordinal string used to denote the position in an +// ordered sequence such as 1st, 2nd, 3rd, 4th. +// +// ordinalize(1) // => "1st" +// ordinalize(2) // => "2nd" +// ordinalize(1002) // => "1002nd" +// ordinalize(1003) // => "1003rd" +// ordinalize(-11) // => "-11th" +// ordinalize(-1021) // => "-1021st" +inflect.ordinalize = function (number) { + var _ref; + number = parseInt(number); + if ((_ref = Math.abs(number) % 100) === 11 || _ref === 12 || _ref === 13) { + return "" + number + "th"; + } else { + switch (Math.abs(number) % 10) { + case 1: + return "" + number + "st"; + case 2: + return "" + number + "nd"; + case 3: + return "" + number + "rd"; + default: + return "" + number + "th"; + } + } +}; + +// Checks a given word for uncountability +// +// "money".uncountability() // => true +// "my money".uncountability() // => true +inflect.uncountability = function (word) { + return inflect.inflections.uncountables.some(function(ele, ind, arr) { + return word.match(new RegExp("(\\b|_)" + ele + "$", 'i')) != null; + }); +}; + +// Returns the plural form of the word in the string. +// +// "post".pluralize() // => "posts" +// "octopus".pluralize() // => "octopi" +// "sheep".pluralize() // => "sheep" +// "words".pluralize() // => "words" +// "CamelOctopus".pluralize() // => "CamelOctopi" +inflect.pluralize = function (word) { + var plural, result; + result = word; + if (word === '' || inflect.uncountability(word)) { + return result; + } else { + for (var i = 0; i < inflect.inflections.plurals.length; i++) { + plural = inflect.inflections.plurals[i]; + result = util.string.gsub(result, plural[0], plural[1]); + if (word.match(plural[0]) != null) break; + } + return result; + } +}; + +// The reverse of _pluralize_, returns the singular form of a word in a string. +// +// "posts".singularize() // => "post" +// "octopi".singularize() // => "octopus" +// "sheep".singularize() // => "sheep" +// "word".singularize() // => "word" +// "CamelOctopi".singularize() // => "CamelOctopus" +inflect.singularize = function (word) { + var result, singular; + result = word; + if (word === '' || inflect.uncountability(word)) { + return result; + } else { + for (var i = 0; i < inflect.inflections.singulars.length; i++) { + singular = inflect.inflections.singulars[i]; + result = util.string.gsub(result, singular[0], singular[1]); + if (word.match(singular[0])) break; + } + return result; + } +}; + +// Capitalizes the first word and turns underscores into spaces and strips a +// trailing "_id", if any. Like _titleize_, this is meant for creating pretty output. +// +// "employee_salary".humanize() // => "Employee salary" +// "author_id".humanize() // => "Author" +inflect.humanize = function (lower_case_and_underscored_word) { + var human, result; + result = lower_case_and_underscored_word; + for (var i = 0; i < inflect.inflections.humans.length; i++) { + human = inflect.inflections.humans[i]; + result = util.string.gsub(result, human[0], human[1]); + } + result = util.string.gsub(result, /_id$/, ""); + result = util.string.gsub(result, /_/, " "); + return util.string.capitalize(result, true); +}; + +// Capitalizes all the words and replaces some characters in the string to create +// a nicer looking title. _titleize_ is meant for creating pretty output. It is not +// used in the Bullet internals. +// +// +// "man from the boondocks".titleize() // => "Man From The Boondocks" +// "x-men: the last stand".titleize() // => "X Men: The Last Stand" +inflect.titleize = function (word) { + var self; + self = inflect.humanize(inflect.underscore(word)); + self = util.string.gsub(self, /[^a-zA-Z:']/, ' '); + return util.string.capitalize(self); +}; + +// Create the name of a table like Bullet does for models to table names. This method +// uses the _pluralize_ method on the last word in the string. +// +// "RawScaledScorer".tableize() // => "raw_scaled_scorers" +// "egg_and_ham".tableize() // => "egg_and_hams" +// "fancyCategory".tableize() // => "fancy_categories" +inflect.tableize = function (class_name) { + return inflect.pluralize(inflect.underscore(class_name)); +}; + +// Create a class name from a plural table name like Bullet does for table names to models. +// Note that this returns a string and not a Class. +// +// "egg_and_hams".classify() // => "EggAndHam" +// "posts".classify() // => "Post" +// +// Singular names are not handled correctly: +// +// "business".classify() // => "Busines" +inflect.classify = function (table_name) { + return inflect.camelize(inflect.singularize(util.string.gsub(table_name, /.*\./, ''))); +} diff --git a/node_modules/i/lib/native.js b/node_modules/i/lib/native.js new file mode 100644 index 0000000..d2c8de1 --- /dev/null +++ b/node_modules/i/lib/native.js @@ -0,0 +1,26 @@ +module.exports = function (obj) { + + var addProperty = function (method, func) { + String.prototype.__defineGetter__(method, func); + } + + var stringPrototypeBlacklist = [ + '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', + 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', + 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', + 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight', 'gsub' + ]; + + Object.keys(obj).forEach(function (key) { + if (key != 'inflect' && key != 'inflections') { + if (stringPrototypeBlacklist.indexOf(key) !== -1) { + console.log('warn: You should not override String.prototype.' + key); + } else { + addProperty(key, function () { + return obj[key](this); + }); + } + } + }); + +} diff --git a/node_modules/i/lib/util.js b/node_modules/i/lib/util.js new file mode 100644 index 0000000..87ebd3e --- /dev/null +++ b/node_modules/i/lib/util.js @@ -0,0 +1,136 @@ +// Some utility functions in js + +var u = module.exports = { + array: { + // Returns a copy of the array with the value removed once + // + // [1, 2, 3, 1].del 1 #=> [2, 3, 1] + // [1, 2, 3].del 4 #=> [1, 2, 3] + del: function (arr, val) { + var index = arr.indexOf(val); + if (index != -1) { + if (index == 0) { + return arr.slice(1) + } else { + return arr.slice(0, index).concat(arr.slice(index+1)); + } + } else { + return arr; + } + }, + + // Returns the first element of the array + // + // [1, 2, 3].first() #=> 1 + first: function(arr) { + return arr[0]; + }, + + // Returns the last element of the array + // + // [1, 2, 3].last() #=> 3 + last: function(arr) { + return arr[arr.length-1]; + } + }, + string: { + // Returns a copy of str with all occurrences of pattern replaced with either replacement or the return value of a function. + // The pattern will typically be a Regexp; if it is a String then no regular expression metacharacters will be interpreted + // (that is /\d/ will match a digit, but ‘\d’ will match a backslash followed by a ‘d’). + // + // In the function form, the current match object is passed in as a parameter to the function, and variables such as + // $[1], $[2], $[3] (where $ is the match object) will be set appropriately. The value returned by the function will be + // substituted for the match on each call. + // + // The result inherits any tainting in the original string or any supplied replacement string. + // + // "hello".gsub /[aeiou]/, '*' #=> "h*ll*" + // "hello".gsub /[aeiou]/, '<$1>' #=> "hll" + // "hello".gsub /[aeiou]/, ($) { + // "<#{$[1]}>" #=> "hll" + // + gsub: function (str, pattern, replacement) { + var i, match, matchCmpr, matchCmprPrev, replacementStr, result, self; + if (!((pattern != null) && (replacement != null))) return u.string.value(str); + result = ''; + self = str; + while (self.length > 0) { + if ((match = self.match(pattern))) { + result += self.slice(0, match.index); + if (typeof replacement === 'function') { + match[1] = match[1] || match[0]; + result += replacement(match); + } else if (replacement.match(/\$[1-9]/)) { + matchCmprPrev = match; + matchCmpr = u.array.del(match, void 0); + while (matchCmpr !== matchCmprPrev) { + matchCmprPrev = matchCmpr; + matchCmpr = u.array.del(matchCmpr, void 0); + } + match[1] = match[1] || match[0]; + replacementStr = replacement; + for (i = 1; i <= 9; i++) { + if (matchCmpr[i]) { + replacementStr = u.string.gsub(replacementStr, new RegExp("\\\$" + i), matchCmpr[i]); + } + } + result += replacementStr; + } else { + result += replacement; + } + self = self.slice(match.index + match[0].length); + } else { + result += self; + self = ''; + } + } + return result; + }, + + // Returns a copy of the String with the first letter being upper case + // + // "hello".upcase #=> "Hello" + upcase: function(str) { + var self = u.string.gsub(str, /_([a-z])/, function ($) { + return "_" + $[1].toUpperCase(); + }); + self = u.string.gsub(self, /\/([a-z])/, function ($) { + return "/" + $[1].toUpperCase(); + }); + return self[0].toUpperCase() + self.substr(1); + }, + + // Returns a copy of capitalized string + // + // "employee salary" #=> "Employee Salary" + capitalize: function (str, spaces) { + var self = str.toLowerCase(); + if(!spaces) { + self = u.string.gsub(self, /\s([a-z])/, function ($) { + return " " + $[1].toUpperCase(); + }); + } + return self[0].toUpperCase() + self.substr(1); + }, + + // Returns a copy of the String with the first letter being lower case + // + // "HELLO".downcase #=> "hELLO" + downcase: function(str) { + var self = u.string.gsub(str, /_([A-Z])/, function ($) { + return "_" + $[1].toLowerCase(); + }); + self = u.string.gsub(self, /\/([A-Z])/, function ($) { + return "/" + $[1].toLowerCase(); + }); + return self[0].toLowerCase() + self.substr(1); + }, + + // Returns a string value for the String object + // + // "hello".value() #=> "hello" + value: function (str) { + return str.substr(0); + } + } +} diff --git a/node_modules/i/package.json b/node_modules/i/package.json new file mode 100644 index 0000000..87176d4 --- /dev/null +++ b/node_modules/i/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + "i@0.3.x", + "/home/mywebsite/node_modules/utile" + ] + ], + "_from": "i@>=0.3.0 <0.4.0", + "_id": "i@0.3.3", + "_inCache": true, + "_installable": true, + "_location": "/i", + "_npmUser": { + "email": "pavan.sss1991@gmail.com", + "name": "pksunkara" + }, + "_npmVersion": "2.0.0", + "_phantomChildren": {}, + "_requested": { + "name": "i", + "raw": "i@0.3.x", + "rawSpec": "0.3.x", + "scope": null, + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/utile" + ], + "_resolved": "https://registry.npmjs.org/i/-/i-0.3.3.tgz", + "_shasum": "0ff9a5eb743504aa8ac26a84f84c641287ff24cd", + "_shrinkwrap": null, + "_spec": "i@0.3.x", + "_where": "/home/mywebsite/node_modules/utile", + "author": { + "email": "pavan.sss1991@gmail.com", + "name": "Pavan Kumar Sunkara", + "url": "pksunkara.github.com" + }, + "bugs": { + "url": "https://github.com/pksunkara/inflect/issues" + }, + "contributors": [ + { + "name": "Pavan Kumar Sunkara", + "email": "pavan.sss1991@gmail.com" + } + ], + "dependencies": {}, + "description": "custom inflections for nodejs", + "devDependencies": { + "vows": "~0.6.1" + }, + "directories": {}, + "dist": { + "shasum": "0ff9a5eb743504aa8ac26a84f84c641287ff24cd", + "tarball": "http://registry.npmjs.org/i/-/i-0.3.3.tgz" + }, + "engines": { + "node": ">=0.4" + }, + "gitHead": "f6495e42873fe5b3ca80b060bc274662c3ed610b", + "homepage": "http://pksunkara.github.com/inflect", + "keywords": [ + "camelize", + "classify", + "dasherize", + "demodulize", + "foreign_key", + "ordinalize", + "plural", + "pluralize", + "singular", + "singularize", + "tableize", + "titleize", + "uncountable", + "underscore" + ], + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/pksunkara/inflect/raw/master/LICENSE" + } + ], + "main": "./lib/inflect", + "maintainers": [ + { + "name": "pksunkara", + "email": "pavan.sss1991@gmail.com" + } + ], + "name": "i", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/pksunkara/inflect.git" + }, + "scripts": { + "test": "vows --spec $(find test -name '*-test.js')" + }, + "version": "0.3.3" +} diff --git a/node_modules/i/test/inflector/cases.js b/node_modules/i/test/inflector/cases.js new file mode 100644 index 0000000..04c6030 --- /dev/null +++ b/node_modules/i/test/inflector/cases.js @@ -0,0 +1,209 @@ +(function() { + + module.exports = { + SingularToPlural: { + "search": "searches", + "switch": "switches", + "fix": "fixes", + "box": "boxes", + "process": "processes", + "address": "addresses", + "case": "cases", + "stack": "stacks", + "wish": "wishes", + "fish": "fish", + "jeans": "jeans", + "funky jeans": "funky jeans", + "my money": "my money", + "category": "categories", + "query": "queries", + "ability": "abilities", + "agency": "agencies", + "movie": "movies", + "archive": "archives", + "index": "indices", + "wife": "wives", + "safe": "saves", + "half": "halves", + "move": "moves", + "salesperson": "salespeople", + "person": "people", + "spokesman": "spokesmen", + "man": "men", + "woman": "women", + "basis": "bases", + "diagnosis": "diagnoses", + "diagnosis_a": "diagnosis_as", + "datum": "data", + "medium": "media", + "stadium": "stadia", + "analysis": "analyses", + "node_child": "node_children", + "child": "children", + "experience": "experiences", + "day": "days", + "comment": "comments", + "foobar": "foobars", + "newsletter": "newsletters", + "old_news": "old_news", + "news": "news", + "series": "series", + "species": "species", + "quiz": "quizzes", + "perspective": "perspectives", + "ox": "oxen", + "photo": "photos", + "buffalo": "buffaloes", + "tomato": "tomatoes", + "dwarf": "dwarves", + "elf": "elves", + "information": "information", + "equipment": "equipment", + "bus": "buses", + "status": "statuses", + "status_code": "status_codes", + "mouse": "mice", + "louse": "lice", + "house": "houses", + "octopus": "octopi", + "virus": "viri", + "alias": "aliases", + "portfolio": "portfolios", + "vertex": "vertices", + "matrix": "matrices", + "matrix_fu": "matrix_fus", + "axis": "axes", + "testis": "testes", + "crisis": "crises", + "rice": "rice", + "shoe": "shoes", + "horse": "horses", + "prize": "prizes", + "edge": "edges", + "cow": "kine", + "database": "databases" + }, + CamelToUnderscore: { + "Product": "product", + "SpecialGuest": "special_guest", + "ApplicationController": "application_controller", + "Area51Controller": "area51_controller" + }, + UnderscoreToLowerCamel: { + "product": "product", + "Widget": "widget", + "special_guest": "specialGuest", + "application_controller": "applicationController", + "area51_controller": "area51Controller" + }, + CamelToUnderscoreWithoutReverse: { + "HTMLTidy": "html_tidy", + "HTMLTidyGenerator": "html_tidy_generator", + "FreeBSD": "free_bsd", + "HTML": "html" + }, + CamelWithModuleToUnderscoreWithSlash: { + "Admin.Product": "admin/product", + "Users.Commission.Department": "users/commission/department", + "UsersSection.CommissionDepartment": "users_section/commission_department" + }, + ClassNameToForeignKeyWithUnderscore: { + "Person": "person_id", + "MyApplication.Billing.Account": "account_id" + }, + ClassNameToForeignKeyWithoutUnderscore: { + "Person": "personid", + "MyApplication.Billing.Account": "accountid" + }, + ClassNameToTableName: { + "PrimarySpokesman": "primary_spokesmen", + "NodeChild": "node_children" + }, + UnderscoreToHuman: { + "employee_salary": "Employee salary", + "employee_id": "Employee", + "underground": "Underground" + }, + MixtureToTitleCase: { + 'bullet_record': 'Bullet Record', + 'BulletRecord': 'Bullet Record', + 'bullet web service': 'Bullet Web Service', + 'Bullet Web Service': 'Bullet Web Service', + 'Bullet web service': 'Bullet Web Service', + 'bulletwebservice': 'Bulletwebservice', + 'Bulletwebservice': 'Bulletwebservice', + "pavan's code": "Pavan's Code", + "Pavan's code": "Pavan's Code", + "pavan's Code": "Pavan's Code" + }, + OrdinalNumbers: { + "-1": "-1st", + "-2": "-2nd", + "-3": "-3rd", + "-4": "-4th", + "-5": "-5th", + "-6": "-6th", + "-7": "-7th", + "-8": "-8th", + "-9": "-9th", + "-10": "-10th", + "-11": "-11th", + "-12": "-12th", + "-13": "-13th", + "-14": "-14th", + "-20": "-20th", + "-21": "-21st", + "-22": "-22nd", + "-23": "-23rd", + "-24": "-24th", + "-100": "-100th", + "-101": "-101st", + "-102": "-102nd", + "-103": "-103rd", + "-104": "-104th", + "-110": "-110th", + "-111": "-111th", + "-112": "-112th", + "-113": "-113th", + "-1000": "-1000th", + "-1001": "-1001st", + "0": "0th", + "1": "1st", + "2": "2nd", + "3": "3rd", + "4": "4th", + "5": "5th", + "6": "6th", + "7": "7th", + "8": "8th", + "9": "9th", + "10": "10th", + "11": "11th", + "12": "12th", + "13": "13th", + "14": "14th", + "20": "20th", + "21": "21st", + "22": "22nd", + "23": "23rd", + "24": "24th", + "100": "100th", + "101": "101st", + "102": "102nd", + "103": "103rd", + "104": "104th", + "110": "110th", + "111": "111th", + "112": "112th", + "113": "113th", + "1000": "1000th", + "1001": "1001st" + }, + UnderscoresToDashes: { + "street": "street", + "street_address": "street-address", + "person_street_address": "person-street-address" + } + }; + +}).call(this); diff --git a/node_modules/i/test/inflector/inflections-test.js b/node_modules/i/test/inflector/inflections-test.js new file mode 100644 index 0000000..be8d960 --- /dev/null +++ b/node_modules/i/test/inflector/inflections-test.js @@ -0,0 +1,87 @@ +(function() { + var assert, vows; + + vows = require('vows'); + + assert = require('assert'); + + vows.describe('Module Inflector inflections').addBatch({ + 'Test inflector inflections': { + topic: require('../../lib/inflections'), + 'clear': { + 'single': function(topic) { + topic.uncountables = [1, 2, 3]; + topic.humans = [1, 2, 3]; + topic.clear('uncountables'); + assert.isEmpty(topic.uncountables); + return assert.deepEqual(topic.humans, [1, 2, 3]); + }, + 'all': function(topic) { + assert.deepEqual(topic.humans, [1, 2, 3]); + topic.uncountables = [1, 2, 3]; + topic.clear(); + assert.isEmpty(topic.uncountables); + return assert.isEmpty(topic.humans); + } + }, + 'uncountable': { + 'one item': function(topic) { + topic.clear(); + assert.isEmpty(topic.uncountables); + topic.uncountable('money'); + return assert.deepEqual(topic.uncountables, ['money']); + }, + 'many items': function(topic) { + topic.clear(); + assert.isEmpty(topic.uncountables); + topic.uncountable(['money', 'rice']); + return assert.deepEqual(topic.uncountables, ['money', 'rice']); + } + }, + 'human': function(topic) { + topic.clear(); + assert.isEmpty(topic.humans); + topic.human("legacy_col_person_name", "Name"); + return assert.deepEqual(topic.humans, [["legacy_col_person_name", "Name"]]); + }, + 'plural': function(topic) { + topic.clear(); + assert.isEmpty(topic.plurals); + topic.plural('ox', 'oxen'); + assert.deepEqual(topic.plurals, [['ox', 'oxen']]); + topic.uncountable('money'); + assert.deepEqual(topic.uncountables, ['money']); + topic.uncountable('monies'); + topic.plural('money', 'monies'); + assert.deepEqual(topic.plurals, [['money', 'monies'], ['ox', 'oxen']]); + return assert.isEmpty(topic.uncountables); + }, + 'singular': function(topic) { + topic.clear(); + assert.isEmpty(topic.singulars); + topic.singular('ox', 'oxen'); + assert.deepEqual(topic.singulars, [['ox', 'oxen']]); + topic.uncountable('money'); + assert.deepEqual(topic.uncountables, ['money']); + topic.uncountable('monies'); + topic.singular('money', 'monies'); + assert.deepEqual(topic.singulars, [['money', 'monies'], ['ox', 'oxen']]); + return assert.isEmpty(topic.uncountables); + }, + 'irregular': function(topic) { + topic.clear(); + topic.uncountable(['octopi', 'octopus']); + assert.deepEqual(topic.uncountables, ['octopi', 'octopus']); + topic.irregular('octopus', 'octopi'); + assert.isEmpty(topic.uncountables); + assert.equal(topic.singulars[0][0].toString(), /(o)ctopi$/i.toString()); + assert.equal(topic.singulars[0][1], '$1ctopus'); + assert.equal(topic.plurals[0][0].toString(), /(o)ctopi$/i.toString()); + assert.equal(topic.plurals[0][1], '$1ctopi'); + assert.equal(topic.plurals[1][0].toString(), /(o)ctopus$/i.toString()); + return assert.equal(topic.plurals[1][1].toString(), '$1ctopi'); + } + } + })["export"](module); + +}).call(this); diff --git a/node_modules/i/test/inflector/methods-test.js b/node_modules/i/test/inflector/methods-test.js new file mode 100644 index 0000000..d3f0c84 --- /dev/null +++ b/node_modules/i/test/inflector/methods-test.js @@ -0,0 +1,342 @@ +(function() { + var assert, cases, vows, util; + + vows = require('vows'); + + assert = require('assert'); + + util = require('../../lib/util'); + + cases = require('./cases'); + + vows.describe('Module Inflector methods').addBatch({ + 'Test inflector method': { + topic: require('../../lib/methods'), + 'camelize': { + 'word': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.CamelToUnderscore; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.camelize(words[i]), i)); + } + return _results; + }, + 'word with first letter lower': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.UnderscoreToLowerCamel; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.camelize(i, false), words[i])); + } + return _results; + }, + 'path': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.CamelWithModuleToUnderscoreWithSlash; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.camelize(words[i]), i)); + } + return _results; + }, + 'path with first letter lower': function(topic) { + return assert.equal(topic.camelize('bullet_record/errors', false), 'bulletRecord.Errors'); + } + }, + 'underscore': { + 'word': function(topic) { + var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; + words = cases.CamelToUnderscore; + _ref = Object.keys(words); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + assert.equal(topic.underscore(i), words[i]); + } + words = cases.CamelToUnderscoreWithoutReverse; + _ref2 = Object.keys(words); + _results = []; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + i = _ref2[_j]; + _results.push(assert.equal(topic.underscore(i), words[i])); + } + return _results; + }, + 'path': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.CamelWithModuleToUnderscoreWithSlash; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.underscore(i), words[i])); + } + return _results; + }, + 'from dasherize': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.UnderscoresToDashes; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.underscore(topic.dasherize(i)), i)); + } + return _results; + } + }, + 'dasherize': { + 'underscored_word': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.UnderscoresToDashes; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.dasherize(i), words[i])); + } + return _results; + } + }, + 'demodulize': { + 'module name': function(topic) { + return assert.equal(topic.demodulize('BulletRecord.CoreExtensions.Inflections'), 'Inflections'); + }, + 'isolated module name': function(topic) { + return assert.equal(topic.demodulize('Inflections'), 'Inflections'); + } + }, + 'foreign_key': { + 'normal': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.ClassNameToForeignKeyWithoutUnderscore; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.foreign_key(i, false), words[i])); + } + return _results; + }, + 'with_underscore': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.ClassNameToForeignKeyWithUnderscore; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.foreign_key(i), words[i])); + } + return _results; + } + }, + 'ordinalize': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.OrdinalNumbers; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.ordinalize(i), words[i])); + } + return _results; + } + } + }).addBatch({ + 'Test inflector inflection methods': { + topic: function() { + var Inflector; + Inflector = require('../../lib/methods'); + Inflector.inflections["default"](); + return Inflector; + }, + 'pluralize': { + 'empty': function(topic) { + return assert.equal(topic.pluralize(''), ''); + }, + 'uncountable': function(topic) { + return assert.equal(topic.pluralize('money'), 'money'); + }, + 'normal': function(topic) { + topic.inflections.irregular('octopus', 'octopi'); + return assert.equal(topic.pluralize('octopus'), 'octopi'); + }, + 'cases': function(topic) { + var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; + words = cases.SingularToPlural; + _ref = Object.keys(words); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + assert.equal(topic.pluralize(i), words[i]); + } + _ref2 = Object.keys(words); + _results = []; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + i = _ref2[_j]; + _results.push(assert.equal(topic.pluralize(util.string.capitalize(i)), util.string.capitalize(words[i]))); + } + return _results; + }, + 'cases plural': function(topic) { + var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; + words = cases.SingularToPlural; + _ref = Object.keys(words); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + assert.equal(topic.pluralize(words[i]), words[i]); + } + _ref2 = Object.keys(words); + _results = []; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + i = _ref2[_j]; + _results.push(assert.equal(topic.pluralize(util.string.capitalize(words[i])), util.string.capitalize(words[i]))); + } + return _results; + } + }, + 'singuralize': { + 'empty': function(topic) { + return assert.equal(topic.singularize(''), ''); + }, + 'uncountable': function(topic) { + return assert.equal(topic.singularize('money'), 'money'); + }, + 'normal': function(topic) { + topic.inflections.irregular('octopus', 'octopi'); + return assert.equal(topic.singularize('octopi'), 'octopus'); + }, + 'cases': function(topic) { + var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; + words = cases.SingularToPlural; + _ref = Object.keys(words); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + assert.equal(topic.singularize(words[i]), i); + } + _ref2 = Object.keys(words); + _results = []; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + i = _ref2[_j]; + _results.push(assert.equal(topic.singularize(util.string.capitalize(words[i])), util.string.capitalize(i))); + } + return _results; + } + }, + 'uncountablility': { + 'normal': function(topic) { + var i, words, _i, _j, _k, _len, _len2, _len3, _results; + words = topic.inflections.uncountables; + for (_i = 0, _len = words.length; _i < _len; _i++) { + i = words[_i]; + assert.equal(topic.singularize(i), i); + } + for (_j = 0, _len2 = words.length; _j < _len2; _j++) { + i = words[_j]; + assert.equal(topic.pluralize(i), i); + } + _results = []; + for (_k = 0, _len3 = words.length; _k < _len3; _k++) { + i = words[_k]; + _results.push(assert.equal(topic.singularize(i), topic.pluralize(i))); + } + return _results; + }, + 'greedy': function(topic) { + var countable_word, uncountable_word; + uncountable_word = "ors"; + countable_word = "sponsor"; + topic.inflections.uncountable(uncountable_word); + assert.equal(topic.singularize(uncountable_word), uncountable_word); + assert.equal(topic.pluralize(uncountable_word), uncountable_word); + assert.equal(topic.pluralize(uncountable_word), topic.singularize(uncountable_word)); + assert.equal(topic.singularize(countable_word), 'sponsor'); + assert.equal(topic.pluralize(countable_word), 'sponsors'); + return assert.equal(topic.singularize(topic.pluralize(countable_word)), 'sponsor'); + } + }, + 'humanize': { + 'normal': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.UnderscoreToHuman; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.humanize(i), words[i])); + } + return _results; + }, + 'with rule': function(topic) { + topic.inflections.human(/^(.*)_cnt$/i, '$1_count'); + topic.inflections.human(/^prefix_(.*)$/i, '$1'); + assert.equal(topic.humanize('jargon_cnt'), 'Jargon count'); + return assert.equal(topic.humanize('prefix_request'), 'Request'); + }, + 'with string': function(topic) { + topic.inflections.human('col_rpted_bugs', 'Reported bugs'); + assert.equal(topic.humanize('col_rpted_bugs'), 'Reported bugs'); + return assert.equal(topic.humanize('COL_rpted_bugs'), 'Col rpted bugs'); + }, + 'with _id': function(topic) { + return assert.equal(topic.humanize('author_id'), 'Author'); + } + }, + 'titleize': { + 'normal': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.MixtureToTitleCase; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.titleize(i), words[i])); + } + return _results; + }, + 'with hyphens': function(topic) { + return assert.equal(topic.titleize('x-men: the last stand'), 'X Men: The Last Stand'); + } + }, + 'tableize': function(topic) { + var i, words, _i, _len, _ref, _results; + words = cases.ClassNameToTableName; + _ref = Object.keys(words); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + _results.push(assert.equal(topic.tableize(i), words[i])); + } + return _results; + }, + 'classify': { + 'underscore': function(topic) { + var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; + words = cases.ClassNameToTableName; + _ref = Object.keys(words); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + assert.equal(topic.classify(words[i]), i); + } + _ref2 = Object.keys(words); + _results = []; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + i = _ref2[_j]; + _results.push(assert.equal(topic.classify('table_prefix.' + words[i]), i)); + } + return _results; + }, + 'normal': function(topic) { + topic.inflections.irregular('octopus', 'octopi'); + return assert.equal(topic.classify('octopi'), 'Octopus'); + } + } + } + })["export"](module); + +}).call(this); diff --git a/node_modules/i/test/utils/array-test.js b/node_modules/i/test/utils/array-test.js new file mode 100644 index 0000000..95ba2bc --- /dev/null +++ b/node_modules/i/test/utils/array-test.js @@ -0,0 +1,39 @@ +(function() { + var assert, vows, util; + + vows = require('vows'); + + assert = require('assert'); + + util = require('../../lib/util'); + + vows.describe('Module core extension Array').addBatch({ + 'Testing del': { + topic: ['a', 'b', 'c'], + 'element exists': { + 'first element': function(topic) { + return assert.deepEqual(util.array.del(topic, 'a'), ['b', 'c']); + }, + 'middle element': function(topic) { + return assert.deepEqual(util.array.del(topic, 'b'), ['a', 'c']); + }, + 'last element': function(topic) { + return assert.deepEqual(util.array.del(topic, 'c'), ['a', 'b']); + } + }, + 'element does not exist': function(topic) { + return assert.deepEqual(util.array.del(topic, 'd'), ['a', 'b', 'c']); + } + }, + 'Testing utils': { + topic: ['a', 'b', 'c'], + 'first': function(topic) { + return assert.equal(util.array.first(topic), 'a'); + }, + 'last': function(topic) { + return assert.equal(util.array.last(topic), 'c'); + } + } + })["export"](module); + +}).call(this); diff --git a/node_modules/i/test/utils/string-test.js b/node_modules/i/test/utils/string-test.js new file mode 100644 index 0000000..e932233 --- /dev/null +++ b/node_modules/i/test/utils/string-test.js @@ -0,0 +1,88 @@ +(function() { + var assert, vows, util; + + vows = require('vows'); + + assert = require('assert'); + + util = require('../../lib/util'); + + vows.describe('Module core extension String').addBatch({ + 'Testing value': { + topic: 'bullet', + 'join the keys': function(topic) { + return assert.equal(util.string.value(topic), 'bullet'); + } + }, + 'Testing gsub': { + topic: 'bullet', + 'when no args': function(topic) { + return assert.equal(util.string.gsub(topic), 'bullet'); + }, + 'when only 1 arg': function(topic) { + return assert.equal(util.string.gsub(topic, /./), 'bullet'); + }, + 'when given proper args': function(topic) { + return assert.equal(util.string.gsub(topic, /[aeiou]/, '*'), 'b*ll*t'); + }, + 'when replacement is a function': { + 'with many groups': function(topic) { + var str; + str = util.string.gsub(topic, /([aeiou])(.)/, function($) { + return "<" + $[1] + ">" + $[2]; + }); + return assert.equal(str, 'bllt'); + }, + 'with no groups': function(topic) { + var str; + str = util.string.gsub(topic, /[aeiou]/, function($) { + return "<" + $[1] + ">"; + }); + return assert.equal(str, 'bllt'); + } + }, + 'when replacement is special': { + 'with many groups': function(topic) { + return assert.equal(util.string.gsub(topic, /([aeiou])(.)/, '<$1>$2'), 'bllt'); + }, + 'with no groups': function(topic) { + return assert.equal(util.string.gsub(topic, /[aeiou]/, '<$1>'), 'bllt'); + } + } + }, + 'Testing capitalize': { + topic: 'employee salary', + 'normal': function(topic) { + return assert.equal(util.string.capitalize(topic), 'Employee Salary'); + } + }, + 'Testing upcase': { + topic: 'bullet', + 'only first letter should be upcase': function(topic) { + return assert.equal(util.string.upcase(topic), 'Bullet'); + }, + 'letter after underscore': function(topic) { + return assert.equal(util.string.upcase('bullet_record'), 'Bullet_Record'); + }, + 'letter after slash': function(topic) { + return assert.equal(util.string.upcase('bullet_record/errors'), 'Bullet_Record/Errors'); + }, + 'no letter after space': function(topic) { + return assert.equal(util.string.upcase('employee salary'), 'Employee salary'); + } + }, + 'Testing downcase': { + topic: 'BULLET', + 'only first letter should be downcase': function(topic) { + return assert.equal(util.string.downcase(topic), 'bULLET'); + }, + 'letter after underscore': function(topic) { + return assert.equal(util.string.downcase('BULLET_RECORD'), 'bULLET_rECORD'); + }, + 'letter after slash': function(topic) { + return assert.equal(util.string.downcase('BULLET_RECORD/ERRORS'), 'bULLET_rECORD/eRRORS'); + } + } + })["export"](module); + +}).call(this); diff --git a/node_modules/inflight/.eslintrc b/node_modules/inflight/.eslintrc new file mode 100644 index 0000000..b7a1550 --- /dev/null +++ b/node_modules/inflight/.eslintrc @@ -0,0 +1,17 @@ +{ + "env" : { + "node" : true + }, + "rules" : { + "semi": [2, "never"], + "strict": 0, + "quotes": [1, "single", "avoid-escape"], + "no-use-before-define": 0, + "curly": 0, + "no-underscore-dangle": 0, + "no-lonely-if": 1, + "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}], + "no-mixed-requires": 0, + "space-infix-ops": 0 + } +} diff --git a/node_modules/inflight/LICENSE b/node_modules/inflight/LICENSE new file mode 100644 index 0000000..05eeeb8 --- /dev/null +++ b/node_modules/inflight/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/inflight/README.md b/node_modules/inflight/README.md new file mode 100644 index 0000000..6dc8929 --- /dev/null +++ b/node_modules/inflight/README.md @@ -0,0 +1,37 @@ +# inflight + +Add callbacks to requests in flight to avoid async duplication + +## USAGE + +```javascript +var inflight = require('inflight') + +// some request that does some stuff +function req(key, callback) { + // key is any random string. like a url or filename or whatever. + // + // will return either a falsey value, indicating that the + // request for this key is already in flight, or a new callback + // which when called will call all callbacks passed to inflightk + // with the same key + callback = inflight(key, callback) + + // If we got a falsey value back, then there's already a req going + if (!callback) return + + // this is where you'd fetch the url or whatever + // callback is also once()-ified, so it can safely be assigned + // to multiple events etc. First call wins. + setTimeout(function() { + callback(null, key) + }, 100) +} + +// only assigns a single setTimeout +// when it dings, all cbs get called +req('foo', cb1) +req('foo', cb2) +req('foo', cb3) +req('foo', cb4) +``` diff --git a/node_modules/inflight/inflight.js b/node_modules/inflight/inflight.js new file mode 100644 index 0000000..8bc96cb --- /dev/null +++ b/node_modules/inflight/inflight.js @@ -0,0 +1,44 @@ +var wrappy = require('wrappy') +var reqs = Object.create(null) +var once = require('once') + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/node_modules/inflight/package.json b/node_modules/inflight/package.json new file mode 100644 index 0000000..debafd2 --- /dev/null +++ b/node_modules/inflight/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "inflight@^1.0.4", + "/home/mywebsite/node_modules/glob" + ] + ], + "_from": "inflight@>=1.0.4 <2.0.0", + "_id": "inflight@1.0.4", + "_inCache": true, + "_installable": true, + "_location": "/inflight", + "_nodeVersion": "0.10.32", + "_npmUser": { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + "_npmVersion": "2.1.3", + "_phantomChildren": {}, + "_requested": { + "name": "inflight", + "raw": "inflight@^1.0.4", + "rawSpec": "^1.0.4", + "scope": null, + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", + "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "_shrinkwrap": null, + "_spec": "inflight@^1.0.4", + "_where": "/home/mywebsite/node_modules/glob", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "description": "Add callbacks to requests in flight to avoid async duplication", + "devDependencies": { + "tap": "^0.4.10" + }, + "directories": {}, + "dist": { + "shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "tarball": "http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" + }, + "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "main": "inflight.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "name": "inflight", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inflight.git" + }, + "scripts": { + "test": "tap test.js" + }, + "version": "1.0.4" +} diff --git a/node_modules/inflight/test.js b/node_modules/inflight/test.js new file mode 100644 index 0000000..2bb75b3 --- /dev/null +++ b/node_modules/inflight/test.js @@ -0,0 +1,97 @@ +var test = require('tap').test +var inf = require('./inflight.js') + + +function req (key, cb) { + cb = inf(key, cb) + if (cb) setTimeout(function () { + cb(key) + cb(key) + }) + return cb +} + +test('basic', function (t) { + var calleda = false + var a = req('key', function (k) { + t.notOk(calleda) + calleda = true + t.equal(k, 'key') + if (calledb) t.end() + }) + t.ok(a, 'first returned cb function') + + var calledb = false + var b = req('key', function (k) { + t.notOk(calledb) + calledb = true + t.equal(k, 'key') + if (calleda) t.end() + }) + + t.notOk(b, 'second should get falsey inflight response') +}) + +test('timing', function (t) { + var expect = [ + 'method one', + 'start one', + 'end one', + 'two', + 'tick', + 'three' + ] + var i = 0 + + function log (m) { + t.equal(m, expect[i], m + ' === ' + expect[i]) + ++i + if (i === expect.length) + t.end() + } + + function method (name, cb) { + log('method ' + name) + process.nextTick(cb) + } + + var one = inf('foo', function () { + log('start one') + var three = inf('foo', function () { + log('three') + }) + if (three) method('three', three) + log('end one') + }) + + method('one', one) + + var two = inf('foo', function () { + log('two') + }) + if (two) method('one', two) + + process.nextTick(log.bind(null, 'tick')) +}) + +test('parameters', function (t) { + t.plan(8) + + var a = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.ok(a, 'first returned cb function') + + var b = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.notOk(b, 'second should get falsey inflight response') + + setTimeout(function () { + a(1, 2, 3) + }) +}) diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/node_modules/inherits/README.md b/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js new file mode 100644 index 0000000..29f5e24 --- /dev/null +++ b/node_modules/inherits/inherits.js @@ -0,0 +1 @@ +module.exports = require('util').inherits diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..c1e78a7 --- /dev/null +++ b/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json new file mode 100644 index 0000000..749426e --- /dev/null +++ b/node_modules/inherits/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "inherits@2", + "/home/mywebsite/node_modules/glob" + ] + ], + "_from": "inherits@>=2.0.0 <3.0.0", + "_id": "inherits@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/inherits", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "1.3.8", + "_phantomChildren": {}, + "_requested": { + "name": "inherits", + "raw": "inherits@2", + "rawSpec": "2", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar", + "/glob", + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_shrinkwrap": null, + "_spec": "inherits@2", + "_where": "/home/mywebsite/node_modules/glob", + "browser": "./inherits_browser.js", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "dependencies": {}, + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "homepage": "https://github.com/isaacs/inherits#readme", + "keywords": [ + "browser", + "browserify", + "class", + "inheritance", + "inherits", + "klass", + "object-oriented", + "oop" + ], + "license": "ISC", + "main": "./inherits.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "inherits", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.0.1" +} diff --git a/node_modules/inherits/test.js b/node_modules/inherits/test.js new file mode 100644 index 0000000..fc53012 --- /dev/null +++ b/node_modules/inherits/test.js @@ -0,0 +1,25 @@ +var inherits = require('./inherits.js') +var assert = require('assert') + +function test(c) { + assert(c.constructor === Child) + assert(c.constructor.super_ === Parent) + assert(Object.getPrototypeOf(c) === Child.prototype) + assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) + assert(c instanceof Child) + assert(c instanceof Parent) +} + +function Child() { + Parent.call(this) + test(this) +} + +function Parent() {} + +inherits(Child, Parent) + +var c = new Child +test(c) + +console.log('ok') diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/LICENSE b/node_modules/ini/LICENSE similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/minimatch/node_modules/sigmund/LICENSE rename to node_modules/ini/LICENSE diff --git a/node_modules/ini/README.md b/node_modules/ini/README.md new file mode 100644 index 0000000..33df258 --- /dev/null +++ b/node_modules/ini/README.md @@ -0,0 +1,102 @@ +An ini format parser and serializer for node. + +Sections are treated as nested objects. Items before the first +heading are saved on the object directly. + +## Usage + +Consider an ini-file `config.ini` that looks like this: + + ; this comment is being ignored + scope = global + + [database] + user = dbuser + password = dbpassword + database = use_this_database + + [paths.default] + datadir = /var/lib/data + array[] = first value + array[] = second value + array[] = third value + +You can read, manipulate and write the ini-file like so: + + var fs = require('fs') + , ini = require('ini') + + var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')) + + config.scope = 'local' + config.database.database = 'use_another_database' + config.paths.default.tmpdir = '/tmp' + delete config.paths.default.datadir + config.paths.default.array.push('fourth value') + + fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' })) + +This will result in a file called `config_modified.ini` being written +to the filesystem with the following content: + + [section] + scope=local + [section.database] + user=dbuser + password=dbpassword + database=use_another_database + [section.paths.default] + tmpdir=/tmp + array[]=first value + array[]=second value + array[]=third value + array[]=fourth value + + +## API + +### decode(inistring) + +Decode the ini-style formatted `inistring` into a nested object. + +### parse(inistring) + +Alias for `decode(inistring)` + +### encode(object, [options]) + +Encode the object `object` into an ini-style formatted string. If the +optional parameter `section` is given, then all top-level properties +of the object are put into this section and the `section`-string is +prepended to all sub-sections, see the usage example above. + +The `options` object may contain the following: + +* `section` A string which will be the first `section` in the encoded + ini data. Defaults to none. +* `whitespace` Boolean to specify whether to put whitespace around the + `=` character. By default, whitespace is omitted, to be friendly to + some persnickety old parsers that don't tolerate it well. But some + find that it's more human-readable and pretty with the whitespace. + +For backwards compatibility reasons, if a `string` options is passed +in, then it is assumed to be the `section` value. + +### stringify(object, [options]) + +Alias for `encode(object, [options])` + +### safe(val) + +Escapes the string `val` such that it is safe to be used as a key or +value in an ini-file. Basically escapes quotes. For example + + ini.safe('"unsafe string"') + +would result in + + "\"unsafe string\"" + +### unsafe(val) + +Unescapes the string `val` diff --git a/node_modules/ini/ini.js b/node_modules/ini/ini.js new file mode 100644 index 0000000..ddf5bd9 --- /dev/null +++ b/node_modules/ini/ini.js @@ -0,0 +1,190 @@ + +exports.parse = exports.decode = decode +exports.stringify = exports.encode = encode + +exports.safe = safe +exports.unsafe = unsafe + +var eol = process.platform === "win32" ? "\r\n" : "\n" + +function encode (obj, opt) { + var children = [] + , out = "" + + if (typeof opt === "string") { + opt = { + section: opt, + whitespace: false + } + } else { + opt = opt || {} + opt.whitespace = opt.whitespace === true + } + + var separator = opt.whitespace ? " = " : "=" + + Object.keys(obj).forEach(function (k, _, __) { + var val = obj[k] + if (val && Array.isArray(val)) { + val.forEach(function(item) { + out += safe(k + "[]") + separator + safe(item) + "\n" + }) + } + else if (val && typeof val === "object") { + children.push(k) + } else { + out += safe(k) + separator + safe(val) + eol + } + }) + + if (opt.section && out.length) { + out = "[" + safe(opt.section) + "]" + eol + out + } + + children.forEach(function (k, _, __) { + var nk = dotSplit(k).join('\\.') + var section = (opt.section ? opt.section + "." : "") + nk + var child = encode(obj[k], { + section: section, + whitespace: opt.whitespace + }) + if (out.length && child.length) { + out += eol + } + out += child + }) + + return out +} + +function dotSplit (str) { + return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') + .replace(/\\\./g, '\u0001') + .split(/\./).map(function (part) { + return part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') + }) +} + +function decode (str) { + var out = {} + , p = out + , section = null + , state = "START" + // section |key = value + , re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i + , lines = str.split(/[\r\n]+/g) + , section = null + + lines.forEach(function (line, _, __) { + if (!line || line.match(/^\s*[;#]/)) return + var match = line.match(re) + if (!match) return + if (match[1] !== undefined) { + section = unsafe(match[1]) + p = out[section] = out[section] || {} + return + } + var key = unsafe(match[2]) + , value = match[3] ? unsafe((match[4] || "")) : true + switch (value) { + case 'true': + case 'false': + case 'null': value = JSON.parse(value) + } + + // Convert keys with '[]' suffix to an array + if (key.length > 2 && key.slice(-2) === "[]") { + key = key.substring(0, key.length - 2) + if (!p[key]) { + p[key] = [] + } + else if (!Array.isArray(p[key])) { + p[key] = [p[key]] + } + } + + // safeguard against resetting a previously defined + // array by accidentally forgetting the brackets + if (Array.isArray(p[key])) { + p[key].push(value) + } + else { + p[key] = value + } + }) + + // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} + // use a filter to return the keys that have to be deleted. + Object.keys(out).filter(function (k, _, __) { + if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k])) return false + // see if the parent section is also an object. + // if so, add it to that, and mark this one for deletion + var parts = dotSplit(k) + , p = out + , l = parts.pop() + , nl = l.replace(/\\\./g, '.') + parts.forEach(function (part, _, __) { + if (!p[part] || typeof p[part] !== "object") p[part] = {} + p = p[part] + }) + if (p === out && nl === l) return false + p[nl] = out[k] + return true + }).forEach(function (del, _, __) { + delete out[del] + }) + + return out +} + +function isQuoted (val) { + return (val.charAt(0) === "\"" && val.slice(-1) === "\"") + || (val.charAt(0) === "'" && val.slice(-1) === "'") +} + +function safe (val) { + return ( typeof val !== "string" + || val.match(/[=\r\n]/) + || val.match(/^\[/) + || (val.length > 1 + && isQuoted(val)) + || val !== val.trim() ) + ? JSON.stringify(val) + : val.replace(/;/g, '\\;').replace(/#/g, "\\#") +} + +function unsafe (val, doUnesc) { + val = (val || "").trim() + if (isQuoted(val)) { + // remove the single quotes before calling JSON.parse + if (val.charAt(0) === "'") { + val = val.substr(1, val.length - 2); + } + try { val = JSON.parse(val) } catch (_) {} + } else { + // walk the val to find the first not-escaped ; character + var esc = false + var unesc = ""; + for (var i = 0, l = val.length; i < l; i++) { + var c = val.charAt(i) + if (esc) { + if ("\\;#".indexOf(c) !== -1) + unesc += c + else + unesc += "\\" + c + esc = false + } else if (";#".indexOf(c) !== -1) { + break + } else if (c === "\\") { + esc = true + } else { + unesc += c + } + } + if (esc) + unesc += "\\" + return unesc + } + return val +} diff --git a/node_modules/ini/package.json b/node_modules/ini/package.json new file mode 100644 index 0000000..8e8a2fc --- /dev/null +++ b/node_modules/ini/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "ini@1.x.x", + "/home/mywebsite/node_modules/nconf" + ] + ], + "_from": "ini@>=1.0.0 <2.0.0", + "_id": "ini@1.3.4", + "_inCache": true, + "_installable": true, + "_location": "/ini", + "_nodeVersion": "2.0.1", + "_npmUser": { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "ini", + "raw": "ini@1.x.x", + "rawSpec": "1.x.x", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/nconf" + ], + "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "_shasum": "0537cb79daf59b59a1a517dff706c86ec039162e", + "_shrinkwrap": null, + "_spec": "ini@1.x.x", + "_where": "/home/mywebsite/node_modules/nconf", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/ini/issues" + }, + "dependencies": {}, + "description": "An ini encoder/decoder for node", + "devDependencies": { + "tap": "^1.2.0" + }, + "directories": {}, + "dist": { + "shasum": "0537cb79daf59b59a1a517dff706c86ec039162e", + "tarball": "http://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "ini.js" + ], + "gitHead": "4a3001abc4c608e51add9f1d2b2cadf02b8e6dea", + "homepage": "https://github.com/isaacs/ini#readme", + "license": "ISC", + "main": "ini.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "ini", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/ini.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.3.4" +} diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js new file mode 100644 index 0000000..6c8c7e7 --- /dev/null +++ b/node_modules/is-binary-path/index.js @@ -0,0 +1,12 @@ +'use strict'; +var path = require('path'); +var binaryExtensions = require('binary-extensions'); +var exts = Object.create(null); + +binaryExtensions.forEach(function (el) { + exts[el] = true; +}); + +module.exports = function (filepath) { + return path.extname(filepath).slice(1).toLowerCase() in exts; +}; diff --git a/node_modules/is-binary-path/license b/node_modules/is-binary-path/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-binary-path/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json new file mode 100644 index 0000000..4197fe9 --- /dev/null +++ b/node_modules/is-binary-path/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + "is-binary-path@^1.0.0", + "/home/mywebsite/node_modules/chokidar" + ] + ], + "_from": "is-binary-path@>=1.0.0 <2.0.0", + "_id": "is-binary-path@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/is-binary-path", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-binary-path", + "raw": "is-binary-path@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "_shasum": "75f16642b480f187a711c814161fd3a4a7655898", + "_shrinkwrap": null, + "_spec": "is-binary-path@^1.0.0", + "_where": "/home/mywebsite/node_modules/chokidar", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-binary-path/issues" + }, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "description": "Check if a filepath is a binary file", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "75f16642b480f187a711c814161fd3a4a7655898", + "tarball": "http://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "ed26bd7be5e29dad159c2771cb99dd48913f9de0", + "homepage": "https://github.com/sindresorhus/is-binary-path", + "keywords": [ + "bin", + "binary", + "check", + "detect", + "ext", + "extension", + "extensions", + "file", + "is", + "path" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "paulmillr", + "email": "paul@paulmillr.com" + }, + { + "name": "es128", + "email": "elan.shanker+npm@gmail.com" + } + ], + "name": "is-binary-path", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-binary-path.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.1" +} diff --git a/node_modules/is-binary-path/readme.md b/node_modules/is-binary-path/readme.md new file mode 100644 index 0000000..a17d6a2 --- /dev/null +++ b/node_modules/is-binary-path/readme.md @@ -0,0 +1,34 @@ +# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) + +> Check if a filepath is a binary file + + +## Install + +``` +$ npm install --save is-binary-path +``` + + +## Usage + +```js +var isBinaryPath = require('is-binary-path'); + +isBinaryPath('src/unicorn.png'); +//=> true + +isBinaryPath('src/unicorn.txt'); +//=> false +``` + + +## Related + +- [`binary-extensions`](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions +- [`is-text-path`](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-buffer/.travis.yml b/node_modules/is-buffer/.travis.yml new file mode 100644 index 0000000..8803fc1 --- /dev/null +++ b/node_modules/is-buffer/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: +- 'iojs' +env: + global: + - secure: du27W3wTgZ3G183axW7w0I01lOIurx8kilMH9p45VMfNXCu8lo6FLtLIQZxJ1FYMoJLQ1yfJTu2G0rq39SotDfJumsk6tF7BjTY/HKCocZaHqCMgw0W2bcylb5kMAdLhBNPlzejpPoWa1x1axbAHNFOLQNVosG/Bavu3/kuIIps= + - secure: Ax/5aekM40o67NuTkvQqx1DhfP86ZlHTtKbv5yI+WFmbjD3FQM8b8G1J/o7doaBDev7Mp+1zDJOK2pFGtt+JGRl0lM2JUmLh6yh/b28obXyei5iuUkqzKJLfKZHMbY5QW/1i4DUM+zSXe6Kava0qnqYg5wBBnrF6gLdsVsCGNQk= diff --git a/node_modules/is-buffer/.zuul.yml b/node_modules/is-buffer/.zuul.yml new file mode 100644 index 0000000..7b84b05 --- /dev/null +++ b/node_modules/is-buffer/.zuul.yml @@ -0,0 +1,18 @@ +ui: tape +browsers: + - name: chrome + version: 39..latest + - name: firefox + version: 34..latest + - name: safari + version: 5..latest + - name: ie + version: 8..latest + - name: opera + version: 11..latest + - name: iphone + version: 5.1..latest + - name: ipad + version: 5.1..latest + - name: android + version: 5.0..latest diff --git a/node_modules/is-buffer/LICENSE b/node_modules/is-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/node_modules/is-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-buffer/README.md b/node_modules/is-buffer/README.md new file mode 100644 index 0000000..82f7fcf --- /dev/null +++ b/node_modules/is-buffer/README.md @@ -0,0 +1,49 @@ +# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] + +#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (incl. [browser Buffers](https://github.com/feross/buffer)) + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg?style=flat +[travis-url]: https://travis-ci.org/feross/is-buffer +[npm-image]: https://img.shields.io/npm/v/is-buffer.svg?style=flat +[npm-url]: https://npmjs.org/package/is-buffer +[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg?style=flat +[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg +[saucelabs-url]: https://saucelabs.com/u/is-buffer + +## Why not use `Buffer.isBuffer`? + +This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). + +It's future-proof and works in node too! + +## install + +```bash +npm install is-buffer +``` + +## usage + +```js +var isBuffer = require('is-buffer') + +isBuffer(new Buffer(4)) // true + +isBuffer(undefined) // false +isBuffer(null) // false +isBuffer('') // false +isBuffer(true) // false +isBuffer(false) // false +isBuffer(0) // false +isBuffer(1) // false +isBuffer(1.0) // false +isBuffer('string') // false +isBuffer({}) // false +isBuffer(function foo () {}) // false +``` + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/is-buffer/index.js b/node_modules/is-buffer/index.js new file mode 100644 index 0000000..ef02824 --- /dev/null +++ b/node_modules/is-buffer/index.js @@ -0,0 +1,17 @@ +/** + * Determine if an object is Buffer + * + * Author: Feross Aboukhadijeh + * License: MIT + * + * `npm install is-buffer` + */ + +module.exports = function (obj) { + return !!(obj != null && + (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) + (obj.constructor && + typeof obj.constructor.isBuffer === 'function' && + obj.constructor.isBuffer(obj)) + )) +} diff --git a/node_modules/is-buffer/package.json b/node_modules/is-buffer/package.json new file mode 100644 index 0000000..272a2cd --- /dev/null +++ b/node_modules/is-buffer/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + "is-buffer@^1.0.2", + "/home/mywebsite/node_modules/kind-of" + ] + ], + "_from": "is-buffer@>=1.0.2 <2.0.0", + "_id": "is-buffer@1.1.1", + "_inCache": true, + "_installable": true, + "_location": "/is-buffer", + "_nodeVersion": "4.2.3", + "_npmUser": { + "email": "feross@feross.org", + "name": "feross" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "is-buffer", + "raw": "is-buffer@^1.0.2", + "rawSpec": "^1.0.2", + "scope": null, + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/kind-of" + ], + "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.1.tgz", + "_shasum": "3058de9ca454564e8bbe5b8dd2719a8d7089e7d7", + "_shrinkwrap": null, + "_spec": "is-buffer@^1.0.2", + "_where": "/home/mywebsite/node_modules/kind-of", + "author": { + "email": "feross@feross.org", + "name": "Feross Aboukhadijeh", + "url": "http://feross.org/" + }, + "bugs": { + "url": "https://github.com/feross/is-buffer/issues" + }, + "dependencies": {}, + "description": "Determine if an object is Buffer", + "devDependencies": { + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "directories": {}, + "dist": { + "shasum": "3058de9ca454564e8bbe5b8dd2719a8d7089e7d7", + "tarball": "http://registry.npmjs.org/is-buffer/-/is-buffer-1.1.1.tgz" + }, + "gitHead": "9ccd67d6ca6476d1cb7b38fd9fc7d9d71d212f5c", + "homepage": "http://feross.org", + "keywords": [ + "arraybuffer", + "browser", + "browser buffer", + "browserify", + "buffer", + "buffers", + "core buffer", + "dataview", + "float32array", + "float64array", + "int16array", + "int32array", + "type", + "typed array", + "uint32array" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "feross", + "email": "feross@feross.org" + } + ], + "name": "is-buffer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/feross/is-buffer.git" + }, + "scripts": { + "test": "npm run test-node && npm run test-browser", + "test-browser": "zuul -- test/*.js", + "test-browser-local": "zuul --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "testling": { + "files": "test/*.js" + }, + "version": "1.1.1" +} diff --git a/node_modules/is-buffer/test/basic.js b/node_modules/is-buffer/test/basic.js new file mode 100644 index 0000000..38d883b --- /dev/null +++ b/node_modules/is-buffer/test/basic.js @@ -0,0 +1,20 @@ +var isBuffer = require('../') +var test = require('tape') + +test('is-buffer', function (t) { + t.ok(isBuffer(new Buffer(4)), 'new Buffer(4)') + + t.notOk(isBuffer(undefined), 'undefined') + t.notOk(isBuffer(null), 'null') + t.notOk(isBuffer(''), 'empty string') + t.notOk(isBuffer(true), 'true') + t.notOk(isBuffer(false), 'false') + t.notOk(isBuffer(0), '0') + t.notOk(isBuffer(1), '1') + t.notOk(isBuffer(1.0), '1.0') + t.notOk(isBuffer('string'), 'string') + t.notOk(isBuffer({}), '{}') + t.notOk(isBuffer(function foo () {}), 'function foo () {}') + + t.end() +}) diff --git a/node_modules/is-dotfile/LICENSE b/node_modules/is-dotfile/LICENSE new file mode 100644 index 0000000..33754da --- /dev/null +++ b/node_modules/is-dotfile/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-dotfile/README.md b/node_modules/is-dotfile/README.md new file mode 100644 index 0000000..d17b55c --- /dev/null +++ b/node_modules/is-dotfile/README.md @@ -0,0 +1,74 @@ +# is-dotfile [![NPM version](https://badge.fury.io/js/is-dotfile.svg)](http://badge.fury.io/js/is-dotfile) + +> Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-dotfile --save +``` + +## Usage + +```js +var isDotfile = require('is-dotfile'); +``` + +**false** + +All of the following return `false`: + +```js +isDotfile('a/b/c.js'); +isDotfile('/.git/foo'); +isDotfile('a/b/c/.git/foo'); +//=> false +``` + +**true** + +All of the following return `true`: + +```js +isDotfile('a/b/.gitignore'); +isDotfile('.gitignore'); +isDotfile('/.gitignore'); +//=> true +``` + +## Related projects + +* [dotfile-regex](https://www.npmjs.com/package/dotfile-regex): Regular expresson for matching dotfiles. | [homepage](https://github.com/regexps/dotfile-regex) +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob) +* [is-dotdir](https://www.npmjs.com/package/is-dotdir): Returns true if a path is a dot-directory. | [homepage](https://github.com/jonschlinkert/is-dotdir) +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-dotfile/issues/new). + +## Authors + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 20, 2015._ \ No newline at end of file diff --git a/node_modules/is-dotfile/index.js b/node_modules/is-dotfile/index.js new file mode 100644 index 0000000..5a0a0ca --- /dev/null +++ b/node_modules/is-dotfile/index.js @@ -0,0 +1,15 @@ +/*! + * is-dotfile + * + * Copyright (c) 2015 Jon Schlinkert, contributors. + * Licensed under the MIT license. + */ + +module.exports = function(str) { + if (str.charCodeAt(0) === 46 /* . */ && str.indexOf('/', 1) === -1) { + return true; + } + + var last = str.lastIndexOf('/'); + return last !== -1 ? str.charCodeAt(last + 1) === 46 /* . */ : false; +}; diff --git a/node_modules/is-dotfile/package.json b/node_modules/is-dotfile/package.json new file mode 100644 index 0000000..856a84f --- /dev/null +++ b/node_modules/is-dotfile/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "is-dotfile@^1.0.0", + "/home/mywebsite/node_modules/parse-glob" + ] + ], + "_from": "is-dotfile@>=1.0.0 <2.0.0", + "_id": "is-dotfile@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/is-dotfile", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "is-dotfile", + "raw": "is-dotfile@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-glob" + ], + "_resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz", + "_shasum": "2c132383f39199f8edc268ca01b9b007d205cc4d", + "_shrinkwrap": null, + "_spec": "is-dotfile@^1.0.0", + "_where": "/home/mywebsite/node_modules/parse-glob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-dotfile/issues" + }, + "dependencies": {}, + "description": "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.", + "devDependencies": { + "benchmarked": "^0.1.3", + "dotfile-regex": "^0.1.2", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "2c132383f39199f8edc268ca01b9b007d205cc4d", + "tarball": "http://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "df258600b0afa6403a2a840f2ec486c9d350492f", + "homepage": "https://github.com/jonschlinkert/is-dotfile", + "keywords": [ + "detect", + "dot", + "dotfile", + "expression", + "file", + "filepath", + "find", + "fs", + "is", + "match", + "path", + "regex", + "regexp", + "regular" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "is-dotfile", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-dotfile.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "dotfile-regex", + "has-glob", + "is-dotdir", + "is-glob" + ] + } + }, + "version": "1.0.2" +} diff --git a/node_modules/is-equal-shallow/LICENSE b/node_modules/is-equal-shallow/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/is-equal-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-equal-shallow/README.md b/node_modules/is-equal-shallow/README.md new file mode 100644 index 0000000..1142276 --- /dev/null +++ b/node_modules/is-equal-shallow/README.md @@ -0,0 +1,90 @@ +# is-equal-shallow [![NPM version](https://badge.fury.io/js/is-equal-shallow.svg)](http://badge.fury.io/js/is-equal-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/is-equal-shallow.svg)](https://travis-ci.org/jonschlinkert/is-equal-shallow) + +> Does a shallow comparison of two objects, returning false if the keys or values differ. + +The purpose of this lib is to do the fastest comparison possible of two objects when the values will predictably be primitives. + +* only compares objects. +* only compares the first level of each object +* values must be primitives. If a value is not a primitive, even if the values are the same, `false` is returned. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-equal-shallow --save +``` + +## Usage + +```js +var equals = require('is-equal-shallow'); +equals(object_a, object_b); +``` + +**Examples** + +```js +equals({a: true, b: true}, {a: true, b: true}); +//=> 'true' + +equals({a: true, b: false}, {c: false, b: false}); +//=> 'false' + +equals({a: true, b: false}, {a: false, b: false}); +//=> 'false' +``` + +Strict comparison for equality: + +```js +equals({a: true, b: true}, {a: true, b: 'true'}); +//=> 'false' +``` + +When values are not primitives, `false` is always returned: + +```js +equals({ b: {}}, { b: {}}); +//=> 'false' + +equals({ b: []}, { b: []}); +//=> 'false' +``` + +## Related projects + +Other object utils: + +* [clone-deep](https://github.com/jonschlinkert/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. +* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in) +* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-equal-shallow/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 22, 2015._ \ No newline at end of file diff --git a/node_modules/is-equal-shallow/index.js b/node_modules/is-equal-shallow/index.js new file mode 100644 index 0000000..1006eef --- /dev/null +++ b/node_modules/is-equal-shallow/index.js @@ -0,0 +1,27 @@ +/*! + * is-equal-shallow + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isPrimitive = require('is-primitive'); + +module.exports = function isEqual(a, b) { + if (!a && !b) { return true; } + if (!a && b || a && !b) { return false; } + + var numKeysA = 0, numKeysB = 0, key; + for (key in b) { + numKeysB++; + if (!isPrimitive(b[key]) || !a.hasOwnProperty(key) || (a[key] !== b[key])) { + return false; + } + } + for (key in a) { + numKeysA++; + } + return numKeysA === numKeysB; +}; diff --git a/node_modules/is-equal-shallow/package.json b/node_modules/is-equal-shallow/package.json new file mode 100644 index 0000000..93a5497 --- /dev/null +++ b/node_modules/is-equal-shallow/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + "is-equal-shallow@^0.1.1", + "/home/mywebsite/node_modules/regex-cache" + ] + ], + "_from": "is-equal-shallow@>=0.1.1 <0.2.0", + "_id": "is-equal-shallow@0.1.3", + "_inCache": true, + "_installable": true, + "_location": "/is-equal-shallow", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-equal-shallow", + "raw": "is-equal-shallow@^0.1.1", + "rawSpec": "^0.1.1", + "scope": null, + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/regex-cache" + ], + "_resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "_shasum": "2238098fc221de0bcfa5d9eac4c45d638aa1c534", + "_shrinkwrap": null, + "_spec": "is-equal-shallow@^0.1.1", + "_where": "/home/mywebsite/node_modules/regex-cache", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-equal-shallow/issues" + }, + "dependencies": { + "is-primitive": "^2.0.0" + }, + "description": "Does a shallow comparison of two objects, returning false if the keys or values differ.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "2238098fc221de0bcfa5d9eac4c45d638aa1c534", + "tarball": "http://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "dceb47dd9c9c21066958116e3b54b3c8c251ee4a", + "homepage": "https://github.com/jonschlinkert/is-equal-shallow", + "keywords": [ + "compare", + "comparison", + "equal", + "equals", + "is", + "is-equal", + "key", + "object", + "same", + "shallow", + "value" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "is-equal-shallow", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/is-equal-shallow.git" + }, + "scripts": { + "test": "mocha" + }, + "verbiage": { + "related": { + "description": "Other object utils:", + "list": [ + "clone-deep", + "for-in", + "for-own", + "is-plain-object", + "isobject" + ] + } + }, + "version": "0.1.3" +} diff --git a/node_modules/is-extendable/LICENSE b/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-extendable/README.md b/node_modules/is-extendable/README.md new file mode 100644 index 0000000..e4cfaeb --- /dev/null +++ b/node_modules/is-extendable/README.md @@ -0,0 +1,72 @@ +# is-extendable [![NPM version](https://badge.fury.io/js/is-extendable.svg)](http://badge.fury.io/js/is-extendable) + +> Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. "can the value have keys?" + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-extendable --save +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* `array` +* `regexp` +* `plain object` +* `function` +* `date` +* `error` + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is an `object`, `function` + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Related projects + +* [assign-deep](https://github.com/jonschlinkert/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [is-equal-shallow](https://github.com/jonschlinkert/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extendable/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 04, 2015._ \ No newline at end of file diff --git a/node_modules/is-extendable/index.js b/node_modules/is-extendable/index.js new file mode 100644 index 0000000..4ee71a4 --- /dev/null +++ b/node_modules/is-extendable/index.js @@ -0,0 +1,13 @@ +/*! + * is-extendable + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function isExtendable(val) { + return typeof val !== 'undefined' && val !== null + && (typeof val === 'object' || typeof val === 'function'); +}; diff --git a/node_modules/is-extendable/package.json b/node_modules/is-extendable/package.json new file mode 100644 index 0000000..68f58f7 --- /dev/null +++ b/node_modules/is-extendable/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "is-extendable@^0.1.1", + "/home/mywebsite/node_modules/object.omit" + ] + ], + "_from": "is-extendable@>=0.1.1 <0.2.0", + "_id": "is-extendable@0.1.1", + "_inCache": true, + "_installable": true, + "_location": "/is-extendable", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-extendable", + "raw": "is-extendable@^0.1.1", + "rawSpec": "^0.1.1", + "scope": null, + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/object.omit" + ], + "_resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "_shasum": "62b110e289a471418e3ec36a617d472e301dfc89", + "_shrinkwrap": null, + "_spec": "is-extendable@^0.1.1", + "_where": "/home/mywebsite/node_modules/object.omit", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "dependencies": {}, + "description": "Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. \"can the value have keys?\"", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "62b110e289a471418e3ec36a617d472e301dfc89", + "tarball": "http://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "c36a0732e6a76931c6f66c5931d1f3e54fa44380", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "is-extendable", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-extendable.git" + }, + "scripts": { + "test": "mocha" + }, + "verbiage": { + "related": { + "list": [ + "assign-deep", + "extend-shallow", + "is-equal-shallow", + "is-extendable", + "is-plain-object", + "isobject", + "kind-of" + ] + } + }, + "version": "0.1.1" +} diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/is-extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob/README.md b/node_modules/is-extglob/README.md similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob/README.md rename to node_modules/is-extglob/README.md diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-extglob/index.js rename to node_modules/is-extglob/index.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json similarity index 63% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob/package.json rename to node_modules/is-extglob/package.json index 148383a..04ac308 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/extglob/node_modules/is-extglob/package.json +++ b/node_modules/is-extglob/package.json @@ -1,42 +1,73 @@ { - "name": "is-extglob", - "description": "Returns true if a string has an extglob.", - "version": "1.0.0", - "homepage": "https://github.com/jonschlinkert/is-extglob", + "_args": [ + [ + "is-extglob@^1.0.0", + "/home/mywebsite/node_modules/micromatch" + ] + ], + "_from": "is-extglob@>=1.0.0 <2.0.0", + "_id": "is-extglob@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/is-extglob", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-extglob", + "raw": "is-extglob@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/extglob", + "/is-glob", + "/micromatch", + "/parse-glob" + ], + "_resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "_shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", + "_shrinkwrap": null, + "_spec": "is-extglob@^1.0.0", + "_where": "/home/mywebsite/node_modules/micromatch", "author": { "name": "Jon Schlinkert", "url": "https://github.com/jonschlinkert" }, - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-extglob.git" - }, "bugs": { "url": "https://github.com/jonschlinkert/is-extglob/issues" }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha", - "prepublish": "browserify -o browser.js -e index.js" - }, + "dependencies": {}, + "description": "Returns true if a string has an extglob.", "devDependencies": { "mocha": "*", "should": "*" }, + "directories": {}, + "dist": { + "shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", + "tarball": "http://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-extglob", "keywords": [ "bash", "braces", "check", "exec", - "extglob", "expression", + "extglob", "glob", "globbing", "globstar", @@ -48,26 +79,24 @@ "string", "test" ], - "_id": "is-extglob@1.0.0", - "_shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", - "_from": "is-extglob@>=1.0.0 <2.0.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, + "license": "MIT", + "main": "index.js", "maintainers": [ { "name": "jonschlinkert", "email": "github@sellside.com" } ], - "dist": { - "shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", - "tarball": "http://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + "name": "is-extglob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-extglob.git" }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "readme": "ERROR: No README data found!" + "scripts": { + "prepublish": "browserify -o browser.js -e index.js", + "test": "mocha" + }, + "version": "1.0.0" } diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob/README.md b/node_modules/is-glob/README.md similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob/README.md rename to node_modules/is-glob/README.md diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob/index.js b/node_modules/is-glob/index.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob/index.js rename to node_modules/is-glob/index.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob/package.json b/node_modules/is-glob/package.json similarity index 72% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob/package.json rename to node_modules/is-glob/package.json index 2efdd09..c6152f7 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/parse-glob/node_modules/is-glob/package.json +++ b/node_modules/is-glob/package.json @@ -1,43 +1,76 @@ { - "name": "is-glob", - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet", - "version": "2.0.1", - "homepage": "https://github.com/jonschlinkert/is-glob", + "_args": [ + [ + "is-glob@^2.0.0", + "/home/mywebsite/node_modules/chokidar" + ] + ], + "_from": "is-glob@>=2.0.0 <3.0.0", + "_id": "is-glob@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/is-glob", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-glob", + "raw": "is-glob@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar", + "/glob-base", + "/glob-parent", + "/micromatch", + "/parse-glob" + ], + "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "_shasum": "d096f926a3ded5600f3fdfd91198cb0888c2d863", + "_shrinkwrap": null, + "_spec": "is-glob@^2.0.0", + "_where": "/home/mywebsite/node_modules/chokidar", "author": { "name": "Jon Schlinkert", "url": "https://github.com/jonschlinkert" }, - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-glob.git" - }, "bugs": { "url": "https://github.com/jonschlinkert/is-glob/issues" }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, "dependencies": { "is-extglob": "^1.0.0" }, + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet", "devDependencies": { "mocha": "*" }, + "directories": {}, + "dist": { + "shasum": "d096f926a3ded5600f3fdfd91198cb0888c2d863", + "tarball": "http://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "d7db1b2dd559b3d5a73f89dbe72d9e9f4d6587d7", + "homepage": "https://github.com/jonschlinkert/is-glob", "keywords": [ "bash", "braces", "check", "exec", - "extglob", "expression", + "extglob", "glob", "globbing", "globstar", @@ -49,6 +82,28 @@ "string", "test" ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "is-glob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-glob.git" + }, + "scripts": { + "test": "mocha" + }, "verb": { "related": { "list": [ @@ -60,31 +115,5 @@ ] } }, - "gitHead": "d7db1b2dd559b3d5a73f89dbe72d9e9f4d6587d7", - "_id": "is-glob@2.0.1", - "_shasum": "d096f926a3ded5600f3fdfd91198cb0888c2d863", - "_from": "is-glob@>=2.0.0 <3.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.12.4", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "dist": { - "shasum": "d096f926a3ded5600f3fdfd91198cb0888c2d863", - "tarball": "http://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "readme": "ERROR: No README data found!" + "version": "2.0.1" } diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-number/README.md b/node_modules/is-number/README.md new file mode 100644 index 0000000..8395f91 --- /dev/null +++ b/node_modules/is-number/README.md @@ -0,0 +1,103 @@ +# is-number [![NPM version](https://badge.fury.io/js/is-number.svg)](http://badge.fury.io/js/is-number) [![Build Status](https://travis-ci.org/jonschlinkert/is-number.svg)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-number --save +``` + +## Usage + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## Other projects + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even) +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even) +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd) +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive) +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-number/issues/new). + +## Run tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 22, 2015._ \ No newline at end of file diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js new file mode 100644 index 0000000..96ec66d --- /dev/null +++ b/node_modules/is-number/index.js @@ -0,0 +1,19 @@ +/*! + * is-number + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function isNumber(num) { + var type = typeOf(num); + if (type !== 'number' && type !== 'string') { + return false; + } + var n = +num; + return (n - n + 1) >= 0 && num !== ''; +}; diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json new file mode 100644 index 0000000..629e969 --- /dev/null +++ b/node_modules/is-number/package.json @@ -0,0 +1,118 @@ +{ + "_args": [ + [ + "is-number@^2.1.0", + "/home/mywebsite/node_modules/fill-range" + ] + ], + "_from": "is-number@>=2.1.0 <3.0.0", + "_id": "is-number@2.1.0", + "_inCache": true, + "_installable": true, + "_location": "/is-number", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "is-number", + "raw": "is-number@^2.1.0", + "rawSpec": "^2.1.0", + "scope": null, + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fill-range", + "/randomatic" + ], + "_resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "_shasum": "01fcbbb393463a548f2f466cce16dece49db908f", + "_shrinkwrap": null, + "_spec": "is-number@^2.1.0", + "_where": "/home/mywebsite/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "description": "Returns true if the value is a number. comprehensive tests.", + "devDependencies": { + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "01fcbbb393463a548f2f466cce16dece49db908f", + "tarball": "http://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "d06c6e2cc048d3cad016cb8dfb055bb14d86fffa", + "homepage": "https://github.com/jonschlinkert/is-number", + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is number", + "is-number", + "istype", + "kind of", + "math", + "number", + "test", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "is-number", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-number.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "even", + "is-even", + "is-odd", + "is-primitive", + "kind-of", + "odd" + ] + } + }, + "version": "2.1.0" +} diff --git a/node_modules/is-primitive/LICENSE b/node_modules/is-primitive/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/is-primitive/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-primitive/README.md b/node_modules/is-primitive/README.md new file mode 100644 index 0000000..e1c3064 --- /dev/null +++ b/node_modules/is-primitive/README.md @@ -0,0 +1,57 @@ +# is-primitive [![NPM version](https://badge.fury.io/js/is-primitive.svg)](http://badge.fury.io/js/is-primitive) [![Build Status](https://travis-ci.org/jonschlinkert/is-primitive.svg)](https://travis-ci.org/jonschlinkert/is-primitive) + +> Returns `true` if the value is a primitive. + +## Install with [npm](npmjs.org) + +```bash +npm i is-primitive --save +``` + +## Running tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + +## Usage + +```js +var isPrimitive = require('is-primitive'); +isPrimitive('abc'); +//=> true + +isPrimitive(42); +//=> true + +isPrimitive(false); +//=> true + +isPrimitive(true); +//=> true + +isPrimitive({}); +//=> false + +isPrimitive([]); +//=> false + +isPrimitive(function(){}); +//=> false +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014-2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 16, 2015._ \ No newline at end of file diff --git a/node_modules/is-primitive/index.js b/node_modules/is-primitive/index.js new file mode 100644 index 0000000..55f11cf --- /dev/null +++ b/node_modules/is-primitive/index.js @@ -0,0 +1,13 @@ +/*! + * is-primitive + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +// see http://jsperf.com/testing-value-is-primitive/7 +module.exports = function isPrimitive(value) { + return value == null || (typeof value !== 'function' && typeof value !== 'object'); +}; diff --git a/node_modules/is-primitive/package.json b/node_modules/is-primitive/package.json new file mode 100644 index 0000000..020448b --- /dev/null +++ b/node_modules/is-primitive/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "is-primitive@^2.0.0", + "/home/mywebsite/node_modules/regex-cache" + ] + ], + "_from": "is-primitive@>=2.0.0 <3.0.0", + "_id": "is-primitive@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/is-primitive", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-primitive", + "raw": "is-primitive@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/is-equal-shallow", + "/regex-cache" + ], + "_resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "_shasum": "207bab91638499c07b2adf240a41a87210034575", + "_shrinkwrap": null, + "_spec": "is-primitive@^2.0.0", + "_where": "/home/mywebsite/node_modules/regex-cache", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-primitive/issues" + }, + "dependencies": {}, + "description": "Returns `true` if the value is a primitive. ", + "devDependencies": { + "mocha": "*", + "should": "^4.0.4" + }, + "directories": {}, + "dist": { + "shasum": "207bab91638499c07b2adf240a41a87210034575", + "tarball": "http://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "c512b7c95fb049aa9b1f039ddc0670611b66cce2", + "homepage": "https://github.com/jonschlinkert/is-primitive", + "keywords": [ + "boolean", + "check", + "number", + "primitive", + "string", + "symbol", + "type", + "typeof", + "util" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/is-primitive/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "is-primitive", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/is-primitive.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.0" +} diff --git a/node_modules/isarray/README.md b/node_modules/isarray/README.md new file mode 100644 index 0000000..052a62b --- /dev/null +++ b/node_modules/isarray/README.md @@ -0,0 +1,54 @@ + +# isarray + +`Array#isArray` for older browsers. + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/isarray/build/build.js b/node_modules/isarray/build/build.js new file mode 100644 index 0000000..ec58596 --- /dev/null +++ b/node_modules/isarray/build/build.js @@ -0,0 +1,209 @@ + +/** + * Require the given path. + * + * @param {String} path + * @return {Object} exports + * @api public + */ + +function require(path, parent, orig) { + var resolved = require.resolve(path); + + // lookup failed + if (null == resolved) { + orig = orig || path; + parent = parent || 'root'; + var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); + err.path = orig; + err.parent = parent; + err.require = true; + throw err; + } + + var module = require.modules[resolved]; + + // perform real require() + // by invoking the module's + // registered function + if (!module.exports) { + module.exports = {}; + module.client = module.component = true; + module.call(this, module.exports, require.relative(resolved), module); + } + + return module.exports; +} + +/** + * Registered modules. + */ + +require.modules = {}; + +/** + * Registered aliases. + */ + +require.aliases = {}; + +/** + * Resolve `path`. + * + * Lookup: + * + * - PATH/index.js + * - PATH.js + * - PATH + * + * @param {String} path + * @return {String} path or null + * @api private + */ + +require.resolve = function(path) { + if (path.charAt(0) === '/') path = path.slice(1); + var index = path + '/index.js'; + + var paths = [ + path, + path + '.js', + path + '.json', + path + '/index.js', + path + '/index.json' + ]; + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + if (require.modules.hasOwnProperty(path)) return path; + } + + if (require.aliases.hasOwnProperty(index)) { + return require.aliases[index]; + } +}; + +/** + * Normalize `path` relative to the current path. + * + * @param {String} curr + * @param {String} path + * @return {String} + * @api private + */ + +require.normalize = function(curr, path) { + var segs = []; + + if ('.' != path.charAt(0)) return path; + + curr = curr.split('/'); + path = path.split('/'); + + for (var i = 0; i < path.length; ++i) { + if ('..' == path[i]) { + curr.pop(); + } else if ('.' != path[i] && '' != path[i]) { + segs.push(path[i]); + } + } + + return curr.concat(segs).join('/'); +}; + +/** + * Register module at `path` with callback `definition`. + * + * @param {String} path + * @param {Function} definition + * @api private + */ + +require.register = function(path, definition) { + require.modules[path] = definition; +}; + +/** + * Alias a module definition. + * + * @param {String} from + * @param {String} to + * @api private + */ + +require.alias = function(from, to) { + if (!require.modules.hasOwnProperty(from)) { + throw new Error('Failed to alias "' + from + '", it does not exist'); + } + require.aliases[to] = from; +}; + +/** + * Return a require function relative to the `parent` path. + * + * @param {String} parent + * @return {Function} + * @api private + */ + +require.relative = function(parent) { + var p = require.normalize(parent, '..'); + + /** + * lastIndexOf helper. + */ + + function lastIndexOf(arr, obj) { + var i = arr.length; + while (i--) { + if (arr[i] === obj) return i; + } + return -1; + } + + /** + * The relative require() itself. + */ + + function localRequire(path) { + var resolved = localRequire.resolve(path); + return require(resolved, parent, path); + } + + /** + * Resolve relative to the parent. + */ + + localRequire.resolve = function(path) { + var c = path.charAt(0); + if ('/' == c) return path.slice(1); + if ('.' == c) return require.normalize(p, path); + + // resolve deps by returning + // the dep in the nearest "deps" + // directory + var segs = parent.split('/'); + var i = lastIndexOf(segs, 'deps') + 1; + if (!i) i = 0; + path = segs.slice(0, i + 1).join('/') + '/deps/' + path; + return path; + }; + + /** + * Check if module is defined at `path`. + */ + + localRequire.exists = function(path) { + return require.modules.hasOwnProperty(localRequire.resolve(path)); + }; + + return localRequire; +}; +require.register("isarray/index.js", function(exports, require, module){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +}); +require.alias("isarray/index.js", "isarray/index.js"); + diff --git a/node_modules/isarray/component.json b/node_modules/isarray/component.json new file mode 100644 index 0000000..9e31b68 --- /dev/null +++ b/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/node_modules/isarray/index.js b/node_modules/isarray/index.js new file mode 100644 index 0000000..5f5ad45 --- /dev/null +++ b/node_modules/isarray/index.js @@ -0,0 +1,3 @@ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; diff --git a/node_modules/isarray/package.json b/node_modules/isarray/package.json new file mode 100644 index 0000000..e04d520 --- /dev/null +++ b/node_modules/isarray/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "isarray@0.0.1", + "/home/mywebsite/node_modules/isobject" + ] + ], + "_from": "isarray@0.0.1", + "_id": "isarray@0.0.1", + "_inCache": true, + "_installable": true, + "_location": "/isarray", + "_npmUser": { + "email": "julian@juliangruber.com", + "name": "juliangruber" + }, + "_npmVersion": "1.2.18", + "_phantomChildren": {}, + "_requested": { + "name": "isarray", + "raw": "isarray@0.0.1", + "rawSpec": "0.0.1", + "scope": null, + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/isobject", + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "_shrinkwrap": null, + "_spec": "isarray@0.0.1", + "_where": "/home/mywebsite/node_modules/isobject", + "author": { + "email": "mail@juliangruber.com", + "name": "Julian Gruber", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "dependencies": {}, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tap": "*" + }, + "directories": {}, + "dist": { + "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "array", + "browser", + "isarray" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "name": "isarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.0.1" +} diff --git a/node_modules/isobject/LICENSE b/node_modules/isobject/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/README.md b/node_modules/isobject/README.md similarity index 95% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/README.md rename to node_modules/isobject/README.md index 7ee6f31..29eec83 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/README.md +++ b/node_modules/isobject/README.md @@ -74,8 +74,8 @@ Pull requests and stars are always welcome. For bugs and feature requests, [plea ## License Copyright © 2014-2015 [Jon Schlinkert](https://github.com/jonschlinkert) -Released under the [MIT](https://github.com/jonschlinkert/isobject/blob/master/LICENSE) license. +Released under the MIT license. *** -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 13, 2015._ \ No newline at end of file +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 20, 2015._ \ No newline at end of file diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/index.js b/node_modules/isobject/index.js similarity index 55% rename from node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/index.js rename to node_modules/isobject/index.js index 3cb7e33..66159fa 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/object.omit/node_modules/isobject/index.js +++ b/node_modules/isobject/index.js @@ -7,7 +7,8 @@ 'use strict'; -module.exports = function isObject(val) { - return val != null && typeof val === 'object' - && !Array.isArray(val); +var isArray = require('isarray'); + +module.exports = function isObject(o) { + return o != null && typeof o === 'object' && !isArray(o); }; diff --git a/node_modules/isobject/package.json b/node_modules/isobject/package.json new file mode 100644 index 0000000..b386b03 --- /dev/null +++ b/node_modules/isobject/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "isobject@^2.0.0", + "/home/mywebsite/node_modules/fill-range" + ] + ], + "_from": "isobject@>=2.0.0 <3.0.0", + "_id": "isobject@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/isobject", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "isobject", + "raw": "isobject@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fill-range" + ], + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-2.0.0.tgz", + "_shasum": "208de872bd7378c2a92af9428a3f56eb91a122c4", + "_shrinkwrap": null, + "_spec": "isobject@^2.0.0", + "_where": "/home/mywebsite/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "dependencies": { + "isarray": "0.0.1" + }, + "description": "Returns true if the value is an object and not an array or null.", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "208de872bd7378c2a92af9428a3f56eb91a122c4", + "tarball": "http://registry.npmjs.org/isobject/-/isobject-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "563423a8cd174564f2cf758358c690b0d3a5e5c2", + "homepage": "https://github.com/jonschlinkert/isobject", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "isobject", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/isobject.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "assign-deep", + "extend-shallow", + "is-equal-shallow", + "is-extendable", + "is-plain-object", + "kind-of" + ] + } + }, + "version": "2.0.0" +} diff --git a/node_modules/jade/node_modules/constantinople/node_modules/.bin/acorn b/node_modules/jade/node_modules/constantinople/node_modules/.bin/acorn deleted file mode 120000 index cf76760..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/.bin/acorn +++ /dev/null @@ -1 +0,0 @@ -../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.editorconfig b/node_modules/jade/node_modules/constantinople/node_modules/acorn/.editorconfig deleted file mode 100644 index c14d5c6..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.editorconfig +++ /dev/null @@ -1,7 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.gitattributes b/node_modules/jade/node_modules/constantinople/node_modules/acorn/.gitattributes deleted file mode 100644 index fcadb2c..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text eol=lf diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.npmignore b/node_modules/jade/node_modules/constantinople/node_modules/acorn/.npmignore deleted file mode 100644 index ecba291..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -/.tern-port -/test -/local diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.tern-project b/node_modules/jade/node_modules/constantinople/node_modules/acorn/.tern-project deleted file mode 100644 index 6718ce0..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.tern-project +++ /dev/null @@ -1,6 +0,0 @@ -{ - "plugins": { - "node": true, - "es_modules": true - } -} \ No newline at end of file diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.travis.yml b/node_modules/jade/node_modules/constantinople/node_modules/acorn/.travis.yml deleted file mode 100644 index ffb9f71..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/.travis.yml +++ /dev/null @@ -1,2 +0,0 @@ -language: node_js -node_js: '0.10' diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/AUTHORS b/node_modules/jade/node_modules/constantinople/node_modules/acorn/AUTHORS deleted file mode 100644 index 2f39def..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/AUTHORS +++ /dev/null @@ -1,41 +0,0 @@ -List of Acorn contributors. Updated before every release. - -Adrian Rakovsky -Alistair Braidwood -Andres Suarez -Aparajita Fishman -Arian Stolwijk -Artem Govorov -Brandon Mills -Charles Hughes -Conrad Irwin -David Bonnet -Forbes Lindesay -Gilad Peleg -impinball -Ingvar Stepanyan -Jesse McCarthy -Jiaxing Wang -Joel Kemp -Johannes Herr -Jürg Lehni -keeyipchan -Kevin Kwok -krator -Marijn Haverbeke -Martin Carlberg -Mathias Bynens -Mathieu 'p01' Henri -Max Schaefer -Max Zerzouri -Mihai Bazon -Mike Rennie -Nick Fitzgerald -Oskar Schöldström -Paul Harper -Peter Rust -PlNG -r-e-d -Rich Harris -Sebastian McKenzie -zsjforcn diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/README.md b/node_modules/jade/node_modules/constantinople/node_modules/acorn/README.md deleted file mode 100644 index b1291ea..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/README.md +++ /dev/null @@ -1,377 +0,0 @@ -# Acorn - -[![Build Status](https://travis-ci.org/marijnh/acorn.svg?branch=master)](https://travis-ci.org/marijnh/acorn) -[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.org/package/acorn) -[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) - -A tiny, fast JavaScript parser, written completely in JavaScript. - -## Installation - -The easiest way to install acorn is with [`npm`][npm]. - -[npm]: http://npmjs.org - -```sh -npm install acorn -``` - -Alternately, download the source. - -```sh -git clone https://github.com/marijnh/acorn.git -``` - -## Components - -When run in a CommonJS (node.js) or AMD environment, exported values -appear in the interfaces exposed by the individual files, as usual. -When loaded in the browser (Acorn works in any JS-enabled browser more -recent than IE5) without any kind of module management, a single -global object `acorn` will be defined, and all the exported properties -will be added to that. - -### Main parser - -This is implemented in `dist/acorn.js`, and is what you get when you -`require("acorn")` in node.js. - -**parse**`(input, options)` is used to parse a JavaScript program. -The `input` parameter is a string, `options` can be undefined or an -object setting some of the options listed below. The return value will -be an abstract syntax tree object as specified by the -[ESTree spec][estree]. - -When encountering a syntax error, the parser will raise a -`SyntaxError` object with a meaningful message. The error object will -have a `pos` property that indicates the character offset at which the -error occurred, and a `loc` object that contains a `{line, column}` -object referring to that same position. - -[estree]: https://github.com/estree/estree - -- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, or 6. This influences support for strict mode, the set - of reserved words, and support for new syntax features. Default is 5. - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. - -- **onInsertedSemicolon**: If given a callback, that callback will be - called whenever a missing semicolon is inserted by the parser. The - callback will be given the character offset of the point where the - semicolon is inserted as argument, and if `locations` is on, also a - `{line, column}` object representing this position. - -- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing - commas. - -- **allowReserved**: If `false`, using a reserved word will generate - an error. Defaults to `true`. When given the value `"never"`, - reserved words and keywords can also not be used as property names - (as in Internet Explorer's old parser). - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowHashBang**: When this is enabled (off by default), if the - code starts with the characters `#!` (as in a shellscript), the - first line will be treated as a comment. - -- **locations**: When `true`, each node has a `loc` object attached - with `start` and `end` subobjects, each of which contains the - one-based line and zero-based column numbers in `{line, column}` - form. Default is `false`. - -- **onToken**: If a function is passed for this option, each found - token will be passed in same format as `tokenize()` returns. - - If array is passed, each found token is pushed to it. - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **onComment**: If a function is passed for this option, whenever a - comment is encountered the function will be called with the - following parameters: - - - `block`: `true` if the comment is a block comment, false if it - is a line comment. - - `text`: The content of the comment. - - `start`: Character offset of the start of the comment. - - `end`: Character offset of the end of the comment. - - When the `locations` options is on, the `{line, column}` locations - of the comment’s start and end are passed as two additional - parameters. - - If array is passed for this option, each found comment is pushed - to it as object in Esprima format: - - ```javascript - { - "type": "Line" | "Block", - "value": "comment text", - "range": ..., - "loc": ... - } - ``` - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **ranges**: Nodes have their start and end characters offsets - recorded in `start` and `end` properties (directly on the node, - rather than the `loc` object, which holds line/column data. To also - add a [semi-standardized][range] `range` property holding a - `[start, end]` array with the same numbers, set the `ranges` option - to `true`. - -- **program**: It is possible to parse multiple files into a single - AST by passing the tree produced by parsing the first file as the - `program` option in subsequent parses. This will add the toplevel - forms of the parsed file to the "Program" (top) node of an existing - parse tree. - -- **sourceFile**: When the `locations` option is `true`, you can pass - this option to add a `source` attribute in every node’s `loc` - object. Note that the contents of this option are not examined or - processed in any way; you are free to use whatever format you - choose. - -- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property - will be added directly to the nodes, rather than the `loc` object. - -- **preserveParens**: If this option is `true`, parenthesized expressions - are represented by (non-standard) `ParenthesizedExpression` nodes - that have a single `expression` property containing the expression - inside parentheses. - -[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - -**parseExpressionAt**`(input, offset, options)` will parse a single -expression in a string, and return its AST. It will not complain if -there is more of the string left after the expression. - -**getLineInfo**`(input, offset)` can be used to get a `{line, -column}` object for a given program string and character offset. - -**tokenizer**`(input, options)` returns an object with a `getToken` -method that can be called repeatedly to get the next token, a `{start, -end, type, value}` object (with added `loc` property when the -`locations` option is enabled and `range` property when the `ranges` -option is enabled). When the token's type is `tokTypes.eof`, you -should stop calling the method, since it will keep returning that same -token forever. - -In ES6 environment, returned result can be used as any other -protocol-compliant iterable: - -```javascript -for (let token of acorn.tokenize(str)) { - // iterate over the tokens -} - -// transform code to array of tokens: -var tokens = [...acorn.tokenize(str)]; -``` - -**tokTypes** holds an object mapping names to the token type objects -that end up in the `type` properties of tokens. - -#### Note on using with [Escodegen][escodegen] - -Escodegen supports generating comments from AST, attached in -Esprima-specific format. In order to simulate same format in -Acorn, consider following example: - -```javascript -var comments = [], tokens = []; - -var ast = acorn.parse('var x = 42; // answer', { - // collect ranges for each node - ranges: true, - // collect comments in Esprima's format - onComment: comments, - // collect token ranges - onToken: tokens -}); - -// attach comments using collected information -escodegen.attachComments(ast, comments, tokens); - -// generate code -console.log(escodegen.generate(ast, {comment: true})); -// > 'var x = 42; // answer' -``` - -[escodegen]: https://github.com/Constellation/escodegen - -#### Using Acorn in an environment with a Content Security Policy - -Some contexts, such as Chrome Web Apps, disallow run-time code evaluation. -Acorn uses `new Function` to generate fast functions that test whether -a word is in a given set, and will trigger a security error when used -in a context with such a -[Content Security Policy](http://www.html5rocks.com/en/tutorials/security/content-security-policy/#eval-too) -(see [#90](https://github.com/marijnh/acorn/issues/90) and -[#123](https://github.com/marijnh/acorn/issues/123)). - -The `dist/acorn_csp.js` file in the distribution (which is built -by the `bin/without_eval` script) has the generated code inlined, and -can thus run without evaluating anything. - -### dist/acorn_loose.js ### - -This file implements an error-tolerant parser. It exposes a single -function. The loose parser is accessible in node.js via `require("acorn/dist/acorn_loose")`. - -**parse_dammit**`(input, options)` takes the same arguments and -returns the same syntax tree as the `parse` function in `acorn.js`, -but never raises an error, and will do its best to parse syntactically -invalid code in as meaningful a way as it can. It'll insert identifier -nodes with name `"✖"` as placeholders in places where it can't make -sense of the input. Depends on `acorn.js`, because it uses the same -tokenizer. - -### dist/walk.js ### - -Implements an abstract syntax tree walker. Will store its interface in -`acorn.walk` when loaded without a module system. - -**simple**`(node, visitors, base, state)` does a 'simple' walk over -a tree. `node` should be the AST node to walk, and `visitors` an -object with properties whose names correspond to node types in the -[ESTree spec][estree]. The properties should contain functions -that will be called with the node object and, if applicable the state -at that point. The last two arguments are optional. `base` is a walker -algorithm, and `state` is a start state. The default walker will -simply visit all statements and expressions and not produce a -meaningful state. (An example of a use of state it to track scope at -each point in the tree.) - -**ancestor**`(node, visitors, base, state)` does a 'simple' walk over -a tree, building up an array of ancestor nodes (including the current node) -and passing the array to callbacks in the `state` parameter. - -**recursive**`(node, state, functions, base)` does a 'recursive' -walk, where the walker functions are responsible for continuing the -walk on the child nodes of their target node. `state` is the start -state, and `functions` should contain an object that maps node types -to walker functions. Such functions are called with `(node, state, c)` -arguments, and can cause the walk to continue on a sub-node by calling -the `c` argument on it with `(node, state)` arguments. The optional -`base` argument provides the fallback walker functions for node types -that aren't handled in the `functions` object. If not given, the -default walkers will be used. - -**make**`(functions, base)` builds a new walker object by using the -walker functions in `functions` and filling in the missing ones by -taking defaults from `base`. - -**findNodeAt**`(node, start, end, test, base, state)` tries to -locate a node in a tree at the given start and/or end offsets, which -satisfies the predicate `test`. `start` end `end` can be either `null` -(as wildcard) or a number. `test` may be a string (indicating a node -type) or a function that takes `(nodeType, node)` arguments and -returns a boolean indicating whether this node is interesting. `base` -and `state` are optional, and can be used to specify a custom walker. -Nodes are tested from inner to outer, so if two nodes match the -boundaries, the inner one will be preferred. - -**findNodeAround**`(node, pos, test, base, state)` is a lot like -`findNodeAt`, but will match any node that exists 'around' (spanning) -the given position. - -**findNodeAfter**`(node, pos, test, base, state)` is similar to -`findNodeAround`, but will match all nodes *after* the given position -(testing outer nodes before inner nodes). - -## Command line interface - -The `bin/acorn` utility can be used to parse a file from the command -line. It accepts as arguments its input file and the following -options: - -- `--ecma3|--ecma5|--ecma6`: Sets the ECMAScript version to parse. Default is - version 5. - -- `--locations`: Attaches a "loc" object to each node with "start" and - "end" subobjects, each of which contains the one-based line and - zero-based column numbers in `{line, column}` form. - -- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. - -- `--compact`: No whitespace is used in the AST output. - -- `--silent`: Do not output the AST, just return the exit status. - -- `--help`: Print the usage information and quit. - -The utility spits out the syntax tree as JSON data. - -## Build system - -Acorn is written in ECMAScript 6, as a set of small modules, in the -project's `src` directory, and compiled down to bigger ECMAScript 3 -files in `dist` using [Browserify](http://browserify.org) and -[Babel](http://babeljs.io/). If you are already using Babel, you can -consider including the modules directly. - -The command-line test runner (`npm test`) uses the ES6 modules. The -browser-based test page (`test/index.html`) uses the compiled modules. -The `bin/build-acorn.js` script builds the latter from the former. - -If you are working on Acorn, you'll probably want to try the code out -directly, without an intermediate build step. In your scripts, you can -register the Babel require shim like this: - - require("babel-core/register") - -That will allow you to directly `require` the ES6 modules. - -## Plugins - -Acorn is designed support allow plugins which, within reasonable -bounds, redefine the way the parser works. Plugins can add new token -types and new tokenizer contexts (if necessary), and extend methods in -the parser object. This is not a clean, elegant API—using it requires -an understanding of Acorn's internals, and plugins are likely to break -whenever those internals are significantly changed. But still, it is -_possible_, in this way, to create parsers for JavaScript dialects -without forking all of Acorn. And in principle it is even possible to -combine such plugins, so that if you have, for example, a plugin for -parsing types and a plugin for parsing JSX-style XML literals, you -could load them both and parse code with both JSX tags and types. - -A plugin should register itself by adding a property to -`acorn.plugins`, which holds a function. Calling `acorn.parse`, a -`plugins` option can be passed, holding an object mapping plugin names -to configuration values (or just `true` for plugins that don't take -options). After the parser object has been created, the initialization -functions for the chosen plugins are called with `(parser, -configValue)` arguments. They are expected to use the `parser.extend` -method to extend parser methods. For example, the `readToken` method -could be extended like this: - -```javascript -parser.extend("readToken", function(nextMethod) { - return function(code) { - console.log("Reading a token!") - return nextMethod.call(this, code) - } -}) -``` - -The `nextMethod` argument passed to `extend`'s second argument is the -previous value of this method, and should usually be called through to -whenever the extended method does not handle the call itself. - -There is a proof-of-concept JSX plugin in the [`jsx` -branch](https://github.com/marijnh/acorn/tree/jsx) branch of the -Github repository. diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/acorn b/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/acorn deleted file mode 100755 index 41fd156..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/acorn +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env node - -var path = require("path"); -var fs = require("fs"); -var acorn = require("../dist/acorn.js"); - -var infile, parsed, tokens, options = {}, silent = false, compact = false, tokenize = false; - -function help(status) { - var print = (status == 0) ? console.log : console.error; - print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6]"); - print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] infile"); - process.exit(status); -} - -for (var i = 2; i < process.argv.length; ++i) { - var arg = process.argv[i]; - if (arg[0] != "-" && !infile) infile = arg; - else if (arg == "--" && !infile && i + 2 == process.argv.length) infile = process.argv[++i]; - else if (arg == "--ecma3") options.ecmaVersion = 3; - else if (arg == "--ecma5") options.ecmaVersion = 5; - else if (arg == "--ecma6") options.ecmaVersion = 6; - else if (arg == "--ecma7") options.ecmaVersion = 7; - else if (arg == "--locations") options.locations = true; - else if (arg == "--allow-hash-bang") options.allowHashBang = true; - else if (arg == "--silent") silent = true; - else if (arg == "--compact") compact = true; - else if (arg == "--help") help(0); - else if (arg == "--tokenize") tokenize = true; - else if (arg == "--module") options.sourceType = 'module'; - else help(1); -} - -try { - var code = fs.readFileSync(infile, "utf8"); - - if (!tokenize) - parsed = acorn.parse(code, options); - else { - var get = acorn.tokenize(code, options); - tokens = []; - while (true) { - var token = get(); - tokens.push(token); - if (token.type.type == "eof") - break; - } - } -} catch(e) { - console.log(e.message); - process.exit(1); -} - -if (!silent) - console.log(JSON.stringify(tokenize ? tokens : parsed, null, compact ? null : 2)); diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/build-acorn.js b/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/build-acorn.js deleted file mode 100644 index a97b757..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/build-acorn.js +++ /dev/null @@ -1,51 +0,0 @@ -var fs = require("fs"), path = require("path") -var stream = require("stream") - -var browserify = require("browserify") -var babelify = require("babelify").configure({loose: "all"}) - -process.chdir(path.resolve(__dirname, "..")) - -browserify({standalone: "acorn"}) - .plugin(require('browserify-derequire')) - .transform(babelify) - .require("./src/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/acorn.js")) - -function acornShim(file) { - var tr = new stream.Transform - if (file == path.resolve(__dirname, "../src/index.js")) { - var sent = false - tr._transform = function(chunk, _, callback) { - if (!sent) { - sent = true - callback(null, "module.exports = typeof acorn != 'undefined' ? acorn : _dereq_(\"./acorn\")") - } else { - callback() - } - } - } else { - tr._transform = function(chunk, _, callback) { callback(null, chunk) } - } - return tr -} - -browserify({standalone: "acorn.loose"}) - .plugin(require('browserify-derequire')) - .transform(acornShim) - .transform(babelify) - .require("./src/loose/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/acorn_loose.js")) - -browserify({standalone: "acorn.walk"}) - .plugin(require('browserify-derequire')) - .transform(acornShim) - .transform(babelify) - .require("./src/walk/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/walk.js")) diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/generate-identifier-regex.js b/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/generate-identifier-regex.js deleted file mode 100644 index 0d7c50f..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/generate-identifier-regex.js +++ /dev/null @@ -1,47 +0,0 @@ -// Note: run `npm install unicode-7.0.0` first. - -// Which Unicode version should be used? -var version = '7.0.0'; - -var start = require('unicode-' + version + '/properties/ID_Start/code-points') - .filter(function(ch) { return ch > 127; }); -var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/properties/ID_Continue/code-points') - .filter(function(ch) { return ch > 127 && start.indexOf(ch) == -1; })); - -function pad(str, width) { - while (str.length < width) str = "0" + str; - return str; -} - -function esc(code) { - var hex = code.toString(16); - if (hex.length <= 2) return "\\x" + pad(hex, 2); - else return "\\u" + pad(hex, 4); -} - -function generate(chars) { - var astral = [], re = ""; - for (var i = 0, at = 0x10000; i < chars.length; i++) { - var from = chars[i], to = from; - while (i < chars.length - 1 && chars[i + 1] == to + 1) { - i++; - to++; - } - if (to <= 0xffff) { - if (from == to) re += esc(from); - else if (from + 1 == to) re += esc(from) + esc(to); - else re += esc(from) + "-" + esc(to); - } else { - astral.push(from - at, to - from); - at = to; - } - } - return {nonASCII: re, astral: astral}; -} - -var startData = generate(start), contData = generate(cont); - -console.log(" var nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";"); -console.log(" var nonASCIIidentifierChars = \"" + contData.nonASCII + "\";"); -console.log(" var astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"); -console.log(" var astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"); diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/update_authors.sh b/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/update_authors.sh deleted file mode 100755 index 466c8db..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/update_authors.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Combine existing list of authors with everyone known in git, sort, add header. -tail --lines=+3 AUTHORS > AUTHORS.tmp -git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp -echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS -sort -u AUTHORS.tmp >> AUTHORS -rm -f AUTHORS.tmp diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/without_eval b/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/without_eval deleted file mode 100755 index 4331e70..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/bin/without_eval +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - -var fs = require("fs") - -var acornSrc = fs.readFileSync(require.resolve("../dist/acorn"), "utf8") -var acorn = require("../dist/acorn"), walk = require("../dist/walk") - -var ast = acorn.parse(acornSrc) -var touchups = [], uses = [] - -var makePred - -walk.simple(ast, { - FunctionDeclaration: function(node) { - if (node.id.name == "makePredicate") { - makePred = node - touchups.push({text: "// Removed to create an eval-free library", from: node.start, to: node.end}) - } - }, - ObjectExpression: function(node) { - node.properties.forEach(function(prop) { - if (prop.value.type == "CallExpression" && - prop.value.callee.name == "makePredicate") - uses.push(prop.value) - }) - } -}) - -var results = [] -var dryRun = acornSrc.slice(0, makePred.end) + "; makePredicate = (function(mp) {" + - "return function(words) { var r = mp(words); predicates.push(r); return r }})(makePredicate);" + - acornSrc.slice(makePred.end) -;(new Function("predicates", dryRun))(results) - -uses.forEach(function (node, i) { - touchups.push({text: results[i].toString(), from: node.start, to: node.end}) -}) - -var result = "", pos = 0 -touchups.sort(function(a, b) { return a.from - b.from }) -touchups.forEach(function(touchup) { - result += acornSrc.slice(pos, touchup.from) - result += touchup.text - pos = touchup.to -}) -result += acornSrc.slice(pos) - -process.stdout.write(result) diff --git a/node_modules/jade/node_modules/constantinople/node_modules/acorn/dist/acorn.js b/node_modules/jade/node_modules/constantinople/node_modules/acorn/dist/acorn.js deleted file mode 100644 index b44edb9..0000000 --- a/node_modules/jade/node_modules/constantinople/node_modules/acorn/dist/acorn.js +++ /dev/null @@ -1,3312 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 6 && (prop.computed || prop.method || prop.shorthand)) return; - var key = prop.key, - name = undefined; - switch (key.type) { - case "Identifier": - name = key.name;break; - case "Literal": - name = String(key.value);break; - default: - return; - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property"); - propHash.proto = true; - } - return; - } - var other = undefined; - if (_util.has(propHash, name)) { - other = propHash[name]; - var isGetSet = kind !== "init"; - if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp.parseExpression = function (noIn, refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - if (this.type === _tokentype.types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - return this.finishNode(node, "SequenceExpression"); - } - return expr; -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { - if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield(); - - var failOnShorthandAssign = undefined; - if (!refShorthandDefaultPos) { - refShorthandDefaultPos = { start: 0 }; - failOnShorthandAssign = true; - } else { - failOnShorthandAssign = false; - } - var startPos = this.start, - startLoc = this.startLoc; - if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start; - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); - if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; - refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return left; -}; - -// Parse a ternary conditional (`?:`) operator. - -pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - if (this.eat(_tokentype.types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(_tokentype.types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; -}; - -// Start the precedence parser. - -pp.parseExprOps = function (noIn, refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== _tokentype.types._in)) { - if (prec > minPrec) { - var node = this.startNodeAt(leftStartPos, leftStartLoc); - node.left = left; - node.operator = this.value; - var op = this.type; - this.next(); - var startPos = this.start, - startLoc = this.startLoc; - node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn); - this.finishNode(node, op === _tokentype.types.logicalOR || op === _tokentype.types.logicalAND ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - return left; -}; - -// Parse unary operators, both prefix and postfix. - -pp.parseMaybeUnary = function (refShorthandDefaultPos) { - if (this.type.prefix) { - var node = this.startNode(), - update = this.type === _tokentype.types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - while (this.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - return expr; -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp.parseExprSubscripts = function (refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprAtom(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseSubscripts(expr, startPos, startLoc); -}; - -pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { - for (;;) { - if (this.eat(_tokentype.types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseIdent(true); - node.computed = false; - base = this.finishNode(node, "MemberExpression"); - } else if (this.eat(_tokentype.types.bracketL)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(_tokentype.types.bracketR); - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(_tokentype.types.parenL)) { - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseExprList(_tokentype.types.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (this.type === _tokentype.types.backQuote) { - var node = this.startNodeAt(startPos, startLoc); - node.tag = base; - node.quasi = this.parseTemplate(); - base = this.finishNode(node, "TaggedTemplateExpression"); - } else { - return base; - } - } -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp.parseExprAtom = function (refShorthandDefaultPos) { - var node = undefined, - canBeArrow = this.potentialArrowAt == this.start; - switch (this.type) { - case _tokentype.types._super: - if (!this.inFunction) this.raise(this.start, "'super' outside of function or class"); - case _tokentype.types._this: - var type = this.type === _tokentype.types._this ? "ThisExpression" : "Super"; - node = this.startNode(); - this.next(); - return this.finishNode(node, type); - - case _tokentype.types._yield: - if (this.inGenerator) this.unexpected(); - - case _tokentype.types.name: - var startPos = this.start, - startLoc = this.startLoc; - var id = this.parseIdent(this.type !== _tokentype.types.name); - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]); - return id; - - case _tokentype.types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = { pattern: value.pattern, flags: value.flags }; - return node; - - case _tokentype.types.num:case _tokentype.types.string: - return this.parseLiteral(this.value); - - case _tokentype.types._null:case _tokentype.types._true:case _tokentype.types._false: - node = this.startNode(); - node.value = this.type === _tokentype.types._null ? null : this.type === _tokentype.types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal"); - - case _tokentype.types.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case _tokentype.types.bracketL: - node = this.startNode(); - this.next(); - // check whether this is array comprehension or regular array - if (this.options.ecmaVersion >= 7 && this.type === _tokentype.types._for) { - return this.parseComprehension(node, false); - } - node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refShorthandDefaultPos); - return this.finishNode(node, "ArrayExpression"); - - case _tokentype.types.braceL: - return this.parseObj(false, refShorthandDefaultPos); - - case _tokentype.types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false); - - case _tokentype.types._class: - return this.parseClass(this.startNode(), false); - - case _tokentype.types._new: - return this.parseNew(); - - case _tokentype.types.backQuote: - return this.parseTemplate(); - - default: - this.unexpected(); - } -}; - -pp.parseLiteral = function (value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal"); -}; - -pp.parseParenExpression = function () { - this.expect(_tokentype.types.parenL); - var val = this.parseExpression(); - this.expect(_tokentype.types.parenR); - return val; -}; - -pp.parseParenAndDistinguishExpression = function (canBeArrow) { - var startPos = this.start, - startLoc = this.startLoc, - val = undefined; - if (this.options.ecmaVersion >= 6) { - this.next(); - - if (this.options.ecmaVersion >= 7 && this.type === _tokentype.types._for) { - return this.parseComprehension(this.startNodeAt(startPos, startLoc), true); - } - - var innerStartPos = this.start, - innerStartLoc = this.startLoc; - var exprList = [], - first = true; - var refShorthandDefaultPos = { start: 0 }, - spreadStart = undefined, - innerParenStart = undefined; - while (this.type !== _tokentype.types.parenR) { - first ? first = false : this.expect(_tokentype.types.comma); - if (this.type === _tokentype.types.ellipsis) { - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRest())); - break; - } else { - if (this.type === _tokentype.types.parenL && !innerParenStart) { - innerParenStart = this.start; - } - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); - } - } - var innerEndPos = this.start, - innerEndLoc = this.startLoc; - this.expect(_tokentype.types.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { - if (innerParenStart) this.unexpected(innerParenStart); - return this.parseParenArrowList(startPos, startLoc, exprList); - } - - if (!exprList.length) this.unexpected(this.lastTokStart); - if (spreadStart) this.unexpected(spreadStart); - if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression"); - } else { - return val; - } -}; - -pp.parseParenItem = function (item) { - return item; -}; - -pp.parseParenArrowList = function (startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList); -}; - -// New's precedence is slightly tricky. It must allow its argument -// to be a `[]` or dot subscript expression, but not a call — at -// least, not without wrapping it in parentheses. Thus, it uses the - -var empty = []; - -pp.parseNew = function () { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(_tokentype.types.dot)) { - node.meta = meta; - node.property = this.parseIdent(true); - if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target"); - return this.finishNode(node, "MetaProperty"); - } - var startPos = this.start, - startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, false);else node.arguments = empty; - return this.finishNode(node, "NewExpression"); -}; - -// Parse template expression. - -pp.parseTemplateElement = function () { - var elem = this.startNode(); - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value - }; - this.next(); - elem.tail = this.type === _tokentype.types.backQuote; - return this.finishNode(elem, "TemplateElement"); -}; - -pp.parseTemplate = function () { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(); - node.quasis = [curElt]; - while (!curElt.tail) { - this.expect(_tokentype.types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(_tokentype.types.braceR); - node.quasis.push(curElt = this.parseTemplateElement()); - } - this.next(); - return this.finishNode(node, "TemplateLiteral"); -}; - -// Parse an object literal or binding pattern. - -pp.parseObj = function (isPattern, refShorthandDefaultPos) { - var node = this.startNode(), - first = true, - propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(_tokentype.types.braceR)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; - } else first = false; - - var prop = this.startNode(), - isGenerator = undefined, - startPos = undefined, - startLoc = undefined; - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refShorthandDefaultPos) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) isGenerator = this.eat(_tokentype.types.star); - } - this.parsePropertyName(prop); - this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos); - this.checkPropClash(prop, propHash); - node.properties.push(this.finishNode(prop, "Property")); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); -}; - -pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos) { - if (this.eat(_tokentype.types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === _tokentype.types.parenL) { - if (isPattern) this.unexpected(); - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator); - } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != _tokentype.types.comma && this.type != _tokentype.types.braceR)) { - if (isGenerator || isPattern) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") this.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - prop.kind = "init"; - if (isPattern) { - if (this.isKeyword(prop.key.name) || this.strict && (_identifier.reservedWords.strictBind(prop.key.name) || _identifier.reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === _tokentype.types.eq && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else this.unexpected(); -}; - -pp.parsePropertyName = function (prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(_tokentype.types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(_tokentype.types.bracketR); - return prop.key; - } else { - prop.computed = false; - } - } - return prop.key = this.type === _tokentype.types.num || this.type === _tokentype.types.string ? this.parseExprAtom() : this.parseIdent(true); -}; - -// Initialize empty function node. - -pp.initFunction = function (node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; - } -}; - -// Parse object or class method. - -pp.parseMethod = function (isGenerator) { - var node = this.startNode(); - this.initFunction(node); - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, false); - var allowExpressionBody = undefined; - if (this.options.ecmaVersion >= 6) { - node.generator = isGenerator; - } - this.parseFunctionBody(node, false); - return this.finishNode(node, "FunctionExpression"); -}; - -// Parse arrow function expression with given parameters. - -pp.parseArrowExpression = function (node, params) { - this.initFunction(node); - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - return this.finishNode(node, "ArrowFunctionExpression"); -}; - -// Parse function body and check parameters. - -pp.parseFunctionBody = function (node, allowExpression) { - var isExpression = allowExpression && this.type !== _tokentype.types.braceL; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - } else { - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldInFunc = this.inFunction, - oldInGen = this.inGenerator, - oldLabels = this.labels; - this.inFunction = true;this.inGenerator = node.generator;this.labels = []; - node.body = this.parseBlock(true); - node.expression = false; - this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; - } - - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { - var nameHash = {}, - oldStrict = this.strict; - this.strict = true; - if (node.id) this.checkLVal(node.id, true); - for (var i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], true, nameHash); - }this.strict = oldStrict; - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) break; - } else first = false; - - var elt = undefined; - if (allowEmpty && this.type === _tokentype.types.comma) elt = null;else if (this.type === _tokentype.types.ellipsis) elt = this.parseSpread(refShorthandDefaultPos);else elt = this.parseMaybeAssign(false, refShorthandDefaultPos); - elts.push(elt); - } - return elts; -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp.parseIdent = function (liberal) { - var node = this.startNode(); - if (liberal && this.options.allowReserved == "never") liberal = false; - if (this.type === _tokentype.types.name) { - if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && _identifier.reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); - node.name = this.value; - } else if (liberal && this.type.keyword) { - node.name = this.type.keyword; - } else { - this.unexpected(); - } - this.next(); - return this.finishNode(node, "Identifier"); -}; - -// Parses yield expression inside generator. - -pp.parseYield = function () { - var node = this.startNode(); - this.next(); - if (this.type == _tokentype.types.semi || this.canInsertSemicolon() || this.type != _tokentype.types.star && !this.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(_tokentype.types.star); - node.argument = this.parseMaybeAssign(); - } - return this.finishNode(node, "YieldExpression"); -}; - -// Parses array and generator comprehensions. - -pp.parseComprehension = function (node, isGenerator) { - node.blocks = []; - while (this.type === _tokentype.types._for) { - var block = this.startNode(); - this.next(); - this.expect(_tokentype.types.parenL); - block.left = this.parseBindingAtom(); - this.checkLVal(block.left, true); - this.expectContextual("of"); - block.right = this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.blocks.push(this.finishNode(block, "ComprehensionBlock")); - } - node.filter = this.eat(_tokentype.types._if) ? this.parseParenExpression() : null; - node.body = this.parseExpression(); - this.expect(isGenerator ? _tokentype.types.parenR : _tokentype.types.bracketR); - node.generator = isGenerator; - return this.finishNode(node, "ComprehensionExpression"); -}; - -},{"./identifier":2,"./state":10,"./tokentype":14,"./util":15}],2:[function(_dereq_,module,exports){ -// This is a trick taken from Esprima. It turns out that, on -// non-Chrome browsers, to check whether a string is in a set, a -// predicate containing a big ugly `switch` statement is faster than -// a regular expression, and on Chrome the two are about on par. -// This function uses `eval` (non-lexical) to produce such a -// predicate from a space-separated string of words. -// -// It starts by sorting the words by length. - -"use strict"; - -exports.__esModule = true; -exports.isIdentifierStart = isIdentifierStart; -exports.isIdentifierChar = isIdentifierChar; -function makePredicate(words) { - words = words.split(" "); - var f = "", - cats = []; - out: for (var i = 0; i < words.length; ++i) { - for (var j = 0; j < cats.length; ++j) { - if (cats[j][0].length == words[i].length) { - cats[j].push(words[i]); - continue out; - } - }cats.push([words[i]]); - } - function compareTo(arr) { - if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"; - f += "switch(str){"; - for (var i = 0; i < arr.length; ++i) { - f += "case " + JSON.stringify(arr[i]) + ":"; - }f += "return true}return false;"; - } - - // When there are more than three length categories, an outer - // switch first dispatches on the lengths, to save on comparisons. - - if (cats.length > 3) { - cats.sort(function (a, b) { - return b.length - a.length; - }); - f += "switch(str.length){"; - for (var i = 0; i < cats.length; ++i) { - var cat = cats[i]; - f += "case " + cat[0].length + ":"; - compareTo(cat); - } - f += "}" - - // Otherwise, simply generate a flat `switch` statement. - - ; - } else { - compareTo(words); - } - return new Function("str", f); -} - -// Reserved word lists for various dialects of the language - -var reservedWords = { - 3: makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"), - 5: makePredicate("class enum extends super const export import"), - 6: makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") -}; - -exports.reservedWords = reservedWords; -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: makePredicate(ecma5AndLessKeywords), - 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super") -}; - -exports.keywords = keywords; -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `tools/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; -var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by tools/generate-identifier-regex.js -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541]; -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 4305, 6, 792618, 239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } -} - -// Test whether a given character code starts an identifier. - -function isIdentifierStart(code, astral) { - if (code < 65) return code === 36; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes); -} - -// Test whether a given character is part of an identifier. - -function isIdentifierChar(code, astral) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -},{}],3:[function(_dereq_,module,exports){ -// Acorn is a tiny, fast JavaScript parser written in JavaScript. -// -// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and -// various contributors and released under an MIT license. -// -// Git repositories for Acorn are available at -// -// http://marijnhaverbeke.nl/git/acorn -// https://github.com/marijnh/acorn.git -// -// Please use the [github bug tracker][ghbt] to report issues. -// -// [ghbt]: https://github.com/marijnh/acorn/issues -// -// This file defines the main parser interface. The library also comes -// with a [error-tolerant parser][dammit] and an -// [abstract syntax tree walker][walk], defined in other files. -// -// [dammit]: acorn_loose.js -// [walk]: util/walk.js - -"use strict"; - -exports.__esModule = true; -exports.parse = parse; -exports.parseExpressionAt = parseExpressionAt; -exports.tokenizer = tokenizer; - -var _state = _dereq_("./state"); - -var _options = _dereq_("./options"); - -_dereq_("./parseutil"); - -_dereq_("./statement"); - -_dereq_("./lval"); - -_dereq_("./expression"); - -_dereq_("./location"); - -exports.Parser = _state.Parser; -exports.plugins = _state.plugins; -exports.defaultOptions = _options.defaultOptions; - -var _locutil = _dereq_("./locutil"); - -exports.Position = _locutil.Position; -exports.SourceLocation = _locutil.SourceLocation; -exports.getLineInfo = _locutil.getLineInfo; - -var _node = _dereq_("./node"); - -exports.Node = _node.Node; - -var _tokentype = _dereq_("./tokentype"); - -exports.TokenType = _tokentype.TokenType; -exports.tokTypes = _tokentype.types; - -var _tokencontext = _dereq_("./tokencontext"); - -exports.TokContext = _tokencontext.TokContext; -exports.tokContexts = _tokencontext.types; - -var _identifier = _dereq_("./identifier"); - -exports.isIdentifierChar = _identifier.isIdentifierChar; -exports.isIdentifierStart = _identifier.isIdentifierStart; - -var _tokenize = _dereq_("./tokenize"); - -exports.Token = _tokenize.Token; - -var _whitespace = _dereq_("./whitespace"); - -exports.isNewLine = _whitespace.isNewLine; -exports.lineBreak = _whitespace.lineBreak; -exports.lineBreakG = _whitespace.lineBreakG; -var version = "2.3.0"; - -exports.version = version; -// The main exported interface (under `self.acorn` when in the -// browser) is a `parse` function that takes a code string and -// returns an abstract syntax tree as specified by [Mozilla parser -// API][api]. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - -function parse(input, options) { - return new _state.Parser(options, input).parse(); -} - -// This function tries to parse a single expression at a given -// offset in a string. Useful for parsing mixed-language formats -// that embed JavaScript expressions. - -function parseExpressionAt(input, pos, options) { - var p = new _state.Parser(options, input, pos); - p.nextToken(); - return p.parseExpression(); -} - -// Acorn is organized as a tokenizer and a recursive-descent parser. -// The `tokenize` export provides an interface to the tokenizer. - -function tokenizer(input, options) { - return new _state.Parser(options, input); -} - -},{"./expression":1,"./identifier":2,"./location":4,"./locutil":5,"./lval":6,"./node":7,"./options":8,"./parseutil":9,"./state":10,"./statement":11,"./tokencontext":12,"./tokenize":13,"./tokentype":14,"./whitespace":16}],4:[function(_dereq_,module,exports){ -"use strict"; - -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var pp = _state.Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp.raise = function (pos, message) { - var loc = _locutil.getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos;err.loc = loc;err.raisedAt = this.pos; - throw err; -}; - -pp.curPosition = function () { - if (this.options.locations) { - return new _locutil.Position(this.curLine, this.pos - this.lineStart); - } -}; - -},{"./locutil":5,"./state":10}],5:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; -exports.getLineInfo = getLineInfo; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _whitespace = _dereq_("./whitespace"); - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = (function () { - function Position(line, col) { - _classCallCheck(this, Position); - - this.line = line; - this.column = col; - } - - Position.prototype.offset = function offset(n) { - return new Position(this.line, this.column + n); - }; - - return Position; -})(); - -exports.Position = Position; - -var SourceLocation = function SourceLocation(p, start, end) { - _classCallCheck(this, SourceLocation); - - this.start = start; - this.end = end; - if (p.sourceFile !== null) this.source = p.sourceFile; -}; - -exports.SourceLocation = SourceLocation; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - _whitespace.lineBreakG.lastIndex = cur; - var match = _whitespace.lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); - } - } -} - -},{"./whitespace":16}],6:[function(_dereq_,module,exports){ -"use strict"; - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _identifier = _dereq_("./identifier"); - -var _util = _dereq_("./util"); - -var pp = _state.Parser.prototype; - -// Convert existing expression atom to assignable pattern -// if possible. - -pp.toAssignable = function (node, isBinding) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - this.toAssignable(prop.value, isBinding); - } - break; - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding); - break; - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - break; - - case "ParenthesizedExpression": - node.expression = this.toAssignable(node.expression, isBinding); - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - this.raise(node.start, "Assigning to rvalue"); - } - } - return node; -}; - -// Convert list of expression atoms to binding list. - -pp.toAssignableList = function (exprList, isBinding) { - var end = exprList.length; - if (end) { - var last = exprList[end - 1]; - if (last && last.type == "RestElement") { - --end; - } else if (last && last.type == "SpreadElement") { - last.type = "RestElement"; - var arg = last.argument; - this.toAssignable(arg, isBinding); - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); - --end; - } - } - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) this.toAssignable(elt, isBinding); - } - return exprList; -}; - -// Parses spread element. - -pp.parseSpread = function (refShorthandDefaultPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(refShorthandDefaultPos); - return this.finishNode(node, "SpreadElement"); -}; - -pp.parseRest = function () { - var node = this.startNode(); - this.next(); - node.argument = this.type === _tokentype.types.name || this.type === _tokentype.types.bracketL ? this.parseBindingAtom() : this.unexpected(); - return this.finishNode(node, "RestElement"); -}; - -// Parses lvalue (assignable) atom. - -pp.parseBindingAtom = function () { - if (this.options.ecmaVersion < 6) return this.parseIdent(); - switch (this.type) { - case _tokentype.types.name: - return this.parseIdent(); - - case _tokentype.types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(_tokentype.types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern"); - - case _tokentype.types.braceL: - return this.parseObj(true); - - default: - this.unexpected(); - } -}; - -pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (first) first = false;else this.expect(_tokentype.types.comma); - if (allowEmpty && this.type === _tokentype.types.comma) { - elts.push(null); - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break; - } else if (this.type === _tokentype.types.ellipsis) { - var rest = this.parseRest(); - this.parseBindingListItem(rest); - elts.push(rest); - this.expect(close); - break; - } else { - var elem = this.parseMaybeDefault(this.start, this.startLoc); - this.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts; -}; - -pp.parseBindingListItem = function (param) { - return param; -}; - -// Parses assignment pattern around given atom if possible. - -pp.parseMaybeDefault = function (startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (!this.eat(_tokentype.types.eq)) return left; - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); -}; - -// Verify that a node is an lval — something that can be assigned -// to. - -pp.checkLVal = function (expr, isBinding, checkClashes) { - switch (expr.type) { - case "Identifier": - if (this.strict && (_identifier.reservedWords.strictBind(expr.name) || _identifier.reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); - if (checkClashes) { - if (_util.has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); - checkClashes[expr.name] = true; - } - break; - - case "MemberExpression": - if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); - break; - - case "ObjectPattern": - for (var i = 0; i < expr.properties.length; i++) { - this.checkLVal(expr.properties[i].value, isBinding, checkClashes); - }break; - - case "ArrayPattern": - for (var i = 0; i < expr.elements.length; i++) { - var elem = expr.elements[i]; - if (elem) this.checkLVal(elem, isBinding, checkClashes); - } - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes); - break; - - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes); - break; - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, isBinding, checkClashes); - break; - - default: - this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -},{"./identifier":2,"./state":10,"./tokentype":14,"./util":15}],7:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var Node = function Node(parser, pos, loc) { - _classCallCheck(this, Node); - - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) this.loc = new _locutil.SourceLocation(parser, loc); - if (parser.options.directSourceFile) this.sourceFile = parser.options.directSourceFile; - if (parser.options.ranges) this.range = [pos, 0]; -}; - -exports.Node = Node; - -// Start an AST node, attaching a start offset. - -var pp = _state.Parser.prototype; - -pp.startNode = function () { - return new Node(this, this.start, this.startLoc); -}; - -pp.startNodeAt = function (pos, loc) { - return new Node(this, pos, loc); -}; - -// Finish an AST node, adding `type` and `end` properties. - -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - return node; -} - -pp.finishNode = function (node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc); -}; - -// Finish node at given position - -pp.finishNodeAt = function (node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc); -}; - -},{"./locutil":5,"./state":10}],8:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; -exports.getOptions = getOptions; - -var _util = _dereq_("./util"); - -var _locutil = _dereq_("./locutil"); - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must - // be either 3, or 5, or 6. This influences support for strict - // mode, the set of reserved words, support for getters and - // setters and other features. - ecmaVersion: 5, - // Source type ("script" or "module") for different semantics - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // th position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are not enforced. Disable - // `allowReserved` to enforce them. When this option has the - // value "never", reserved words and keywords can also not be - // used as property names. - allowReserved: true, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokenize() returns. Note that you are not - // allowed to call the parser from the callback—that will - // corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false, - plugins: {} -}; - -exports.defaultOptions = defaultOptions; -// Interpret and default an options object - -function getOptions(opts) { - var options = {}; - for (var opt in defaultOptions) { - options[opt] = opts && _util.has(opts, opt) ? opts[opt] : defaultOptions[opt]; - }if (_util.isArray(options.onToken)) { - (function () { - var tokens = options.onToken; - options.onToken = function (token) { - return tokens.push(token); - }; - })(); - } - if (_util.isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); - - return options; -} - -function pushComment(options, array) { - return function (block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) comment.loc = new _locutil.SourceLocation(this, startLoc, endLoc); - if (options.ranges) comment.range = [start, end]; - array.push(comment); - }; -} - -},{"./locutil":5,"./util":15}],9:[function(_dereq_,module,exports){ -"use strict"; - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _whitespace = _dereq_("./whitespace"); - -var pp = _state.Parser.prototype; - -// ## Parser utilities - -// Test whether a statement node is the string literal `"use strict"`. - -pp.isUseStrict = function (stmt) { - return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict"; -}; - -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. - -pp.eat = function (type) { - if (this.type === type) { - this.next(); - return true; - } else { - return false; - } -}; - -// Tests whether parsed token is a contextual keyword. - -pp.isContextual = function (name) { - return this.type === _tokentype.types.name && this.value === name; -}; - -// Consumes contextual keyword if possible. - -pp.eatContextual = function (name) { - return this.value === name && this.eat(_tokentype.types.name); -}; - -// Asserts that following token is given contextual keyword. - -pp.expectContextual = function (name) { - if (!this.eatContextual(name)) this.unexpected(); -}; - -// Test whether a semicolon can be inserted at the current position. - -pp.canInsertSemicolon = function () { - return this.type === _tokentype.types.eof || this.type === _tokentype.types.braceR || _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); -}; - -pp.insertSemicolon = function () { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); - return true; - } -}; - -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. - -pp.semicolon = function () { - if (!this.eat(_tokentype.types.semi) && !this.insertSemicolon()) this.unexpected(); -}; - -pp.afterTrailingComma = function (tokType) { - if (this.type == tokType) { - if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); - this.next(); - return true; - } -}; - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function (type) { - this.eat(type) || this.unexpected(); -}; - -// Raise an unexpected token error. - -pp.unexpected = function (pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; - -},{"./state":10,"./tokentype":14,"./whitespace":16}],10:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _identifier = _dereq_("./identifier"); - -var _tokentype = _dereq_("./tokentype"); - -var _whitespace = _dereq_("./whitespace"); - -var _options = _dereq_("./options"); - -// Registered plugins -var plugins = {}; - -exports.plugins = plugins; - -var Parser = (function () { - function Parser(options, input, startPos) { - _classCallCheck(this, Parser); - - this.options = _options.getOptions(options); - this.sourceFile = this.options.sourceFile; - this.isKeyword = _identifier.keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; - this.isReservedWord = _identifier.reservedWords[this.options.ecmaVersion]; - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Load plugins - this.loadPlugins(this.options.plugins); - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); - this.curLine = this.input.slice(0, this.lineStart).split(_whitespace.lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = _tokentype.types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.strict = this.inModule = this.options.sourceType === "module"; - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Flags to track whether we are in a function, a generator. - this.inFunction = this.inGenerator = false; - // Labels in scope. - this.labels = []; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); - } - - Parser.prototype.extend = function extend(name, f) { - this[name] = f(this[name]); - }; - - Parser.prototype.loadPlugins = function loadPlugins(pluginConfigs) { - for (var _name in pluginConfigs) { - var plugin = plugins[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, pluginConfigs[_name]); - } - }; - - Parser.prototype.parse = function parse() { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node); - }; - - return Parser; -})(); - -exports.Parser = Parser; - -},{"./identifier":2,"./options":8,"./tokentype":14,"./whitespace":16}],11:[function(_dereq_,module,exports){ -"use strict"; - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _whitespace = _dereq_("./whitespace"); - -var pp = _state.Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp.parseTopLevel = function (node) { - var first = true; - if (!node.body) node.body = []; - while (this.type !== _tokentype.types.eof) { - var stmt = this.parseStatement(true, true); - node.body.push(stmt); - if (first) { - if (this.isUseStrict(stmt)) this.setStrict(true); - first = false; - } - } - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program"); -}; - -var loopLabel = { kind: "loop" }, - switchLabel = { kind: "switch" }; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp.parseStatement = function (declaration, topLevel) { - var starttype = this.type, - node = this.startNode(); - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case _tokentype.types._break:case _tokentype.types._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - case _tokentype.types._debugger: - return this.parseDebuggerStatement(node); - case _tokentype.types._do: - return this.parseDoStatement(node); - case _tokentype.types._for: - return this.parseForStatement(node); - case _tokentype.types._function: - if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); - return this.parseFunctionStatement(node); - case _tokentype.types._class: - if (!declaration) this.unexpected(); - return this.parseClass(node, true); - case _tokentype.types._if: - return this.parseIfStatement(node); - case _tokentype.types._return: - return this.parseReturnStatement(node); - case _tokentype.types._switch: - return this.parseSwitchStatement(node); - case _tokentype.types._throw: - return this.parseThrowStatement(node); - case _tokentype.types._try: - return this.parseTryStatement(node); - case _tokentype.types._let:case _tokentype.types._const: - if (!declaration) this.unexpected(); // NOTE: falls through to _var - case _tokentype.types._var: - return this.parseVarStatement(node, starttype); - case _tokentype.types._while: - return this.parseWhileStatement(node); - case _tokentype.types._with: - return this.parseWithStatement(node); - case _tokentype.types.braceL: - return this.parseBlock(); - case _tokentype.types.semi: - return this.parseEmptyStatement(node); - case _tokentype.types._export: - case _tokentype.types._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level"); - if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); - } - return starttype === _tokentype.types._import ? this.parseImport(node) : this.parseExport(node); - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - var maybeName = this.value, - expr = this.parseExpression(); - if (starttype === _tokentype.types.name && expr.type === "Identifier" && this.eat(_tokentype.types.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); - } -}; - -pp.parseBreakContinueStatement = function (node, keyword) { - var isBreak = keyword == "break"; - this.next(); - if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== _tokentype.types.name) this.unexpected();else { - node.label = this.parseIdent(); - this.semicolon(); - } - - // Verify that there is an actual destination to break or - // continue to. - for (var i = 0; i < this.labels.length; ++i) { - var lab = this.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); -}; - -pp.parseDebuggerStatement = function (node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); -}; - -pp.parseDoStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - this.expect(_tokentype.types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) this.eat(_tokentype.types.semi);else this.semicolon(); - return this.finishNode(node, "DoWhileStatement"); -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp.parseForStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - this.expect(_tokentype.types.parenL); - if (this.type === _tokentype.types.semi) return this.parseFor(node, null); - if (this.type === _tokentype.types._var || this.type === _tokentype.types._let || this.type === _tokentype.types._const) { - var _init = this.startNode(), - varKind = this.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== _tokentype.types._var && _init.declarations[0].init)) return this.parseForIn(node, _init); - return this.parseFor(node, _init); - } - var refShorthandDefaultPos = { start: 0 }; - var init = this.parseExpression(true, refShorthandDefaultPos); - if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { - this.toAssignable(init); - this.checkLVal(init); - return this.parseForIn(node, init); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return this.parseFor(node, init); -}; - -pp.parseFunctionStatement = function (node) { - this.next(); - return this.parseFunction(node, true); -}; - -pp.parseIfStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(false); - node.alternate = this.eat(_tokentype.types._else) ? this.parseStatement(false) : null; - return this.finishNode(node, "IfStatement"); -}; - -pp.parseReturnStatement = function (node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function"); - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.argument = null;else { - node.argument = this.parseExpression();this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); -}; - -pp.parseSwitchStatement = function (node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(_tokentype.types.braceL); - this.labels.push(switchLabel); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - for (var cur, sawDefault = false; this.type != _tokentype.types.braceR;) { - if (this.type === _tokentype.types._case || this.type === _tokentype.types._default) { - var isCase = this.type === _tokentype.types._case; - if (cur) this.finishNode(cur, "SwitchCase"); - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses"); - sawDefault = true; - cur.test = null; - } - this.expect(_tokentype.types.colon); - } else { - if (!cur) this.unexpected(); - cur.consequent.push(this.parseStatement(true)); - } - } - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement"); -}; - -pp.parseThrowStatement = function (node) { - this.next(); - if (_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw"); - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp.parseTryStatement = function (node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === _tokentype.types._catch) { - var clause = this.startNode(); - this.next(); - this.expect(_tokentype.types.parenL); - clause.param = this.parseBindingAtom(); - this.checkLVal(clause.param, true); - this.expect(_tokentype.types.parenR); - clause.guard = null; - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.guardedHandlers = empty; - node.finalizer = this.eat(_tokentype.types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause"); - return this.finishNode(node, "TryStatement"); -}; - -pp.parseVarStatement = function (node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); -}; - -pp.parseWhileStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "WhileStatement"); -}; - -pp.parseWithStatement = function (node) { - if (this.strict) this.raise(this.start, "'with' in strict mode"); - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement"); -}; - -pp.parseEmptyStatement = function (node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); -}; - -pp.parseLabeledStatement = function (node, maybeName, expr) { - for (var i = 0; i < this.labels.length; ++i) { - if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - }var kind = this.type.isLoop ? "loop" : this.type === _tokentype.types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label = this.labels[i]; - if (label.statementStart == node.start) { - label.statementStart = this.start; - label.kind = kind; - } else break; - } - this.labels.push({ name: maybeName, kind: kind, statementStart: this.start }); - node.body = this.parseStatement(true); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); -}; - -pp.parseExpressionStatement = function (node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp.parseBlock = function (allowStrict) { - var node = this.startNode(), - first = true, - oldStrict = undefined; - node.body = []; - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - var stmt = this.parseStatement(true); - node.body.push(stmt); - if (first && allowStrict && this.isUseStrict(stmt)) { - oldStrict = this.strict; - this.setStrict(this.strict = true); - } - first = false; - } - if (oldStrict === false) this.setStrict(false); - return this.finishNode(node, "BlockStatement"); -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp.parseFor = function (node, init) { - node.init = init; - this.expect(_tokentype.types.semi); - node.test = this.type === _tokentype.types.semi ? null : this.parseExpression(); - this.expect(_tokentype.types.semi); - node.update = this.type === _tokentype.types.parenR ? null : this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "ForStatement"); -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp.parseForIn = function (node, init) { - var type = this.type === _tokentype.types._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - node.left = init; - node.right = this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, type); -}; - -// Parse a list of variable declarations. - -pp.parseVar = function (node, isFor, kind) { - node.declarations = []; - node.kind = kind.keyword; - for (;;) { - var decl = this.startNode(); - this.parseVarId(decl); - if (this.eat(_tokentype.types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === _tokentype.types._const && !(this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - this.unexpected(); - } else if (decl.id.type != "Identifier" && !(isFor && (this.type === _tokentype.types._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(_tokentype.types.comma)) break; - } - return node; -}; - -pp.parseVarId = function (decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true); -}; - -// Parse a function declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseFunction = function (node, isStatement, allowExpressionBody) { - this.initFunction(node); - if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star); - if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent(); - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); -}; - -pp.parseFunctionParams = function (node) { - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, false); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseClass = function (node, isStatement) { - this.next(); - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (this.eat(_tokentype.types.semi)) continue; - var method = this.startNode(); - var isGenerator = this.eat(_tokentype.types.star); - var isMaybeStatic = this.type === _tokentype.types.name && this.value === "static"; - this.parsePropertyName(method); - method["static"] = isMaybeStatic && this.type !== _tokentype.types.parenL; - if (method["static"]) { - if (isGenerator) this.unexpected(); - isGenerator = this.eat(_tokentype.types.star); - this.parsePropertyName(method); - } - method.kind = "method"; - var isGetSet = false; - if (!method.computed) { - var key = method.key; - - if (!isGenerator && key.type === "Identifier" && this.type !== _tokentype.types.parenL && (key.name === "get" || key.name === "set")) { - isGetSet = true; - method.kind = key.name; - key = this.parsePropertyName(method); - } - if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) { - if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class"); - if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier"); - if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); - method.kind = "constructor"; - hadConstructor = true; - } - } - this.parseClassMethod(classBody, method, isGenerator); - if (isGetSet) { - var paramCount = method.kind === "get" ? 0 : 1; - if (method.value.params.length !== paramCount) { - var start = method.value.start; - if (method.kind === "get") this.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); - } - } - } - node.body = this.finishNode(classBody, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); -}; - -pp.parseClassMethod = function (classBody, method, isGenerator) { - method.value = this.parseMethod(isGenerator); - classBody.body.push(this.finishNode(method, "MethodDefinition")); -}; - -pp.parseClassId = function (node, isStatement) { - node.id = this.type === _tokentype.types.name ? this.parseIdent() : isStatement ? this.unexpected() : null; -}; - -pp.parseClassSuper = function (node) { - node.superClass = this.eat(_tokentype.types._extends) ? this.parseExprSubscripts() : null; -}; - -// Parses module export declaration. - -pp.parseExport = function (node) { - this.next(); - // export * from '...' - if (this.eat(_tokentype.types.star)) { - this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration"); - } - if (this.eat(_tokentype.types._default)) { - // export default ... - var expr = this.parseMaybeAssign(); - var needsSemi = true; - if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") { - needsSemi = false; - if (expr.id) { - expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration"; - } - } - node.declaration = expr; - if (needsSemi) this.semicolon(); - return this.finishNode(node, "ExportDefaultDeclaration"); - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(true); - node.specifiers = []; - node.source = null; - } else { - // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(); - if (this.eatContextual("from")) { - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - } else { - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration"); -}; - -pp.shouldParseExportStatement = function () { - return this.type.keyword; -}; - -// Parses a comma-separated list of module exports. - -pp.parseExportSpecifiers = function () { - var nodes = [], - first = true; - // export { x, y as z } [from '...'] - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.local = this.parseIdent(this.type === _tokentype.types._default); - node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - return nodes; -}; - -// Parses import declaration. - -pp.parseImport = function (node) { - this.next(); - // import '...' - if (this.type === _tokentype.types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); -}; - -// Parses a comma-separated list of module imports. - -pp.parseImportSpecifiers = function () { - var nodes = [], - first = true; - if (this.type === _tokentype.types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(_tokentype.types.comma)) return nodes; - } - if (this.type === _tokentype.types.star) { - var node = this.startNode(); - this.next(); - this.expectContextual("as"); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportNamespaceSpecifier")); - return nodes; - } - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.imported = this.parseIdent(true); - node.local = this.eatContextual("as") ? this.parseIdent() : node.imported; - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportSpecifier")); - } - return nodes; -}; - -},{"./state":10,"./tokentype":14,"./whitespace":16}],12:[function(_dereq_,module,exports){ -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _state = _dereq_("./state"); - -var _tokentype = _dereq_("./tokentype"); - -var _whitespace = _dereq_("./whitespace"); - -var TokContext = function TokContext(token, isExpr, preserveSpace, override) { - _classCallCheck(this, TokContext); - - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; -}; - -exports.TokContext = TokContext; -var types = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", true), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - f_expr: new TokContext("function", true) -}; - -exports.types = types; -var pp = _state.Parser.prototype; - -pp.initialContext = function () { - return [types.b_stat]; -}; - -pp.braceIsBlock = function (prevType) { - if (prevType === _tokentype.types.colon) { - var _parent = this.curContext(); - if (_parent === types.b_stat || _parent === types.b_expr) return !_parent.isExpr; - } - if (prevType === _tokentype.types._return) return _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); - if (prevType === _tokentype.types._else || prevType === _tokentype.types.semi || prevType === _tokentype.types.eof || prevType === _tokentype.types.parenR) return true; - if (prevType == _tokentype.types.braceL) return this.curContext() === types.b_stat; - return !this.exprAllowed; -}; - -pp.updateContext = function (prevType) { - var update = undefined, - type = this.type; - if (type.keyword && prevType == _tokentype.types.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; -}; - -// Token-specific context update code - -_tokentype.types.parenR.updateContext = _tokentype.types.braceR.updateContext = function () { - if (this.context.length == 1) { - this.exprAllowed = true; - return; - } - var out = this.context.pop(); - if (out === types.b_stat && this.curContext() === types.f_expr) { - this.context.pop(); - this.exprAllowed = false; - } else if (out === types.b_tmpl) { - this.exprAllowed = true; - } else { - this.exprAllowed = !out.isExpr; - } -}; - -_tokentype.types.braceL.updateContext = function (prevType) { - this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); - this.exprAllowed = true; -}; - -_tokentype.types.dollarBraceL.updateContext = function () { - this.context.push(types.b_tmpl); - this.exprAllowed = true; -}; - -_tokentype.types.parenL.updateContext = function (prevType) { - var statementParens = prevType === _tokentype.types._if || prevType === _tokentype.types._for || prevType === _tokentype.types._with || prevType === _tokentype.types._while; - this.context.push(statementParens ? types.p_stat : types.p_expr); - this.exprAllowed = true; -}; - -_tokentype.types.incDec.updateContext = function () {}; - -_tokentype.types._function.updateContext = function () { - if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); - this.exprAllowed = false; -}; - -_tokentype.types.backQuote.updateContext = function () { - if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); - this.exprAllowed = false; -}; - -// tokExprAllowed stays unchanged - -},{"./state":10,"./tokentype":14,"./whitespace":16}],13:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _identifier = _dereq_("./identifier"); - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var _whitespace = _dereq_("./whitespace"); - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = function Token(p) { - _classCallCheck(this, Token); - - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) this.loc = new _locutil.SourceLocation(p, p.startLoc, p.endLoc); - if (p.options.ranges) this.range = [p.start, p.end]; -}; - -exports.Token = Token; - -// ## Tokenizer - -var pp = _state.Parser.prototype; - -// Are we running under Rhino? -var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"; - -// Move to the next token - -pp.next = function () { - if (this.options.onToken) this.options.onToken(new Token(this)); - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp.getToken = function () { - this.next(); - return new Token(this); -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { - var self = this; - return { next: function next() { - var token = self.getToken(); - return { - done: token.type === _tokentype.types.eof, - value: token - }; - } }; -}; - -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). - -pp.setStrict = function (strict) { - this.strict = strict; - if (this.type !== _tokentype.types.num && this.type !== _tokentype.types.string) return; - this.pos = this.start; - if (this.options.locations) { - while (this.pos < this.lineStart) { - this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1; - --this.curLine; - } - } - this.nextToken(); -}; - -pp.curContext = function () { - return this.context[this.context.length - 1]; -}; - -// Read a single token, updating the parser object's token-related -// properties. - -pp.nextToken = function () { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - - this.start = this.pos; - if (this.options.locations) this.startLoc = this.curPosition(); - if (this.pos >= this.input.length) return this.finishToken(_tokentype.types.eof); - - if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos()); -}; - -pp.readToken = function (code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (_identifier.isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord(); - - return this.getTokenFromCode(code); -}; - -pp.fullCharCodeAtPos = function () { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) return code; - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00; -}; - -pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, - end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); - this.pos = end + 2; - if (this.options.locations) { - _whitespace.lineBreakG.lastIndex = start; - var match = undefined; - while ((match = _whitespace.lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this.curLine; - this.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition()); -}; - -pp.skipLineComment = function (startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { - ++this.pos; - ch = this.input.charCodeAt(this.pos); - } - if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition()); -}; - -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. - -pp.skipSpace = function () { - loop: while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - switch (ch) { - case 32:case 160: - // ' ' - ++this.pos; - break; - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos; - } - case 10:case 8232:case 8233: - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - break; - case 47: - // '/' - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: - // '*' - this.skipBlockComment(); - break; - case 47: - this.skipLineComment(2); - break; - default: - break loop; - } - break; - default: - if (ch > 8 && ch < 14 || ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break loop; - } - } - } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp.finishToken = function (type, val) { - this.end = this.pos; - if (this.options.locations) this.endLoc = this.curPosition(); - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp.readToken_dot = function () { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) return this.readNumber(true); - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { - // 46 = dot '.' - this.pos += 3; - return this.finishToken(_tokentype.types.ellipsis); - } else { - ++this.pos; - return this.finishToken(_tokentype.types.dot); - } -}; - -pp.readToken_slash = function () { - // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { - ++this.pos;return this.readRegexp(); - } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.slash, 1); -}; - -pp.readToken_mult_modulo = function (code) { - // '%*' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(code === 42 ? _tokentype.types.star : _tokentype.types.modulo, 1); -}; - -pp.readToken_pipe_amp = function (code) { - // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) return this.finishOp(code === 124 ? _tokentype.types.logicalOR : _tokentype.types.logicalAND, 2); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(code === 124 ? _tokentype.types.bitwiseOR : _tokentype.types.bitwiseAND, 1); -}; - -pp.readToken_caret = function () { - // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.bitwiseXOR, 1); -}; - -pp.readToken_plus_min = function (code) { - // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(_tokentype.types.incDec, 2); - } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.plusMin, 1); -}; - -pp.readToken_lt_gt = function (code) { - // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1); - return this.finishOp(_tokentype.types.bitShift, size); - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected(); - // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(_tokentype.types.incDec, 2); - } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.plusMin, 1); -}; - -pp.readToken_lt_gt = function (code) { - // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1); - return this.finishOp(_tokentype.types.bitShift, size); - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected(); - // `` line comment - this.skipLineComment(3) - this.skipSpace() - return this.nextToken() - } - return this.finishOp(tt.incDec, 2) - } - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.plusMin, 1) -} - -pp.readToken_lt_gt = function(code) { // '<>' - let next = this.input.charCodeAt(this.pos + 1) - let size = 1 - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) - return this.finishOp(tt.bitShift, size) - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected() - // `` line comment this.skipLineComment(3); this.skipSpace(); return this.nextToken(); } - return this.finishOp(_tokentype.types.incDec, 2); + return this.finishOp(tt.incDec, 2); } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.plusMin, 1); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.plusMin, 1); }; pp.readToken_lt_gt = function (code) { @@ -2650,8 +3364,8 @@ pp.readToken_lt_gt = function (code) { var size = 1; if (next === code) { size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1); - return this.finishOp(_tokentype.types.bitShift, size); + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1); + return this.finishOp(tt.bitShift, size); } if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { if (this.inModule) this.unexpected(); @@ -2661,19 +3375,19 @@ pp.readToken_lt_gt = function (code) { return this.nextToken(); } if (next === 61) size = this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2; - return this.finishOp(_tokentype.types.relational, size); + return this.finishOp(tt.relational, size); }; pp.readToken_eq_excl = function (code) { // '=!' var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2); + if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2); if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>' this.pos += 2; - return this.finishToken(_tokentype.types.arrow); + return this.finishToken(tt.arrow); } - return this.finishOp(code === 61 ? _tokentype.types.eq : _tokentype.types.prefix, 1); + return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1); }; pp.getTokenFromCode = function (code) { @@ -2686,31 +3400,31 @@ pp.getTokenFromCode = function (code) { // Punctuation tokens. case 40: - ++this.pos;return this.finishToken(_tokentype.types.parenL); + ++this.pos;return this.finishToken(tt.parenL); case 41: - ++this.pos;return this.finishToken(_tokentype.types.parenR); + ++this.pos;return this.finishToken(tt.parenR); case 59: - ++this.pos;return this.finishToken(_tokentype.types.semi); + ++this.pos;return this.finishToken(tt.semi); case 44: - ++this.pos;return this.finishToken(_tokentype.types.comma); + ++this.pos;return this.finishToken(tt.comma); case 91: - ++this.pos;return this.finishToken(_tokentype.types.bracketL); + ++this.pos;return this.finishToken(tt.bracketL); case 93: - ++this.pos;return this.finishToken(_tokentype.types.bracketR); + ++this.pos;return this.finishToken(tt.bracketR); case 123: - ++this.pos;return this.finishToken(_tokentype.types.braceL); + ++this.pos;return this.finishToken(tt.braceL); case 125: - ++this.pos;return this.finishToken(_tokentype.types.braceR); + ++this.pos;return this.finishToken(tt.braceR); case 58: - ++this.pos;return this.finishToken(_tokentype.types.colon); + ++this.pos;return this.finishToken(tt.colon); case 63: - ++this.pos;return this.finishToken(_tokentype.types.question); + ++this.pos;return this.finishToken(tt.question); case 96: // '`' if (this.options.ecmaVersion < 6) break; ++this.pos; - return this.finishToken(_tokentype.types.backQuote); + return this.finishToken(tt.backQuote); case 48: // '0' @@ -2766,7 +3480,7 @@ pp.getTokenFromCode = function (code) { case 126: // '~' - return this.finishOp(_tokentype.types.prefix, 1); + return this.finishOp(tt.prefix, 1); } this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'"); @@ -2778,32 +3492,22 @@ pp.finishOp = function (type, size) { return this.finishToken(type, str); }; +var regexpUnicodeSupport = false; +try { + new RegExp("￿", "u");regexpUnicodeSupport = true; +} catch (e) {} + // Parse a regular expression. Some context-awareness is necessary, // since a '/' inside a '[]' set does not end the expression. -function tryCreateRegexp(src, flags, throwErrorAt) { - try { - return new RegExp(src, flags); - } catch (e) { - if (throwErrorAt !== undefined) { - if (e instanceof SyntaxError) this.raise(throwErrorAt, "Error parsing regular expression: " + e.message); - this.raise(e); - } - } -} - -var regexpUnicodeSupport = !!tryCreateRegexp("￿", "u"); - pp.readRegexp = function () { - var _this = this; - var escaped = undefined, inClass = undefined, start = this.pos; for (;;) { if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression"); var ch = this.input.charAt(this.pos); - if (_whitespace.lineBreak.test(ch)) this.raise(start, "Unterminated regular expression"); + if (lineBreak.test(ch)) this.raise(start, "Unterminated regular expression"); if (!escaped) { if (ch === "[") inClass = true;else if (ch === "]" && inClass) inClass = false;else if (ch === "/" && !inClass) break; escaped = ch === "\\"; @@ -2829,12 +3533,7 @@ pp.readRegexp = function () { // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a // perfectly valid pattern that is equivalent to `[a-b]`, but it would // be replaced by `[x-b]` which throws an error. - tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (match, code, offset) { - code = Number("0x" + code); - if (code > 0x10FFFF) _this.raise(start + offset + 3, "Code point out of bounds"); - return "x"; - }); - tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"); + tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"); } } // Detect invalid regular expressions. @@ -2842,12 +3541,19 @@ pp.readRegexp = function () { // Rhino's regular expression parser is flaky and throws uncatchable exceptions, // so don't do detection if we are running under Rhino if (!isRhino) { - tryCreateRegexp(tmp, undefined, start); + try { + new RegExp(tmp); + } catch (e) { + if (e instanceof SyntaxError) this.raise(start, "Error parsing regular expression: " + e.message); + this.raise(e); + } // Get a regular expression object for this pattern-flag pair, or `null` in // case the current environment doesn't support the flags it uses. - value = tryCreateRegexp(content, mods); + try { + value = new RegExp(content, mods); + } catch (err) {} } - return this.finishToken(_tokentype.types.regexp, { pattern: content, flags: mods, value: value }); + return this.finishToken(tt.regexp, { pattern: content, flags: mods, value: value }); }; // Read an integer in the given radix. Return null if zero digits @@ -2877,8 +3583,8 @@ pp.readRadixNumber = function (radix) { this.pos += 2; // 0x var val = this.readInt(radix); if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix); - if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); - return this.finishToken(_tokentype.types.num, val); + if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); + return this.finishToken(tt.num, val); }; // Read an integer, octal integer, or floating-point number. @@ -2888,14 +3594,12 @@ pp.readNumber = function (startsWithDot) { isFloat = false, octal = this.input.charCodeAt(this.pos) === 48; if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number"); - var next = this.input.charCodeAt(this.pos); - if (next === 46) { - // '.' + if (this.input.charCodeAt(this.pos) === 46) { ++this.pos; this.readInt(10); isFloat = true; - next = this.input.charCodeAt(this.pos); } + var next = this.input.charCodeAt(this.pos); if (next === 69 || next === 101) { // 'eE' next = this.input.charCodeAt(++this.pos); @@ -2903,12 +3607,12 @@ pp.readNumber = function (startsWithDot) { if (this.readInt(10) === null) this.raise(start, "Invalid number"); isFloat = true; } - if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); + if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); var str = this.input.slice(start, this.pos), val = undefined; if (isFloat) val = parseFloat(str);else if (!octal || str.length === 1) val = parseInt(str, 10);else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number");else val = parseInt(str, 8); - return this.finishToken(_tokentype.types.num, val); + return this.finishToken(tt.num, val); }; // Read a string value, interpreting backslash-escapes. @@ -2919,10 +3623,10 @@ pp.readCodePoint = function () { if (ch === 123) { if (this.options.ecmaVersion < 6) this.unexpected(); - var codePos = ++this.pos; + ++this.pos; code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos); ++this.pos; - if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds"); + if (code > 1114111) this.unexpected(); } else { code = this.readHexChar(4); } @@ -2931,9 +3635,9 @@ pp.readCodePoint = function () { function codePointToString(code) { // UTF-16 Decoding - if (code <= 0xFFFF) return String.fromCharCode(code); - code -= 0x10000; - return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00); + if (code <= 65535) { + return String.fromCharCode(code); + }return String.fromCharCode((code - 65536 >> 10) + 55296, (code - 65536 & 1023) + 56320); } pp.readString = function (quote) { @@ -2946,15 +3650,15 @@ pp.readString = function (quote) { if (ch === 92) { // '\' out += this.input.slice(chunkStart, this.pos); - out += this.readEscapedChar(false); + out += this.readEscapedChar(); chunkStart = this.pos; } else { - if (_whitespace.isNewLine(ch)) this.raise(this.start, "Unterminated string constant"); + if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant"); ++this.pos; } } out += this.input.slice(chunkStart, this.pos++); - return this.finishToken(_tokentype.types.string, out); + return this.finishToken(tt.string, out); }; // Reads template string tokens. @@ -2967,35 +3671,31 @@ pp.readTmplToken = function () { var ch = this.input.charCodeAt(this.pos); if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${' - if (this.pos === this.start && this.type === _tokentype.types.template) { + if (this.pos === this.start && this.type === tt.template) { if (ch === 36) { this.pos += 2; - return this.finishToken(_tokentype.types.dollarBraceL); + return this.finishToken(tt.dollarBraceL); } else { ++this.pos; - return this.finishToken(_tokentype.types.backQuote); + return this.finishToken(tt.backQuote); } } out += this.input.slice(chunkStart, this.pos); - return this.finishToken(_tokentype.types.template, out); + return this.finishToken(tt.template, out); } if (ch === 92) { // '\' out += this.input.slice(chunkStart, this.pos); - out += this.readEscapedChar(true); + out += this.readEscapedChar(); chunkStart = this.pos; - } else if (_whitespace.isNewLine(ch)) { + } else if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.pos); ++this.pos; - switch (ch) { - case 13: - if (this.input.charCodeAt(this.pos) === 10) ++this.pos; - case 10: - out += "\n"; - break; - default: - out += String.fromCharCode(ch); - break; + if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { + ++this.pos; + out += "\n"; + } else { + out += String.fromCharCode(ch); } if (this.options.locations) { ++this.curLine; @@ -3010,87 +3710,91 @@ pp.readTmplToken = function () { // Used to read escaped characters -pp.readEscapedChar = function (inTemplate) { +pp.readEscapedChar = function () { var ch = this.input.charCodeAt(++this.pos); + var octal = /^[0-7]+/.exec(this.input.slice(this.pos, this.pos + 3)); + if (octal) octal = octal[0]; + while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1); + if (octal === "0") octal = null; ++this.pos; - switch (ch) { - case 110: - return "\n"; // 'n' -> '\n' - case 114: - return "\r"; // 'r' -> '\r' - case 120: - return String.fromCharCode(this.readHexChar(2)); // 'x' - case 117: - return codePointToString(this.readCodePoint()); // 'u' - case 116: - return "\t"; // 't' -> '\t' - case 98: - return "\b"; // 'b' -> '\b' - case 118: - return "\u000b"; // 'v' -> '\u000b' - case 102: - return "\f"; // 'f' -> '\f' - case 13: - if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n' - case 10: - // ' \n' - if (this.options.locations) { - this.lineStart = this.pos;++this.curLine; - } - return ""; - default: - if (ch >= 48 && ch <= 55) { - var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]; - var octal = parseInt(octalStr, 8); - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); + if (octal) { + if (this.strict) this.raise(this.pos - 2, "Octal literal in strict mode"); + this.pos += octal.length - 1; + return String.fromCharCode(parseInt(octal, 8)); + } else { + switch (ch) { + case 110: + return "\n"; // 'n' -> '\n' + case 114: + return "\r"; // 'r' -> '\r' + case 120: + return String.fromCharCode(this.readHexChar(2)); // 'x' + case 117: + return codePointToString(this.readCodePoint()); // 'u' + case 116: + return "\t"; // 't' -> '\t' + case 98: + return "\b"; // 'b' -> '\b' + case 118: + return "\u000b"; // 'v' -> '\u000b' + case 102: + return "\f"; // 'f' -> '\f' + case 48: + return "\u0000"; // 0 -> '\0' + case 13: + if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n' + case 10: + // ' \n' + if (this.options.locations) { + this.lineStart = this.pos;++this.curLine; } - if (octal > 0 && (this.strict || inTemplate)) { - this.raise(this.pos - 2, "Octal literal in strict mode"); - } - this.pos += octalStr.length - 1; - return String.fromCharCode(octal); - } - return String.fromCharCode(ch); + return ""; + default: + return String.fromCharCode(ch); + } } }; // Used to read character escape sequences ('\x', '\u', '\U'). pp.readHexChar = function (len) { - var codePos = this.pos; var n = this.readInt(16, len); - if (n === null) this.raise(codePos, "Bad character escape sequence"); + if (n === null) this.raise(this.start, "Bad character escape sequence"); return n; }; -// Read an identifier, and return it as a string. Sets `this.containsEsc` +// Used to signal to callers of `readWord1` whether the word +// contained any escape sequences. This is needed because words with +// escape sequences must not be interpreted as keywords. + +var containsEsc; + +// Read an identifier, and return it as a string. Sets `containsEsc` // to whether the word contained a '\u' escape. // // Incrementally adds only escaped chars, adding other chunks as-is // as a micro-optimization. pp.readWord1 = function () { - this.containsEsc = false; + containsEsc = false; var word = "", first = true, chunkStart = this.pos; var astral = this.options.ecmaVersion >= 6; while (this.pos < this.input.length) { var ch = this.fullCharCodeAtPos(); - if (_identifier.isIdentifierChar(ch, astral)) { - this.pos += ch <= 0xffff ? 1 : 2; + if (isIdentifierChar(ch, astral)) { + this.pos += ch <= 65535 ? 1 : 2; } else if (ch === 92) { // "\" - this.containsEsc = true; + containsEsc = true; word += this.input.slice(chunkStart, this.pos); var escStart = this.pos; if (this.input.charCodeAt(++this.pos) != 117) // "u" this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX"); ++this.pos; var esc = this.readCodePoint(); - if (!(first ? _identifier.isIdentifierStart : _identifier.isIdentifierChar)(esc, astral)) this.raise(escStart, "Invalid Unicode escape"); + if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) this.raise(escStart, "Invalid Unicode escape"); word += codePointToString(esc); chunkStart = this.pos; } else { @@ -3106,12 +3810,17 @@ pp.readWord1 = function () { pp.readWord = function () { var word = this.readWord1(); - var type = _tokentype.types.name; - if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.isKeyword(word)) type = _tokentype.keywords[word]; + var type = tt.name; + if ((this.options.ecmaVersion >= 6 || !containsEsc) && this.isKeyword(word)) type = keywordTypes[word]; return this.finishToken(type, word); }; -},{"./identifier":2,"./locutil":5,"./state":10,"./tokentype":14,"./whitespace":16}],14:[function(_dereq_,module,exports){ +},{"./identifier":7,"./location":8,"./state":13,"./tokentype":17,"./whitespace":19}],17:[function(_dereq_,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +exports.__esModule = true; // ## Token types // The assignment of fine-grained, information-carrying type objects @@ -3130,14 +3839,8 @@ pp.readWord = function () { // to know when parsing a label, in order to allow or disallow // continue jumps to that label. -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var TokenType = function TokenType(label) { - var conf = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; +var TokenType = exports.TokenType = function TokenType(label) { + var conf = arguments[1] === undefined ? {} : arguments[1]; _classCallCheck(this, TokenType); @@ -3153,8 +3856,6 @@ var TokenType = function TokenType(label) { this.updateContext = null; }; -exports.TokenType = TokenType; - function binop(name, prec) { return new TokenType(name, { beforeExpr: true, binop: prec }); } @@ -3226,7 +3927,7 @@ var keywords = {}; exports.keywords = keywords; // Succinct definitions of keyword token types function kw(name) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var options = arguments[1] === undefined ? {} : arguments[1]; options.keyword = name; keywords[name] = types["_" + name] = new TokenType(name, options); @@ -3237,7 +3938,7 @@ kw("case", beforeExpr); kw("catch"); kw("continue"); kw("debugger"); -kw("default", beforeExpr); +kw("default"); kw("do", { isLoop: true }); kw("else", beforeExpr); kw("finally"); @@ -3270,31 +3971,32 @@ kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }); kw("void", { beforeExpr: true, prefix: true, startsExpr: true }); kw("delete", { beforeExpr: true, prefix: true, startsExpr: true }); -},{}],15:[function(_dereq_,module,exports){ +},{}],18:[function(_dereq_,module,exports){ "use strict"; -exports.__esModule = true; exports.isArray = isArray; + +// Checks if an object has a property. + exports.has = has; +exports.__esModule = true; function isArray(obj) { return Object.prototype.toString.call(obj) === "[object Array]"; } -// Checks if an object has a property. - function has(obj, propName) { return Object.prototype.hasOwnProperty.call(obj, propName); } -},{}],16:[function(_dereq_,module,exports){ +},{}],19:[function(_dereq_,module,exports){ +"use strict"; + +exports.isNewLine = isNewLine; +exports.__esModule = true; // Matches a whole line break (where CRLF is considered a single // line break). Used to count lines. -"use strict"; - -exports.__esModule = true; -exports.isNewLine = isNewLine; var lineBreak = /\r\n?|\n|\u2028|\u2029/; exports.lineBreak = lineBreak; var lineBreakG = new RegExp(lineBreak.source, "g"); @@ -3302,11 +4004,11 @@ var lineBreakG = new RegExp(lineBreak.source, "g"); exports.lineBreakG = lineBreakG; function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code == 0x2029; + return code === 10 || code === 13 || code === 8232 || code == 8233; } var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; exports.nonASCIIwhitespace = nonASCIIwhitespace; -},{}]},{},[3])(3) +},{}]},{},[1])(1) }); \ No newline at end of file diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/acorn_csp.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/acorn_csp.js index ea08177..47ebea4 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/acorn_csp.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/acorn_csp.js @@ -1,4 +1,803 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +}; + + +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; + + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = _dereq_('./support/isBuffer'); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = _dereq_('inherits'); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./support/isBuffer":4,"_process":3,"inherits":2}],6:[function(_dereq_,module,exports){ // A recursive descent parser operates by defining functions for all // syntactic elements, and recursively calling those, each function // advancing the input stream and returning an AST node. Precedence @@ -19,15 +818,15 @@ "use strict"; -var _tokentype = _dereq_("./tokentype"); +var tt = _dereq_("./tokentype").types; -var _state = _dereq_("./state"); +var Parser = _dereq_("./state").Parser; -var _identifier = _dereq_("./identifier"); +var reservedWords = _dereq_("./identifier").reservedWords; -var _util = _dereq_("./util"); +var has = _dereq_("./util").has; -var pp = _state.Parser.prototype; +var pp = Parser.prototype; // Check if property name clashes with already added. // Object/class getters and setters are not allowed to clash — @@ -35,7 +834,7 @@ var pp = _state.Parser.prototype; // strict mode, init properties are also not allowed to be repeated. pp.checkPropClash = function (prop, propHash) { - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) return; + if (this.options.ecmaVersion >= 6) return; var key = prop.key, name = undefined; switch (key.type) { @@ -46,16 +845,9 @@ pp.checkPropClash = function (prop, propHash) { default: return; } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property"); - propHash.proto = true; - } - return; - } - var other = undefined; - if (_util.has(propHash, name)) { + var kind = prop.kind || "init", + other = undefined; + if (has(propHash, name)) { other = propHash[name]; var isGetSet = kind !== "init"; if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); @@ -88,10 +880,10 @@ pp.parseExpression = function (noIn, refShorthandDefaultPos) { var startPos = this.start, startLoc = this.startLoc; var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - if (this.type === _tokentype.types.comma) { + if (this.type === tt.comma) { var node = this.startNodeAt(startPos, startLoc); node.expressions = [expr]; - while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); + while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); return this.finishNode(node, "SequenceExpression"); } return expr; @@ -101,7 +893,7 @@ pp.parseExpression = function (noIn, refShorthandDefaultPos) { // operators like `+=`. pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { - if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield(); + if (this.type == tt._yield && this.inGenerator) return this.parseYield(); var failOnShorthandAssign = undefined; if (!refShorthandDefaultPos) { @@ -112,13 +904,13 @@ pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { } var startPos = this.start, startLoc = this.startLoc; - if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start; + if (this.type == tt.parenL || this.type == tt.name) this.potentialArrowAt = this.start; var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); if (this.type.isAssign) { var node = this.startNodeAt(startPos, startLoc); node.operator = this.value; - node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; + node.left = this.type === tt.eq ? this.toAssignable(left) : left; refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly this.checkLVal(left); this.next(); @@ -137,11 +929,11 @@ pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { startLoc = this.startLoc; var expr = this.parseExprOps(noIn, refShorthandDefaultPos); if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - if (this.eat(_tokentype.types.question)) { + if (this.eat(tt.question)) { var node = this.startNodeAt(startPos, startLoc); node.test = expr; node.consequent = this.parseMaybeAssign(); - this.expect(_tokentype.types.colon); + this.expect(tt.colon); node.alternate = this.parseMaybeAssign(noIn); return this.finishNode(node, "ConditionalExpression"); } @@ -166,7 +958,17 @@ pp.parseExprOps = function (noIn, refShorthandDefaultPos) { pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== _tokentype.types._in)) { + if (Array.isArray(leftStartPos)) { + if (this.options.locations && noIn === undefined) { + // shift arguments to left by one + noIn = minPrec; + minPrec = leftStartLoc; + // flatten leftStartPos + leftStartLoc = leftStartPos[1]; + leftStartPos = leftStartPos[0]; + } + } + if (prec != null && (!noIn || this.type !== tt._in)) { if (prec > minPrec) { var node = this.startNodeAt(leftStartPos, leftStartLoc); node.left = left; @@ -176,7 +978,7 @@ pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { var startPos = this.start, startLoc = this.startLoc; node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn); - this.finishNode(node, op === _tokentype.types.logicalOR || op === _tokentype.types.logicalAND ? "LogicalExpression" : "BinaryExpression"); + this.finishNode(node, op === tt.logicalOR || op === tt.logicalAND ? "LogicalExpression" : "BinaryExpression"); return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); } } @@ -188,7 +990,7 @@ pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { pp.parseMaybeUnary = function (refShorthandDefaultPos) { if (this.type.prefix) { var node = this.startNode(), - update = this.type === _tokentype.types.incDec; + update = this.type === tt.incDec; node.operator = this.value; node.prefix = true; this.next(); @@ -224,26 +1026,35 @@ pp.parseExprSubscripts = function (refShorthandDefaultPos) { }; pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { + if (Array.isArray(startPos)) { + if (this.options.locations && noCalls === undefined) { + // shift arguments to left by one + noCalls = startLoc; + // flatten startPos + startLoc = startPos[1]; + startPos = startPos[0]; + } + } for (;;) { - if (this.eat(_tokentype.types.dot)) { + if (this.eat(tt.dot)) { var node = this.startNodeAt(startPos, startLoc); node.object = base; node.property = this.parseIdent(true); node.computed = false; base = this.finishNode(node, "MemberExpression"); - } else if (this.eat(_tokentype.types.bracketL)) { + } else if (this.eat(tt.bracketL)) { var node = this.startNodeAt(startPos, startLoc); node.object = base; node.property = this.parseExpression(); node.computed = true; - this.expect(_tokentype.types.bracketR); + this.expect(tt.bracketR); base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(_tokentype.types.parenL)) { + } else if (!noCalls && this.eat(tt.parenL)) { var node = this.startNodeAt(startPos, startLoc); node.callee = base; - node.arguments = this.parseExprList(_tokentype.types.parenR, false); + node.arguments = this.parseExprList(tt.parenR, false); base = this.finishNode(node, "CallExpression"); - } else if (this.type === _tokentype.types.backQuote) { + } else if (this.type === tt.backQuote) { var node = this.startNodeAt(startPos, startLoc); node.tag = base; node.quasi = this.parseTemplate(); @@ -263,68 +1074,67 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { var node = undefined, canBeArrow = this.potentialArrowAt == this.start; switch (this.type) { - case _tokentype.types._super: - if (!this.inFunction) this.raise(this.start, "'super' outside of function or class"); - case _tokentype.types._this: - var type = this.type === _tokentype.types._this ? "ThisExpression" : "Super"; + case tt._this: + case tt._super: + var type = this.type === tt._this ? "ThisExpression" : "Super"; node = this.startNode(); this.next(); return this.finishNode(node, type); - case _tokentype.types._yield: + case tt._yield: if (this.inGenerator) this.unexpected(); - case _tokentype.types.name: + case tt.name: var startPos = this.start, startLoc = this.startLoc; - var id = this.parseIdent(this.type !== _tokentype.types.name); - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]); + var id = this.parseIdent(this.type !== tt.name); + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]); return id; - case _tokentype.types.regexp: + case tt.regexp: var value = this.value; node = this.parseLiteral(value.value); node.regex = { pattern: value.pattern, flags: value.flags }; return node; - case _tokentype.types.num:case _tokentype.types.string: + case tt.num:case tt.string: return this.parseLiteral(this.value); - case _tokentype.types._null:case _tokentype.types._true:case _tokentype.types._false: + case tt._null:case tt._true:case tt._false: node = this.startNode(); - node.value = this.type === _tokentype.types._null ? null : this.type === _tokentype.types._true; + node.value = this.type === tt._null ? null : this.type === tt._true; node.raw = this.type.keyword; this.next(); return this.finishNode(node, "Literal"); - case _tokentype.types.parenL: + case tt.parenL: return this.parseParenAndDistinguishExpression(canBeArrow); - case _tokentype.types.bracketL: + case tt.bracketL: node = this.startNode(); this.next(); // check whether this is array comprehension or regular array - if (this.options.ecmaVersion >= 7 && this.type === _tokentype.types._for) { + if (this.options.ecmaVersion >= 7 && this.type === tt._for) { return this.parseComprehension(node, false); } - node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refShorthandDefaultPos); + node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos); return this.finishNode(node, "ArrayExpression"); - case _tokentype.types.braceL: + case tt.braceL: return this.parseObj(false, refShorthandDefaultPos); - case _tokentype.types._function: + case tt._function: node = this.startNode(); this.next(); return this.parseFunction(node, false); - case _tokentype.types._class: + case tt._class: return this.parseClass(this.startNode(), false); - case _tokentype.types._new: + case tt._new: return this.parseNew(); - case _tokentype.types.backQuote: + case tt.backQuote: return this.parseTemplate(); default: @@ -341,9 +1151,9 @@ pp.parseLiteral = function (value) { }; pp.parseParenExpression = function () { - this.expect(_tokentype.types.parenL); + this.expect(tt.parenL); var val = this.parseExpression(); - this.expect(_tokentype.types.parenR); + this.expect(tt.parenR); return val; }; @@ -354,7 +1164,7 @@ pp.parseParenAndDistinguishExpression = function (canBeArrow) { if (this.options.ecmaVersion >= 6) { this.next(); - if (this.options.ecmaVersion >= 7 && this.type === _tokentype.types._for) { + if (this.options.ecmaVersion >= 7 && this.type === tt._for) { return this.parseComprehension(this.startNodeAt(startPos, startLoc), true); } @@ -365,14 +1175,14 @@ pp.parseParenAndDistinguishExpression = function (canBeArrow) { var refShorthandDefaultPos = { start: 0 }, spreadStart = undefined, innerParenStart = undefined; - while (this.type !== _tokentype.types.parenR) { - first ? first = false : this.expect(_tokentype.types.comma); - if (this.type === _tokentype.types.ellipsis) { + while (this.type !== tt.parenR) { + first ? first = false : this.expect(tt.comma); + if (this.type === tt.ellipsis) { spreadStart = this.start; exprList.push(this.parseParenItem(this.parseRest())); break; } else { - if (this.type === _tokentype.types.parenL && !innerParenStart) { + if (this.type === tt.parenL && !innerParenStart) { innerParenStart = this.start; } exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); @@ -380,9 +1190,9 @@ pp.parseParenAndDistinguishExpression = function (canBeArrow) { } var innerEndPos = this.start, innerEndLoc = this.startLoc; - this.expect(_tokentype.types.parenR); + this.expect(tt.parenR); - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { if (innerParenStart) this.unexpected(innerParenStart); return this.parseParenArrowList(startPos, startLoc, exprList); } @@ -428,7 +1238,7 @@ var empty = []; pp.parseNew = function () { var node = this.startNode(); var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(_tokentype.types.dot)) { + if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { node.meta = meta; node.property = this.parseIdent(true); if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target"); @@ -437,7 +1247,7 @@ pp.parseNew = function () { var startPos = this.start, startLoc = this.startLoc; node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, false);else node.arguments = empty; + if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false);else node.arguments = empty; return this.finishNode(node, "NewExpression"); }; @@ -446,11 +1256,11 @@ pp.parseNew = function () { pp.parseTemplateElement = function () { var elem = this.startNode(); elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + raw: this.input.slice(this.start, this.end), cooked: this.value }; this.next(); - elem.tail = this.type === _tokentype.types.backQuote; + elem.tail = this.type === tt.backQuote; return this.finishNode(elem, "TemplateElement"); }; @@ -461,9 +1271,9 @@ pp.parseTemplate = function () { var curElt = this.parseTemplateElement(); node.quasis = [curElt]; while (!curElt.tail) { - this.expect(_tokentype.types.dollarBraceL); + this.expect(tt.dollarBraceL); node.expressions.push(this.parseExpression()); - this.expect(_tokentype.types.braceR); + this.expect(tt.braceR); node.quasis.push(curElt = this.parseTemplateElement()); } this.next(); @@ -478,10 +1288,10 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) { propHash = {}; node.properties = []; this.next(); - while (!this.eat(_tokentype.types.braceR)) { + while (!this.eat(tt.braceR)) { if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; } else first = false; var prop = this.startNode(), @@ -495,7 +1305,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) { startPos = this.start; startLoc = this.startLoc; } - if (!isPattern) isGenerator = this.eat(_tokentype.types.star); + if (!isPattern) isGenerator = this.eat(tt.star); } this.parsePropertyName(prop); this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos); @@ -506,30 +1316,25 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) { }; pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos) { - if (this.eat(_tokentype.types.colon)) { + if (this.eat(tt.colon)) { prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === _tokentype.types.parenL) { + } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { if (isPattern) this.unexpected(); prop.kind = "init"; prop.method = true; prop.value = this.parseMethod(isGenerator); - } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != _tokentype.types.comma && this.type != _tokentype.types.braceR)) { + } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != tt.comma && this.type != tt.braceR)) { if (isGenerator || isPattern) this.unexpected(); prop.kind = prop.key.name; this.parsePropertyName(prop); prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") this.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); - } } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { prop.kind = "init"; if (isPattern) { - if (this.isKeyword(prop.key.name) || this.strict && (_identifier.reservedWords.strictBind(prop.key.name) || _identifier.reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); + if (this.isKeyword(prop.key.name) || this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === _tokentype.types.eq && refShorthandDefaultPos) { + } else if (this.type === tt.eq && refShorthandDefaultPos) { if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); } else { @@ -541,16 +1346,16 @@ pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startL pp.parsePropertyName = function (prop) { if (this.options.ecmaVersion >= 6) { - if (this.eat(_tokentype.types.bracketL)) { + if (this.eat(tt.bracketL)) { prop.computed = true; prop.key = this.parseMaybeAssign(); - this.expect(_tokentype.types.bracketR); + this.expect(tt.bracketR); return prop.key; } else { prop.computed = false; } } - return prop.key = this.type === _tokentype.types.num || this.type === _tokentype.types.string ? this.parseExprAtom() : this.parseIdent(true); + return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); }; // Initialize empty function node. @@ -568,13 +1373,16 @@ pp.initFunction = function (node) { pp.parseMethod = function (isGenerator) { var node = this.startNode(); this.initFunction(node); - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, false); + this.expect(tt.parenL); + node.params = this.parseBindingList(tt.parenR, false, false); var allowExpressionBody = undefined; if (this.options.ecmaVersion >= 6) { node.generator = isGenerator; + allowExpressionBody = true; + } else { + allowExpressionBody = false; } - this.parseFunctionBody(node, false); + this.parseFunctionBody(node, allowExpressionBody); return this.finishNode(node, "FunctionExpression"); }; @@ -590,7 +1398,7 @@ pp.parseArrowExpression = function (node, params) { // Parse function body and check parameters. pp.parseFunctionBody = function (node, allowExpression) { - var isExpression = allowExpression && this.type !== _tokentype.types.braceL; + var isExpression = allowExpression && this.type !== tt.braceL; if (isExpression) { node.body = this.parseMaybeAssign(); @@ -632,13 +1440,15 @@ pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthand first = true; while (!this.eat(close)) { if (!first) { - this.expect(_tokentype.types.comma); + this.expect(tt.comma); if (allowTrailingComma && this.afterTrailingComma(close)) break; } else first = false; - var elt = undefined; - if (allowEmpty && this.type === _tokentype.types.comma) elt = null;else if (this.type === _tokentype.types.ellipsis) elt = this.parseSpread(refShorthandDefaultPos);else elt = this.parseMaybeAssign(false, refShorthandDefaultPos); - elts.push(elt); + if (allowEmpty && this.type === tt.comma) { + elts.push(null); + } else { + if (this.type === tt.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); + } } return elts; }; @@ -650,8 +1460,8 @@ pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthand pp.parseIdent = function (liberal) { var node = this.startNode(); if (liberal && this.options.allowReserved == "never") liberal = false; - if (this.type === _tokentype.types.name) { - if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && _identifier.reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); + if (this.type === tt.name) { + if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); node.name = this.value; } else if (liberal && this.type.keyword) { node.name = this.type.keyword; @@ -667,11 +1477,11 @@ pp.parseIdent = function (liberal) { pp.parseYield = function () { var node = this.startNode(); this.next(); - if (this.type == _tokentype.types.semi || this.canInsertSemicolon() || this.type != _tokentype.types.star && !this.type.startsExpr) { + if (this.type == tt.semi || this.canInsertSemicolon() || this.type != tt.star && !this.type.startsExpr) { node.delegate = false; node.argument = null; } else { - node.delegate = this.eat(_tokentype.types.star); + node.delegate = this.eat(tt.star); node.argument = this.parseMaybeAssign(); } return this.finishNode(node, "YieldExpression"); @@ -681,25 +1491,37 @@ pp.parseYield = function () { pp.parseComprehension = function (node, isGenerator) { node.blocks = []; - while (this.type === _tokentype.types._for) { + while (this.type === tt._for) { var block = this.startNode(); this.next(); - this.expect(_tokentype.types.parenL); + this.expect(tt.parenL); block.left = this.parseBindingAtom(); this.checkLVal(block.left, true); this.expectContextual("of"); block.right = this.parseExpression(); - this.expect(_tokentype.types.parenR); + this.expect(tt.parenR); node.blocks.push(this.finishNode(block, "ComprehensionBlock")); } - node.filter = this.eat(_tokentype.types._if) ? this.parseParenExpression() : null; + node.filter = this.eat(tt._if) ? this.parseParenExpression() : null; node.body = this.parseExpression(); - this.expect(isGenerator ? _tokentype.types.parenR : _tokentype.types.bracketR); + this.expect(isGenerator ? tt.parenR : tt.bracketR); node.generator = isGenerator; return this.finishNode(node, "ComprehensionExpression"); }; -},{"./identifier":2,"./state":10,"./tokentype":14,"./util":15}],2:[function(_dereq_,module,exports){ +},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],7:[function(_dereq_,module,exports){ + + +// Test whether a given character code starts an identifier. + +"use strict"; + +exports.isIdentifierStart = isIdentifierStart; + +// Test whether a given character is part of an identifier. + +exports.isIdentifierChar = isIdentifierChar; +exports.__esModule = true; // This is a trick taken from Esprima. It turns out that, on // non-Chrome browsers, to check whether a string is in a set, a // predicate containing a big ugly `switch` statement is faster than @@ -709,11 +1531,6 @@ pp.parseComprehension = function (node, isGenerator) { // // It starts by sorting the words by length. -"use strict"; - -exports.__esModule = true; -exports.isIdentifierStart = isIdentifierStart; -exports.isIdentifierChar = isIdentifierChar; // Removed to create an eval-free library // Reserved word lists for various dialects of the language @@ -779,196 +1596,77 @@ var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3 // assumption is that looking up astral identifier characters is // rare. function isInAstralSet(code, set) { - var pos = 0x10000; + var pos = 65536; for (var i = 0; i < set.length; i += 2) { pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; + if (pos > code) { + return false; + }pos += set[i + 1]; + if (pos >= code) { + return true; + } } } - -// Test whether a given character code starts an identifier. - function isIdentifierStart(code, astral) { - if (code < 65) return code === 36; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes); + if (code < 65) { + return code === 36; + }if (code < 91) { + return true; + }if (code < 97) { + return code === 95; + }if (code < 123) { + return true; + }if (code <= 65535) { + return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); + }if (astral === false) { + return false; + }return isInAstralSet(code, astralIdentifierStartCodes); } -// Test whether a given character is part of an identifier. - function isIdentifierChar(code, astral) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + if (code < 48) { + return code === 36; + }if (code < 58) { + return true; + }if (code < 65) { + return false; + }if (code < 91) { + return true; + }if (code < 97) { + return code === 95; + }if (code < 123) { + return true; + }if (code <= 65535) { + return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + }if (astral === false) { + return false; + }return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); } -},{}],3:[function(_dereq_,module,exports){ -// Acorn is a tiny, fast JavaScript parser written in JavaScript. -// -// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and -// various contributors and released under an MIT license. -// -// Git repositories for Acorn are available at -// -// http://marijnhaverbeke.nl/git/acorn -// https://github.com/marijnh/acorn.git -// -// Please use the [github bug tracker][ghbt] to report issues. -// -// [ghbt]: https://github.com/marijnh/acorn/issues -// -// This file defines the main parser interface. The library also comes -// with a [error-tolerant parser][dammit] and an -// [abstract syntax tree walker][walk], defined in other files. -// -// [dammit]: acorn_loose.js -// [walk]: util/walk.js - +},{}],8:[function(_dereq_,module,exports){ "use strict"; -exports.__esModule = true; -exports.parse = parse; -exports.parseExpressionAt = parseExpressionAt; -exports.tokenizer = tokenizer; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; -var _state = _dereq_("./state"); +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. -var _options = _dereq_("./options"); - -_dereq_("./parseutil"); - -_dereq_("./statement"); - -_dereq_("./lval"); - -_dereq_("./expression"); - -_dereq_("./location"); - -exports.Parser = _state.Parser; -exports.plugins = _state.plugins; -exports.defaultOptions = _options.defaultOptions; - -var _locutil = _dereq_("./locutil"); - -exports.Position = _locutil.Position; -exports.SourceLocation = _locutil.SourceLocation; -exports.getLineInfo = _locutil.getLineInfo; - -var _node = _dereq_("./node"); - -exports.Node = _node.Node; - -var _tokentype = _dereq_("./tokentype"); - -exports.TokenType = _tokentype.TokenType; -exports.tokTypes = _tokentype.types; - -var _tokencontext = _dereq_("./tokencontext"); - -exports.TokContext = _tokencontext.TokContext; -exports.tokContexts = _tokencontext.types; - -var _identifier = _dereq_("./identifier"); - -exports.isIdentifierChar = _identifier.isIdentifierChar; -exports.isIdentifierStart = _identifier.isIdentifierStart; - -var _tokenize = _dereq_("./tokenize"); - -exports.Token = _tokenize.Token; - -var _whitespace = _dereq_("./whitespace"); - -exports.isNewLine = _whitespace.isNewLine; -exports.lineBreak = _whitespace.lineBreak; -exports.lineBreakG = _whitespace.lineBreakG; -var version = "2.3.0"; - -exports.version = version; -// The main exported interface (under `self.acorn` when in the -// browser) is a `parse` function that takes a code string and -// returns an abstract syntax tree as specified by [Mozilla parser -// API][api]. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - -function parse(input, options) { - return new _state.Parser(options, input).parse(); -} - -// This function tries to parse a single expression at a given -// offset in a string. Useful for parsing mixed-language formats -// that embed JavaScript expressions. - -function parseExpressionAt(input, pos, options) { - var p = new _state.Parser(options, input, pos); - p.nextToken(); - return p.parseExpression(); -} - -// Acorn is organized as a tokenizer and a recursive-descent parser. -// The `tokenize` export provides an interface to the tokenizer. - -function tokenizer(input, options) { - return new _state.Parser(options, input); -} - -},{"./expression":1,"./identifier":2,"./location":4,"./locutil":5,"./lval":6,"./node":7,"./options":8,"./parseutil":9,"./state":10,"./statement":11,"./tokencontext":12,"./tokenize":13,"./tokentype":14,"./whitespace":16}],4:[function(_dereq_,module,exports){ -"use strict"; - -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var pp = _state.Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp.raise = function (pos, message) { - var loc = _locutil.getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos;err.loc = loc;err.raisedAt = this.pos; - throw err; -}; - -pp.curPosition = function () { - if (this.options.locations) { - return new _locutil.Position(this.curLine, this.pos - this.lineStart); - } -}; - -},{"./locutil":5,"./state":10}],5:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; exports.getLineInfo = getLineInfo; +exports.__esModule = true; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var Parser = _dereq_("./state").Parser; -var _whitespace = _dereq_("./whitespace"); +var lineBreakG = _dereq_("./whitespace").lineBreakG; + +var deprecate = _dereq_("util").deprecate; // These are used when `options.locations` is on, for the // `startLoc` and `endLoc` properties. -var Position = (function () { +var Position = exports.Position = (function () { function Position(line, col) { _classCallCheck(this, Position); @@ -983,9 +1681,7 @@ var Position = (function () { return Position; })(); -exports.Position = Position; - -var SourceLocation = function SourceLocation(p, start, end) { +var SourceLocation = exports.SourceLocation = function SourceLocation(p, start, end) { _classCallCheck(this, SourceLocation); this.start = start; @@ -993,18 +1689,10 @@ var SourceLocation = function SourceLocation(p, start, end) { if (p.sourceFile !== null) this.source = p.sourceFile; }; -exports.SourceLocation = SourceLocation; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - function getLineInfo(input, offset) { for (var line = 1, cur = 0;;) { - _whitespace.lineBreakG.lastIndex = cur; - var match = _whitespace.lineBreakG.exec(input); + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); if (match && match.index < offset) { ++line; cur = match.index + match[0].length; @@ -1014,18 +1702,42 @@ function getLineInfo(input, offset) { } } -},{"./whitespace":16}],6:[function(_dereq_,module,exports){ +var pp = Parser.prototype; + +// This function is used to raise exceptions on parse errors. It +// takes an offset integer (into the current `input`) to indicate +// the location of the error, attaches the position to the end +// of the error message, and then raises a `SyntaxError` with that +// message. + +pp.raise = function (pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos;err.loc = loc;err.raisedAt = this.pos; + throw err; +}; + +pp.curPosition = function () { + return new Position(this.curLine, this.pos - this.lineStart); +}; + +pp.markPosition = function () { + return this.options.locations ? [this.start, this.startLoc] : this.start; +}; + +},{"./state":13,"./whitespace":19,"util":5}],9:[function(_dereq_,module,exports){ "use strict"; -var _tokentype = _dereq_("./tokentype"); +var tt = _dereq_("./tokentype").types; -var _state = _dereq_("./state"); +var Parser = _dereq_("./state").Parser; -var _identifier = _dereq_("./identifier"); +var reservedWords = _dereq_("./identifier").reservedWords; -var _util = _dereq_("./util"); +var has = _dereq_("./util").has; -var pp = _state.Parser.prototype; +var pp = Parser.prototype; // Convert existing expression atom to assignable pattern // if possible. @@ -1056,7 +1768,6 @@ pp.toAssignable = function (node, isBinding) { case "AssignmentExpression": if (node.operator === "=") { node.type = "AssignmentPattern"; - delete node.operator; } else { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } @@ -1111,7 +1822,7 @@ pp.parseSpread = function (refShorthandDefaultPos) { pp.parseRest = function () { var node = this.startNode(); this.next(); - node.argument = this.type === _tokentype.types.name || this.type === _tokentype.types.bracketL ? this.parseBindingAtom() : this.unexpected(); + node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected(); return this.finishNode(node, "RestElement"); }; @@ -1120,16 +1831,16 @@ pp.parseRest = function () { pp.parseBindingAtom = function () { if (this.options.ecmaVersion < 6) return this.parseIdent(); switch (this.type) { - case _tokentype.types.name: + case tt.name: return this.parseIdent(); - case _tokentype.types.bracketL: + case tt.bracketL: var node = this.startNode(); this.next(); - node.elements = this.parseBindingList(_tokentype.types.bracketR, true, true); + node.elements = this.parseBindingList(tt.bracketR, true, true); return this.finishNode(node, "ArrayPattern"); - case _tokentype.types.braceL: + case tt.braceL: return this.parseObj(true); default: @@ -1141,12 +1852,12 @@ pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { var elts = [], first = true; while (!this.eat(close)) { - if (first) first = false;else this.expect(_tokentype.types.comma); - if (allowEmpty && this.type === _tokentype.types.comma) { + if (first) first = false;else this.expect(tt.comma); + if (allowEmpty && this.type === tt.comma) { elts.push(null); } else if (allowTrailingComma && this.afterTrailingComma(close)) { break; - } else if (this.type === _tokentype.types.ellipsis) { + } else if (this.type === tt.ellipsis) { var rest = this.parseRest(); this.parseBindingListItem(rest); elts.push(rest); @@ -1168,9 +1879,19 @@ pp.parseBindingListItem = function (param) { // Parses assignment pattern around given atom if possible. pp.parseMaybeDefault = function (startPos, startLoc, left) { + if (Array.isArray(startPos)) { + if (this.options.locations && noCalls === undefined) { + // shift arguments to left by one + left = startLoc; + // flatten startPos + startLoc = startPos[1]; + startPos = startPos[0]; + } + } left = left || this.parseBindingAtom(); - if (!this.eat(_tokentype.types.eq)) return left; + if (!this.eat(tt.eq)) return left; var node = this.startNodeAt(startPos, startLoc); + node.operator = "="; node.left = left; node.right = this.parseMaybeAssign(); return this.finishNode(node, "AssignmentPattern"); @@ -1182,9 +1903,9 @@ pp.parseMaybeDefault = function (startPos, startLoc, left) { pp.checkLVal = function (expr, isBinding, checkClashes) { switch (expr.type) { case "Identifier": - if (this.strict && (_identifier.reservedWords.strictBind(expr.name) || _identifier.reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); + if (this.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); if (checkClashes) { - if (_util.has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); + if (has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); checkClashes[expr.name] = true; } break; @@ -1222,71 +1943,93 @@ pp.checkLVal = function (expr, isBinding, checkClashes) { } }; -},{"./identifier":2,"./state":10,"./tokentype":14,"./util":15}],7:[function(_dereq_,module,exports){ +},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],10:[function(_dereq_,module,exports){ "use strict"; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + exports.__esModule = true; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var Parser = _dereq_("./state").Parser; -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var Node = function Node(parser, pos, loc) { - _classCallCheck(this, Node); - - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) this.loc = new _locutil.SourceLocation(parser, loc); - if (parser.options.directSourceFile) this.sourceFile = parser.options.directSourceFile; - if (parser.options.ranges) this.range = [pos, 0]; -}; - -exports.Node = Node; +var SourceLocation = _dereq_("./location").SourceLocation; // Start an AST node, attaching a start offset. -var pp = _state.Parser.prototype; +var pp = Parser.prototype; + +var Node = exports.Node = function Node() { + _classCallCheck(this, Node); +}; pp.startNode = function () { - return new Node(this, this.start, this.startLoc); + var node = new Node(); + node.start = this.start; + if (this.options.locations) node.loc = new SourceLocation(this, this.startLoc); + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [this.start, 0]; + return node; }; pp.startNodeAt = function (pos, loc) { - return new Node(this, pos, loc); + var node = new Node(); + if (Array.isArray(pos)) { + if (this.options.locations && loc === undefined) { + // flatten pos + loc = pos[1]; + pos = pos[0]; + } + } + node.start = pos; + if (this.options.locations) node.loc = new SourceLocation(this, loc); + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [pos, 0]; + return node; }; // Finish an AST node, adding `type` and `end` properties. -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - return node; -} - pp.finishNode = function (node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc); + node.type = type; + node.end = this.lastTokEnd; + if (this.options.locations) node.loc.end = this.lastTokEndLoc; + if (this.options.ranges) node.range[1] = this.lastTokEnd; + return node; }; // Finish node at given position pp.finishNodeAt = function (node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc); + node.type = type; + if (Array.isArray(pos)) { + if (this.options.locations && loc === undefined) { + // flatten pos + loc = pos[1]; + pos = pos[0]; + } + } + node.end = pos; + if (this.options.locations) node.loc.end = loc; + if (this.options.ranges) node.range[1] = pos; + return node; }; -},{"./locutil":5,"./state":10}],8:[function(_dereq_,module,exports){ +},{"./location":8,"./state":13}],11:[function(_dereq_,module,exports){ + + +// Interpret and default an options object + "use strict"; -exports.__esModule = true; exports.getOptions = getOptions; +exports.__esModule = true; var _util = _dereq_("./util"); -var _locutil = _dereq_("./locutil"); +var has = _util.has; +var isArray = _util.isArray; + +var SourceLocation = _dereq_("./location").SourceLocation; // A second optional argument can be given to further configure // the parser process. These options are recognized: @@ -1369,16 +2112,13 @@ var defaultOptions = { // (non-standard) ParenthesizedExpression nodes preserveParens: false, plugins: {} -}; - -exports.defaultOptions = defaultOptions; -// Interpret and default an options object +};exports.defaultOptions = defaultOptions; function getOptions(opts) { var options = {}; for (var opt in defaultOptions) { - options[opt] = opts && _util.has(opts, opt) ? opts[opt] : defaultOptions[opt]; - }if (_util.isArray(options.onToken)) { + options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; + }if (isArray(options.onToken)) { (function () { var tokens = options.onToken; options.onToken = function (token) { @@ -1386,7 +2126,7 @@ function getOptions(opts) { }; })(); } - if (_util.isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); + if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); return options; } @@ -1399,29 +2139,29 @@ function pushComment(options, array) { start: start, end: end }; - if (options.locations) comment.loc = new _locutil.SourceLocation(this, startLoc, endLoc); + if (options.locations) comment.loc = new SourceLocation(this, startLoc, endLoc); if (options.ranges) comment.range = [start, end]; array.push(comment); }; } -},{"./locutil":5,"./util":15}],9:[function(_dereq_,module,exports){ +},{"./location":8,"./util":18}],12:[function(_dereq_,module,exports){ "use strict"; -var _tokentype = _dereq_("./tokentype"); +var tt = _dereq_("./tokentype").types; -var _state = _dereq_("./state"); +var Parser = _dereq_("./state").Parser; -var _whitespace = _dereq_("./whitespace"); +var lineBreak = _dereq_("./whitespace").lineBreak; -var pp = _state.Parser.prototype; +var pp = Parser.prototype; // ## Parser utilities // Test whether a statement node is the string literal `"use strict"`. pp.isUseStrict = function (stmt) { - return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict"; + return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.value === "use strict"; }; // Predicate that tests whether the next token is of the given @@ -1439,13 +2179,13 @@ pp.eat = function (type) { // Tests whether parsed token is a contextual keyword. pp.isContextual = function (name) { - return this.type === _tokentype.types.name && this.value === name; + return this.type === tt.name && this.value === name; }; // Consumes contextual keyword if possible. pp.eatContextual = function (name) { - return this.value === name && this.eat(_tokentype.types.name); + return this.value === name && this.eat(tt.name); }; // Asserts that following token is given contextual keyword. @@ -1457,7 +2197,7 @@ pp.expectContextual = function (name) { // Test whether a semicolon can be inserted at the current position. pp.canInsertSemicolon = function () { - return this.type === _tokentype.types.eof || this.type === _tokentype.types.braceR || _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); + return this.type === tt.eof || this.type === tt.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); }; pp.insertSemicolon = function () { @@ -1471,7 +2211,7 @@ pp.insertSemicolon = function () { // pretend that there is a semicolon at this position. pp.semicolon = function () { - if (!this.eat(_tokentype.types.semi) && !this.insertSemicolon()) this.unexpected(); + if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected(); }; pp.afterTrailingComma = function (tokType) { @@ -1495,125 +2235,106 @@ pp.unexpected = function (pos) { this.raise(pos != null ? pos : this.start, "Unexpected token"); }; -},{"./state":10,"./tokentype":14,"./whitespace":16}],10:[function(_dereq_,module,exports){ +},{"./state":13,"./tokentype":17,"./whitespace":19}],13:[function(_dereq_,module,exports){ "use strict"; +exports.Parser = Parser; exports.__esModule = true; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _identifier = _dereq_("./identifier"); -var _tokentype = _dereq_("./tokentype"); +var reservedWords = _identifier.reservedWords; +var keywords = _identifier.keywords; -var _whitespace = _dereq_("./whitespace"); +var tt = _dereq_("./tokentype").types; -var _options = _dereq_("./options"); +var lineBreak = _dereq_("./whitespace").lineBreak; + +function Parser(options, input, startPos) { + this.options = options; + this.sourceFile = this.options.sourceFile || null; + this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; + this.isReservedWord = reservedWords[this.options.ecmaVersion]; + this.input = input; + + // Load plugins + this.loadPlugins(this.options.plugins); + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; + } + + // Properties of the current token: + // Its type + this.type = tt.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = null; + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; + + // Figure out if it's a module code. + this.strict = this.inModule = this.options.sourceType === "module"; + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; + + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false; + // Labels in scope. + this.labels = []; + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); +} + +Parser.prototype.extend = function (name, f) { + this[name] = f(this[name]); +}; // Registered plugins + var plugins = {}; exports.plugins = plugins; - -var Parser = (function () { - function Parser(options, input, startPos) { - _classCallCheck(this, Parser); - - this.options = _options.getOptions(options); - this.sourceFile = this.options.sourceFile; - this.isKeyword = _identifier.keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; - this.isReservedWord = _identifier.reservedWords[this.options.ecmaVersion]; - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Load plugins - this.loadPlugins(this.options.plugins); - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); - this.curLine = this.input.slice(0, this.lineStart).split(_whitespace.lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = _tokentype.types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.strict = this.inModule = this.options.sourceType === "module"; - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Flags to track whether we are in a function, a generator. - this.inFunction = this.inGenerator = false; - // Labels in scope. - this.labels = []; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); +Parser.prototype.loadPlugins = function (plugins) { + for (var _name in plugins) { + var plugin = exports.plugins[_name]; + if (!plugin) throw new Error("Plugin '" + _name + "' not found"); + plugin(this, plugins[_name]); } +}; - Parser.prototype.extend = function extend(name, f) { - this[name] = f(this[name]); - }; - - Parser.prototype.loadPlugins = function loadPlugins(pluginConfigs) { - for (var _name in pluginConfigs) { - var plugin = plugins[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, pluginConfigs[_name]); - } - }; - - Parser.prototype.parse = function parse() { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node); - }; - - return Parser; -})(); - -exports.Parser = Parser; - -},{"./identifier":2,"./options":8,"./tokentype":14,"./whitespace":16}],11:[function(_dereq_,module,exports){ +},{"./identifier":7,"./tokentype":17,"./whitespace":19}],14:[function(_dereq_,module,exports){ "use strict"; -var _tokentype = _dereq_("./tokentype"); +var tt = _dereq_("./tokentype").types; -var _state = _dereq_("./state"); +var Parser = _dereq_("./state").Parser; -var _whitespace = _dereq_("./whitespace"); +var lineBreak = _dereq_("./whitespace").lineBreak; -var pp = _state.Parser.prototype; +var pp = Parser.prototype; // ### Statement parsing @@ -1625,13 +2346,11 @@ var pp = _state.Parser.prototype; pp.parseTopLevel = function (node) { var first = true; if (!node.body) node.body = []; - while (this.type !== _tokentype.types.eof) { + while (this.type !== tt.eof) { var stmt = this.parseStatement(true, true); node.body.push(stmt); - if (first) { - if (this.isUseStrict(stmt)) this.setStrict(true); - first = false; - } + if (first && this.isUseStrict(stmt)) this.setStrict(true); + first = false; } this.next(); if (this.options.ecmaVersion >= 6) { @@ -1659,49 +2378,49 @@ pp.parseStatement = function (declaration, topLevel) { // complexity. switch (starttype) { - case _tokentype.types._break:case _tokentype.types._continue: + case tt._break:case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword); - case _tokentype.types._debugger: + case tt._debugger: return this.parseDebuggerStatement(node); - case _tokentype.types._do: + case tt._do: return this.parseDoStatement(node); - case _tokentype.types._for: + case tt._for: return this.parseForStatement(node); - case _tokentype.types._function: + case tt._function: if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); return this.parseFunctionStatement(node); - case _tokentype.types._class: + case tt._class: if (!declaration) this.unexpected(); return this.parseClass(node, true); - case _tokentype.types._if: + case tt._if: return this.parseIfStatement(node); - case _tokentype.types._return: + case tt._return: return this.parseReturnStatement(node); - case _tokentype.types._switch: + case tt._switch: return this.parseSwitchStatement(node); - case _tokentype.types._throw: + case tt._throw: return this.parseThrowStatement(node); - case _tokentype.types._try: + case tt._try: return this.parseTryStatement(node); - case _tokentype.types._let:case _tokentype.types._const: + case tt._let:case tt._const: if (!declaration) this.unexpected(); // NOTE: falls through to _var - case _tokentype.types._var: + case tt._var: return this.parseVarStatement(node, starttype); - case _tokentype.types._while: + case tt._while: return this.parseWhileStatement(node); - case _tokentype.types._with: + case tt._with: return this.parseWithStatement(node); - case _tokentype.types.braceL: + case tt.braceL: return this.parseBlock(); - case _tokentype.types.semi: + case tt.semi: return this.parseEmptyStatement(node); - case _tokentype.types._export: - case _tokentype.types._import: + case tt._export: + case tt._import: if (!this.options.allowImportExportEverywhere) { if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level"); if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } - return starttype === _tokentype.types._import ? this.parseImport(node) : this.parseExport(node); + return starttype === tt._import ? this.parseImport(node) : this.parseExport(node); // If the statement does not start with a statement keyword or a // brace, it's an ExpressionStatement or LabeledStatement. We @@ -1711,14 +2430,14 @@ pp.parseStatement = function (declaration, topLevel) { default: var maybeName = this.value, expr = this.parseExpression(); - if (starttype === _tokentype.types.name && expr.type === "Identifier" && this.eat(_tokentype.types.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); + if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); } }; pp.parseBreakContinueStatement = function (node, keyword) { var isBreak = keyword == "break"; this.next(); - if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== _tokentype.types.name) this.unexpected();else { + if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== tt.name) this.unexpected();else { node.label = this.parseIdent(); this.semicolon(); } @@ -1747,9 +2466,9 @@ pp.parseDoStatement = function (node) { this.labels.push(loopLabel); node.body = this.parseStatement(false); this.labels.pop(); - this.expect(_tokentype.types._while); + this.expect(tt._while); node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) this.eat(_tokentype.types.semi);else this.semicolon(); + if (this.options.ecmaVersion >= 6) this.eat(tt.semi);else this.semicolon(); return this.finishNode(node, "DoWhileStatement"); }; @@ -1764,20 +2483,20 @@ pp.parseDoStatement = function (node) { pp.parseForStatement = function (node) { this.next(); this.labels.push(loopLabel); - this.expect(_tokentype.types.parenL); - if (this.type === _tokentype.types.semi) return this.parseFor(node, null); - if (this.type === _tokentype.types._var || this.type === _tokentype.types._let || this.type === _tokentype.types._const) { + this.expect(tt.parenL); + if (this.type === tt.semi) return this.parseFor(node, null); + if (this.type === tt._var || this.type === tt._let || this.type === tt._const) { var _init = this.startNode(), varKind = this.type; this.next(); this.parseVar(_init, true, varKind); this.finishNode(_init, "VariableDeclaration"); - if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== _tokentype.types._var && _init.declarations[0].init)) return this.parseForIn(node, _init); + if ((this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== tt._var && _init.declarations[0].init)) return this.parseForIn(node, _init); return this.parseFor(node, _init); } var refShorthandDefaultPos = { start: 0 }; var init = this.parseExpression(true, refShorthandDefaultPos); - if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { + if (this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { this.toAssignable(init); this.checkLVal(init); return this.parseForIn(node, init); @@ -1796,7 +2515,7 @@ pp.parseIfStatement = function (node) { this.next(); node.test = this.parseParenExpression(); node.consequent = this.parseStatement(false); - node.alternate = this.eat(_tokentype.types._else) ? this.parseStatement(false) : null; + node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null; return this.finishNode(node, "IfStatement"); }; @@ -1808,7 +2527,7 @@ pp.parseReturnStatement = function (node) { // optional arguments, we eagerly look for a semicolon or the // possibility to insert one. - if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.argument = null;else { + if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null;else { node.argument = this.parseExpression();this.semicolon(); } return this.finishNode(node, "ReturnStatement"); @@ -1818,16 +2537,16 @@ pp.parseSwitchStatement = function (node) { this.next(); node.discriminant = this.parseParenExpression(); node.cases = []; - this.expect(_tokentype.types.braceL); + this.expect(tt.braceL); this.labels.push(switchLabel); // Statements under must be grouped (by label) in SwitchCase // nodes. `cur` is used to keep the node that we are currently // adding statements to. - for (var cur, sawDefault = false; this.type != _tokentype.types.braceR;) { - if (this.type === _tokentype.types._case || this.type === _tokentype.types._default) { - var isCase = this.type === _tokentype.types._case; + for (var cur, sawDefault; this.type != tt.braceR;) { + if (this.type === tt._case || this.type === tt._default) { + var isCase = this.type === tt._case; if (cur) this.finishNode(cur, "SwitchCase"); node.cases.push(cur = this.startNode()); cur.consequent = []; @@ -1839,7 +2558,7 @@ pp.parseSwitchStatement = function (node) { sawDefault = true; cur.test = null; } - this.expect(_tokentype.types.colon); + this.expect(tt.colon); } else { if (!cur) this.unexpected(); cur.consequent.push(this.parseStatement(true)); @@ -1853,7 +2572,7 @@ pp.parseSwitchStatement = function (node) { pp.parseThrowStatement = function (node) { this.next(); - if (_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw"); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw"); node.argument = this.parseExpression(); this.semicolon(); return this.finishNode(node, "ThrowStatement"); @@ -1867,19 +2586,19 @@ pp.parseTryStatement = function (node) { this.next(); node.block = this.parseBlock(); node.handler = null; - if (this.type === _tokentype.types._catch) { + if (this.type === tt._catch) { var clause = this.startNode(); this.next(); - this.expect(_tokentype.types.parenL); + this.expect(tt.parenL); clause.param = this.parseBindingAtom(); this.checkLVal(clause.param, true); - this.expect(_tokentype.types.parenR); + this.expect(tt.parenR); clause.guard = null; clause.body = this.parseBlock(); node.handler = this.finishNode(clause, "CatchClause"); } node.guardedHandlers = empty; - node.finalizer = this.eat(_tokentype.types._finally) ? this.parseBlock() : null; + node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null; if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause"); return this.finishNode(node, "TryStatement"); }; @@ -1916,15 +2635,8 @@ pp.parseEmptyStatement = function (node) { pp.parseLabeledStatement = function (node, maybeName, expr) { for (var i = 0; i < this.labels.length; ++i) { if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - }var kind = this.type.isLoop ? "loop" : this.type === _tokentype.types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label = this.labels[i]; - if (label.statementStart == node.start) { - label.statementStart = this.start; - label.kind = kind; - } else break; - } - this.labels.push({ name: maybeName, kind: kind, statementStart: this.start }); + }var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null; + this.labels.push({ name: maybeName, kind: kind }); node.body = this.parseStatement(true); this.labels.pop(); node.label = expr; @@ -1946,8 +2658,8 @@ pp.parseBlock = function (allowStrict) { first = true, oldStrict = undefined; node.body = []; - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { var stmt = this.parseStatement(true); node.body.push(stmt); if (first && allowStrict && this.isUseStrict(stmt)) { @@ -1966,11 +2678,11 @@ pp.parseBlock = function (allowStrict) { pp.parseFor = function (node, init) { node.init = init; - this.expect(_tokentype.types.semi); - node.test = this.type === _tokentype.types.semi ? null : this.parseExpression(); - this.expect(_tokentype.types.semi); - node.update = this.type === _tokentype.types.parenR ? null : this.parseExpression(); - this.expect(_tokentype.types.parenR); + this.expect(tt.semi); + node.test = this.type === tt.semi ? null : this.parseExpression(); + this.expect(tt.semi); + node.update = this.type === tt.parenR ? null : this.parseExpression(); + this.expect(tt.parenR); node.body = this.parseStatement(false); this.labels.pop(); return this.finishNode(node, "ForStatement"); @@ -1980,11 +2692,11 @@ pp.parseFor = function (node, init) { // same from parser's perspective. pp.parseForIn = function (node, init) { - var type = this.type === _tokentype.types._in ? "ForInStatement" : "ForOfStatement"; + var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"; this.next(); node.left = init; node.right = this.parseExpression(); - this.expect(_tokentype.types.parenR); + this.expect(tt.parenR); node.body = this.parseStatement(false); this.labels.pop(); return this.finishNode(node, type); @@ -1998,17 +2710,17 @@ pp.parseVar = function (node, isFor, kind) { for (;;) { var decl = this.startNode(); this.parseVarId(decl); - if (this.eat(_tokentype.types.eq)) { + if (this.eat(tt.eq)) { decl.init = this.parseMaybeAssign(isFor); - } else if (kind === _tokentype.types._const && !(this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + } else if (kind === tt._const && !(this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { this.unexpected(); - } else if (decl.id.type != "Identifier" && !(isFor && (this.type === _tokentype.types._in || this.isContextual("of")))) { + } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) { this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); } else { decl.init = null; } node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(_tokentype.types.comma)) break; + if (!this.eat(tt.comma)) break; } return node; }; @@ -2023,16 +2735,16 @@ pp.parseVarId = function (decl) { pp.parseFunction = function (node, isStatement, allowExpressionBody) { this.initFunction(node); - if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star); - if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent(); + if (this.options.ecmaVersion >= 6) node.generator = this.eat(tt.star); + if (isStatement || this.type === tt.name) node.id = this.parseIdent(); this.parseFunctionParams(node); this.parseFunctionBody(node, allowExpressionBody); return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); }; pp.parseFunctionParams = function (node) { - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, false); + this.expect(tt.parenL); + node.params = this.parseBindingList(tt.parenR, false, false); }; // Parse a class declaration or literal (depending on the @@ -2045,25 +2757,25 @@ pp.parseClass = function (node, isStatement) { var classBody = this.startNode(); var hadConstructor = false; classBody.body = []; - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (this.eat(_tokentype.types.semi)) continue; + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + if (this.eat(tt.semi)) continue; var method = this.startNode(); - var isGenerator = this.eat(_tokentype.types.star); - var isMaybeStatic = this.type === _tokentype.types.name && this.value === "static"; + var isGenerator = this.eat(tt.star); + var isMaybeStatic = this.type === tt.name && this.value === "static"; this.parsePropertyName(method); - method["static"] = isMaybeStatic && this.type !== _tokentype.types.parenL; + method["static"] = isMaybeStatic && this.type !== tt.parenL; if (method["static"]) { if (isGenerator) this.unexpected(); - isGenerator = this.eat(_tokentype.types.star); + isGenerator = this.eat(tt.star); this.parsePropertyName(method); } method.kind = "method"; - var isGetSet = false; if (!method.computed) { var key = method.key; - if (!isGenerator && key.type === "Identifier" && this.type !== _tokentype.types.parenL && (key.name === "get" || key.name === "set")) { + var isGetSet = false; + if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) { isGetSet = true; method.kind = key.name; key = this.parsePropertyName(method); @@ -2077,13 +2789,6 @@ pp.parseClass = function (node, isStatement) { } } this.parseClassMethod(classBody, method, isGenerator); - if (isGetSet) { - var paramCount = method.kind === "get" ? 0 : 1; - if (method.value.params.length !== paramCount) { - var start = method.value.start; - if (method.kind === "get") this.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); - } - } } node.body = this.finishNode(classBody, "ClassBody"); return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); @@ -2095,11 +2800,11 @@ pp.parseClassMethod = function (classBody, method, isGenerator) { }; pp.parseClassId = function (node, isStatement) { - node.id = this.type === _tokentype.types.name ? this.parseIdent() : isStatement ? this.unexpected() : null; + node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null; }; pp.parseClassSuper = function (node) { - node.superClass = this.eat(_tokentype.types._extends) ? this.parseExprSubscripts() : null; + node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null; }; // Parses module export declaration. @@ -2107,13 +2812,13 @@ pp.parseClassSuper = function (node) { pp.parseExport = function (node) { this.next(); // export * from '...' - if (this.eat(_tokentype.types.star)) { + if (this.eat(tt.star)) { this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); this.semicolon(); return this.finishNode(node, "ExportAllDeclaration"); } - if (this.eat(_tokentype.types._default)) { + if (this.eat(tt._default)) { // export default ... var expr = this.parseMaybeAssign(); var needsSemi = true; @@ -2137,7 +2842,7 @@ pp.parseExport = function (node) { node.declaration = null; node.specifiers = this.parseExportSpecifiers(); if (this.eatContextual("from")) { - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); } else { node.source = null; } @@ -2156,15 +2861,15 @@ pp.parseExportSpecifiers = function () { var nodes = [], first = true; // export { x, y as z } [from '...'] - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; } else first = false; var node = this.startNode(); - node.local = this.parseIdent(this.type === _tokentype.types._default); + node.local = this.parseIdent(this.type === tt._default); node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; nodes.push(this.finishNode(node, "ExportSpecifier")); } @@ -2176,13 +2881,14 @@ pp.parseExportSpecifiers = function () { pp.parseImport = function (node) { this.next(); // import '...' - if (this.type === _tokentype.types.string) { + if (this.type === tt.string) { node.specifiers = empty; node.source = this.parseExprAtom(); + node.kind = ""; } else { node.specifiers = this.parseImportSpecifiers(); this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); } this.semicolon(); return this.finishNode(node, "ImportDeclaration"); @@ -2193,15 +2899,15 @@ pp.parseImport = function (node) { pp.parseImportSpecifiers = function () { var nodes = [], first = true; - if (this.type === _tokentype.types.name) { + if (this.type === tt.name) { // import defaultObj, { x, y as z } from '...' var node = this.startNode(); node.local = this.parseIdent(); this.checkLVal(node.local, true); nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(_tokentype.types.comma)) return nodes; + if (!this.eat(tt.comma)) return nodes; } - if (this.type === _tokentype.types.star) { + if (this.type === tt.star) { var node = this.startNode(); this.next(); this.expectContextual("as"); @@ -2210,11 +2916,11 @@ pp.parseImportSpecifiers = function () { nodes.push(this.finishNode(node, "ImportNamespaceSpecifier")); return nodes; } - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; } else first = false; var node = this.startNode(); @@ -2226,33 +2932,31 @@ pp.parseImportSpecifiers = function () { return nodes; }; -},{"./state":10,"./tokentype":14,"./whitespace":16}],12:[function(_dereq_,module,exports){ +},{"./state":13,"./tokentype":17,"./whitespace":19}],15:[function(_dereq_,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +exports.__esModule = true; // The algorithm used to determine whether a regexp can appear at a // given point in the program is loosely based on sweet.js' approach. // See https://github.com/mozilla/sweet.js/wiki/design -"use strict"; +var Parser = _dereq_("./state").Parser; -exports.__esModule = true; +var tt = _dereq_("./tokentype").types; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var lineBreak = _dereq_("./whitespace").lineBreak; -var _state = _dereq_("./state"); - -var _tokentype = _dereq_("./tokentype"); - -var _whitespace = _dereq_("./whitespace"); - -var TokContext = function TokContext(token, isExpr, preserveSpace, override) { +var TokContext = exports.TokContext = function TokContext(token, isExpr, preserveSpace, override) { _classCallCheck(this, TokContext); this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; + this.isExpr = isExpr; + this.preserveSpace = preserveSpace; this.override = override; }; -exports.TokContext = TokContext; var types = { b_stat: new TokContext("{", false), b_expr: new TokContext("{", true), @@ -2266,32 +2970,30 @@ var types = { }; exports.types = types; -var pp = _state.Parser.prototype; +var pp = Parser.prototype; pp.initialContext = function () { return [types.b_stat]; }; pp.braceIsBlock = function (prevType) { - if (prevType === _tokentype.types.colon) { - var _parent = this.curContext(); - if (_parent === types.b_stat || _parent === types.b_expr) return !_parent.isExpr; - } - if (prevType === _tokentype.types._return) return _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); - if (prevType === _tokentype.types._else || prevType === _tokentype.types.semi || prevType === _tokentype.types.eof || prevType === _tokentype.types.parenR) return true; - if (prevType == _tokentype.types.braceL) return this.curContext() === types.b_stat; + var parent = undefined; + if (prevType === tt.colon && (parent = this.curContext()).token == "{") return !parent.isExpr; + if (prevType === tt._return) return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); + if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof) return true; + if (prevType == tt.braceL) return this.curContext() === types.b_stat; return !this.exprAllowed; }; pp.updateContext = function (prevType) { var update = undefined, type = this.type; - if (type.keyword && prevType == _tokentype.types.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; + if (type.keyword && prevType == tt.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; }; // Token-specific context update code -_tokentype.types.parenR.updateContext = _tokentype.types.braceR.updateContext = function () { +tt.parenR.updateContext = tt.braceR.updateContext = function () { if (this.context.length == 1) { this.exprAllowed = true; return; @@ -2307,76 +3009,85 @@ _tokentype.types.parenR.updateContext = _tokentype.types.braceR.updateContext = } }; -_tokentype.types.braceL.updateContext = function (prevType) { +tt.braceL.updateContext = function (prevType) { this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); this.exprAllowed = true; }; -_tokentype.types.dollarBraceL.updateContext = function () { +tt.dollarBraceL.updateContext = function () { this.context.push(types.b_tmpl); this.exprAllowed = true; }; -_tokentype.types.parenL.updateContext = function (prevType) { - var statementParens = prevType === _tokentype.types._if || prevType === _tokentype.types._for || prevType === _tokentype.types._with || prevType === _tokentype.types._while; +tt.parenL.updateContext = function (prevType) { + var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while; this.context.push(statementParens ? types.p_stat : types.p_expr); this.exprAllowed = true; }; -_tokentype.types.incDec.updateContext = function () {}; +tt.incDec.updateContext = function () {}; -_tokentype.types._function.updateContext = function () { +tt._function.updateContext = function () { if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); this.exprAllowed = false; }; -_tokentype.types.backQuote.updateContext = function () { +tt.backQuote.updateContext = function () { if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); this.exprAllowed = false; }; // tokExprAllowed stays unchanged -},{"./state":10,"./tokentype":14,"./whitespace":16}],13:[function(_dereq_,module,exports){ +},{"./state":13,"./tokentype":17,"./whitespace":19}],16:[function(_dereq_,module,exports){ "use strict"; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + exports.__esModule = true; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _identifier = _dereq_("./identifier"); +var isIdentifierStart = _identifier.isIdentifierStart; +var isIdentifierChar = _identifier.isIdentifierChar; + var _tokentype = _dereq_("./tokentype"); -var _state = _dereq_("./state"); +var tt = _tokentype.types; +var keywordTypes = _tokentype.keywords; -var _locutil = _dereq_("./locutil"); +var Parser = _dereq_("./state").Parser; + +var SourceLocation = _dereq_("./location").SourceLocation; var _whitespace = _dereq_("./whitespace"); +var lineBreak = _whitespace.lineBreak; +var lineBreakG = _whitespace.lineBreakG; +var isNewLine = _whitespace.isNewLine; +var nonASCIIwhitespace = _whitespace.nonASCIIwhitespace; + // Object type used to represent tokens. Note that normally, tokens // simply exist as properties on the parser object. This is only // used for the onToken callback and the external tokenizer. -var Token = function Token(p) { +var Token = exports.Token = function Token(p) { _classCallCheck(this, Token); this.type = p.type; this.value = p.value; this.start = p.start; this.end = p.end; - if (p.options.locations) this.loc = new _locutil.SourceLocation(p, p.startLoc, p.endLoc); + if (p.options.locations) this.loc = new SourceLocation(p, p.startLoc, p.endLoc); if (p.options.ranges) this.range = [p.start, p.end]; }; -exports.Token = Token; - // ## Tokenizer -var pp = _state.Parser.prototype; +var pp = Parser.prototype; // Are we running under Rhino? -var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"; +var isRhino = typeof Packages !== "undefined"; // Move to the next token @@ -2401,7 +3112,7 @@ if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { return { next: function next() { var token = self.getToken(); return { - done: token.type === _tokentype.types.eof, + done: token.type === tt.eof, value: token }; } }; @@ -2412,7 +3123,7 @@ if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { pp.setStrict = function (strict) { this.strict = strict; - if (this.type !== _tokentype.types.num && this.type !== _tokentype.types.string) return; + if (this.type !== tt.num && this.type !== tt.string) return; this.pos = this.start; if (this.options.locations) { while (this.pos < this.lineStart) { @@ -2436,7 +3147,7 @@ pp.nextToken = function () { this.start = this.pos; if (this.options.locations) this.startLoc = this.curPosition(); - if (this.pos >= this.input.length) return this.finishToken(_tokentype.types.eof); + if (this.pos >= this.input.length) return this.finishToken(tt.eof); if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos()); }; @@ -2444,88 +3155,90 @@ pp.nextToken = function () { pp.readToken = function (code) { // Identifier or keyword. '\uXXXX' sequences are allowed in // identifiers, so '\' also dispatches to that. - if (_identifier.isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord(); + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord(); return this.getTokenFromCode(code); }; pp.fullCharCodeAtPos = function () { var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) return code; + if (code <= 55295 || code >= 57344) return code; var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00; + return (code << 10) + next - 56613888; }; pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.curPosition(); + var startLoc = this.options.onComment && this.options.locations && this.curPosition(); var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); this.pos = end + 2; if (this.options.locations) { - _whitespace.lineBreakG.lastIndex = start; + lineBreakG.lastIndex = start; var match = undefined; - while ((match = _whitespace.lineBreakG.exec(this.input)) && match.index < this.pos) { + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { ++this.curLine; this.lineStart = match.index + match[0].length; } } - if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition()); + if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.options.locations && this.curPosition()); }; pp.skipLineComment = function (startSkip) { var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); + var startLoc = this.options.onComment && this.options.locations && this.curPosition(); var ch = this.input.charCodeAt(this.pos += startSkip); while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { ++this.pos; ch = this.input.charCodeAt(this.pos); } - if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition()); + if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.options.locations && this.curPosition()); }; // Called at the start of the parse and after every token. Skips // whitespace and comments, and. pp.skipSpace = function () { - loop: while (this.pos < this.input.length) { + while (this.pos < this.input.length) { var ch = this.input.charCodeAt(this.pos); - switch (ch) { - case 32:case 160: - // ' ' + if (ch === 32) { + // ' ' + ++this.pos; + } else if (ch === 13) { + ++this.pos; + var next = this.input.charCodeAt(this.pos); + if (next === 10) { ++this.pos; - break; - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos; - } - case 10:case 8232:case 8233: - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - break; - case 47: + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch === 10 || ch === 8232 || ch === 8233) { + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch > 8 && ch < 14) { + ++this.pos; + } else if (ch === 47) { + // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 42) { + // '*' + this.skipBlockComment(); + } else if (next === 47) { // '/' - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: - // '*' - this.skipBlockComment(); - break; - case 47: - this.skipLineComment(2); - break; - default: - break loop; - } - break; - default: - if (ch > 8 && ch < 14 || ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break loop; - } + this.skipLineComment(2); + } else break; + } else if (ch === 160) { + // '\xa0' + ++this.pos; + } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break; } } }; @@ -2561,10 +3274,10 @@ pp.readToken_dot = function () { if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' this.pos += 3; - return this.finishToken(_tokentype.types.ellipsis); + return this.finishToken(tt.ellipsis); } else { ++this.pos; - return this.finishToken(_tokentype.types.dot); + return this.finishToken(tt.dot); } }; @@ -2574,46 +3287,46 @@ pp.readToken_slash = function () { if (this.exprAllowed) { ++this.pos;return this.readRegexp(); } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.slash, 1); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.slash, 1); }; pp.readToken_mult_modulo = function (code) { // '%*' var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(code === 42 ? _tokentype.types.star : _tokentype.types.modulo, 1); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(code === 42 ? tt.star : tt.modulo, 1); }; pp.readToken_pipe_amp = function (code) { // '|&' var next = this.input.charCodeAt(this.pos + 1); - if (next === code) return this.finishOp(code === 124 ? _tokentype.types.logicalOR : _tokentype.types.logicalAND, 2); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(code === 124 ? _tokentype.types.bitwiseOR : _tokentype.types.bitwiseAND, 1); + if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1); }; pp.readToken_caret = function () { // '^' var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.bitwiseXOR, 1); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.bitwiseXOR, 1); }; pp.readToken_plus_min = function (code) { // '+-' var next = this.input.charCodeAt(this.pos + 1); if (next === code) { - if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { + if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { // A `-->` line comment this.skipLineComment(3); this.skipSpace(); return this.nextToken(); } - return this.finishOp(_tokentype.types.incDec, 2); + return this.finishOp(tt.incDec, 2); } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.plusMin, 1); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.plusMin, 1); }; pp.readToken_lt_gt = function (code) { @@ -2622,8 +3335,8 @@ pp.readToken_lt_gt = function (code) { var size = 1; if (next === code) { size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1); - return this.finishOp(_tokentype.types.bitShift, size); + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1); + return this.finishOp(tt.bitShift, size); } if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { if (this.inModule) this.unexpected(); @@ -2633,19 +3346,19 @@ pp.readToken_lt_gt = function (code) { return this.nextToken(); } if (next === 61) size = this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2; - return this.finishOp(_tokentype.types.relational, size); + return this.finishOp(tt.relational, size); }; pp.readToken_eq_excl = function (code) { // '=!' var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2); + if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2); if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>' this.pos += 2; - return this.finishToken(_tokentype.types.arrow); + return this.finishToken(tt.arrow); } - return this.finishOp(code === 61 ? _tokentype.types.eq : _tokentype.types.prefix, 1); + return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1); }; pp.getTokenFromCode = function (code) { @@ -2658,31 +3371,31 @@ pp.getTokenFromCode = function (code) { // Punctuation tokens. case 40: - ++this.pos;return this.finishToken(_tokentype.types.parenL); + ++this.pos;return this.finishToken(tt.parenL); case 41: - ++this.pos;return this.finishToken(_tokentype.types.parenR); + ++this.pos;return this.finishToken(tt.parenR); case 59: - ++this.pos;return this.finishToken(_tokentype.types.semi); + ++this.pos;return this.finishToken(tt.semi); case 44: - ++this.pos;return this.finishToken(_tokentype.types.comma); + ++this.pos;return this.finishToken(tt.comma); case 91: - ++this.pos;return this.finishToken(_tokentype.types.bracketL); + ++this.pos;return this.finishToken(tt.bracketL); case 93: - ++this.pos;return this.finishToken(_tokentype.types.bracketR); + ++this.pos;return this.finishToken(tt.bracketR); case 123: - ++this.pos;return this.finishToken(_tokentype.types.braceL); + ++this.pos;return this.finishToken(tt.braceL); case 125: - ++this.pos;return this.finishToken(_tokentype.types.braceR); + ++this.pos;return this.finishToken(tt.braceR); case 58: - ++this.pos;return this.finishToken(_tokentype.types.colon); + ++this.pos;return this.finishToken(tt.colon); case 63: - ++this.pos;return this.finishToken(_tokentype.types.question); + ++this.pos;return this.finishToken(tt.question); case 96: // '`' if (this.options.ecmaVersion < 6) break; ++this.pos; - return this.finishToken(_tokentype.types.backQuote); + return this.finishToken(tt.backQuote); case 48: // '0' @@ -2738,7 +3451,7 @@ pp.getTokenFromCode = function (code) { case 126: // '~' - return this.finishOp(_tokentype.types.prefix, 1); + return this.finishOp(tt.prefix, 1); } this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'"); @@ -2750,32 +3463,22 @@ pp.finishOp = function (type, size) { return this.finishToken(type, str); }; +var regexpUnicodeSupport = false; +try { + new RegExp("￿", "u");regexpUnicodeSupport = true; +} catch (e) {} + // Parse a regular expression. Some context-awareness is necessary, // since a '/' inside a '[]' set does not end the expression. -function tryCreateRegexp(src, flags, throwErrorAt) { - try { - return new RegExp(src, flags); - } catch (e) { - if (throwErrorAt !== undefined) { - if (e instanceof SyntaxError) this.raise(throwErrorAt, "Error parsing regular expression: " + e.message); - this.raise(e); - } - } -} - -var regexpUnicodeSupport = !!tryCreateRegexp("￿", "u"); - pp.readRegexp = function () { - var _this = this; - var escaped = undefined, inClass = undefined, start = this.pos; for (;;) { if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression"); var ch = this.input.charAt(this.pos); - if (_whitespace.lineBreak.test(ch)) this.raise(start, "Unterminated regular expression"); + if (lineBreak.test(ch)) this.raise(start, "Unterminated regular expression"); if (!escaped) { if (ch === "[") inClass = true;else if (ch === "]" && inClass) inClass = false;else if (ch === "/" && !inClass) break; escaped = ch === "\\"; @@ -2801,12 +3504,7 @@ pp.readRegexp = function () { // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a // perfectly valid pattern that is equivalent to `[a-b]`, but it would // be replaced by `[x-b]` which throws an error. - tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (match, code, offset) { - code = Number("0x" + code); - if (code > 0x10FFFF) _this.raise(start + offset + 3, "Code point out of bounds"); - return "x"; - }); - tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"); + tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"); } } // Detect invalid regular expressions. @@ -2814,12 +3512,19 @@ pp.readRegexp = function () { // Rhino's regular expression parser is flaky and throws uncatchable exceptions, // so don't do detection if we are running under Rhino if (!isRhino) { - tryCreateRegexp(tmp, undefined, start); + try { + new RegExp(tmp); + } catch (e) { + if (e instanceof SyntaxError) this.raise(start, "Error parsing regular expression: " + e.message); + this.raise(e); + } // Get a regular expression object for this pattern-flag pair, or `null` in // case the current environment doesn't support the flags it uses. - value = tryCreateRegexp(content, mods); + try { + value = new RegExp(content, mods); + } catch (err) {} } - return this.finishToken(_tokentype.types.regexp, { pattern: content, flags: mods, value: value }); + return this.finishToken(tt.regexp, { pattern: content, flags: mods, value: value }); }; // Read an integer in the given radix. Return null if zero digits @@ -2849,8 +3554,8 @@ pp.readRadixNumber = function (radix) { this.pos += 2; // 0x var val = this.readInt(radix); if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix); - if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); - return this.finishToken(_tokentype.types.num, val); + if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); + return this.finishToken(tt.num, val); }; // Read an integer, octal integer, or floating-point number. @@ -2860,14 +3565,12 @@ pp.readNumber = function (startsWithDot) { isFloat = false, octal = this.input.charCodeAt(this.pos) === 48; if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number"); - var next = this.input.charCodeAt(this.pos); - if (next === 46) { - // '.' + if (this.input.charCodeAt(this.pos) === 46) { ++this.pos; this.readInt(10); isFloat = true; - next = this.input.charCodeAt(this.pos); } + var next = this.input.charCodeAt(this.pos); if (next === 69 || next === 101) { // 'eE' next = this.input.charCodeAt(++this.pos); @@ -2875,12 +3578,12 @@ pp.readNumber = function (startsWithDot) { if (this.readInt(10) === null) this.raise(start, "Invalid number"); isFloat = true; } - if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); + if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number"); var str = this.input.slice(start, this.pos), val = undefined; if (isFloat) val = parseFloat(str);else if (!octal || str.length === 1) val = parseInt(str, 10);else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number");else val = parseInt(str, 8); - return this.finishToken(_tokentype.types.num, val); + return this.finishToken(tt.num, val); }; // Read a string value, interpreting backslash-escapes. @@ -2891,10 +3594,10 @@ pp.readCodePoint = function () { if (ch === 123) { if (this.options.ecmaVersion < 6) this.unexpected(); - var codePos = ++this.pos; + ++this.pos; code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos); ++this.pos; - if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds"); + if (code > 1114111) this.unexpected(); } else { code = this.readHexChar(4); } @@ -2903,9 +3606,9 @@ pp.readCodePoint = function () { function codePointToString(code) { // UTF-16 Decoding - if (code <= 0xFFFF) return String.fromCharCode(code); - code -= 0x10000; - return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00); + if (code <= 65535) { + return String.fromCharCode(code); + }return String.fromCharCode((code - 65536 >> 10) + 55296, (code - 65536 & 1023) + 56320); } pp.readString = function (quote) { @@ -2918,15 +3621,15 @@ pp.readString = function (quote) { if (ch === 92) { // '\' out += this.input.slice(chunkStart, this.pos); - out += this.readEscapedChar(false); + out += this.readEscapedChar(); chunkStart = this.pos; } else { - if (_whitespace.isNewLine(ch)) this.raise(this.start, "Unterminated string constant"); + if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant"); ++this.pos; } } out += this.input.slice(chunkStart, this.pos++); - return this.finishToken(_tokentype.types.string, out); + return this.finishToken(tt.string, out); }; // Reads template string tokens. @@ -2939,35 +3642,31 @@ pp.readTmplToken = function () { var ch = this.input.charCodeAt(this.pos); if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${' - if (this.pos === this.start && this.type === _tokentype.types.template) { + if (this.pos === this.start && this.type === tt.template) { if (ch === 36) { this.pos += 2; - return this.finishToken(_tokentype.types.dollarBraceL); + return this.finishToken(tt.dollarBraceL); } else { ++this.pos; - return this.finishToken(_tokentype.types.backQuote); + return this.finishToken(tt.backQuote); } } out += this.input.slice(chunkStart, this.pos); - return this.finishToken(_tokentype.types.template, out); + return this.finishToken(tt.template, out); } if (ch === 92) { // '\' out += this.input.slice(chunkStart, this.pos); - out += this.readEscapedChar(true); + out += this.readEscapedChar(); chunkStart = this.pos; - } else if (_whitespace.isNewLine(ch)) { + } else if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.pos); ++this.pos; - switch (ch) { - case 13: - if (this.input.charCodeAt(this.pos) === 10) ++this.pos; - case 10: - out += "\n"; - break; - default: - out += String.fromCharCode(ch); - break; + if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { + ++this.pos; + out += "\n"; + } else { + out += String.fromCharCode(ch); } if (this.options.locations) { ++this.curLine; @@ -2982,87 +3681,91 @@ pp.readTmplToken = function () { // Used to read escaped characters -pp.readEscapedChar = function (inTemplate) { +pp.readEscapedChar = function () { var ch = this.input.charCodeAt(++this.pos); + var octal = /^[0-7]+/.exec(this.input.slice(this.pos, this.pos + 3)); + if (octal) octal = octal[0]; + while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1); + if (octal === "0") octal = null; ++this.pos; - switch (ch) { - case 110: - return "\n"; // 'n' -> '\n' - case 114: - return "\r"; // 'r' -> '\r' - case 120: - return String.fromCharCode(this.readHexChar(2)); // 'x' - case 117: - return codePointToString(this.readCodePoint()); // 'u' - case 116: - return "\t"; // 't' -> '\t' - case 98: - return "\b"; // 'b' -> '\b' - case 118: - return "\u000b"; // 'v' -> '\u000b' - case 102: - return "\f"; // 'f' -> '\f' - case 13: - if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n' - case 10: - // ' \n' - if (this.options.locations) { - this.lineStart = this.pos;++this.curLine; - } - return ""; - default: - if (ch >= 48 && ch <= 55) { - var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]; - var octal = parseInt(octalStr, 8); - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); + if (octal) { + if (this.strict) this.raise(this.pos - 2, "Octal literal in strict mode"); + this.pos += octal.length - 1; + return String.fromCharCode(parseInt(octal, 8)); + } else { + switch (ch) { + case 110: + return "\n"; // 'n' -> '\n' + case 114: + return "\r"; // 'r' -> '\r' + case 120: + return String.fromCharCode(this.readHexChar(2)); // 'x' + case 117: + return codePointToString(this.readCodePoint()); // 'u' + case 116: + return "\t"; // 't' -> '\t' + case 98: + return "\b"; // 'b' -> '\b' + case 118: + return "\u000b"; // 'v' -> '\u000b' + case 102: + return "\f"; // 'f' -> '\f' + case 48: + return "\u0000"; // 0 -> '\0' + case 13: + if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n' + case 10: + // ' \n' + if (this.options.locations) { + this.lineStart = this.pos;++this.curLine; } - if (octal > 0 && (this.strict || inTemplate)) { - this.raise(this.pos - 2, "Octal literal in strict mode"); - } - this.pos += octalStr.length - 1; - return String.fromCharCode(octal); - } - return String.fromCharCode(ch); + return ""; + default: + return String.fromCharCode(ch); + } } }; // Used to read character escape sequences ('\x', '\u', '\U'). pp.readHexChar = function (len) { - var codePos = this.pos; var n = this.readInt(16, len); - if (n === null) this.raise(codePos, "Bad character escape sequence"); + if (n === null) this.raise(this.start, "Bad character escape sequence"); return n; }; -// Read an identifier, and return it as a string. Sets `this.containsEsc` +// Used to signal to callers of `readWord1` whether the word +// contained any escape sequences. This is needed because words with +// escape sequences must not be interpreted as keywords. + +var containsEsc; + +// Read an identifier, and return it as a string. Sets `containsEsc` // to whether the word contained a '\u' escape. // // Incrementally adds only escaped chars, adding other chunks as-is // as a micro-optimization. pp.readWord1 = function () { - this.containsEsc = false; + containsEsc = false; var word = "", first = true, chunkStart = this.pos; var astral = this.options.ecmaVersion >= 6; while (this.pos < this.input.length) { var ch = this.fullCharCodeAtPos(); - if (_identifier.isIdentifierChar(ch, astral)) { - this.pos += ch <= 0xffff ? 1 : 2; + if (isIdentifierChar(ch, astral)) { + this.pos += ch <= 65535 ? 1 : 2; } else if (ch === 92) { // "\" - this.containsEsc = true; + containsEsc = true; word += this.input.slice(chunkStart, this.pos); var escStart = this.pos; if (this.input.charCodeAt(++this.pos) != 117) // "u" this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX"); ++this.pos; var esc = this.readCodePoint(); - if (!(first ? _identifier.isIdentifierStart : _identifier.isIdentifierChar)(esc, astral)) this.raise(escStart, "Invalid Unicode escape"); + if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) this.raise(escStart, "Invalid Unicode escape"); word += codePointToString(esc); chunkStart = this.pos; } else { @@ -3078,12 +3781,17 @@ pp.readWord1 = function () { pp.readWord = function () { var word = this.readWord1(); - var type = _tokentype.types.name; - if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.isKeyword(word)) type = _tokentype.keywords[word]; + var type = tt.name; + if ((this.options.ecmaVersion >= 6 || !containsEsc) && this.isKeyword(word)) type = keywordTypes[word]; return this.finishToken(type, word); }; -},{"./identifier":2,"./locutil":5,"./state":10,"./tokentype":14,"./whitespace":16}],14:[function(_dereq_,module,exports){ +},{"./identifier":7,"./location":8,"./state":13,"./tokentype":17,"./whitespace":19}],17:[function(_dereq_,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +exports.__esModule = true; // ## Token types // The assignment of fine-grained, information-carrying type objects @@ -3102,14 +3810,8 @@ pp.readWord = function () { // to know when parsing a label, in order to allow or disallow // continue jumps to that label. -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var TokenType = function TokenType(label) { - var conf = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; +var TokenType = exports.TokenType = function TokenType(label) { + var conf = arguments[1] === undefined ? {} : arguments[1]; _classCallCheck(this, TokenType); @@ -3125,8 +3827,6 @@ var TokenType = function TokenType(label) { this.updateContext = null; }; -exports.TokenType = TokenType; - function binop(name, prec) { return new TokenType(name, { beforeExpr: true, binop: prec }); } @@ -3198,7 +3898,7 @@ var keywords = {}; exports.keywords = keywords; // Succinct definitions of keyword token types function kw(name) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var options = arguments[1] === undefined ? {} : arguments[1]; options.keyword = name; keywords[name] = types["_" + name] = new TokenType(name, options); @@ -3209,7 +3909,7 @@ kw("case", beforeExpr); kw("catch"); kw("continue"); kw("debugger"); -kw("default", beforeExpr); +kw("default"); kw("do", { isLoop: true }); kw("else", beforeExpr); kw("finally"); @@ -3242,31 +3942,32 @@ kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }); kw("void", { beforeExpr: true, prefix: true, startsExpr: true }); kw("delete", { beforeExpr: true, prefix: true, startsExpr: true }); -},{}],15:[function(_dereq_,module,exports){ +},{}],18:[function(_dereq_,module,exports){ "use strict"; -exports.__esModule = true; exports.isArray = isArray; + +// Checks if an object has a property. + exports.has = has; +exports.__esModule = true; function isArray(obj) { return Object.prototype.toString.call(obj) === "[object Array]"; } -// Checks if an object has a property. - function has(obj, propName) { return Object.prototype.hasOwnProperty.call(obj, propName); } -},{}],16:[function(_dereq_,module,exports){ +},{}],19:[function(_dereq_,module,exports){ +"use strict"; + +exports.isNewLine = isNewLine; +exports.__esModule = true; // Matches a whole line break (where CRLF is considered a single // line break). Used to count lines. -"use strict"; - -exports.__esModule = true; -exports.isNewLine = isNewLine; var lineBreak = /\r\n?|\n|\u2028|\u2029/; exports.lineBreak = lineBreak; var lineBreakG = new RegExp(lineBreak.source, "g"); @@ -3274,11 +3975,11 @@ var lineBreakG = new RegExp(lineBreak.source, "g"); exports.lineBreakG = lineBreakG; function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code == 0x2029; + return code === 10 || code === 13 || code === 8232 || code == 8233; } var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; exports.nonASCIIwhitespace = nonASCIIwhitespace; -},{}]},{},[3])(3) +},{}]},{},[1])(1) }); \ No newline at end of file diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/acorn_loose.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/acorn_loose.js index aef7a0a..521e280 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/acorn_loose.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/acorn_loose.js @@ -1,18 +1,83 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g.acorn || (g.acorn = {})).loose = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o minPrec) { var node = this.startNodeAt(start); node.left = left; @@ -119,14 +184,14 @@ lp.parseExprOp = function (left, start, minPrec, noIn, indent, line) { lp.parseMaybeUnary = function (noIn) { if (this.tok.type.prefix) { var node = this.startNode(), - update = this.tok.type === _.tokTypes.incDec; + update = this.tok.type === tt.incDec; node.operator = this.tok.value; node.prefix = true; this.next(); node.argument = this.parseMaybeUnary(noIn); if (update) node.argument = this.checkLVal(node.argument); return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else if (this.tok.type === _.tokTypes.ellipsis) { + } else if (this.tok.type === tt.ellipsis) { var node = this.startNode(); this.next(); node.argument = this.parseMaybeUnary(noIn); @@ -153,16 +218,16 @@ lp.parseExprSubscripts = function () { lp.parseSubscripts = function (base, start, noCalls, startIndent, line) { for (;;) { if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) { - if (this.tok.type == _.tokTypes.dot && this.curIndent == startIndent) --startIndent;else return base; + if (this.tok.type == tt.dot && this.curIndent == startIndent) --startIndent;else return base; } - if (this.eat(_.tokTypes.dot)) { + if (this.eat(tt.dot)) { var node = this.startNodeAt(start); node.object = base; if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) node.property = this.dummyIdent();else node.property = this.parsePropertyAccessor() || this.dummyIdent(); node.computed = false; base = this.finishNode(node, "MemberExpression"); - } else if (this.tok.type == _.tokTypes.bracketL) { + } else if (this.tok.type == tt.bracketL) { this.pushCx(); this.next(); var node = this.startNodeAt(start); @@ -170,14 +235,14 @@ lp.parseSubscripts = function (base, start, noCalls, startIndent, line) { node.property = this.parseExpression(); node.computed = true; this.popCx(); - this.expect(_.tokTypes.bracketR); + this.expect(tt.bracketR); base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.tok.type == _.tokTypes.parenL) { + } else if (!noCalls && this.tok.type == tt.parenL) { var node = this.startNodeAt(start); node.callee = base; - node.arguments = this.parseExprList(_.tokTypes.parenR); + node.arguments = this.parseExprList(tt.parenR); base = this.finishNode(node, "CallExpression"); - } else if (this.tok.type == _.tokTypes.backQuote) { + } else if (this.tok.type == tt.backQuote) { var node = this.startNodeAt(start); node.tag = base; node.quasi = this.parseTemplate(); @@ -191,19 +256,19 @@ lp.parseSubscripts = function (base, start, noCalls, startIndent, line) { lp.parseExprAtom = function () { var node = undefined; switch (this.tok.type) { - case _.tokTypes._this: - case _.tokTypes._super: - var type = this.tok.type === _.tokTypes._this ? "ThisExpression" : "Super"; + case tt._this: + case tt._super: + var type = this.tok.type === tt._this ? "ThisExpression" : "Super"; node = this.startNode(); this.next(); return this.finishNode(node, type); - case _.tokTypes.name: + case tt.name: var start = this.storeCurrentPos(); var id = this.parseIdent(); - return this.eat(_.tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id; + return this.eat(tt.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id; - case _.tokTypes.regexp: + case tt.regexp: node = this.startNode(); var val = this.tok.value; node.regex = { pattern: val.pattern, flags: val.flags }; @@ -212,27 +277,27 @@ lp.parseExprAtom = function () { this.next(); return this.finishNode(node, "Literal"); - case _.tokTypes.num:case _.tokTypes.string: + case tt.num:case tt.string: node = this.startNode(); node.value = this.tok.value; node.raw = this.input.slice(this.tok.start, this.tok.end); this.next(); return this.finishNode(node, "Literal"); - case _.tokTypes._null:case _.tokTypes._true:case _.tokTypes._false: + case tt._null:case tt._true:case tt._false: node = this.startNode(); - node.value = this.tok.type === _.tokTypes._null ? null : this.tok.type === _.tokTypes._true; + node.value = this.tok.type === tt._null ? null : this.tok.type === tt._true; node.raw = this.tok.type.keyword; this.next(); return this.finishNode(node, "Literal"); - case _.tokTypes.parenL: + case tt.parenL: var parenStart = this.storeCurrentPos(); this.next(); var inner = this.parseExpression(); - this.expect(_.tokTypes.parenR); - if (this.eat(_.tokTypes.arrow)) { - return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (_parseutil.isDummy(inner) ? [] : [inner])); + this.expect(tt.parenR); + if (this.eat(tt.arrow)) { + return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner])); } if (this.options.preserveParens) { var par = this.startNodeAt(parenStart); @@ -241,38 +306,38 @@ lp.parseExprAtom = function () { } return inner; - case _.tokTypes.bracketL: + case tt.bracketL: node = this.startNode(); - node.elements = this.parseExprList(_.tokTypes.bracketR, true); + node.elements = this.parseExprList(tt.bracketR, true); return this.finishNode(node, "ArrayExpression"); - case _.tokTypes.braceL: + case tt.braceL: return this.parseObj(); - case _.tokTypes._class: + case tt._class: return this.parseClass(); - case _.tokTypes._function: + case tt._function: node = this.startNode(); this.next(); return this.parseFunction(node, false); - case _.tokTypes._new: + case tt._new: return this.parseNew(); - case _.tokTypes._yield: + case tt._yield: node = this.startNode(); this.next(); - if (this.semicolon() || this.canInsertSemicolon() || this.tok.type != _.tokTypes.star && !this.tok.type.startsExpr) { + if (this.semicolon() || this.canInsertSemicolon() || this.tok.type != tt.star && !this.tok.type.startsExpr) { node.delegate = false; node.argument = null; } else { - node.delegate = this.eat(_.tokTypes.star); + node.delegate = this.eat(tt.star); node.argument = this.parseMaybeAssign(); } return this.finishNode(node, "YieldExpression"); - case _.tokTypes.backQuote: + case tt.backQuote: return this.parseTemplate(); default: @@ -285,15 +350,15 @@ lp.parseNew = function () { startIndent = this.curIndent, line = this.curLineStart; var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(_.tokTypes.dot)) { + if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { node.meta = meta; node.property = this.parseIdent(true); return this.finishNode(node, "MetaProperty"); } var start = this.storeCurrentPos(); node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line); - if (this.tok.type == _.tokTypes.parenL) { - node.arguments = this.parseExprList(_.tokTypes.parenR); + if (this.tok.type == tt.parenL) { + node.arguments = this.parseExprList(tt.parenR); } else { node.arguments = []; } @@ -303,11 +368,11 @@ lp.parseNew = function () { lp.parseTemplateElement = function () { var elem = this.startNode(); elem.value = { - raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, "\n"), + raw: this.input.slice(this.tok.start, this.tok.end), cooked: this.tok.value }; this.next(); - elem.tail = this.tok.type === _.tokTypes.backQuote; + elem.tail = this.tok.type === tt.backQuote; return this.finishNode(elem, "TemplateElement"); }; @@ -320,7 +385,7 @@ lp.parseTemplate = function () { while (!curElt.tail) { this.next(); node.expressions.push(this.parseExpression()); - if (this.expect(_.tokTypes.braceR)) { + if (this.expect(tt.braceR)) { curElt = this.parseTemplateElement(); } else { curElt = this.startNode(); @@ -329,7 +394,7 @@ lp.parseTemplate = function () { } node.quasis.push(curElt); } - this.expect(_.tokTypes.backQuote); + this.expect(tt.backQuote); return this.finishNode(node, "TemplateLiteral"); }; @@ -339,11 +404,11 @@ lp.parseObj = function () { this.pushCx(); var indent = this.curIndent + 1, line = this.curLineStart; - this.eat(_.tokTypes.braceL); + this.eat(tt.braceL); if (this.curIndent + 1 < indent) { indent = this.curIndent;line = this.curLineStart; } - while (!this.closes(_.tokTypes.braceR, indent, line)) { + while (!this.closes(tt.braceR, indent, line)) { var prop = this.startNode(), isGenerator = undefined, start = undefined; @@ -351,27 +416,27 @@ lp.parseObj = function () { start = this.storeCurrentPos(); prop.method = false; prop.shorthand = false; - isGenerator = this.eat(_.tokTypes.star); + isGenerator = this.eat(tt.star); } this.parsePropertyName(prop); - if (_parseutil.isDummy(prop.key)) { - if (_parseutil.isDummy(this.parseMaybeAssign())) this.next();this.eat(_.tokTypes.comma);continue; + if (isDummy(prop.key)) { + if (isDummy(this.parseMaybeAssign())) this.next();this.eat(tt.comma);continue; } - if (this.eat(_.tokTypes.colon)) { + if (this.eat(tt.colon)) { prop.kind = "init"; prop.value = this.parseMaybeAssign(); - } else if (this.options.ecmaVersion >= 6 && (this.tok.type === _.tokTypes.parenL || this.tok.type === _.tokTypes.braceL)) { + } else if (this.options.ecmaVersion >= 6 && (this.tok.type === tt.parenL || this.tok.type === tt.braceL)) { prop.kind = "init"; prop.method = true; prop.value = this.parseMethod(isGenerator); - } else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" && !prop.computed && (prop.key.name === "get" || prop.key.name === "set") && (this.tok.type != _.tokTypes.comma && this.tok.type != _.tokTypes.braceR)) { + } else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" && !prop.computed && (prop.key.name === "get" || prop.key.name === "set") && (this.tok.type != tt.comma && this.tok.type != tt.braceR)) { prop.kind = prop.key.name; this.parsePropertyName(prop); prop.value = this.parseMethod(false); } else { prop.kind = "init"; if (this.options.ecmaVersion >= 6) { - if (this.eat(_.tokTypes.eq)) { + if (this.eat(tt.eq)) { var assign = this.startNodeAt(start); assign.operator = "="; assign.left = prop.key; @@ -386,10 +451,10 @@ lp.parseObj = function () { prop.shorthand = true; } node.properties.push(this.finishNode(prop, "Property")); - this.eat(_.tokTypes.comma); + this.eat(tt.comma); } this.popCx(); - if (!this.eat(_.tokTypes.braceR)) { + if (!this.eat(tt.braceR)) { // If there is no closing brace, make the node span to the start // of the next token (this is useful for Tern) this.last.end = this.tok.start; @@ -400,25 +465,25 @@ lp.parseObj = function () { lp.parsePropertyName = function (prop) { if (this.options.ecmaVersion >= 6) { - if (this.eat(_.tokTypes.bracketL)) { + if (this.eat(tt.bracketL)) { prop.computed = true; prop.key = this.parseExpression(); - this.expect(_.tokTypes.bracketR); + this.expect(tt.bracketR); return; } else { prop.computed = false; } } - var key = this.tok.type === _.tokTypes.num || this.tok.type === _.tokTypes.string ? this.parseExprAtom() : this.parseIdent(); + var key = this.tok.type === tt.num || this.tok.type === tt.string ? this.parseExprAtom() : this.parseIdent(); prop.key = key || this.dummyIdent(); }; lp.parsePropertyAccessor = function () { - if (this.tok.type === _.tokTypes.name || this.tok.type.keyword) return this.parseIdent(); + if (this.tok.type === tt.name || this.tok.type.keyword) return this.parseIdent(); }; lp.parseIdent = function () { - var name = this.tok.type === _.tokTypes.name ? this.tok.value : this.tok.type.keyword; + var name = this.tok.type === tt.name ? this.tok.value : this.tok.type.keyword; if (!name) return this.dummyIdent(); var node = this.startNode(); this.next(); @@ -460,7 +525,6 @@ lp.toAssignable = function (node, binding) { case "AssignmentExpression": node.type = "AssignmentPattern"; - delete node.operator; break; } } @@ -474,7 +538,7 @@ lp.toAssignableList = function (exprList, binding) { }; lp.parseFunctionParams = function (params) { - params = this.parseExprList(_.tokTypes.parenR); + params = this.parseExprList(tt.parenR); return this.toAssignableList(params, true); }; @@ -483,7 +547,7 @@ lp.parseMethod = function (isGenerator) { this.initFunction(node); node.params = this.parseFunctionParams(); node.generator = isGenerator || false; - node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== _.tokTypes.braceL; + node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tt.braceL; node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock(); return this.finishNode(node, "FunctionExpression"); }; @@ -491,7 +555,7 @@ lp.parseMethod = function (isGenerator) { lp.parseArrowExpression = function (node, params) { this.initFunction(node); node.params = this.toAssignableList(params, true); - node.expression = this.tok.type !== _.tokTypes.braceL; + node.expression = this.tok.type !== tt.braceL; node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock(); return this.finishNode(node, "ArrowFunctionExpression"); }; @@ -503,18 +567,18 @@ lp.parseExprList = function (close, allowEmpty) { elts = []; this.next(); // Opening bracket while (!this.closes(close, indent + 1, line)) { - if (this.eat(_.tokTypes.comma)) { + if (this.eat(tt.comma)) { elts.push(allowEmpty ? null : this.dummyIdent()); continue; } var elt = this.parseMaybeAssign(); - if (_parseutil.isDummy(elt)) { + if (isDummy(elt)) { if (this.closes(close, indent, line)) break; this.next(); } else { elts.push(elt); } - this.eat(_.tokTypes.comma); + this.eat(tt.comma); } this.popCx(); if (!this.eat(close)) { @@ -526,227 +590,183 @@ lp.parseExprList = function (close, allowEmpty) { return elts; }; -},{"..":1,"./parseutil":4,"./state":5}],3:[function(_dereq_,module,exports){ -// Acorn: Loose parser -// -// This module provides an alternative parser (`parse_dammit`) that -// exposes that same interface as `parse`, but will try to parse -// anything as JavaScript, repairing syntax error the best it can. -// There are circumstances in which it will raise an error and give -// up, but they are very rare. The resulting AST will be a mostly -// valid JavaScript AST (as per the [Mozilla parser API][api], except -// that: -// -// - Return outside functions is allowed -// -// - Label consistency (no conflicts, break only to existing labels) -// is not enforced. -// -// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever -// the parser got too confused to return anything meaningful. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API -// -// The expected use for this is to *first* try `acorn.parse`, and only -// if that fails switch to `parse_dammit`. The loose parser might -// parse badly indented code incorrectly, so **don't** use it as -// your default parser. -// -// Quite a lot of acorn.js is duplicated here. The alternative was to -// add a *lot* of extra cruft to that file, making it less readable -// and slower. Copying and editing the code allowed me to make -// invasive changes and simplifications without creating a complicated -// tangle. - +},{"..":2,"./parseutil":4,"./state":5}],4:[function(_dereq_,module,exports){ "use strict"; +exports.isDummy = isDummy; exports.__esModule = true; -exports.parse_dammit = parse_dammit; -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } } +var LooseParser = _dereq_("./state").LooseParser; var _ = _dereq_(".."); -var acorn = _interopRequireWildcard(_); +var Node = _.Node; +var SourceLocation = _.SourceLocation; +var lineBreak = _.lineBreak; +var isNewLine = _.isNewLine; +var tt = _.tokTypes; -var _state = _dereq_("./state"); +var lp = LooseParser.prototype; -_dereq_("./tokenize"); +lp.startNode = function () { + var node = new Node(); + node.start = this.tok.start; + if (this.options.locations) node.loc = new SourceLocation(this.toks, this.tok.loc.start); + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [this.tok.start, 0]; + return node; +}; -_dereq_("./statement"); +lp.storeCurrentPos = function () { + return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start; +}; -_dereq_("./expression"); +lp.startNodeAt = function (pos) { + var node = new Node(); + if (this.options.locations) { + node.start = pos[0]; + node.loc = new SourceLocation(this.toks, pos[1]); + pos = pos[0]; + } else { + node.start = pos; + } + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [pos, 0]; + return node; +}; -exports.LooseParser = _state.LooseParser; +lp.finishNode = function (node, type) { + node.type = type; + node.end = this.last.end; + if (this.options.locations) node.loc.end = this.last.loc.end; + if (this.options.ranges) node.range[1] = this.last.end; + return node; +}; -acorn.defaultOptions.tabSize = 4; - -function parse_dammit(input, options) { - var p = new _state.LooseParser(input, options); - p.next(); - return p.parseTopLevel(); -} - -acorn.parse_dammit = parse_dammit; -acorn.LooseParser = _state.LooseParser; - -},{"..":1,"./expression":2,"./state":5,"./statement":6,"./tokenize":7}],4:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; -exports.isDummy = isDummy; +lp.dummyIdent = function () { + var dummy = this.startNode(); + dummy.name = "✖"; + return this.finishNode(dummy, "Identifier"); +}; function isDummy(node) { return node.name == "✖"; } -},{}],5:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _ = _dereq_(".."); - -var LooseParser = (function () { - function LooseParser(input, options) { - _classCallCheck(this, LooseParser); - - this.toks = _.tokenizer(input, options); - this.options = this.toks.options; - this.input = this.toks.input; - this.tok = this.last = { type: _.tokTypes.eof, start: 0, end: 0 }; - if (this.options.locations) { - var here = this.toks.curPosition(); - this.tok.loc = new _.SourceLocation(this.toks, here, here); - } - this.ahead = []; // Tokens ahead - this.context = []; // Indentation contexted - this.curIndent = 0; - this.curLineStart = 0; - this.nextLineStart = this.lineEnd(this.curLineStart) + 1; - } - - LooseParser.prototype.startNode = function startNode() { - return new _.Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null); - }; - - LooseParser.prototype.storeCurrentPos = function storeCurrentPos() { - return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start; - }; - - LooseParser.prototype.startNodeAt = function startNodeAt(pos) { - if (this.options.locations) { - return new _.Node(this.toks, pos[0], pos[1]); - } else { - return new _.Node(this.toks, pos); - } - }; - - LooseParser.prototype.finishNode = function finishNode(node, type) { - node.type = type; - node.end = this.last.end; - if (this.options.locations) node.loc.end = this.last.loc.end; - if (this.options.ranges) node.range[1] = this.last.end; - return node; - }; - - LooseParser.prototype.dummyIdent = function dummyIdent() { - var dummy = this.startNode(); - dummy.name = "✖"; - return this.finishNode(dummy, "Identifier"); - }; - - LooseParser.prototype.eat = function eat(type) { - if (this.tok.type === type) { - this.next(); - return true; - } else { - return false; - } - }; - - LooseParser.prototype.isContextual = function isContextual(name) { - return this.tok.type === _.tokTypes.name && this.tok.value === name; - }; - - LooseParser.prototype.eatContextual = function eatContextual(name) { - return this.tok.value === name && this.eat(_.tokTypes.name); - }; - - LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon() { - return this.tok.type === _.tokTypes.eof || this.tok.type === _.tokTypes.braceR || _.lineBreak.test(this.input.slice(this.last.end, this.tok.start)); - }; - - LooseParser.prototype.semicolon = function semicolon() { - return this.eat(_.tokTypes.semi); - }; - - LooseParser.prototype.expect = function expect(type) { - if (this.eat(type)) return true; - for (var i = 1; i <= 2; i++) { - if (this.lookAhead(i).type == type) { - for (var j = 0; j < i; j++) { - this.next(); - }return true; - } - } - }; - - LooseParser.prototype.pushCx = function pushCx() { - this.context.push(this.curIndent); - }; - - LooseParser.prototype.popCx = function popCx() { - this.curIndent = this.context.pop(); - }; - - LooseParser.prototype.lineEnd = function lineEnd(pos) { - while (pos < this.input.length && !_.isNewLine(this.input.charCodeAt(pos))) ++pos; - return pos; - }; - - LooseParser.prototype.indentationAfter = function indentationAfter(pos) { - for (var count = 0;; ++pos) { - var ch = this.input.charCodeAt(pos); - if (ch === 32) ++count;else if (ch === 9) count += this.options.tabSize;else return count; - } - }; - - LooseParser.prototype.closes = function closes(closeTok, indent, line, blockHeuristic) { - if (this.tok.type === closeTok || this.tok.type === _.tokTypes.eof) return true; - return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() && (!blockHeuristic || this.nextLineStart >= this.input.length || this.indentationAfter(this.nextLineStart) < indent); - }; - - LooseParser.prototype.tokenStartsLine = function tokenStartsLine() { - for (var p = this.tok.start - 1; p >= this.curLineStart; --p) { - var ch = this.input.charCodeAt(p); - if (ch !== 9 && ch !== 32) return false; - } +lp.eat = function (type) { + if (this.tok.type === type) { + this.next(); return true; - }; + } else { + return false; + } +}; - return LooseParser; -})(); +lp.isContextual = function (name) { + return this.tok.type === tt.name && this.tok.value === name; +}; + +lp.eatContextual = function (name) { + return this.tok.value === name && this.eat(tt.name); +}; + +lp.canInsertSemicolon = function () { + return this.tok.type === tt.eof || this.tok.type === tt.braceR || lineBreak.test(this.input.slice(this.last.end, this.tok.start)); +}; + +lp.semicolon = function () { + return this.eat(tt.semi); +}; + +lp.expect = function (type) { + if (this.eat(type)) return true; + for (var i = 1; i <= 2; i++) { + if (this.lookAhead(i).type == type) { + for (var j = 0; j < i; j++) { + this.next(); + }return true; + } + } +}; + +lp.pushCx = function () { + this.context.push(this.curIndent); +}; +lp.popCx = function () { + this.curIndent = this.context.pop(); +}; + +lp.lineEnd = function (pos) { + while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos; + return pos; +}; + +lp.indentationAfter = function (pos) { + for (var count = 0;; ++pos) { + var ch = this.input.charCodeAt(pos); + if (ch === 32) ++count;else if (ch === 9) count += this.options.tabSize;else return count; + } +}; + +lp.closes = function (closeTok, indent, line, blockHeuristic) { + if (this.tok.type === closeTok || this.tok.type === tt.eof) return true; + return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() && (!blockHeuristic || this.nextLineStart >= this.input.length || this.indentationAfter(this.nextLineStart) < indent); +}; + +lp.tokenStartsLine = function () { + for (var p = this.tok.start - 1; p >= this.curLineStart; --p) { + var ch = this.input.charCodeAt(p); + if (ch !== 9 && ch !== 32) return false; + } + return true; +}; + +},{"..":2,"./state":5}],5:[function(_dereq_,module,exports){ +"use strict"; exports.LooseParser = LooseParser; - -},{"..":1}],6:[function(_dereq_,module,exports){ -"use strict"; - -var _state = _dereq_("./state"); - -var _parseutil = _dereq_("./parseutil"); +exports.__esModule = true; var _ = _dereq_(".."); -var lp = _state.LooseParser.prototype; +var tokenizer = _.tokenizer; +var SourceLocation = _.SourceLocation; +var tt = _.tokTypes; + +function LooseParser(input, options) { + this.toks = tokenizer(input, options); + this.options = this.toks.options; + this.input = this.toks.input; + this.tok = this.last = { type: tt.eof, start: 0, end: 0 }; + if (this.options.locations) { + var here = this.toks.curPosition(); + this.tok.loc = new SourceLocation(this.toks, here, here); + } + this.ahead = []; // Tokens ahead + this.context = []; // Indentation contexted + this.curIndent = 0; + this.curLineStart = 0; + this.nextLineStart = this.lineEnd(this.curLineStart) + 1; +} + +},{"..":2}],6:[function(_dereq_,module,exports){ +"use strict"; + +var LooseParser = _dereq_("./state").LooseParser; + +var isDummy = _dereq_("./parseutil").isDummy; + +var _ = _dereq_(".."); + +var getLineInfo = _.getLineInfo; +var tt = _.tokTypes; + +var lp = LooseParser.prototype; lp.parseTopLevel = function () { - var node = this.startNodeAt(this.options.locations ? [0, _.getLineInfo(this.input, 0)] : 0); + var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0); node.body = []; - while (this.tok.type !== _.tokTypes.eof) node.body.push(this.parseStatement()); + while (this.tok.type !== tt.eof) node.body.push(this.parseStatement()); this.last = this.tok; if (this.options.ecmaVersion >= 6) { node.sourceType = this.options.sourceType; @@ -759,82 +779,82 @@ lp.parseStatement = function () { node = this.startNode(); switch (starttype) { - case _.tokTypes._break:case _.tokTypes._continue: + case tt._break:case tt._continue: this.next(); - var isBreak = starttype === _.tokTypes._break; + var isBreak = starttype === tt._break; if (this.semicolon() || this.canInsertSemicolon()) { node.label = null; } else { - node.label = this.tok.type === _.tokTypes.name ? this.parseIdent() : null; + node.label = this.tok.type === tt.name ? this.parseIdent() : null; this.semicolon(); } return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - case _.tokTypes._debugger: + case tt._debugger: this.next(); this.semicolon(); return this.finishNode(node, "DebuggerStatement"); - case _.tokTypes._do: + case tt._do: this.next(); node.body = this.parseStatement(); - node.test = this.eat(_.tokTypes._while) ? this.parseParenExpression() : this.dummyIdent(); + node.test = this.eat(tt._while) ? this.parseParenExpression() : this.dummyIdent(); this.semicolon(); return this.finishNode(node, "DoWhileStatement"); - case _.tokTypes._for: + case tt._for: this.next(); this.pushCx(); - this.expect(_.tokTypes.parenL); - if (this.tok.type === _.tokTypes.semi) return this.parseFor(node, null); - if (this.tok.type === _.tokTypes._var || this.tok.type === _.tokTypes._let || this.tok.type === _.tokTypes._const) { + this.expect(tt.parenL); + if (this.tok.type === tt.semi) return this.parseFor(node, null); + if (this.tok.type === tt._var || this.tok.type === tt._let || this.tok.type === tt._const) { var _init = this.parseVar(true); - if (_init.declarations.length === 1 && (this.tok.type === _.tokTypes._in || this.isContextual("of"))) { + if (_init.declarations.length === 1 && (this.tok.type === tt._in || this.isContextual("of"))) { return this.parseForIn(node, _init); } return this.parseFor(node, _init); } var init = this.parseExpression(true); - if (this.tok.type === _.tokTypes._in || this.isContextual("of")) return this.parseForIn(node, this.toAssignable(init)); + if (this.tok.type === tt._in || this.isContextual("of")) return this.parseForIn(node, this.toAssignable(init)); return this.parseFor(node, init); - case _.tokTypes._function: + case tt._function: this.next(); return this.parseFunction(node, true); - case _.tokTypes._if: + case tt._if: this.next(); node.test = this.parseParenExpression(); node.consequent = this.parseStatement(); - node.alternate = this.eat(_.tokTypes._else) ? this.parseStatement() : null; + node.alternate = this.eat(tt._else) ? this.parseStatement() : null; return this.finishNode(node, "IfStatement"); - case _.tokTypes._return: + case tt._return: this.next(); - if (this.eat(_.tokTypes.semi) || this.canInsertSemicolon()) node.argument = null;else { + if (this.eat(tt.semi) || this.canInsertSemicolon()) node.argument = null;else { node.argument = this.parseExpression();this.semicolon(); } return this.finishNode(node, "ReturnStatement"); - case _.tokTypes._switch: + case tt._switch: var blockIndent = this.curIndent, line = this.curLineStart; this.next(); node.discriminant = this.parseParenExpression(); node.cases = []; this.pushCx(); - this.expect(_.tokTypes.braceL); + this.expect(tt.braceL); var cur = undefined; - while (!this.closes(_.tokTypes.braceR, blockIndent, line, true)) { - if (this.tok.type === _.tokTypes._case || this.tok.type === _.tokTypes._default) { - var isCase = this.tok.type === _.tokTypes._case; + while (!this.closes(tt.braceR, blockIndent, line, true)) { + if (this.tok.type === tt._case || this.tok.type === tt._default) { + var isCase = this.tok.type === tt._case; if (cur) this.finishNode(cur, "SwitchCase"); node.cases.push(cur = this.startNode()); cur.consequent = []; this.next(); if (isCase) cur.test = this.parseExpression();else cur.test = null; - this.expect(_.tokTypes.colon); + this.expect(tt.colon); } else { if (!cur) { node.cases.push(cur = this.startNode()); @@ -846,73 +866,73 @@ lp.parseStatement = function () { } if (cur) this.finishNode(cur, "SwitchCase"); this.popCx(); - this.eat(_.tokTypes.braceR); + this.eat(tt.braceR); return this.finishNode(node, "SwitchStatement"); - case _.tokTypes._throw: + case tt._throw: this.next(); node.argument = this.parseExpression(); this.semicolon(); return this.finishNode(node, "ThrowStatement"); - case _.tokTypes._try: + case tt._try: this.next(); node.block = this.parseBlock(); node.handler = null; - if (this.tok.type === _.tokTypes._catch) { + if (this.tok.type === tt._catch) { var clause = this.startNode(); this.next(); - this.expect(_.tokTypes.parenL); + this.expect(tt.parenL); clause.param = this.toAssignable(this.parseExprAtom(), true); - this.expect(_.tokTypes.parenR); + this.expect(tt.parenR); clause.guard = null; clause.body = this.parseBlock(); node.handler = this.finishNode(clause, "CatchClause"); } - node.finalizer = this.eat(_.tokTypes._finally) ? this.parseBlock() : null; + node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null; if (!node.handler && !node.finalizer) return node.block; return this.finishNode(node, "TryStatement"); - case _.tokTypes._var: - case _.tokTypes._let: - case _.tokTypes._const: + case tt._var: + case tt._let: + case tt._const: return this.parseVar(); - case _.tokTypes._while: + case tt._while: this.next(); node.test = this.parseParenExpression(); node.body = this.parseStatement(); return this.finishNode(node, "WhileStatement"); - case _.tokTypes._with: + case tt._with: this.next(); node.object = this.parseParenExpression(); node.body = this.parseStatement(); return this.finishNode(node, "WithStatement"); - case _.tokTypes.braceL: + case tt.braceL: return this.parseBlock(); - case _.tokTypes.semi: + case tt.semi: this.next(); return this.finishNode(node, "EmptyStatement"); - case _.tokTypes._class: + case tt._class: return this.parseClass(true); - case _.tokTypes._import: + case tt._import: return this.parseImport(); - case _.tokTypes._export: + case tt._export: return this.parseExport(); default: var expr = this.parseExpression(); - if (_parseutil.isDummy(expr)) { + if (isDummy(expr)) { this.next(); - if (this.tok.type === _.tokTypes.eof) return this.finishNode(node, "EmptyStatement"); + if (this.tok.type === tt.eof) return this.finishNode(node, "EmptyStatement"); return this.parseStatement(); - } else if (starttype === _.tokTypes.name && expr.type === "Identifier" && this.eat(_.tokTypes.colon)) { + } else if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) { node.body = this.parseStatement(); node.label = expr; return this.finishNode(node, "LabeledStatement"); @@ -927,34 +947,34 @@ lp.parseStatement = function () { lp.parseBlock = function () { var node = this.startNode(); this.pushCx(); - this.expect(_.tokTypes.braceL); + this.expect(tt.braceL); var blockIndent = this.curIndent, line = this.curLineStart; node.body = []; - while (!this.closes(_.tokTypes.braceR, blockIndent, line, true)) node.body.push(this.parseStatement()); + while (!this.closes(tt.braceR, blockIndent, line, true)) node.body.push(this.parseStatement()); this.popCx(); - this.eat(_.tokTypes.braceR); + this.eat(tt.braceR); return this.finishNode(node, "BlockStatement"); }; lp.parseFor = function (node, init) { node.init = init; node.test = node.update = null; - if (this.eat(_.tokTypes.semi) && this.tok.type !== _.tokTypes.semi) node.test = this.parseExpression(); - if (this.eat(_.tokTypes.semi) && this.tok.type !== _.tokTypes.parenR) node.update = this.parseExpression(); + if (this.eat(tt.semi) && this.tok.type !== tt.semi) node.test = this.parseExpression(); + if (this.eat(tt.semi) && this.tok.type !== tt.parenR) node.update = this.parseExpression(); this.popCx(); - this.expect(_.tokTypes.parenR); + this.expect(tt.parenR); node.body = this.parseStatement(); return this.finishNode(node, "ForStatement"); }; lp.parseForIn = function (node, init) { - var type = this.tok.type === _.tokTypes._in ? "ForInStatement" : "ForOfStatement"; + var type = this.tok.type === tt._in ? "ForInStatement" : "ForOfStatement"; this.next(); node.left = init; node.right = this.parseExpression(); this.popCx(); - this.expect(_.tokTypes.parenR); + this.expect(tt.parenR); node.body = this.parseStatement(); return this.finishNode(node, type); }; @@ -967,9 +987,9 @@ lp.parseVar = function (noIn) { do { var decl = this.startNode(); decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent(); - decl.init = this.eat(_.tokTypes.eq) ? this.parseMaybeAssign(noIn) : null; + decl.init = this.eat(tt.eq) ? this.parseMaybeAssign(noIn) : null; node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - } while (this.eat(_.tokTypes.comma)); + } while (this.eat(tt.comma)); if (!node.declarations.length) { var decl = this.startNode(); decl.id = this.dummyIdent(); @@ -982,37 +1002,37 @@ lp.parseVar = function (noIn) { lp.parseClass = function (isStatement) { var node = this.startNode(); this.next(); - if (this.tok.type === _.tokTypes.name) node.id = this.parseIdent();else if (isStatement) node.id = this.dummyIdent();else node.id = null; - node.superClass = this.eat(_.tokTypes._extends) ? this.parseExpression() : null; + if (this.tok.type === tt.name) node.id = this.parseIdent();else if (isStatement) node.id = this.dummyIdent();else node.id = null; + node.superClass = this.eat(tt._extends) ? this.parseExpression() : null; node.body = this.startNode(); node.body.body = []; this.pushCx(); var indent = this.curIndent + 1, line = this.curLineStart; - this.eat(_.tokTypes.braceL); + this.eat(tt.braceL); if (this.curIndent + 1 < indent) { indent = this.curIndent;line = this.curLineStart; } - while (!this.closes(_.tokTypes.braceR, indent, line)) { + while (!this.closes(tt.braceR, indent, line)) { if (this.semicolon()) continue; var method = this.startNode(), isGenerator = undefined; if (this.options.ecmaVersion >= 6) { method["static"] = false; - isGenerator = this.eat(_.tokTypes.star); + isGenerator = this.eat(tt.star); } this.parsePropertyName(method); - if (_parseutil.isDummy(method.key)) { - if (_parseutil.isDummy(this.parseMaybeAssign())) this.next();this.eat(_.tokTypes.comma);continue; + if (isDummy(method.key)) { + if (isDummy(this.parseMaybeAssign())) this.next();this.eat(tt.comma);continue; } - if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" && (this.tok.type != _.tokTypes.parenL && this.tok.type != _.tokTypes.braceL)) { + if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" && (this.tok.type != tt.parenL && this.tok.type != tt.braceL)) { method["static"] = true; - isGenerator = this.eat(_.tokTypes.star); + isGenerator = this.eat(tt.star); this.parsePropertyName(method); } else { method["static"] = false; } - if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" && !method.computed && (method.key.name === "get" || method.key.name === "set") && this.tok.type !== _.tokTypes.parenL && this.tok.type !== _.tokTypes.braceL) { + if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" && !method.computed && (method.key.name === "get" || method.key.name === "set") && this.tok.type !== tt.parenL && this.tok.type !== tt.braceL) { method.kind = method.key.name; this.parsePropertyName(method); method.value = this.parseMethod(false); @@ -1027,7 +1047,7 @@ lp.parseClass = function (isStatement) { node.body.body.push(this.finishNode(method, "MethodDefinition")); } this.popCx(); - if (!this.eat(_.tokTypes.braceR)) { + if (!this.eat(tt.braceR)) { // If there is no closing brace, make the node span to the start // of the next token (this is useful for Tern) this.last.end = this.tok.start; @@ -1041,9 +1061,9 @@ lp.parseClass = function (isStatement) { lp.parseFunction = function (node, isStatement) { this.initFunction(node); if (this.options.ecmaVersion >= 6) { - node.generator = this.eat(_.tokTypes.star); + node.generator = this.eat(tt.star); } - if (this.tok.type === _.tokTypes.name) node.id = this.parseIdent();else if (isStatement) node.id = this.dummyIdent(); + if (this.tok.type === tt.name) node.id = this.parseIdent();else if (isStatement) node.id = this.dummyIdent(); node.params = this.parseFunctionParams(); node.body = this.parseBlock(); return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); @@ -1052,11 +1072,11 @@ lp.parseFunction = function (node, isStatement) { lp.parseExport = function () { var node = this.startNode(); this.next(); - if (this.eat(_.tokTypes.star)) { + if (this.eat(tt.star)) { node.source = this.eatContextual("from") ? this.parseExprAtom() : null; return this.finishNode(node, "ExportAllDeclaration"); } - if (this.eat(_.tokTypes._default)) { + if (this.eat(tt._default)) { var expr = this.parseMaybeAssign(); if (expr.id) { switch (expr.type) { @@ -1086,17 +1106,17 @@ lp.parseExport = function () { lp.parseImport = function () { var node = this.startNode(); this.next(); - if (this.tok.type === _.tokTypes.string) { + if (this.tok.type === tt.string) { node.specifiers = []; node.source = this.parseExprAtom(); node.kind = ""; } else { var elt = undefined; - if (this.tok.type === _.tokTypes.name && this.tok.value !== "from") { + if (this.tok.type === tt.name && this.tok.value !== "from") { elt = this.startNode(); elt.local = this.parseIdent(); this.finishNode(elt, "ImportDefaultSpecifier"); - this.eat(_.tokTypes.comma); + this.eat(tt.comma); } node.specifiers = this.parseImportSpecifierList(); node.source = this.eatContextual("from") ? this.parseExprAtom() : null; @@ -1108,7 +1128,7 @@ lp.parseImport = function () { lp.parseImportSpecifierList = function () { var elts = []; - if (this.tok.type === _.tokTypes.star) { + if (this.tok.type === tt.star) { var elt = this.startNode(); this.next(); if (this.eatContextual("as")) elt.local = this.parseIdent(); @@ -1118,24 +1138,23 @@ lp.parseImportSpecifierList = function () { line = this.curLineStart, continuedLine = this.nextLineStart; this.pushCx(); - this.eat(_.tokTypes.braceL); + this.eat(tt.braceL); if (this.curLineStart > continuedLine) continuedLine = this.curLineStart; - while (!this.closes(_.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { + while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { var elt = this.startNode(); - if (this.eat(_.tokTypes.star)) { + if (this.eat(tt.star)) { if (this.eatContextual("as")) elt.local = this.parseIdent(); this.finishNode(elt, "ImportNamespaceSpecifier"); } else { if (this.isContextual("from")) break; elt.imported = this.parseIdent(); - if (_parseutil.isDummy(elt.imported)) break; elt.local = this.eatContextual("as") ? this.parseIdent() : elt.imported; this.finishNode(elt, "ImportSpecifier"); } elts.push(elt); - this.eat(_.tokTypes.comma); + this.eat(tt.comma); } - this.eat(_.tokTypes.braceR); + this.eat(tt.braceR); this.popCx(); } return elts; @@ -1147,34 +1166,40 @@ lp.parseExportSpecifierList = function () { line = this.curLineStart, continuedLine = this.nextLineStart; this.pushCx(); - this.eat(_.tokTypes.braceL); + this.eat(tt.braceL); if (this.curLineStart > continuedLine) continuedLine = this.curLineStart; - while (!this.closes(_.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { + while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { if (this.isContextual("from")) break; var elt = this.startNode(); elt.local = this.parseIdent(); - if (_parseutil.isDummy(elt.local)) break; elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local; this.finishNode(elt, "ExportSpecifier"); elts.push(elt); - this.eat(_.tokTypes.comma); + this.eat(tt.comma); } - this.eat(_.tokTypes.braceR); + this.eat(tt.braceR); this.popCx(); return elts; }; -},{"..":1,"./parseutil":4,"./state":5}],7:[function(_dereq_,module,exports){ +},{"..":2,"./parseutil":4,"./state":5}],7:[function(_dereq_,module,exports){ "use strict"; var _ = _dereq_(".."); -var _state = _dereq_("./state"); +var tt = _.tokTypes; +var Token = _.Token; +var isNewLine = _.isNewLine; +var SourceLocation = _.SourceLocation; +var getLineInfo = _.getLineInfo; +var lineBreakG = _.lineBreakG; -var lp = _state.LooseParser.prototype; +var LooseParser = _dereq_("./state").LooseParser; + +var lp = LooseParser.prototype; function isSpace(ch) { - return ch < 14 && ch > 8 || ch === 32 || ch === 160 || _.isNewLine(ch); + return ch < 14 && ch > 8 || ch === 32 || ch === 160 || isNewLine(ch); } lp.next = function () { @@ -1194,11 +1219,11 @@ lp.readToken = function () { for (;;) { try { this.toks.next(); - if (this.toks.type === _.tokTypes.dot && this.input.substr(this.toks.end, 1) === "." && this.options.ecmaVersion >= 6) { + if (this.toks.type === tt.dot && this.input.substr(this.toks.end, 1) === "." && this.options.ecmaVersion >= 6) { this.toks.end++; - this.toks.type = _.tokTypes.ellipsis; + this.toks.type = tt.ellipsis; } - return new _.Token(this.toks); + return new Token(this.toks); } catch (e) { if (!(e instanceof SyntaxError)) throw e; @@ -1209,16 +1234,16 @@ lp.readToken = function () { if (/unterminated/i.test(msg)) { pos = this.lineEnd(e.pos + 1); if (/string/.test(msg)) { - replace = { start: e.pos, end: pos, type: _.tokTypes.string, value: this.input.slice(e.pos + 1, pos) }; + replace = { start: e.pos, end: pos, type: tt.string, value: this.input.slice(e.pos + 1, pos) }; } else if (/regular expr/i.test(msg)) { var re = this.input.slice(e.pos, pos); try { re = new RegExp(re); } catch (e) {} - replace = { start: e.pos, end: pos, type: _.tokTypes.regexp, value: re }; + replace = { start: e.pos, end: pos, type: tt.regexp, value: re }; } else if (/template/.test(msg)) { replace = { start: e.pos, end: pos, - type: _.tokTypes.template, + type: tt.template, value: this.input.slice(e.pos, pos) }; } else { replace = false; @@ -1228,7 +1253,7 @@ lp.readToken = function () { } else if (/character escape|expected hexadecimal/i.test(msg)) { while (pos < this.input.length) { var ch = this.input.charCodeAt(pos++); - if (ch === 34 || ch === 39 || _.isNewLine(ch)) break; + if (ch === 34 || ch === 39 || isNewLine(ch)) break; } } else if (/unexpected character/i.test(msg)) { pos++; @@ -1239,9 +1264,9 @@ lp.readToken = function () { throw e; } this.resetTo(pos); - if (replace === true) replace = { start: pos, end: pos, type: _.tokTypes.name, value: "✖" }; + if (replace === true) replace = { start: pos, end: pos, type: tt.name, value: "✖" }; if (replace) { - if (this.options.locations) replace.loc = new _.SourceLocation(this.toks, _.getLineInfo(this.input, replace.start), _.getLineInfo(this.input, replace.end)); + if (this.options.locations) replace.loc = new SourceLocation(this.toks, getLineInfo(this.input, replace.start), getLineInfo(this.input, replace.end)); return replace; } } @@ -1255,9 +1280,9 @@ lp.resetTo = function (pos) { if (this.options.locations) { this.toks.curLine = 1; - this.toks.lineStart = _.lineBreakG.lastIndex = 0; + this.toks.lineStart = lineBreakG.lastIndex = 0; var match = undefined; - while ((match = _.lineBreakG.exec(this.input)) && match.index < pos) { + while ((match = lineBreakG.exec(this.input)) && match.index < pos) { ++this.toks.curLine; this.toks.lineStart = match.index + match[0].length; } @@ -1269,5 +1294,5 @@ lp.lookAhead = function (n) { return this.ahead[n - 1]; }; -},{"..":1,"./state":5}]},{},[3])(3) +},{"..":2,"./state":5}]},{},[1])(1) }); \ No newline at end of file diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/walk.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/walk.js index d3c1784..66540c9 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/walk.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/dist/walk.js @@ -1,4 +1,8 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g.acorn || (g.acorn = {})).walk = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= end)) base[type](node, st, c); - if ((start == null || node.start == start) && (end == null || node.end == end) && test(type, node)) throw new Found(node, st); + if (test(type, node) && (start == null || node.start == start) && (end == null || node.end == end)) throw new Found(node, st); })(node, state); } catch (e) { - if (e instanceof Found) return e; - throw e; + if (e instanceof Found) { + return e; + }throw e; } } -// Find the innermost node of a given type that contains the given -// position. Interface similar to findNodeAt. - function findNodeAround(node, pos, test, base, state) { test = makeTest(test); if (!base) base = exports.base; try { ;(function c(node, st, override) { var type = override || node.type; - if (node.start > pos || node.end < pos) return; - base[type](node, st, c); + if (node.start > pos || node.end < pos) { + return; + }base[type](node, st, c); if (test(type, node)) throw new Found(node, st); })(node, state); } catch (e) { - if (e instanceof Found) return e; - throw e; + if (e instanceof Found) { + return e; + }throw e; } } -// Find the outermost matching node after a given position. - function findNodeAfter(node, pos, test, base, state) { test = makeTest(test); if (!base) base = exports.base; try { ;(function c(node, st, override) { - if (node.end < pos) return; - var type = override || node.type; + if (node.end < pos) { + return; + }var type = override || node.type; if (node.start >= pos && test(type, node)) throw new Found(node, st); base[type](node, st, c); })(node, state); } catch (e) { - if (e instanceof Found) return e; - throw e; + if (e instanceof Found) { + return e; + }throw e; } } -// Find the outermost matching node before a given position. - function findNodeBefore(node, pos, test, base, state) { test = makeTest(test); if (!base) base = exports.base; var max = undefined;(function c(node, st, override) { - if (node.start > pos) return; - var type = override || node.type; + if (node.start > pos) { + return; + }var type = override || node.type; if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) max = new Found(node, st); base[type](node, st, c); })(node, state); return max; } -// Used to create a custom walker. Will fill in all missing node -// type properties with the defaults. - function make(funcs, base) { if (!base) base = exports.base; var visitor = {}; @@ -210,15 +222,12 @@ base.SwitchStatement = function (node, st, c) { base.ReturnStatement = base.YieldExpression = function (node, st, c) { if (node.argument) c(node.argument, st, "Expression"); }; -base.ThrowStatement = base.SpreadElement = function (node, st, c) { +base.ThrowStatement = base.SpreadElement = base.RestElement = function (node, st, c) { return c(node.argument, st, "Expression"); }; base.TryStatement = function (node, st, c) { c(node.block, st, "Statement"); - if (node.handler) { - c(node.handler.param, st, "Pattern"); - c(node.handler.body, st, "ScopeBody"); - } + if (node.handler) c(node.handler.body, st, "ScopeBody"); if (node.finalizer) c(node.finalizer, st, "Statement"); }; base.WhileStatement = base.DoWhileStatement = function (node, st, c) { @@ -246,58 +255,27 @@ base.FunctionDeclaration = function (node, st, c) { }; base.VariableDeclaration = function (node, st, c) { for (var i = 0; i < node.declarations.length; ++i) { - c(node.declarations[i], st); + var decl = node.declarations[i]; + if (decl.init) c(decl.init, st, "Expression"); } }; -base.VariableDeclarator = function (node, st, c) { - c(node.id, st, "Pattern"); - if (node.init) c(node.init, st, "Expression"); -}; base.Function = function (node, st, c) { - if (node.id) c(node.id, st, "Pattern"); - for (var i = 0; i < node.params.length; i++) { - c(node.params[i], st, "Pattern"); - }c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody"); + return c(node.body, st, "ScopeBody"); }; -// FIXME drop these node types in next major version -// (They are awkward, and in ES6 every block can be a scope.) base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); }; -base.ScopeExpression = function (node, st, c) { - return c(node, st, "Expression"); -}; - -base.Pattern = function (node, st, c) { - if (node.type == "Identifier") c(node, st, "VariablePattern");else if (node.type == "MemberExpression") c(node, st, "MemberPattern");else c(node, st); -}; -base.VariablePattern = ignore; -base.MemberPattern = skipThrough; -base.RestElement = function (node, st, c) { - return c(node.argument, st, "Pattern"); -}; -base.ArrayPattern = function (node, st, c) { - for (var i = 0; i < node.elements.length; ++i) { - var elt = node.elements[i]; - if (elt) c(elt, st, "Pattern"); - } -}; -base.ObjectPattern = function (node, st, c) { - for (var i = 0; i < node.properties.length; ++i) { - c(node.properties[i].value, st, "Pattern"); - } -}; base.Expression = skipThrough; base.ThisExpression = base.Super = base.MetaProperty = ignore; -base.ArrayExpression = function (node, st, c) { +base.ArrayExpression = base.ArrayPattern = function (node, st, c) { for (var i = 0; i < node.elements.length; ++i) { var elt = node.elements[i]; if (elt) c(elt, st, "Expression"); } }; -base.ObjectExpression = function (node, st, c) { +base.ObjectExpression = base.ObjectPattern = function (node, st, c) { for (var i = 0; i < node.properties.length; ++i) { c(node.properties[i], st); } @@ -311,14 +289,10 @@ base.SequenceExpression = base.TemplateLiteral = function (node, st, c) { base.UnaryExpression = base.UpdateExpression = function (node, st, c) { c(node.argument, st, "Expression"); }; -base.BinaryExpression = base.LogicalExpression = function (node, st, c) { +base.BinaryExpression = base.AssignmentExpression = base.AssignmentPattern = base.LogicalExpression = function (node, st, c) { c(node.left, st, "Expression"); c(node.right, st, "Expression"); }; -base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { - c(node.left, st, "Pattern"); - c(node.right, st, "Expression"); -}; base.ConditionalExpression = function (node, st, c) { c(node.test, st, "Expression"); c(node.consequent, st, "Expression"); @@ -335,16 +309,12 @@ base.MemberExpression = function (node, st, c) { if (node.computed) c(node.property, st, "Expression"); }; base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { - if (node.declaration) c(node.declaration, st); - if (node.source) c(node.source, st, "Expression"); -}; -base.ExportAllDeclaration = function (node, st, c) { - c(node.source, st, "Expression"); + return c(node.declaration, st); }; base.ImportDeclaration = function (node, st, c) { for (var i = 0; i < node.specifiers.length; i++) { c(node.specifiers[i], st); - }c(node.source, st, "Expression"); + } }; base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore; @@ -353,10 +323,6 @@ base.TaggedTemplateExpression = function (node, st, c) { c(node.quasi, st); }; base.ClassDeclaration = base.ClassExpression = function (node, st, c) { - return c(node, st, "Class"); -}; -base.Class = function (node, st, c) { - if (node.id) c(node.id, st, "Pattern"); if (node.superClass) c(node.superClass, st, "Expression"); for (var i = 0; i < node.body.body.length; i++) { c(node.body.body[i], st); diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/package.json b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/package.json index 3624ba5..267a6c0 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/package.json +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/package.json @@ -1,47 +1,49 @@ { - "name": "acorn", - "description": "ECMAScript parser", - "homepage": "https://github.com/marijnh/acorn", - "main": "dist/acorn.js", - "version": "2.3.0", - "engines": { - "node": ">=0.4.0" - }, - "maintainers": [ - { - "name": "marijn", - "email": "marijnh@gmail.com" - }, - { - "name": "rreverser", - "email": "me@rreverser.com" - } + "_args": [ + [ + "acorn@^1.0.1", + "/home/mywebsite/node_modules/jade/node_modules/with/node_modules/acorn-globals" + ] ], - "repository": { - "type": "git", - "url": "https://github.com/marijnh/acorn.git" + "_from": "acorn@>=1.0.1 <2.0.0", + "_id": "acorn@1.2.2", + "_inCache": true, + "_installable": true, + "_location": "/jade/with/acorn-globals/acorn", + "_npmUser": { + "email": "marijnh@gmail.com", + "name": "marijn" }, - "license": "MIT", - "scripts": { - "prepublish": "node bin/build-acorn.js && node bin/without_eval > dist/acorn_csp.js", - "test": "node test/run.js" + "_npmVersion": "1.4.21", + "_phantomChildren": {}, + "_requested": { + "name": "acorn", + "raw": "acorn@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" }, + "_requiredBy": [ + "/jade/with/acorn-globals" + ], + "_resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", + "_shasum": "c8ce27de0acc76d896d2b1fad3df588d9e82f014", + "_shrinkwrap": null, + "_spec": "acorn@^1.0.1", + "_where": "/home/mywebsite/node_modules/jade/node_modules/with/node_modules/acorn-globals", "bin": { "acorn": "./bin/acorn" }, - "devDependencies": { - "babel-core": "^5.6.15", - "babelify": "^6.1.2", - "browserify": "^10.2.4", - "browserify-derequire": "^0.9.4", - "unicode-7.0.0": "~0.1.5" + "bugs": { + "url": "https://github.com/marijnh/acorn/issues" }, "contributors": [ { - "name": "List of Acorn contributors. Updated before every release." + "name": "keeyipchan" }, { - "name": "Adrian Rakovsky" + "name": "List of Acorn contributors. Updated before every release." }, { "name": "Alistair Braidwood" @@ -82,15 +84,9 @@ { "name": "Ingvar Stepanyan" }, - { - "name": "Jesse McCarthy" - }, { "name": "Jiaxing Wang" }, - { - "name": "Joel Kemp" - }, { "name": "Johannes Herr" }, @@ -98,10 +94,7 @@ "name": "Jürg Lehni" }, { - "name": "keeyipchan" - }, - { - "name": "Kevin Kwok" + "name": "Adrian Rakovsky" }, { "name": "krator" @@ -158,23 +151,42 @@ "name": "zsjforcn" } ], - "gitHead": "45d9a316b26098ba5f819d8a48c54a350ceae44b", - "bugs": { - "url": "https://github.com/marijnh/acorn/issues" - }, - "_id": "acorn@2.3.0", - "_shasum": "1334584c8a3014ee9bd02fa09251cc97e43e388b", - "_from": "acorn@^2.1.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "marijn", - "email": "marijnh@gmail.com" - }, - "dist": { - "shasum": "1334584c8a3014ee9bd02fa09251cc97e43e388b", - "tarball": "http://registry.npmjs.org/acorn/-/acorn-2.3.0.tgz" + "dependencies": {}, + "description": "ECMAScript parser", + "devDependencies": { + "babelify": "^5.0.4", + "browserify": "^9.0.3", + "browserify-derequire": "^0.9.4", + "unicode-7.0.0": "~0.1.5" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/acorn/-/acorn-2.3.0.tgz", - "readme": "ERROR: No README data found!" + "dist": { + "shasum": "c8ce27de0acc76d896d2b1fad3df588d9e82f014", + "tarball": "http://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "gitHead": "0857d8bb9c3c05e6c8fac9e83fddaefc4f43816f", + "homepage": "https://github.com/marijnh/acorn", + "license": "MIT", + "main": "dist/acorn.js", + "maintainers": [ + { + "name": "marijn", + "email": "marijnh@gmail.com" + } + ], + "name": "acorn", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/marijnh/acorn.git" + }, + "scripts": { + "prepublish": "bin/prepublish.sh", + "test": "node test/run.js" + }, + "version": "1.2.2" } diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/expression.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/expression.js old mode 100644 new mode 100755 index 6b27b2a..843c77c --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/expression.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/expression.js @@ -29,23 +29,14 @@ const pp = Parser.prototype // strict mode, init properties are also not allowed to be repeated. pp.checkPropClash = function(prop, propHash) { - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - return + if (this.options.ecmaVersion >= 6) return let key = prop.key, name switch (key.type) { case "Identifier": name = key.name; break case "Literal": name = String(key.value); break default: return } - let kind = prop.kind - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property"); - propHash.proto = true - } - return - } - let other + let kind = prop.kind || "init", other if (has(propHash, name)) { other = propHash[name] let isGetSet = kind !== "init" @@ -155,6 +146,16 @@ pp.parseExprOps = function(noIn, refShorthandDefaultPos) { pp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { let prec = this.type.binop + if (Array.isArray(leftStartPos)){ + if (this.options.locations && noIn === undefined) { + // shift arguments to left by one + noIn = minPrec + minPrec = leftStartLoc + // flatten leftStartPos + leftStartLoc = leftStartPos[1] + leftStartPos = leftStartPos[0] + } + } if (prec != null && (!noIn || this.type !== tt._in)) { if (prec > minPrec) { let node = this.startNodeAt(leftStartPos, leftStartLoc) @@ -212,6 +213,15 @@ pp.parseExprSubscripts = function(refShorthandDefaultPos) { } pp.parseSubscripts = function(base, startPos, startLoc, noCalls) { + if (Array.isArray(startPos)){ + if (this.options.locations && noCalls === undefined) { + // shift arguments to left by one + noCalls = startLoc + // flatten startPos + startLoc = startPos[1] + startPos = startPos[0] + } + } for (;;) { if (this.eat(tt.dot)) { let node = this.startNodeAt(startPos, startLoc) @@ -250,10 +260,8 @@ pp.parseSubscripts = function(base, startPos, startLoc, noCalls) { pp.parseExprAtom = function(refShorthandDefaultPos) { let node, canBeArrow = this.potentialArrowAt == this.start switch (this.type) { - case tt._super: - if (!this.inFunction) - this.raise(this.start, "'super' outside of function or class") case tt._this: + case tt._super: let type = this.type === tt._this ? "ThisExpression" : "Super" node = this.startNode() this.next() @@ -365,7 +373,7 @@ pp.parseParenAndDistinguishExpression = function(canBeArrow) { if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { if (innerParenStart) this.unexpected(innerParenStart) - return this.parseParenArrowList(startPos, startLoc, exprList) + return this.parseParenArrowList(startPos, startLoc, exprList) } if (!exprList.length) this.unexpected(this.lastTokStart) @@ -428,7 +436,7 @@ pp.parseNew = function() { pp.parseTemplateElement = function() { let elem = this.startNode() elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), + raw: this.input.slice(this.start, this.end), cooked: this.value } this.next() @@ -499,14 +507,6 @@ pp.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLo prop.kind = prop.key.name this.parsePropertyName(prop) prop.value = this.parseMethod(false) - let paramCount = prop.kind === "get" ? 0 : 1 - if (prop.value.params.length !== paramCount) { - let start = prop.value.start - if (prop.kind === "get") - this.raise(start, "getter should have no params"); - else - this.raise(start, "setter should have exactly one param") - } } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { prop.kind = "init" if (isPattern) { @@ -560,8 +560,11 @@ pp.parseMethod = function(isGenerator) { let allowExpressionBody if (this.options.ecmaVersion >= 6) { node.generator = isGenerator + allowExpressionBody = true + } else { + allowExpressionBody = false } - this.parseFunctionBody(node, false) + this.parseFunctionBody(node, allowExpressionBody) return this.finishNode(node, "FunctionExpression") } @@ -620,14 +623,14 @@ pp.parseExprList = function(close, allowTrailingComma, allowEmpty, refShorthandD if (allowTrailingComma && this.afterTrailingComma(close)) break } else first = false - let elt - if (allowEmpty && this.type === tt.comma) - elt = null - else if (this.type === tt.ellipsis) - elt = this.parseSpread(refShorthandDefaultPos) - else - elt = this.parseMaybeAssign(false, refShorthandDefaultPos) - elts.push(elt) + if (allowEmpty && this.type === tt.comma) { + elts.push(null) + } else { + if (this.type === tt.ellipsis) + elts.push(this.parseSpread(refShorthandDefaultPos)) + else + elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)) + } } return elts } diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/index.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/index.js index 85f0a0c..8604b74 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/index.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/index.js @@ -25,11 +25,11 @@ import "./parseutil" import "./statement" import "./lval" import "./expression" -import "./location" export {Parser, plugins} from "./state" export {defaultOptions} from "./options" -export {Position, SourceLocation, getLineInfo} from "./locutil" +export {SourceLocation} from "./location" +export {getLineInfo} from "./location" export {Node} from "./node" export {TokenType, types as tokTypes} from "./tokentype" export {TokContext, types as tokContexts} from "./tokencontext" @@ -37,7 +37,7 @@ export {isIdentifierChar, isIdentifierStart} from "./identifier" export {Token} from "./tokenize" export {isNewLine, lineBreak, lineBreakG} from "./whitespace" -export const version = "2.3.0" +export const version = "1.2.2" // The main exported interface (under `self.acorn` when in the // browser) is a `parse` function that takes a code string and @@ -47,7 +47,10 @@ export const version = "2.3.0" // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API export function parse(input, options) { - return new Parser(options, input).parse() + let p = parser(options, input) + let startPos = p.pos, startLoc = p.options.locations && p.curPosition() + p.nextToken() + return p.parseTopLevel(p.options.program || p.startNodeAt(startPos, startLoc)) } // This function tries to parse a single expression at a given @@ -55,7 +58,7 @@ export function parse(input, options) { // that embed JavaScript expressions. export function parseExpressionAt(input, pos, options) { - let p = new Parser(options, input, pos) + let p = parser(options, input, pos) p.nextToken() return p.parseExpression() } @@ -64,5 +67,9 @@ export function parseExpressionAt(input, pos, options) { // The `tokenize` export provides an interface to the tokenizer. export function tokenizer(input, options) { - return new Parser(options, input) + return parser(options, input) +} + +function parser(options, input) { + return new Parser(getOptions(options), String(input)) } diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/location.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/location.js old mode 100644 new mode 100755 index 4625dc3..b813fbc --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/location.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/location.js @@ -1,5 +1,47 @@ import {Parser} from "./state" -import {Position, getLineInfo} from "./locutil" +import {lineBreakG} from "./whitespace" +import {deprecate} from "util" + +// These are used when `options.locations` is on, for the +// `startLoc` and `endLoc` properties. + +export class Position { + constructor(line, col) { + this.line = line + this.column = col + } + + offset(n) { + return new Position(this.line, this.column + n) + } +} + +export class SourceLocation { + constructor(p, start, end) { + this.start = start + this.end = end + if (p.sourceFile !== null) this.source = p.sourceFile + } +} + +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. + +export function getLineInfo(input, offset) { + for (let line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur + let match = lineBreakG.exec(input) + if (match && match.index < offset) { + ++line + cur = match.index + match[0].length + } else { + return new Position(line, offset - cur) + } + } +} const pp = Parser.prototype @@ -18,7 +60,9 @@ pp.raise = function(pos, message) { } pp.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } + return new Position(this.curLine, this.pos - this.lineStart) +} + +pp.markPosition = function() { + return this.options.locations ? [this.start, this.startLoc] : this.start } diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/locutil.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/locutil.js deleted file mode 100644 index 5a9465e..0000000 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/locutil.js +++ /dev/null @@ -1,42 +0,0 @@ -import {lineBreakG} from "./whitespace" - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -export class Position { - constructor(line, col) { - this.line = line - this.column = col - } - - offset(n) { - return new Position(this.line, this.column + n) - } -} - -export class SourceLocation { - constructor(p, start, end) { - this.start = start - this.end = end - if (p.sourceFile !== null) this.source = p.sourceFile - } -} - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -export function getLineInfo(input, offset) { - for (let line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur - let match = lineBreakG.exec(input) - if (match && match.index < offset) { - ++line - cur = match.index + match[0].length - } else { - return new Position(line, offset - cur) - } - } -} diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/expression.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/expression.js index 4db42de..85b2fb4 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/expression.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/expression.js @@ -295,7 +295,7 @@ lp.parseNew = function() { lp.parseTemplateElement = function() { let elem = this.startNode() elem.value = { - raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'), + raw: this.input.slice(this.tok.start, this.tok.end), cooked: this.tok.value } this.next() @@ -447,7 +447,6 @@ lp.toAssignable = function(node, binding) { case "AssignmentExpression": node.type = "AssignmentPattern" - delete node.operator break } } diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/index.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/index.js index a1a749e..acbea8a 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/index.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/index.js @@ -32,6 +32,7 @@ import * as acorn from ".." import {LooseParser} from "./state" import "./tokenize" +import "./parseutil" import "./statement" import "./expression" diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/parseutil.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/parseutil.js index c5ee096..3e2c804 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/parseutil.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/parseutil.js @@ -1 +1,126 @@ -export function isDummy(node) { return node.name == "✖" } \ No newline at end of file +import {LooseParser} from "./state" +import {Node, SourceLocation, lineBreak, isNewLine, tokTypes as tt} from ".." + +const lp = LooseParser.prototype + +lp.startNode = function() { + let node = new Node + node.start = this.tok.start + if (this.options.locations) + node.loc = new SourceLocation(this.toks, this.tok.loc.start) + if (this.options.directSourceFile) + node.sourceFile = this.options.directSourceFile + if (this.options.ranges) + node.range = [this.tok.start, 0] + return node +} + +lp.storeCurrentPos = function() { + return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start +} + +lp.startNodeAt = function(pos) { + let node = new Node + if (this.options.locations) { + node.start = pos[0] + node.loc = new SourceLocation(this.toks, pos[1]) + pos = pos[0] + } else { + node.start = pos + } + if (this.options.directSourceFile) + node.sourceFile = this.options.directSourceFile + if (this.options.ranges) + node.range = [pos, 0] + return node +} + +lp.finishNode = function(node, type) { + node.type = type + node.end = this.last.end + if (this.options.locations) + node.loc.end = this.last.loc.end + if (this.options.ranges) + node.range[1] = this.last.end + return node +} + +lp.dummyIdent = function() { + let dummy = this.startNode() + dummy.name = "✖" + return this.finishNode(dummy, "Identifier") +} + +export function isDummy(node) { return node.name == "✖" } + +lp.eat = function(type) { + if (this.tok.type === type) { + this.next() + return true + } else { + return false + } +} + +lp.isContextual = function(name) { + return this.tok.type === tt.name && this.tok.value === name +} + +lp.eatContextual = function(name) { + return this.tok.value === name && this.eat(tt.name) +} + +lp.canInsertSemicolon = function() { + return this.tok.type === tt.eof || this.tok.type === tt.braceR || + lineBreak.test(this.input.slice(this.last.end, this.tok.start)) +} + +lp.semicolon = function() { + return this.eat(tt.semi) +} + +lp.expect = function(type) { + if (this.eat(type)) return true + for (let i = 1; i <= 2; i++) { + if (this.lookAhead(i).type == type) { + for (let j = 0; j < i; j++) this.next() + return true + } + } +} + +lp.pushCx = function() { + this.context.push(this.curIndent) +} +lp.popCx = function() { + this.curIndent = this.context.pop() +} + +lp.lineEnd = function(pos) { + while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos + return pos +} + +lp.indentationAfter = function(pos) { + for (let count = 0;; ++pos) { + let ch = this.input.charCodeAt(pos) + if (ch === 32) ++count + else if (ch === 9) count += this.options.tabSize + else return count + } +} + +lp.closes = function(closeTok, indent, line, blockHeuristic) { + if (this.tok.type === closeTok || this.tok.type === tt.eof) return true + return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() && + (!blockHeuristic || this.nextLineStart >= this.input.length || + this.indentationAfter(this.nextLineStart) < indent) +} + +lp.tokenStartsLine = function() { + for (let p = this.tok.start - 1; p >= this.curLineStart; --p) { + let ch = this.input.charCodeAt(p) + if (ch !== 9 && ch !== 32) return false + } + return true +} diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/state.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/state.js index f1385f6..fbf1227 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/state.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/state.js @@ -1,124 +1,17 @@ -import {tokenizer, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from ".." +import {tokenizer, SourceLocation, tokTypes as tt} from ".." -export class LooseParser{ - constructor(input, options) { - this.toks = tokenizer(input, options) - this.options = this.toks.options - this.input = this.toks.input - this.tok = this.last = {type: tt.eof, start: 0, end: 0} - if (this.options.locations) { - let here = this.toks.curPosition() - this.tok.loc = new SourceLocation(this.toks, here, here) - } - this.ahead = []; // Tokens ahead - this.context = []; // Indentation contexted - this.curIndent = 0 - this.curLineStart = 0 - this.nextLineStart = this.lineEnd(this.curLineStart) + 1 - } - - startNode() { - return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null) - } - - storeCurrentPos() { - return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start - } - - startNodeAt(pos) { - if (this.options.locations) { - return new Node(this.toks, pos[0], pos[1]) - } else { - return new Node(this.toks, pos) - } - } - - finishNode(node, type) { - node.type = type - node.end = this.last.end - if (this.options.locations) - node.loc.end = this.last.loc.end - if (this.options.ranges) - node.range[1] = this.last.end - return node - } - - dummyIdent() { - let dummy = this.startNode() - dummy.name = "✖" - return this.finishNode(dummy, "Identifier") - } - - eat(type) { - if (this.tok.type === type) { - this.next() - return true - } else { - return false - } - } - - isContextual(name) { - return this.tok.type === tt.name && this.tok.value === name - } - - eatContextual(name) { - return this.tok.value === name && this.eat(tt.name) - } - - canInsertSemicolon() { - return this.tok.type === tt.eof || this.tok.type === tt.braceR || - lineBreak.test(this.input.slice(this.last.end, this.tok.start)) - } - - semicolon() { - return this.eat(tt.semi) - } - - expect(type) { - if (this.eat(type)) return true - for (let i = 1; i <= 2; i++) { - if (this.lookAhead(i).type == type) { - for (let j = 0; j < i; j++) this.next() - return true - } - } - } - - pushCx() { - this.context.push(this.curIndent) - } - - popCx() { - this.curIndent = this.context.pop() - } - - lineEnd(pos) { - while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos - return pos - } - - indentationAfter(pos) { - for (let count = 0;; ++pos) { - let ch = this.input.charCodeAt(pos) - if (ch === 32) ++count - else if (ch === 9) count += this.options.tabSize - else return count - } - } - - closes(closeTok, indent, line, blockHeuristic) { - if (this.tok.type === closeTok || this.tok.type === tt.eof) return true - return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() && - (!blockHeuristic || this.nextLineStart >= this.input.length || - this.indentationAfter(this.nextLineStart) < indent) - } - - tokenStartsLine() { - for (let p = this.tok.start - 1; p >= this.curLineStart; --p) { - let ch = this.input.charCodeAt(p) - if (ch !== 9 && ch !== 32) return false - } - return true +export function LooseParser(input, options) { + this.toks = tokenizer(input, options) + this.options = this.toks.options + this.input = this.toks.input + this.tok = this.last = {type: tt.eof, start: 0, end: 0} + if (this.options.locations) { + let here = this.toks.curPosition() + this.tok.loc = new SourceLocation(this.toks, here, here) } + this.ahead = []; // Tokens ahead + this.context = []; // Indentation contexted + this.curIndent = 0 + this.curLineStart = 0 + this.nextLineStart = this.lineEnd(this.curLineStart) + 1 } diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/statement.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/statement.js index 498d8fe..d2f9177 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/statement.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/loose/statement.js @@ -386,7 +386,6 @@ lp.parseImportSpecifierList = function() { } else { if (this.isContextual("from")) break elt.imported = this.parseIdent() - if (isDummy(elt.imported)) break elt.local = this.eatContextual("as") ? this.parseIdent() : elt.imported this.finishNode(elt, "ImportSpecifier") } @@ -409,7 +408,6 @@ lp.parseExportSpecifierList = function() { if (this.isContextual("from")) break let elt = this.startNode() elt.local = this.parseIdent() - if (isDummy(elt.local)) break elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local this.finishNode(elt, "ExportSpecifier") elts.push(elt) diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/lval.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/lval.js old mode 100644 new mode 100755 index 4dc6f91..fbbc38b --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/lval.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/lval.js @@ -34,7 +34,6 @@ pp.toAssignable = function(node, isBinding) { case "AssignmentExpression": if (node.operator === "=") { node.type = "AssignmentPattern" - delete node.operator } else { this.raise(node.left.end, "Only '=' operator can be used for specifying default value.") } @@ -147,9 +146,19 @@ pp.parseBindingListItem = function(param) { // Parses assignment pattern around given atom if possible. pp.parseMaybeDefault = function(startPos, startLoc, left) { + if (Array.isArray(startPos)){ + if (this.options.locations && noCalls === undefined) { + // shift arguments to left by one + left = startLoc + // flatten startPos + startLoc = startPos[1] + startPos = startPos[0] + } + } left = left || this.parseBindingAtom() if (!this.eat(tt.eq)) return left let node = this.startNodeAt(startPos, startLoc) + node.operator = "=" node.left = left node.right = this.parseMaybeAssign() return this.finishNode(node, "AssignmentPattern") diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/node.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/node.js old mode 100644 new mode 100755 index 76b5b09..24db1c2 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/node.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/node.js @@ -1,36 +1,66 @@ import {Parser} from "./state" -import {SourceLocation} from "./locutil" - -export class Node { - constructor(parser, pos, loc) { - this.type = "" - this.start = pos - this.end = 0 - if (parser.options.locations) - this.loc = new SourceLocation(parser, loc) - if (parser.options.directSourceFile) - this.sourceFile = parser.options.directSourceFile - if (parser.options.ranges) - this.range = [pos, 0] - } -} +import {SourceLocation} from "./location" // Start an AST node, attaching a start offset. const pp = Parser.prototype +export class Node {} + pp.startNode = function() { - return new Node(this, this.start, this.startLoc) + let node = new Node + node.start = this.start + if (this.options.locations) + node.loc = new SourceLocation(this, this.startLoc) + if (this.options.directSourceFile) + node.sourceFile = this.options.directSourceFile + if (this.options.ranges) + node.range = [this.start, 0] + return node } pp.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) + let node = new Node + if (Array.isArray(pos)){ + if (this.options.locations && loc === undefined) { + // flatten pos + loc = pos[1] + pos = pos[0] + } + } + node.start = pos + if (this.options.locations) + node.loc = new SourceLocation(this, loc) + if (this.options.directSourceFile) + node.sourceFile = this.options.directSourceFile + if (this.options.ranges) + node.range = [pos, 0] + return node } // Finish an AST node, adding `type` and `end` properties. -function finishNodeAt(node, type, pos, loc) { +pp.finishNode = function(node, type) { node.type = type + node.end = this.lastTokEnd + if (this.options.locations) + node.loc.end = this.lastTokEndLoc + if (this.options.ranges) + node.range[1] = this.lastTokEnd + return node +} + +// Finish node at given position + +pp.finishNodeAt = function(node, type, pos, loc) { + node.type = type + if (Array.isArray(pos)){ + if (this.options.locations && loc === undefined) { + // flatten pos + loc = pos[1] + pos = pos[0] + } + } node.end = pos if (this.options.locations) node.loc.end = loc @@ -38,13 +68,3 @@ function finishNodeAt(node, type, pos, loc) { node.range[1] = pos return node } - -pp.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) -} - -// Finish node at given position - -pp.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) -} diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/options.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/options.js index 7903014..cc0967e 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/options.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/options.js @@ -1,5 +1,5 @@ import {has, isArray} from "./util" -import {SourceLocation} from "./locutil" +import {SourceLocation} from "./location" // A second optional argument can be given to further configure // the parser process. These options are recognized: diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/parseutil.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/parseutil.js index 8a4a2cf..3d464a2 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/parseutil.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/parseutil.js @@ -10,8 +10,7 @@ const pp = Parser.prototype pp.isUseStrict = function(stmt) { return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && - stmt.expression.type === "Literal" && - stmt.expression.raw.slice(1, -1) === "use strict" + stmt.expression.type === "Literal" && stmt.expression.value === "use strict" } // Predicate that tests whether the next token is of the given diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/state.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/state.js index 542da9e..25ea298 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/state.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/state.js @@ -1,91 +1,78 @@ import {reservedWords, keywords} from "./identifier" import {types as tt} from "./tokentype" import {lineBreak} from "./whitespace" -import {getOptions} from "./options" + +export function Parser(options, input, startPos) { + this.options = options + this.sourceFile = this.options.sourceFile || null + this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5] + this.isReservedWord = reservedWords[this.options.ecmaVersion] + this.input = input + + // Load plugins + this.loadPlugins(this.options.plugins) + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos + this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)) + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length + } else { + this.pos = this.lineStart = 0 + this.curLine = 1 + } + + // Properties of the current token: + // Its type + this.type = tt.eof + // For tokens that include more information than their type, the value + this.value = null + // Its start and end offset + this.start = this.end = this.pos + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = null + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null + this.lastTokStart = this.lastTokEnd = this.pos + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext() + this.exprAllowed = true + + // Figure out if it's a module code. + this.strict = this.inModule = this.options.sourceType === "module" + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1 + + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false + // Labels in scope. + this.labels = [] + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === '#!') + this.skipLineComment(2) +} + +Parser.prototype.extend = function(name, f) { + this[name] = f(this[name]) +} // Registered plugins + export const plugins = {} -export class Parser { - constructor(options, input, startPos) { - this.options = getOptions(options) - this.sourceFile = this.options.sourceFile - this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5] - this.isReservedWord = reservedWords[this.options.ecmaVersion] - this.input = String(input) - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Load plugins - this.loadPlugins(this.options.plugins) - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos - this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)) - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length - } else { - this.pos = this.lineStart = 0 - this.curLine = 1 - } - - // Properties of the current token: - // Its type - this.type = tt.eof - // For tokens that include more information than their type, the value - this.value = null - // Its start and end offset - this.start = this.end = this.pos - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition() - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null - this.lastTokStart = this.lastTokEnd = this.pos - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext() - this.exprAllowed = true - - // Figure out if it's a module code. - this.strict = this.inModule = this.options.sourceType === "module" - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1 - - // Flags to track whether we are in a function, a generator. - this.inFunction = this.inGenerator = false - // Labels in scope. - this.labels = [] - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === '#!') - this.skipLineComment(2) - } - - extend(name, f) { - this[name] = f(this[name]) - } - - loadPlugins(pluginConfigs) { - for (let name in pluginConfigs) { - let plugin = plugins[name] - if (!plugin) throw new Error("Plugin '" + name + "' not found") - plugin(this, pluginConfigs[name]) - } - } - - parse() { - let node = this.options.program || this.startNode() - this.nextToken() - return this.parseTopLevel(node) +Parser.prototype.loadPlugins = function(plugins) { + for (let name in plugins) { + let plugin = exports.plugins[name] + if (!plugin) throw new Error("Plugin '" + name + "' not found") + plugin(this, plugins[name]) } } diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/statement.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/statement.js index a932507..7a6952b 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/statement.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/statement.js @@ -17,10 +17,8 @@ pp.parseTopLevel = function(node) { while (this.type !== tt.eof) { let stmt = this.parseStatement(true, true) node.body.push(stmt) - if (first) { - if (this.isUseStrict(stmt)) this.setStrict(true) - first = false - } + if (first && this.isUseStrict(stmt)) this.setStrict(true) + first = false } this.next() if (this.options.ecmaVersion >= 6) { @@ -206,7 +204,7 @@ pp.parseSwitchStatement = function(node) { // nodes. `cur` is used to keep the node that we are currently // adding statements to. - for (var cur, sawDefault = false; this.type != tt.braceR;) { + for (var cur, sawDefault; this.type != tt.braceR;) { if (this.type === tt._case || this.type === tt._default) { let isCase = this.type === tt._case if (cur) this.finishNode(cur, "SwitchCase") @@ -300,14 +298,7 @@ pp.parseLabeledStatement = function(node, maybeName, expr) { for (let i = 0; i < this.labels.length; ++i) if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared") let kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null - for (let i = this.labels.length - 1; i >= 0; i--) { - let label = this.labels[i] - if (label.statementStart == node.start) { - label.statementStart = this.start; - label.kind = kind; - } else break; - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}) + this.labels.push({name: maybeName, kind: kind}) node.body = this.parseStatement(true) this.labels.pop() node.label = expr @@ -442,9 +433,9 @@ pp.parseClass = function(node, isStatement) { this.parsePropertyName(method) } method.kind = "method" - let isGetSet = false if (!method.computed) { let {key} = method + let isGetSet = false if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) { isGetSet = true method.kind = key.name @@ -460,16 +451,6 @@ pp.parseClass = function(node, isStatement) { } } this.parseClassMethod(classBody, method, isGenerator) - if (isGetSet) { - let paramCount = method.kind === "get" ? 0 : 1 - if (method.value.params.length !== paramCount) { - let start = method.value.start - if (method.kind === "get") - this.raise(start, "getter should have no params"); - else - this.raise(start, "setter should have exactly one param") - } - } } node.body = this.finishNode(classBody, "ClassBody") return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") @@ -565,6 +546,7 @@ pp.parseImport = function(node) { if (this.type === tt.string) { node.specifiers = empty node.source = this.parseExprAtom() + node.kind = "" } else { node.specifiers = this.parseImportSpecifiers() this.expectContextual("from") diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokencontext.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokencontext.js index c76fc9d..f1cb36e 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokencontext.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokencontext.js @@ -9,8 +9,8 @@ import {lineBreak} from "./whitespace" export class TokContext { constructor(token, isExpr, preserveSpace, override) { this.token = token - this.isExpr = !!isExpr - this.preserveSpace = !!preserveSpace + this.isExpr = isExpr + this.preserveSpace = preserveSpace this.override = override } } @@ -32,14 +32,12 @@ pp.initialContext = function() { } pp.braceIsBlock = function(prevType) { - if (prevType === tt.colon) { - let parent = this.curContext() - if (parent === types.b_stat || parent === types.b_expr) - return !parent.isExpr - } + let parent + if (prevType === tt.colon && (parent = this.curContext()).token == "{") + return !parent.isExpr if (prevType === tt._return) return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) - if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR) + if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof) return true if (prevType == tt.braceL) return this.curContext() === types.b_stat diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokenize.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokenize.js index 0409f88..365ed3c 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokenize.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokenize.js @@ -1,7 +1,7 @@ import {isIdentifierStart, isIdentifierChar} from "./identifier" import {types as tt, keywords as keywordTypes} from "./tokentype" import {Parser} from "./state" -import {SourceLocation} from "./locutil" +import {SourceLocation} from "./location" import {lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace} from "./whitespace" // Object type used to represent tokens. Note that normally, tokens @@ -26,7 +26,7 @@ export class Token { const pp = Parser.prototype // Are we running under Rhino? -const isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]" +const isRhino = typeof Packages !== "undefined" // Move to the next token @@ -111,7 +111,7 @@ pp.fullCharCodeAtPos = function() { } pp.skipBlockComment = function() { - let startLoc = this.options.onComment && this.curPosition() + let startLoc = this.options.onComment && this.options.locations && this.curPosition() let start = this.pos, end = this.input.indexOf("*/", this.pos += 2) if (end === -1) this.raise(this.pos - 2, "Unterminated comment") this.pos = end + 2 @@ -125,12 +125,12 @@ pp.skipBlockComment = function() { } if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()) + startLoc, this.options.locations && this.curPosition()) } pp.skipLineComment = function(startSkip) { let start = this.pos - let startLoc = this.options.onComment && this.curPosition() + let startLoc = this.options.onComment && this.options.locations && this.curPosition() let ch = this.input.charCodeAt(this.pos+=startSkip) while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { ++this.pos @@ -138,48 +138,48 @@ pp.skipLineComment = function(startSkip) { } if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()) + startLoc, this.options.locations && this.curPosition()) } // Called at the start of the parse and after every token. Skips // whitespace and comments, and. pp.skipSpace = function() { - loop: while (this.pos < this.input.length) { + while (this.pos < this.input.length) { let ch = this.input.charCodeAt(this.pos) - switch (ch) { - case 32: case 160: // ' ' + if (ch === 32) { // ' ' + ++this.pos + } else if (ch === 13) { + ++this.pos + let next = this.input.charCodeAt(this.pos) + if (next === 10) { ++this.pos - break - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos - } - case 10: case 8232: case 8233: - ++this.pos - if (this.options.locations) { - ++this.curLine - this.lineStart = this.pos - } - break - case 47: // '/' - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: // '*' - this.skipBlockComment() - break - case 47: - this.skipLineComment(2) - break - default: - break loop - } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos - } else { - break loop - } + } + if (this.options.locations) { + ++this.curLine + this.lineStart = this.pos + } + } else if (ch === 10 || ch === 8232 || ch === 8233) { + ++this.pos + if (this.options.locations) { + ++this.curLine + this.lineStart = this.pos + } + } else if (ch > 8 && ch < 14) { + ++this.pos + } else if (ch === 47) { // '/' + let next = this.input.charCodeAt(this.pos + 1) + if (next === 42) { // '*' + this.skipBlockComment() + } else if (next === 47) { // '/' + this.skipLineComment(2) + } else break + } else if (ch === 160) { // '\xa0' + ++this.pos + } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos + } else { + break } } } @@ -373,22 +373,13 @@ pp.finishOp = function(type, size) { return this.finishToken(type, str) } +var regexpUnicodeSupport = false +try { new RegExp("\uffff", "u"); regexpUnicodeSupport = true } +catch(e) {} + // Parse a regular expression. Some context-awareness is necessary, // since a '/' inside a '[]' set does not end the expression. -function tryCreateRegexp(src, flags, throwErrorAt) { - try { - return new RegExp(src, flags); - } catch (e) { - if (throwErrorAt !== undefined) { - if (e instanceof SyntaxError) this.raise(throwErrorAt, "Error parsing regular expression: " + e.message) - this.raise(e) - } - } -} - -var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u"); - pp.readRegexp = function() { let escaped, inClass, start = this.pos for (;;) { @@ -422,12 +413,7 @@ pp.readRegexp = function() { // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a // perfectly valid pattern that is equivalent to `[a-b]`, but it would // be replaced by `[x-b]` which throws an error. - tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, (match, code, offset) => { - code = Number("0x" + code) - if (code > 0x10FFFF) this.raise(start + offset + 3, "Code point out of bounds") - return "x" - }); - tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x") + tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x") } } // Detect invalid regular expressions. @@ -435,10 +421,17 @@ pp.readRegexp = function() { // Rhino's regular expression parser is flaky and throws uncatchable exceptions, // so don't do detection if we are running under Rhino if (!isRhino) { - tryCreateRegexp(tmp, undefined, start); + try { + new RegExp(tmp) + } catch (e) { + if (e instanceof SyntaxError) this.raise(start, "Error parsing regular expression: " + e.message) + this.raise(e) + } // Get a regular expression object for this pattern-flag pair, or `null` in // case the current environment doesn't support the flags it uses. - value = tryCreateRegexp(content, mods) + try { + value = new RegExp(content, mods) + } catch (err) {} } return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value}) } @@ -477,13 +470,12 @@ pp.readRadixNumber = function(radix) { pp.readNumber = function(startsWithDot) { let start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48 if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number") - let next = this.input.charCodeAt(this.pos) - if (next === 46) { // '.' + if (this.input.charCodeAt(this.pos) === 46) { ++this.pos this.readInt(10) isFloat = true - next = this.input.charCodeAt(this.pos) } + let next = this.input.charCodeAt(this.pos) if (next === 69 || next === 101) { // 'eE' next = this.input.charCodeAt(++this.pos) if (next === 43 || next === 45) ++this.pos; // '+-' @@ -507,10 +499,10 @@ pp.readCodePoint = function() { if (ch === 123) { if (this.options.ecmaVersion < 6) this.unexpected() - let codePos = ++this.pos + ++this.pos code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos) ++this.pos - if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds") + if (code > 0x10FFFF) this.unexpected() } else { code = this.readHexChar(4) } @@ -520,8 +512,8 @@ pp.readCodePoint = function() { function codePointToString(code) { // UTF-16 Decoding if (code <= 0xFFFF) return String.fromCharCode(code) - code -= 0x10000 - return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00) + return String.fromCharCode(((code - 0x10000) >> 10) + 0xD800, + ((code - 0x10000) & 1023) + 0xDC00) } pp.readString = function(quote) { @@ -532,7 +524,7 @@ pp.readString = function(quote) { if (ch === quote) break if (ch === 92) { // '\' out += this.input.slice(chunkStart, this.pos) - out += this.readEscapedChar(false) + out += this.readEscapedChar() chunkStart = this.pos } else { if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant") @@ -565,20 +557,16 @@ pp.readTmplToken = function() { } if (ch === 92) { // '\' out += this.input.slice(chunkStart, this.pos) - out += this.readEscapedChar(true) + out += this.readEscapedChar() chunkStart = this.pos } else if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.pos) ++this.pos - switch (ch) { - case 13: - if (this.input.charCodeAt(this.pos) === 10) ++this.pos; - case 10: - out += "\n"; - break; - default: - out += String.fromCharCode(ch); - break; + if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { + ++this.pos + out += "\n" + } else { + out += String.fromCharCode(ch) } if (this.options.locations) { ++this.curLine @@ -593,57 +581,59 @@ pp.readTmplToken = function() { // Used to read escaped characters -pp.readEscapedChar = function(inTemplate) { +pp.readEscapedChar = function() { let ch = this.input.charCodeAt(++this.pos) + let octal = /^[0-7]+/.exec(this.input.slice(this.pos, this.pos + 3)) + if (octal) octal = octal[0] + while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1) + if (octal === "0") octal = null ++this.pos - switch (ch) { - case 110: return "\n"; // 'n' -> '\n' - case 114: return "\r"; // 'r' -> '\r' - case 120: return String.fromCharCode(this.readHexChar(2)); // 'x' - case 117: return codePointToString(this.readCodePoint()); // 'u' - case 116: return "\t"; // 't' -> '\t' - case 98: return "\b"; // 'b' -> '\b' - case 118: return "\u000b"; // 'v' -> '\u000b' - case 102: return "\f"; // 'f' -> '\f' - case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n' - case 10: // ' \n' - if (this.options.locations) { this.lineStart = this.pos; ++this.curLine } - return "" - default: - if (ch >= 48 && ch <= 55) { - let octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0] - let octal = parseInt(octalStr, 8) - if (octal > 255) { - octalStr = octalStr.slice(0, -1) - octal = parseInt(octalStr, 8) - } - if (octal > 0 && (this.strict || inTemplate)) { - this.raise(this.pos - 2, "Octal literal in strict mode") - } - this.pos += octalStr.length - 1 - return String.fromCharCode(octal) + if (octal) { + if (this.strict) this.raise(this.pos - 2, "Octal literal in strict mode") + this.pos += octal.length - 1 + return String.fromCharCode(parseInt(octal, 8)) + } else { + switch (ch) { + case 110: return "\n"; // 'n' -> '\n' + case 114: return "\r"; // 'r' -> '\r' + case 120: return String.fromCharCode(this.readHexChar(2)); // 'x' + case 117: return codePointToString(this.readCodePoint()); // 'u' + case 116: return "\t"; // 't' -> '\t' + case 98: return "\b"; // 'b' -> '\b' + case 118: return "\u000b"; // 'v' -> '\u000b' + case 102: return "\f"; // 'f' -> '\f' + case 48: return "\0"; // 0 -> '\0' + case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n' + case 10: // ' \n' + if (this.options.locations) { this.lineStart = this.pos; ++this.curLine } + return "" + default: return String.fromCharCode(ch) } - return String.fromCharCode(ch) } } // Used to read character escape sequences ('\x', '\u', '\U'). pp.readHexChar = function(len) { - let codePos = this.pos let n = this.readInt(16, len) - if (n === null) this.raise(codePos, "Bad character escape sequence") + if (n === null) this.raise(this.start, "Bad character escape sequence") return n } -// Read an identifier, and return it as a string. Sets `this.containsEsc` +// Used to signal to callers of `readWord1` whether the word +// contained any escape sequences. This is needed because words with +// escape sequences must not be interpreted as keywords. + +var containsEsc + +// Read an identifier, and return it as a string. Sets `containsEsc` // to whether the word contained a '\u' escape. // // Incrementally adds only escaped chars, adding other chunks as-is // as a micro-optimization. pp.readWord1 = function() { - this.containsEsc = false + containsEsc = false let word = "", first = true, chunkStart = this.pos let astral = this.options.ecmaVersion >= 6 while (this.pos < this.input.length) { @@ -651,7 +641,7 @@ pp.readWord1 = function() { if (isIdentifierChar(ch, astral)) { this.pos += ch <= 0xffff ? 1 : 2 } else if (ch === 92) { // "\" - this.containsEsc = true + containsEsc = true word += this.input.slice(chunkStart, this.pos) let escStart = this.pos if (this.input.charCodeAt(++this.pos) != 117) // "u" @@ -676,7 +666,7 @@ pp.readWord1 = function() { pp.readWord = function() { let word = this.readWord1() let type = tt.name - if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.isKeyword(word)) + if ((this.options.ecmaVersion >= 6 || !containsEsc) && this.isKeyword(word)) type = keywordTypes[word] return this.finishToken(type, word) } diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokentype.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokentype.js index bd09b7c..93aef8b 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokentype.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/tokentype.js @@ -108,7 +108,7 @@ kw("case", beforeExpr) kw("catch") kw("continue") kw("debugger") -kw("default", beforeExpr) +kw("default") kw("do", {isLoop: true}) kw("else", beforeExpr) kw("finally") diff --git a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/walk/index.js b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/walk/index.js index 461f61d..493b664 100644 --- a/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/walk/index.js +++ b/node_modules/jade/node_modules/with/node_modules/acorn-globals/node_modules/acorn/src/walk/index.js @@ -16,13 +16,13 @@ // walker, and state can be used to give this walked an initial // state. -export function simple(node, visitors, base, state, override) { +export function simple(node, visitors, base, state) { if (!base) base = exports.base ;(function c(node, st, override) { let type = override || node.type, found = visitors[type] base[type](node, st, c) if (found) found(node, st) - })(node, state, override) + })(node, state) } // An ancestor walk builds up an array of ancestor nodes (including @@ -46,11 +46,11 @@ export function ancestor(node, visitors, base, state) { // threaded through the walk, and can opt how and whether to walk // their child nodes (by calling their third argument on these // nodes). -export function recursive(node, state, funcs, base, override) { +export function recursive(node, state, funcs, base) { let visitor = funcs ? exports.make(funcs, base) : base ;(function c(node, st, override) { visitor[override || node.type](node, st, c) - })(node, state, override) + })(node, state) } function makeTest(test) { @@ -78,9 +78,9 @@ export function findNodeAt(node, start, end, test, base, state) { if ((start == null || node.start <= start) && (end == null || node.end >= end)) base[type](node, st, c) - if ((start == null || node.start == start) && - (end == null || node.end == end) && - test(type, node)) + if (test(type, node) && + (start == null || node.start == start) && + (end == null || node.end == end)) throw new Found(node, st) })(node, state) } catch (e) { @@ -187,14 +187,11 @@ base.SwitchStatement = (node, st, c) => { base.ReturnStatement = base.YieldExpression = (node, st, c) => { if (node.argument) c(node.argument, st, "Expression") } -base.ThrowStatement = base.SpreadElement = +base.ThrowStatement = base.SpreadElement = base.RestElement = (node, st, c) => c(node.argument, st, "Expression") base.TryStatement = (node, st, c) => { c(node.block, st, "Statement") - if (node.handler) { - c(node.handler.param, st, "Pattern") - c(node.handler.body, st, "ScopeBody") - } + if (node.handler) c(node.handler.body, st, "ScopeBody") if (node.finalizer) c(node.finalizer, st, "Statement") } base.WhileStatement = base.DoWhileStatement = (node, st, c) => { @@ -220,56 +217,24 @@ base.DebuggerStatement = ignore base.FunctionDeclaration = (node, st, c) => c(node, st, "Function") base.VariableDeclaration = (node, st, c) => { - for (let i = 0; i < node.declarations.length; ++i) - c(node.declarations[i], st) -} -base.VariableDeclarator = (node, st, c) => { - c(node.id, st, "Pattern") - if (node.init) c(node.init, st, "Expression") -} - -base.Function = (node, st, c) => { - if (node.id) c(node.id, st, "Pattern") - for (let i = 0; i < node.params.length; i++) - c(node.params[i], st, "Pattern") - c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody") -} -// FIXME drop these node types in next major version -// (They are awkward, and in ES6 every block can be a scope.) -base.ScopeBody = (node, st, c) => c(node, st, "Statement") -base.ScopeExpression = (node, st, c) => c(node, st, "Expression") - -base.Pattern = (node, st, c) => { - if (node.type == "Identifier") - c(node, st, "VariablePattern") - else if (node.type == "MemberExpression") - c(node, st, "MemberPattern") - else - c(node, st) -} -base.VariablePattern = ignore -base.MemberPattern = skipThrough -base.RestElement = (node, st, c) => c(node.argument, st, "Pattern") -base.ArrayPattern = (node, st, c) => { - for (let i = 0; i < node.elements.length; ++i) { - let elt = node.elements[i] - if (elt) c(elt, st, "Pattern") + for (let i = 0; i < node.declarations.length; ++i) { + let decl = node.declarations[i] + if (decl.init) c(decl.init, st, "Expression") } } -base.ObjectPattern = (node, st, c) => { - for (let i = 0; i < node.properties.length; ++i) - c(node.properties[i].value, st, "Pattern") -} + +base.Function = (node, st, c) => c(node.body, st, "ScopeBody") +base.ScopeBody = (node, st, c) => c(node, st, "Statement") base.Expression = skipThrough base.ThisExpression = base.Super = base.MetaProperty = ignore -base.ArrayExpression = (node, st, c) => { +base.ArrayExpression = base.ArrayPattern = (node, st, c) => { for (let i = 0; i < node.elements.length; ++i) { let elt = node.elements[i] if (elt) c(elt, st, "Expression") } } -base.ObjectExpression = (node, st, c) => { +base.ObjectExpression = base.ObjectPattern = (node, st, c) => { for (let i = 0; i < node.properties.length; ++i) c(node.properties[i], st) } @@ -281,14 +246,10 @@ base.SequenceExpression = base.TemplateLiteral = (node, st, c) => { base.UnaryExpression = base.UpdateExpression = (node, st, c) => { c(node.argument, st, "Expression") } -base.BinaryExpression = base.LogicalExpression = (node, st, c) => { +base.BinaryExpression = base.AssignmentExpression = base.AssignmentPattern = base.LogicalExpression = (node, st, c) => { c(node.left, st, "Expression") c(node.right, st, "Expression") } -base.AssignmentExpression = base.AssignmentPattern = (node, st, c) => { - c(node.left, st, "Pattern") - c(node.right, st, "Expression") -} base.ConditionalExpression = (node, st, c) => { c(node.test, st, "Expression") c(node.consequent, st, "Expression") @@ -303,17 +264,10 @@ base.MemberExpression = (node, st, c) => { c(node.object, st, "Expression") if (node.computed) c(node.property, st, "Expression") } -base.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => { - if (node.declaration) c(node.declaration, st) - if (node.source) c(node.source, st, "Expression") -} -base.ExportAllDeclaration = (node, st, c) => { - c(node.source, st, "Expression") -} +base.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => c(node.declaration, st) base.ImportDeclaration = (node, st, c) => { for (let i = 0; i < node.specifiers.length; i++) c(node.specifiers[i], st) - c(node.source, st, "Expression") } base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore @@ -321,9 +275,7 @@ base.TaggedTemplateExpression = (node, st, c) => { c(node.tag, st, "Expression") c(node.quasi, st) } -base.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, "Class") -base.Class = (node, st, c) => { - if (node.id) c(node.id, st, "Pattern") +base.ClassDeclaration = base.ClassExpression = (node, st, c) => { if (node.superClass) c(node.superClass, st, "Expression") for (let i = 0; i < node.body.body.length; i++) c(node.body.body[i], st) diff --git a/node_modules/kind-of/LICENSE b/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/kind-of/README.md b/node_modules/kind-of/README.md new file mode 100644 index 0000000..bfc8e20 --- /dev/null +++ b/node_modules/kind-of/README.md @@ -0,0 +1,237 @@ +# kind-of [![NPM version](https://badge.fury.io/js/kind-of.svg)](http://badge.fury.io/js/kind-of) [![Build Status](https://travis-ci.org/jonschlinkert/kind-of.svg)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +[](#optimizations)**What makes this so fast?** + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i kind-of --save +``` + +Install with [bower](http://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/[\s\S]+/); +//=> 'regexp' + +kindOf(new RegExp('^' + 'foo$')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number) +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive) + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/kind-of/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2014-2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 17, 2015._ \ No newline at end of file diff --git a/node_modules/kind-of/index.js b/node_modules/kind-of/index.js new file mode 100644 index 0000000..87938c9 --- /dev/null +++ b/node_modules/kind-of/index.js @@ -0,0 +1,113 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + + // buffer + if (typeof Buffer !== 'undefined' && isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/kind-of/package.json b/node_modules/kind-of/package.json new file mode 100644 index 0000000..1679fe0 --- /dev/null +++ b/node_modules/kind-of/package.json @@ -0,0 +1,127 @@ +{ + "_args": [ + [ + "kind-of@^3.0.2", + "/home/mywebsite/node_modules/micromatch" + ] + ], + "_from": "kind-of@>=3.0.2 <4.0.0", + "_id": "kind-of@3.0.2", + "_inCache": true, + "_installable": true, + "_location": "/kind-of", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "kind-of", + "raw": "kind-of@^3.0.2", + "rawSpec": "^3.0.2", + "scope": null, + "spec": ">=3.0.2 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/is-number", + "/micromatch", + "/randomatic" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.2.tgz", + "_shasum": "187db427046e7e90945692e6768668bd6900dea0", + "_shrinkwrap": null, + "_spec": "kind-of@^3.0.2", + "_where": "/home/mywebsite/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "dependencies": { + "is-buffer": "^1.0.2" + }, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^0.1.3", + "browserify": "^11.0.1", + "glob": "^4.3.5", + "mocha": "*", + "should": "*", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "187db427046e7e90945692e6768668bd6900dea0", + "tarball": "http://registry.npmjs.org/kind-of/-/kind-of-3.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "917a9701737a64abe0f77441c9ef21afca5ab397", + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "kind-of", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + } + }, + "version": "3.0.2" +} diff --git a/node_modules/micromatch/LICENSE b/node_modules/micromatch/LICENSE new file mode 100755 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/micromatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/micromatch/README.md b/node_modules/micromatch/README.md new file mode 100755 index 0000000..0c8cede --- /dev/null +++ b/node_modules/micromatch/README.md @@ -0,0 +1,616 @@ +# micromatch [![NPM version](https://badge.fury.io/js/micromatch.svg)](http://badge.fury.io/js/micromatch) [![Build Status](https://travis-ci.org/jonschlinkert/micromatch.svg)](https://travis-ci.org/jonschlinkert/micromatch) + +> Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i micromatch --save +``` + +## Table of contents + + + +* [Features](#features) +* [Usage](#usage) +* [Switch from minimatch](#switch-from-minimatch) +* [Methods](#methods) + - [.isMatch](#ismatch) + - [.contains](#contains) + - [.matcher](#matcher) + - [.filter](#filter) + - [.any](#any) + - [.expand](#expand) + - [.makeRe](#makere) +* [Options](#options) + - [options.unixify](#optionsunixify) + - [options.dot](#optionsdot) + - [options.unescape](#optionsunescape) + - [options.nodupes](#optionsnodupes) + - [options.matchBase](#optionsmatchbase) + - [options.nobraces](#optionsnobraces) + - [options.nobrackets](#optionsnobrackets) + - [options.noextglob](#optionsnoextglob) + - [options.nocase](#optionsnocase) + - [options.nonull](#optionsnonull) + - [options.cache](#optionscache) +* [Other features](#other-features) + - [Extended globbing](#extended-globbing) + + [extglobs](#extglobs) + + [brace expansion](#brace-expansion) + + [regex character classes](#regex-character-classes) + + [regex groups](#regex-groups) + + [POSIX bracket expressions](#posix-bracket-expressions) +* [Notes](#notes) +* [Benchmarks](#benchmarks) +* [Run tests](#run-tests) +* [Contributing](#contributing) +* [Related](#related) +* [Author](#author) +* [License](#license) + +_(Table of contents generated by [verb](https://github.com/verbose/verb))_ + + + +## Features + +Micromatch is [10-55x faster](#benchmarks) than [minimatch](https://github.com/isaacs/minimatch), resulting from a combination of caching, tokenization, parsing, runtime compilation and regex optimization strategies. + +* [Drop-in replacement](#switch-from-minimatch) for [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) +* Built-in support for multiple glob patterns, like `['foo/*.js', '!bar.js']` +* Better support for the Bash 4.3 specification, and less buggy +* Extensive [unit tests](./test) (approx. 1,300 tests). Minimatch fails many of the tests. + +**Mainstream glob features:** + +* [Brace Expansion](https://github.com/jonschlinkert/braces) (`foo/bar-{1..5}.md`, `one/{two,three}/four.md`) +* Typical glob patterns, like `**/*`, `a/b/*.js`, or `['foo/*.js', '!bar.js']` + +**Extended globbing features:** + +* Logical `OR` (`foo/bar/(abc|xyz).js`) +* Regex character classes (`foo/bar/baz-[1-5].js`) +* POSIX [bracket expressions](https://github.com/jonschlinkert/expand-brackets) (`**/[[:alpha:][:digit:]]/`) +* [extglobs](https://github.com/jonschlinkert/extglob) (`**/+(x|y)`, `!(a|b)`, etc) + +You can combine these to create whatever matching patterns you need. + +## Usage + +```js +var mm = require('micromatch'); +mm(array, patterns); +``` + +**Examples** + +```js +mm(['a.js', 'b.md', 'c.txt'], '*.{js,txt}'); +//=> ['a.js', 'c.txt'] +``` + +**Multiple patterns** + +Multiple patterns can also be passed: + +```js +mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.md', '*.txt']); +//=> ['a.md', 'c.txt'] +``` + +**Negation patterns:** + +Behavior; + +* when the pattern is a string, [minimatch](https://github.com/isaacs/minimatch) behavior is used, so patterns are **inclusive by default**. +* when an array of patterns is passed, [multimatch](https://github.com/sindresorhus/multimatch) behavior is used, so patterns are **exclusive by default** + +```js +mm(['a.js', 'b.md', 'c.txt'], '!*.{js,txt}'); +//=> ['b.md'] + +mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.*', '!*.{js,txt}']); +//=> ['a.md', 'd.json'] +``` + +## Switch from minimatch + +> Use `micromatch.isMatch()` instead of `minimatch()` + +**Minimatch** + +The main `minimatch()` function returns true/false for a single file path and pattern: + +```js +var minimatch = require('minimatch'); +minimatch('foo.js', '*.js'); +//=> 'true' +``` + +**Micromatch** + +With micromatch, `.isMatch()` to get the same result: + +```js +var mm = require('micromatch'); +mm.isMatch('foo.js', '*.js'); +//=> 'true' +``` + +This implementation difference is necessary since the main `micromatch()` method supports matching on multiple globs, with behavior similar to [multimatch](https://github.com/sindresorhus/multimatch). + +## Methods + +```js +var mm = require('micromatch'); +``` + +### .isMatch + +```js +mm.isMatch(filepath, globPattern); +``` + +Returns true if a file path matches the given glob pattern. + +**Example** + +```js +mm.isMatch('.verb.md', '*.md'); +//=> false + +mm.isMatch('.verb.md', '*.md', {dot: true}); +//=> true +``` + +### .contains + +Returns true if any part of a file path matches the given glob pattern. Think of this is "has path" versus "is path". + +**Example** + +`.isMatch()` would return false for both of the following: + +```js +mm.contains('a/b/c', 'a/b'); +//=> true + +mm.contains('a/b/c', 'a/*'); +//=> true +``` + +### .matcher + +Returns a function for matching using the supplied pattern. e.g. create your own "matcher". The advantage of this method is that the pattern can be compiled outside of a loop. + +**Pattern** + +Can be any of the following: + +* `glob/string` +* `regex` +* `function` + +**Example** + +```js +var isMatch = mm.matcher('*.md'); +var files = []; + +['a.md', 'b.txt', 'c.md'].forEach(function(fp) { + if (isMatch(fp)) { + files.push(fp); + } +}); +``` + +### .filter + +Returns a function that can be passed to `Array#filter()`. + +**Params** + +* `patterns` **{String|Array}**: + +**Examples** + +Single glob: + +```js +var fn = mm.filter('*.md'); +['a.js', 'b.txt', 'c.md'].filter(fn); +//=> ['c.md'] + +var fn = mm.filter('[a-c]'); +['a', 'b', 'c', 'd', 'e'].filter(fn); +//=> ['a', 'b', 'c'] +``` + +Array of glob patterns: + +```js +var arr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; + +var fn = mm.filter(['{1..10}', '![7-9]', '!{3..4}']); +arr.filter(fn); +//=> [1, 2, 5, 6, 10] +``` + +_(Internally this function generates the matching function by using the [matcher](#matcher) method. You can use the [matcher](#matcher) method directly to create your own filter function)_ + +### .any + +Returns true if a file path matches any of the given patterns. + +```js +mm.any(filepath, patterns, options); +``` + +**Params** + +* filepath `{String}`: The file path to test. +* patterns `{String|Array}`: One or more glob patterns +* options: `{Object}`: options to pass to the `.matcher()` method. + +**Example** + +```js +mm.any('abc', ['!*z']); +//=> true +mm.any('abc', ['a*', 'z*']); +//=> true +mm.any('abc', 'a*'); +//=> true +mm.any('abc', ['z*']); +//=> false +``` + +### .expand + +Returns an object with a regex-compatible string and tokens. + +```js +mm.expand('*.js'); + +// when `track` is enabled (for debugging), the `history` array is used +// to record each mutation to the glob pattern as it's converted to regex +{ options: { track: false, dot: undefined, makeRe: true, negated: false }, + pattern: '(.*\\/|^)bar\\/(?:(?!(?:^|\\/)\\.).)*?', + history: [], + tokens: + { path: + { whole: '**/bar/**', + dirname: '**/bar/', + filename: '**', + basename: '**', + extname: '', + ext: '' }, + is: + { glob: true, + negated: false, + globstar: true, + dotfile: false, + dotdir: false }, + match: {}, + original: '**/bar/**', + pattern: '**/bar/**', + base: '' } } +``` + +### .makeRe + +Create a regular expression for matching file paths based on the given pattern: + +```js +mm.makeRe('*.js'); +//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ +``` + +## Options + +### options.unixify + +Normalize slashes in file paths and glob patterns to forward slashes. + +Type: `{Boolean}` + +Default: `undefined` on non-windows, `true` on windows. + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +### options.unescape + +Unescape slashes in glob patterns. Use cautiously, especially on windows. + +Type: `{Boolean}` + +Default: `undefined` + +**Example** + +```js +mm.isMatch('abc', '\\a\\b\\c', {unescape: true}); +//=> true +``` + +### options.nodupes + +Remove duplicate elements from the result array. + +Type: `{Boolean}` + +Default: `undefined` + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true}); +//=> ['abc', 'abc'] + +mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true, nodupes: true}); +//=> ['abc'] +``` + +### options.matchBase + +Allow glob patterns without slashes to match a file path based on its basename. . Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +**Example** + +```js +mm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +### options.nobraces + +Don't expand braces in glob patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) `nobrace`. + +Type: `{Boolean}` + +Default: `undefined` + +See [braces](https://github.com/jonschlinkert/braces) for more information about extended brace expansion. + +### options.nobrackets + +Don't expand POSIX bracket expressions. + +Type: `{Boolean}` + +Default: `undefined` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions. + +### options.noextglob + +Don't expand extended globs. + +Type: `{Boolean}` + +Default: `undefined` + +See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs. + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +### options.nonull + +If `true`, when no matches are found the actual (array-ified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +### options.cache + +Cache the platform (e.g. `win32`) to prevent this from being looked up for every filepath. + +Type: `{Boolean}` + +Default: `true` + +## Other features + +Micromatch also supports the following. + +### Extended globbing + +#### extglobs + +Extended globbing, as described by the bash man page: + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern-list)` | `(...|...)?` | Matches zero or one occurrence of the given patterns | +| `*(pattern-list)` | `(...|...)*` | Matches zero or more occurrences of the given patterns | +| `+(pattern-list)` | `(...|...)+` | Matches one or more occurrences of the given patterns | +| `@(pattern-list)` | `(...|...)` * | Matches one of the given patterns | +| `!(pattern-list)` | N/A | Matches anything except one of the given patterns | + +* `@` isn't a RegEx character. + +Powered by [extglob](https://github.com/jonschlinkert/extglob). Visit that library for the full range of options or to report extglob related issues. + +See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs. + +#### brace expansion + +In simple cases, brace expansion appears to work the same way as the logical `OR` operator. For example, `(a|b)` will achieve the same result as `{a,b}`. + +Here are some powerful features unique to brace expansion (versus character classes): + +* range expansion: `a{1..3}b/*.js` expands to: `['a1b/*.js', 'a2b/*.js', 'a3b/*.js']` +* nesting: `a{c,{d,e}}b/*.js` expands to: `['acb/*.js', 'adb/*.js', 'aeb/*.js']` + +Visit [braces](https://github.com/jonschlinkert/braces) to ask questions and create an issue related to brace-expansion, or to see the full range of features and options related to brace expansion. + +#### regex character classes + +With the exception of brace expansion (`{a,b}`, `{1..5}`, etc), most of the special characters convert directly to regex, so you can expect them to follow the same rules and produce the same results as regex. + +For example, given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` + +Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). + +#### regex groups + +Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` +* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` +* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` + +As with regex, parenthese can be nested, so patterns like `((a|b)|c)/b` will work. But it might be easier to achieve your goal using brace expansion. + +#### POSIX bracket expressions + +**Example** + +```js +mm.isMatch('a1', '[[:alpha:][:digit:]]'); +//=> true +``` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions. + +## Notes + +Whenever possible parsing behavior for patterns is based on globbing specifications in Bash 4.3. Patterns that aren't described by Bash follow wildmatch spec (used by git). + +## Benchmarks + +Run the [benchmarks](./benchmark): + +```bash +node benchmark +``` + +As of October 03, 2015: + +```bash +#1: basename-braces + micromatch x 26,420 ops/sec ±0.89% (91 runs sampled) + minimatch x 3,507 ops/sec ±0.64% (97 runs sampled) + +#2: basename + micromatch x 25,315 ops/sec ±0.82% (93 runs sampled) + minimatch x 4,398 ops/sec ±0.86% (94 runs sampled) + +#3: braces-no-glob + micromatch x 341,254 ops/sec ±0.78% (93 runs sampled) + minimatch x 30,197 ops/sec ±1.12% (91 runs sampled) + +#4: braces + micromatch x 54,649 ops/sec ±0.74% (94 runs sampled) + minimatch x 3,095 ops/sec ±0.82% (95 runs sampled) + +#5: immediate + micromatch x 16,719 ops/sec ±0.79% (95 runs sampled) + minimatch x 4,348 ops/sec ±0.86% (96 runs sampled) + +#6: large + micromatch x 721 ops/sec ±0.77% (94 runs sampled) + minimatch x 17.73 ops/sec ±1.08% (50 runs sampled) + +#7: long + micromatch x 5,051 ops/sec ±0.87% (97 runs sampled) + minimatch x 628 ops/sec ±0.83% (94 runs sampled) + +#8: mid + micromatch x 51,280 ops/sec ±0.80% (95 runs sampled) + minimatch x 1,923 ops/sec ±0.84% (95 runs sampled) + +#9: multi-patterns + micromatch x 22,440 ops/sec ±0.97% (94 runs sampled) + minimatch x 2,481 ops/sec ±1.10% (94 runs sampled) + +#10: no-glob + micromatch x 722,823 ops/sec ±1.30% (87 runs sampled) + minimatch x 52,967 ops/sec ±1.09% (94 runs sampled) + +#11: range + micromatch x 243,471 ops/sec ±0.79% (94 runs sampled) + minimatch x 11,736 ops/sec ±0.82% (96 runs sampled) + +#12: shallow + micromatch x 190,874 ops/sec ±0.98% (95 runs sampled) + minimatch x 21,699 ops/sec ±0.81% (97 runs sampled) + +#13: short + micromatch x 496,393 ops/sec ±3.86% (90 runs sampled) + minimatch x 53,765 ops/sec ±0.75% (95 runs sampled) +``` + +## Run tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/micromatch/issues/new). + +Please be sure to run the benchmarks before/after any code changes to judge the impact before you do a PR. thanks! + +## Related + +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces) +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets) +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers… [more](https://www.npmjs.com/package/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range) +* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the… [more](https://www.npmjs.com/package/extglob) | [homepage](https://github.com/jonschlinkert/extglob) +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range) +* [gulp-micromatch](https://www.npmjs.com/package/gulp-micromatch): Filter vinyl files with glob patterns, string, regexp, array,… [more](https://www.npmjs.com/package/gulp-micromatch) | [homepage](https://github.com/tunnckocore/gulp-micromatch) +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) +* [parse-glob](https://www.npmjs.com/package/parse-glob): Parse a glob pattern into an object of tokens. | [homepage](https://github.com/jonschlinkert/parse-glob) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2014-2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 03, 2015._ + + \ No newline at end of file diff --git a/node_modules/micromatch/index.js b/node_modules/micromatch/index.js new file mode 100755 index 0000000..cbafd67 --- /dev/null +++ b/node_modules/micromatch/index.js @@ -0,0 +1,428 @@ +/*! + * micromatch + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var expand = require('./lib/expand'); +var utils = require('./lib/utils'); + +/** + * The main function. Pass an array of filepaths, + * and a string or array of glob patterns + * + * @param {Array|String} `files` + * @param {Array|String} `patterns` + * @param {Object} `opts` + * @return {Array} Array of matches + */ + +function micromatch(files, patterns, opts) { + if (!files || !patterns) return []; + opts = opts || {}; + + if (typeof opts.cache === 'undefined') { + opts.cache = true; + } + + if (!Array.isArray(patterns)) { + return match(files, patterns, opts); + } + + var len = patterns.length, i = 0; + var omit = [], keep = []; + + while (len--) { + var glob = patterns[i++]; + if (typeof glob === 'string' && glob.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, match(files, glob.slice(1), opts)); + } else { + keep.push.apply(keep, match(files, glob, opts)); + } + } + return utils.diff(keep, omit); +} + +/** + * Pass an array of files and a glob pattern as a string. + * + * This function is called by the main `micromatch` function + * If you only need to pass a single pattern you might get + * very minor speed improvements using this function. + * + * @param {Array} `files` + * @param {Array} `pattern` + * @param {Object} `options` + * @return {Array} + */ + +function match(files, pattern, opts) { + if (utils.typeOf(files) !== 'string' && !Array.isArray(files)) { + throw new Error(msg('match', 'files', 'a string or array')); + } + + files = utils.arrayify(files); + opts = opts || {}; + + var negate = opts.negate || false; + var orig = pattern; + + if (typeof pattern === 'string') { + negate = pattern.charAt(0) === '!'; + if (negate) { + pattern = pattern.slice(1); + } + + // we need to remove the character regardless, + // so the above logic is still needed + if (opts.nonegate === true) { + negate = false; + } + } + + var _isMatch = matcher(pattern, opts); + var len = files.length, i = 0; + var res = []; + + while (i < len) { + var file = files[i++]; + var fp = utils.unixify(file, opts); + + if (!_isMatch(fp)) { continue; } + res.push(fp); + } + + if (res.length === 0) { + if (opts.failglob === true) { + throw new Error('micromatch.match() found no matches for: "' + orig + '".'); + } + + if (opts.nonull || opts.nullglob) { + res.push(utils.unescapeGlob(orig)); + } + } + + // if `negate` was defined, diff negated files + if (negate) { res = utils.diff(files, res); } + + // if `ignore` was defined, diff ignored filed + if (opts.ignore && opts.ignore.length) { + pattern = opts.ignore; + opts = utils.omit(opts, ['ignore']); + res = utils.diff(res, micromatch(res, pattern, opts)); + } + + if (opts.nodupes) { + return utils.unique(res); + } + return res; +} + +/** + * Returns a function that takes a glob pattern or array of glob patterns + * to be used with `Array#filter()`. (Internally this function generates + * the matching function using the [matcher] method). + * + * ```js + * var fn = mm.filter('[a-c]'); + * ['a', 'b', 'c', 'd', 'e'].filter(fn); + * //=> ['a', 'b', 'c'] + * ``` + * + * @param {String|Array} `patterns` Can be a glob or array of globs. + * @param {Options} `opts` Options to pass to the [matcher] method. + * @return {Function} Filter function to be passed to `Array#filter()`. + */ + +function filter(patterns, opts) { + if (!Array.isArray(patterns) && typeof patterns !== 'string') { + throw new TypeError(msg('filter', 'patterns', 'a string or array')); + } + + patterns = utils.arrayify(patterns); + var len = patterns.length, i = 0; + var patternMatchers = Array(len); + while (i < len) { + patternMatchers[i] = matcher(patterns[i++], opts); + } + + return function(fp) { + if (fp == null) return []; + var len = patternMatchers.length, i = 0; + var res = true; + + fp = utils.unixify(fp, opts); + while (i < len) { + var fn = patternMatchers[i++]; + if (!fn(fp)) { + res = false; + break; + } + } + return res; + }; +} + +/** + * Returns true if the filepath contains the given + * pattern. Can also return a function for matching. + * + * ```js + * isMatch('foo.md', '*.md', {}); + * //=> true + * + * isMatch('*.md', {})('foo.md') + * //=> true + * ``` + * + * @param {String} `fp` + * @param {String} `pattern` + * @param {Object} `opts` + * @return {Boolean} + */ + +function isMatch(fp, pattern, opts) { + if (typeof fp !== 'string') { + throw new TypeError(msg('isMatch', 'filepath', 'a string')); + } + + fp = utils.unixify(fp, opts); + if (utils.typeOf(pattern) === 'object') { + return matcher(fp, pattern); + } + return matcher(pattern, opts)(fp); +} + +/** + * Returns true if the filepath matches the + * given pattern. + */ + +function contains(fp, pattern, opts) { + if (typeof fp !== 'string') { + throw new TypeError(msg('contains', 'pattern', 'a string')); + } + + opts = opts || {}; + opts.contains = (pattern !== ''); + fp = utils.unixify(fp, opts); + + if (opts.contains && !utils.isGlob(pattern)) { + return fp.indexOf(pattern) !== -1; + } + return matcher(pattern, opts)(fp); +} + +/** + * Returns true if a file path matches any of the + * given patterns. + * + * @param {String} `fp` The filepath to test. + * @param {String|Array} `patterns` Glob patterns to use. + * @param {Object} `opts` Options to pass to the `matcher()` function. + * @return {String} + */ + +function any(fp, patterns, opts) { + if (!Array.isArray(patterns) && typeof patterns !== 'string') { + throw new TypeError(msg('any', 'patterns', 'a string or array')); + } + + patterns = utils.arrayify(patterns); + var len = patterns.length; + + fp = utils.unixify(fp, opts); + while (len--) { + var isMatch = matcher(patterns[len], opts); + if (isMatch(fp)) { + return true; + } + } + return false; +} + +/** + * Filter the keys of an object with the given `glob` pattern + * and `options` + * + * @param {Object} `object` + * @param {Pattern} `object` + * @return {Array} + */ + +function matchKeys(obj, glob, options) { + if (utils.typeOf(obj) !== 'object') { + throw new TypeError(msg('matchKeys', 'first argument', 'an object')); + } + + var fn = matcher(glob, options); + var res = {}; + + for (var key in obj) { + if (obj.hasOwnProperty(key) && fn(key)) { + res[key] = obj[key]; + } + } + return res; +} + +/** + * Return a function for matching based on the + * given `pattern` and `options`. + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {Function} + */ + +function matcher(pattern, opts) { + // pattern is a function + if (typeof pattern === 'function') { + return pattern; + } + // pattern is a regex + if (pattern instanceof RegExp) { + return function(fp) { + return pattern.test(fp); + }; + } + + if (typeof pattern !== 'string') { + throw new TypeError(msg('matcher', 'pattern', 'a string, regex, or function')); + } + + // strings, all the way down... + pattern = utils.unixify(pattern, opts); + + // pattern is a non-glob string + if (!utils.isGlob(pattern)) { + return utils.matchPath(pattern, opts); + } + // pattern is a glob string + var re = makeRe(pattern, opts); + + // `matchBase` is defined + if (opts && opts.matchBase) { + return utils.hasFilename(re, opts); + } + // `matchBase` is not defined + return function(fp) { + fp = utils.unixify(fp, opts); + return re.test(fp); + }; +} + +/** + * Create and cache a regular expression for matching + * file paths. + * + * If the leading character in the `glob` is `!`, a negation + * regex is returned. + * + * @param {String} `glob` + * @param {Object} `options` + * @return {RegExp} + */ + +function toRegex(glob, options) { + // clone options to prevent mutating the original object + var opts = Object.create(options || {}); + var flags = opts.flags || ''; + if (opts.nocase && flags.indexOf('i') === -1) { + flags += 'i'; + } + + var parsed = expand(glob, opts); + + // pass in tokens to avoid parsing more than once + opts.negated = opts.negated || parsed.negated; + opts.negate = opts.negated; + glob = wrapGlob(parsed.pattern, opts); + var re; + + try { + re = new RegExp(glob, flags); + return re; + } catch (err) { + err.reason = 'micromatch invalid regex: (' + re + ')'; + if (opts.strict) throw new SyntaxError(err); + } + + // we're only here if a bad pattern was used and the user + // passed `options.silent`, so match nothing + return /$^/; +} + +/** + * Create the regex to do the matching. If the leading + * character in the `glob` is `!` a negation regex is returned. + * + * @param {String} `glob` + * @param {Boolean} `negate` + */ + +function wrapGlob(glob, opts) { + var prefix = (opts && !opts.contains) ? '^' : ''; + var after = (opts && !opts.contains) ? '$' : ''; + glob = ('(?:' + glob + ')' + after); + if (opts && opts.negate) { + return prefix + ('(?!^' + glob + ').*$'); + } + return prefix + glob; +} + +/** + * Wrap `toRegex` to memoize the generated regex when + * the string and options don't change + */ + +function makeRe(glob, opts) { + if (utils.typeOf(glob) !== 'string') { + throw new Error(msg('makeRe', 'glob', 'a string')); + } + return utils.cache(toRegex, glob, opts); +} + +/** + * Make error messages consistent. Follows this format: + * + * ```js + * msg(methodName, argNumber, nativeType); + * // example: + * msg('matchKeys', 'first', 'an object'); + * ``` + * + * @param {String} `method` + * @param {String} `num` + * @param {String} `type` + * @return {String} + */ + +function msg(method, what, type) { + return 'micromatch.' + method + '(): ' + what + ' should be ' + type + '.'; +} + +/** + * Public methods + */ + +/* eslint no-multi-spaces: 0 */ +micromatch.any = any; +micromatch.braces = micromatch.braceExpand = utils.braces; +micromatch.contains = contains; +micromatch.expand = expand; +micromatch.filter = filter; +micromatch.isMatch = isMatch; +micromatch.makeRe = makeRe; +micromatch.match = match; +micromatch.matcher = matcher; +micromatch.matchKeys = matchKeys; + +/** + * Expose `micromatch` + */ + +module.exports = micromatch; diff --git a/node_modules/micromatch/lib/chars.js b/node_modules/micromatch/lib/chars.js new file mode 100644 index 0000000..a1ffe37 --- /dev/null +++ b/node_modules/micromatch/lib/chars.js @@ -0,0 +1,67 @@ +'use strict'; + +var chars = {}, unesc, temp; + +function reverse(object, prepender) { + return Object.keys(object).reduce(function(reversed, key) { + var newKey = prepender ? prepender + key : key; // Optionally prepend a string to key. + reversed[object[key]] = newKey; // Swap key and value. + return reversed; // Return the result. + }, {}); +} + +/** + * Regex for common characters + */ + +chars.escapeRegex = { + '?': /\?/g, + '@': /\@/g, + '!': /\!/g, + '+': /\+/g, + '*': /\*/g, + '(': /\(/g, + ')': /\)/g, + '[': /\[/g, + ']': /\]/g +}; + +/** + * Escape characters + */ + +chars.ESC = { + '?': '__UNESC_QMRK__', + '@': '__UNESC_AMPE__', + '!': '__UNESC_EXCL__', + '+': '__UNESC_PLUS__', + '*': '__UNESC_STAR__', + ',': '__UNESC_COMMA__', + '(': '__UNESC_LTPAREN__', + ')': '__UNESC_RTPAREN__', + '[': '__UNESC_LTBRACK__', + ']': '__UNESC_RTBRACK__' +}; + +/** + * Unescape characters + */ + +chars.UNESC = unesc || (unesc = reverse(chars.ESC, '\\')); + +chars.ESC_TEMP = { + '?': '__TEMP_QMRK__', + '@': '__TEMP_AMPE__', + '!': '__TEMP_EXCL__', + '*': '__TEMP_STAR__', + '+': '__TEMP_PLUS__', + ',': '__TEMP_COMMA__', + '(': '__TEMP_LTPAREN__', + ')': '__TEMP_RTPAREN__', + '[': '__TEMP_LTBRACK__', + ']': '__TEMP_RTBRACK__' +}; + +chars.TEMP = temp || (temp = reverse(chars.ESC_TEMP)); + +module.exports = chars; diff --git a/node_modules/micromatch/lib/expand.js b/node_modules/micromatch/lib/expand.js new file mode 100644 index 0000000..a8c95ae --- /dev/null +++ b/node_modules/micromatch/lib/expand.js @@ -0,0 +1,311 @@ +/*! + * micromatch + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var utils = require('./utils'); +var Glob = require('./glob'); + +/** + * Expose `expand` + */ + +module.exports = expand; + +/** + * Expand a glob pattern to resolve braces and + * similar patterns before converting to regex. + * + * @param {String|Array} `pattern` + * @param {Array} `files` + * @param {Options} `opts` + * @return {Array} + */ + +function expand(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('micromatch.expand(): argument should be a string.'); + } + + var glob = new Glob(pattern, options || {}); + var opts = glob.options; + + if (!utils.isGlob(pattern)) { + glob.pattern = glob.pattern.replace(/([\/.])/g, '\\$1'); + return glob; + } + + glob.pattern = glob.pattern.replace(/(\+)(?!\()/g, '\\$1'); + glob.pattern = glob.pattern.split('$').join('\\$'); + + if (typeof opts.braces !== 'boolean' && typeof opts.nobraces !== 'boolean') { + opts.braces = true; + } + + if (glob.pattern === '.*') { + return { + pattern: '\\.' + star, + tokens: tok, + options: opts + }; + } + + if (glob.pattern === '*') { + return { + pattern: oneStar(opts.dot), + tokens: tok, + options: opts + }; + } + + // parse the glob pattern into tokens + glob.parse(); + var tok = glob.tokens; + tok.is.negated = opts.negated; + + // dotfile handling + if ((opts.dotfiles === true || tok.is.dotfile) && opts.dot !== false) { + opts.dotfiles = true; + opts.dot = true; + } + + if ((opts.dotdirs === true || tok.is.dotdir) && opts.dot !== false) { + opts.dotdirs = true; + opts.dot = true; + } + + // check for braces with a dotfile pattern + if (/[{,]\./.test(glob.pattern)) { + opts.makeRe = false; + opts.dot = true; + } + + if (opts.nonegate !== true) { + opts.negated = glob.negated; + } + + // if the leading character is a dot or a slash, escape it + if (glob.pattern.charAt(0) === '.' && glob.pattern.charAt(1) !== '/') { + glob.pattern = '\\' + glob.pattern; + } + + /** + * Extended globs + */ + + // expand braces, e.g `{1..5}` + glob.track('before braces'); + if (tok.is.braces) { + glob.braces(); + } + glob.track('after braces'); + + // expand extglobs, e.g `foo/!(a|b)` + glob.track('before extglob'); + if (tok.is.extglob) { + glob.extglob(); + } + glob.track('after extglob'); + + // expand brackets, e.g `[[:alpha:]]` + glob.track('before brackets'); + if (tok.is.brackets) { + glob.brackets(); + } + glob.track('after brackets'); + + // special patterns + glob._replace('[!', '[^'); + glob._replace('(?', '(%~'); + glob._replace(/\[\]/, '\\[\\]'); + glob._replace('/[', '/' + (opts.dot ? dotfiles : nodot) + '[', true); + glob._replace('/?', '/' + (opts.dot ? dotfiles : nodot) + '[^/]', true); + glob._replace('/.', '/(?=.)\\.', true); + + // windows drives + glob._replace(/^(\w):([\\\/]+?)/gi, '(?=.)$1:$2', true); + + // negate slashes in exclusion ranges + if (glob.pattern.indexOf('[^') !== -1) { + glob.pattern = negateSlash(glob.pattern); + } + + if (opts.globstar !== false && glob.pattern === '**') { + glob.pattern = globstar(opts.dot); + + } else { + // '/*/*/*' => '(?:/*){3}' + glob._replace(/(\/\*)+/g, function(match) { + var len = match.length / 2; + if (len === 1) { return match; } + return '(?:\\/*){' + len + '}'; + }); + + glob.pattern = balance(glob.pattern, '[', ']'); + glob.escape(glob.pattern); + + // if the pattern has `**` + if (tok.is.globstar) { + glob.pattern = collapse(glob.pattern, '/**'); + glob.pattern = collapse(glob.pattern, '**/'); + glob._replace('/**/', '(?:/' + globstar(opts.dot) + '/|/)', true); + glob._replace(/\*{2,}/g, '**'); + + // 'foo/*' + glob._replace(/(\w+)\*(?!\/)/g, '$1[^/]*?', true); + glob._replace(/\*\*\/\*(\w)/g, globstar(opts.dot) + '\\/' + (opts.dot ? dotfiles : nodot) + '[^/]*?$1', true); + + if (opts.dot !== true) { + glob._replace(/\*\*\/(.)/g, '(?:**\\/|)$1'); + } + + // 'foo/**' or '{**,*}', but not 'foo**' + if (tok.path.dirname !== '' || /,\*\*|\*\*,/.test(glob.orig)) { + glob._replace('**', globstar(opts.dot), true); + } + } + + // ends with /* + glob._replace(/\/\*$/, '\\/' + oneStar(opts.dot), true); + // ends with *, no slashes + glob._replace(/(?!\/)\*$/, star, true); + // has 'n*.' (partial wildcard w/ file extension) + glob._replace(/([^\/]+)\*/, '$1' + oneStar(true), true); + // has '*' + glob._replace('*', oneStar(opts.dot), true); + glob._replace('?.', '?\\.', true); + glob._replace('?:', '?:', true); + + glob._replace(/\?+/g, function(match) { + var len = match.length; + if (len === 1) { + return qmark; + } + return qmark + '{' + len + '}'; + }); + + // escape '.abc' => '\\.abc' + glob._replace(/\.([*\w]+)/g, '\\.$1'); + // fix '[^\\\\/]' + glob._replace(/\[\^[\\\/]+\]/g, qmark); + // '///' => '\/' + glob._replace(/\/+/g, '\\/'); + // '\\\\\\' => '\\' + glob._replace(/\\{2,}/g, '\\'); + } + + // unescape previously escaped patterns + glob.unescape(glob.pattern); + glob._replace('__UNESC_STAR__', '*'); + + // escape dots that follow qmarks + glob._replace('?.', '?\\.'); + + // remove unnecessary slashes in character classes + glob._replace('[^\\/]', qmark); + + if (glob.pattern.length > 1) { + if (/^[\[?*]/.test(glob.pattern)) { + // only prepend the string if we don't want to match dotfiles + glob.pattern = (opts.dot ? dotfiles : nodot) + glob.pattern; + } + } + + return glob; +} + +/** + * Collapse repeated character sequences. + * + * ```js + * collapse('a/../../../b', '../'); + * //=> 'a/../b' + * ``` + * + * @param {String} `str` + * @param {String} `ch` Character sequence to collapse + * @return {String} + */ + +function collapse(str, ch) { + var res = str.split(ch); + var isFirst = res[0] === ''; + var isLast = res[res.length - 1] === ''; + res = res.filter(Boolean); + if (isFirst) res.unshift(''); + if (isLast) res.push(''); + return res.join(ch); +} + +/** + * Negate slashes in exclusion ranges, per glob spec: + * + * ```js + * negateSlash('[^foo]'); + * //=> '[^\\/foo]' + * ``` + * + * @param {String} `str` glob pattern + * @return {String} + */ + +function negateSlash(str) { + return str.replace(/\[\^([^\]]*?)\]/g, function(match, inner) { + if (inner.indexOf('/') === -1) { + inner = '\\/' + inner; + } + return '[^' + inner + ']'; + }); +} + +/** + * Escape imbalanced braces/bracket. This is a very + * basic, naive implementation that only does enough + * to serve the purpose. + */ + +function balance(str, a, b) { + var aarr = str.split(a); + var alen = aarr.join('').length; + var blen = str.split(b).join('').length; + + if (alen !== blen) { + str = aarr.join('\\' + a); + return str.split(b).join('\\' + b); + } + return str; +} + +/** + * Special patterns to be converted to regex. + * Heuristics are used to simplify patterns + * and speed up processing. + */ + +/* eslint no-multi-spaces: 0 */ +var qmark = '[^/]'; +var star = qmark + '*?'; +var nodot = '(?!\\.)(?=.)'; +var dotfileGlob = '(?:\\/|^)\\.{1,2}($|\\/)'; +var dotfiles = '(?!' + dotfileGlob + ')(?=.)'; +var twoStarDot = '(?:(?!' + dotfileGlob + ').)*?'; + +/** + * Create a regex for `*`. + * + * If `dot` is true, or the pattern does not begin with + * a leading star, then return the simpler regex. + */ + +function oneStar(dotfile) { + return dotfile ? '(?!' + dotfileGlob + ')(?=.)' + star : (nodot + star); +} + +function globstar(dotfile) { + if (dotfile) { return twoStarDot; } + return '(?:(?!(?:\\/|^)\\.).)*?'; +} diff --git a/node_modules/micromatch/lib/glob.js b/node_modules/micromatch/lib/glob.js new file mode 100644 index 0000000..c613326 --- /dev/null +++ b/node_modules/micromatch/lib/glob.js @@ -0,0 +1,193 @@ +'use strict'; + +var chars = require('./chars'); +var utils = require('./utils'); + +/** + * Expose `Glob` + */ + +var Glob = module.exports = function Glob(pattern, options) { + if (!(this instanceof Glob)) { + return new Glob(pattern, options); + } + this.options = options || {}; + this.pattern = pattern; + this.history = []; + this.tokens = {}; + this.init(pattern); +}; + +/** + * Initialize defaults + */ + +Glob.prototype.init = function(pattern) { + this.orig = pattern; + this.negated = this.isNegated(); + this.options.track = this.options.track || false; + this.options.makeRe = true; +}; + +/** + * Push a change into `glob.history`. Useful + * for debugging. + */ + +Glob.prototype.track = function(msg) { + if (this.options.track) { + this.history.push({msg: msg, pattern: this.pattern}); + } +}; + +/** + * Return true if `glob.pattern` was negated + * with `!`, also remove the `!` from the pattern. + * + * @return {Boolean} + */ + +Glob.prototype.isNegated = function() { + if (this.pattern.charCodeAt(0) === 33 /* '!' */) { + this.pattern = this.pattern.slice(1); + return true; + } + return false; +}; + +/** + * Expand braces in the given glob pattern. + * + * We only need to use the [braces] lib when + * patterns are nested. + */ + +Glob.prototype.braces = function() { + if (this.options.nobraces !== true && this.options.nobrace !== true) { + // naive/fast check for imbalanced characters + var a = this.pattern.match(/[\{\(\[]/g); + var b = this.pattern.match(/[\}\)\]]/g); + + // if imbalanced, don't optimize the pattern + if (a && b && (a.length !== b.length)) { + this.options.makeRe = false; + } + + // expand brace patterns and join the resulting array + var expanded = utils.braces(this.pattern, this.options); + this.pattern = expanded.join('|'); + } +}; + +/** + * Expand bracket expressions in `glob.pattern` + */ + +Glob.prototype.brackets = function() { + if (this.options.nobrackets !== true) { + this.pattern = utils.brackets(this.pattern); + } +}; + +/** + * Expand bracket expressions in `glob.pattern` + */ + +Glob.prototype.extglob = function() { + if (this.options.noextglob === true) return; + + if (utils.isExtglob(this.pattern)) { + this.pattern = utils.extglob(this.pattern, {escape: true}); + } +}; + +/** + * Parse the given pattern + */ + +Glob.prototype.parse = function(pattern) { + this.tokens = utils.parseGlob(pattern || this.pattern, true); + return this.tokens; +}; + +/** + * Replace `a` with `b`. Also tracks the change before and + * after each replacement. This is disabled by default, but + * can be enabled by setting `options.track` to true. + * + * Also, when the pattern is a string, `.split()` is used, + * because it's much faster than replace. + * + * @param {RegExp|String} `a` + * @param {String} `b` + * @param {Boolean} `escape` When `true`, escapes `*` and `?` in the replacement. + * @return {String} + */ + +Glob.prototype._replace = function(a, b, escape) { + this.track('before (find): "' + a + '" (replace with): "' + b + '"'); + if (escape) b = esc(b); + if (a && b && typeof a === 'string') { + this.pattern = this.pattern.split(a).join(b); + } else { + this.pattern = this.pattern.replace(a, b); + } + this.track('after'); +}; + +/** + * Escape special characters in the given string. + * + * @param {String} `str` Glob pattern + * @return {String} + */ + +Glob.prototype.escape = function(str) { + this.track('before escape: '); + var re = /["\\](['"]?[^"'\\]['"]?)/g; + + this.pattern = str.replace(re, function($0, $1) { + var o = chars.ESC; + var ch = o && o[$1]; + if (ch) { + return ch; + } + if (/[a-z]/i.test($0)) { + return $0.split('\\').join(''); + } + return $0; + }); + + this.track('after escape: '); +}; + +/** + * Unescape special characters in the given string. + * + * @param {String} `str` + * @return {String} + */ + +Glob.prototype.unescape = function(str) { + var re = /__([A-Z]+)_([A-Z]+)__/g; + this.pattern = str.replace(re, function($0, $1) { + return chars[$1][$0]; + }); + this.pattern = unesc(this.pattern); +}; + +/** + * Escape/unescape utils + */ + +function esc(str) { + str = str.split('?').join('%~'); + str = str.split('*').join('%%'); + return str; +} + +function unesc(str) { + str = str.split('%~').join('?'); + str = str.split('%%').join('*'); + return str; +} diff --git a/node_modules/micromatch/lib/utils.js b/node_modules/micromatch/lib/utils.js new file mode 100644 index 0000000..30f3c2a --- /dev/null +++ b/node_modules/micromatch/lib/utils.js @@ -0,0 +1,144 @@ +'use strict'; + +var win32 = process && process.platform === 'win32'; +var path = require('path'); +var fileRe = require('filename-regex'); +var utils = module.exports; + +/** + * Module dependencies + */ + +utils.diff = require('arr-diff'); +utils.unique = require('array-unique'); +utils.braces = require('braces'); +utils.brackets = require('expand-brackets'); +utils.extglob = require('extglob'); +utils.isExtglob = require('is-extglob'); +utils.isGlob = require('is-glob'); +utils.typeOf = require('kind-of'); +utils.normalize = require('normalize-path'); +utils.omit = require('object.omit'); +utils.parseGlob = require('parse-glob'); +utils.cache = require('regex-cache'); + +/** + * Get the filename of a filepath + * + * @param {String} `string` + * @return {String} + */ + +utils.filename = function filename(fp) { + var seg = fp.match(fileRe()); + return seg && seg[0]; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.isPath = function isPath(pattern, opts) { + return function(fp) { + return pattern === utils.unixify(fp, opts); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.hasPath = function hasPath(pattern, opts) { + return function(fp) { + return utils.unixify(pattern, opts).indexOf(fp) !== -1; + }; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function matchPath(pattern, opts) { + var fn = (opts && opts.contains) + ? utils.hasPath(pattern, opts) + : utils.isPath(pattern, opts); + return fn; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` + * @return {Boolean} + */ + +utils.hasFilename = function hasFilename(re) { + return function(fp) { + var name = utils.filename(fp); + return name && re.test(name); + }; +}; + +/** + * Coerce `val` to an array + * + * @param {*} val + * @return {Array} + */ + +utils.arrayify = function arrayify(val) { + return !Array.isArray(val) + ? [val] + : val; +}; + +/** + * Normalize all slashes in a file path or glob pattern to + * forward slashes. + */ + +utils.unixify = function unixify(fp, opts) { + if (opts && opts.unixify === false) return fp; + if (opts && opts.unixify === true || win32 || path.sep === '\\') { + return utils.normalize(fp, false); + } + if (opts && opts.unescape === true) { + return fp ? fp.toString().replace(/\\(\w)/g, '$1') : ''; + } + return fp; +}; + +/** + * Escape/unescape utils + */ + +utils.escapePath = function escapePath(fp) { + return fp.replace(/[\\.]/g, '\\$&'); +}; + +utils.unescapeGlob = function unescapeGlob(fp) { + return fp.replace(/[\\"']/g, ''); +}; + +utils.escapeRe = function escapeRe(str) { + return str.replace(/[-[\\$*+?.#^\s{}(|)\]]/g, '\\$&'); +}; + +/** + * Expose `utils` + */ + +module.exports = utils; diff --git a/node_modules/micromatch/package.json b/node_modules/micromatch/package.json new file mode 100644 index 0000000..82d454b --- /dev/null +++ b/node_modules/micromatch/package.json @@ -0,0 +1,164 @@ +{ + "_args": [ + [ + "micromatch@^2.1.5", + "/home/mywebsite/node_modules/anymatch" + ] + ], + "_from": "micromatch@>=2.1.5 <3.0.0", + "_id": "micromatch@2.3.7", + "_inCache": true, + "_installable": true, + "_location": "/micromatch", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "micromatch", + "raw": "micromatch@^2.1.5", + "rawSpec": "^2.1.5", + "scope": null, + "spec": ">=2.1.5 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/anymatch" + ], + "_resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.7.tgz", + "_shasum": "2f2e85ef46140dbea6cb55e739b6b11b30eaa509", + "_shrinkwrap": null, + "_spec": "micromatch@^2.1.5", + "_where": "/home/mywebsite/node_modules/anymatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/micromatch/issues" + }, + "dependencies": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`.", + "devDependencies": { + "benchmarked": "^0.1.4", + "chalk": "^1.1.1", + "gulp": "^3.9.0", + "gulp-eslint": "^1.1.1", + "gulp-istanbul": "^0.10.1", + "gulp-mocha": "^2.1.3", + "minimatch": "^3.0.0", + "minimist": "^1.2.0", + "mocha": "*", + "multimatch": "^2.0.0", + "should": "*", + "write": "^0.2.1" + }, + "directories": {}, + "dist": { + "shasum": "2f2e85ef46140dbea6cb55e739b6b11b30eaa509", + "tarball": "http://registry.npmjs.org/micromatch/-/micromatch-2.3.7.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "lib/" + ], + "gitHead": "cf7209ba3a3c962613509d5ec61a890aaf2a42a0", + "homepage": "https://github.com/jonschlinkert/micromatch", + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "minimatch", + "multimatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + }, + { + "name": "es128", + "email": "elan.shanker+npm@gmail.com" + } + ], + "name": "micromatch", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/micromatch.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "reflinks": [ + "braces", + "expand-brackets", + "extglob", + "minimatch", + "multimatch", + "verb" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "expand-range", + "extglob", + "fill-range", + "gulp-micromatch", + "is-glob", + "parse-glob" + ] + } + }, + "version": "2.3.7" +} diff --git a/node_modules/minimatch/LICENSE b/node_modules/minimatch/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md new file mode 100644 index 0000000..d458bc2 --- /dev/null +++ b/node_modules/minimatch/README.md @@ -0,0 +1,216 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instanting the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +## Functions + +The top-level exported function has a `cache` property, which is an LRU +cache set to store 100 items. So, calling these methods repeatedly +with the same pattern and options will use the same Minimatch object, +saving the cost of parsing it multiple times. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js b/node_modules/minimatch/browser.js similarity index 91% rename from node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js rename to node_modules/minimatch/browser.js index 967b45c..7d05159 100644 --- a/node_modules/forever/node_modules/utile/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js +++ b/node_modules/minimatch/browser.js @@ -1,4 +1,4 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o one single character var patternListStack = [] + var negativeLists = [] var plType var stateChar var inClass = false @@ -373,9 +374,13 @@ function parse (pattern, isSub) { } plType = stateChar - patternListStack.push({ type: plType, start: i - 1, reStart: re.length }) + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!' : '(?:' + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' this.debug('plType %j %j', stateChar, re) stateChar = false continue @@ -389,12 +394,15 @@ function parse (pattern, isSub) { clearStateChar() hasMagic = true re += ')' - plType = patternListStack.pop().type + var pl = patternListStack.pop() + plType = pl.type // negation is (?:(?!js)[^/]*) // The others are (?:) switch (plType) { case '!': - re += '[^/]*?)' + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length break case '?': case '+': @@ -508,7 +516,7 @@ function parse (pattern, isSub) { // and escape any | chars that were passed through as-is for the regexp. // Go through and escape them, taking care not to double-escape any // | chars that were already escaped. - for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + 3) // maybe some even number of \, then maybe 1 \, followed by a | tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { @@ -551,12 +559,49 @@ function parse (pattern, isSub) { case '(': addPatternStart = true } + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + // if the re is not "" at this point, then we need to make sure // it doesn't match against an empty path part. // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) re = '(?=.)' + re + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } - if (addPatternStart) re = patternStart + re + if (addPatternStart) { + re = patternStart + re + } // parsing just a piece of a larger pattern. if (isSub === SUBPARSE) { @@ -1110,4 +1155,5 @@ module.exports = function (xs, fn) { return res; }; -},{}]},{},[1]); +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000..ec4c05c --- /dev/null +++ b/node_modules/minimatch/minimatch.js @@ -0,0 +1,912 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + plType = stateChar + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + re += ')' + var pl = patternListStack.pop() + plType = pl.type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json new file mode 100644 index 0000000..13a3450 --- /dev/null +++ b/node_modules/minimatch/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + "minimatch@~2.0.0", + "/home/mywebsite/node_modules/forever-monitor" + ] + ], + "_from": "minimatch@>=2.0.0 <2.1.0", + "_id": "minimatch@2.0.10", + "_inCache": true, + "_installable": true, + "_location": "/minimatch", + "_nodeVersion": "2.2.1", + "_npmUser": { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + "_npmVersion": "3.1.0", + "_phantomChildren": {}, + "_requested": { + "name": "minimatch", + "raw": "minimatch@~2.0.0", + "rawSpec": "~2.0.0", + "scope": null, + "spec": ">=2.0.0 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/forever-monitor", + "/glob", + "/readdirp" + ], + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", + "_shrinkwrap": null, + "_spec": "minimatch@~2.0.0", + "_where": "/home/mywebsite/node_modules/forever-monitor", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "dependencies": { + "brace-expansion": "^1.0.0" + }, + "description": "a glob matcher in javascript", + "devDependencies": { + "browserify": "^9.0.3", + "standard": "^3.7.2", + "tap": "^1.2.0" + }, + "directories": {}, + "dist": { + "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "browser.js", + "minimatch.js" + ], + "gitHead": "6afb85f0c324b321f76a38df81891e562693e257", + "homepage": "https://github.com/isaacs/minimatch#readme", + "license": "ISC", + "main": "minimatch.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "minimatch", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "scripts": { + "posttest": "standard minimatch.js test/*.js", + "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare", + "test": "tap test/*.js" + }, + "version": "2.0.10" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/.travis.yml rename to node_modules/minimist/.travis.yml diff --git a/node_modules/minimist/LICENSE b/node_modules/minimist/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/example/parse.js rename to node_modules/minimist/example/parse.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/index.js b/node_modules/minimist/index.js similarity index 63% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/index.js rename to node_modules/minimist/index.js index 185a045..71fb830 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/index.js +++ b/node_modules/minimist/index.js @@ -1,19 +1,11 @@ module.exports = function (args, opts) { if (!opts) opts = {}; - var flags = { bools : {}, strings : {}, unknownFn: null }; - - if (typeof opts['unknown'] === 'function') { - flags.unknownFn = opts['unknown']; - } - - if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { - flags.allBools = true; - } else { - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } + var flags = { bools : {}, strings : {} }; + + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); var aliases = {}; Object.keys(opts.alias || {}).forEach(function (key) { @@ -46,16 +38,7 @@ module.exports = function (args, opts) { args = args.slice(0, args.indexOf('--')); } - function argDefined(key, arg) { - return (flags.allBools && /^--[^=]+$/.test(arg)) || - flags.strings[key] || flags.bools[key] || aliases[key]; - } - - function setArg (key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) return; - } - + function setArg (key, val) { var value = !flags.strings[key] && isNumber(val) ? Number(val) : val ; @@ -65,25 +48,6 @@ module.exports = function (args, opts) { setKey(argv, x.split('.'), value); }); } - - function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } - } for (var i = 0; i < args.length; i++) { var arg = args[i]; @@ -93,28 +57,27 @@ module.exports = function (args, opts) { // 'dotall' regex modifier. See: // http://stackoverflow.com/a/1068308/13216 var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2], arg); + setArg(m[1], m[2]); } else if (/^--no-.+/.test(arg)) { var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); + setArg(key, false); } else if (/^--.+/.test(arg)) { var key = arg.match(/^--(.+)/)[1]; var next = args[i + 1]; if (next !== undefined && !/^-/.test(next) && !flags.bools[key] - && !flags.allBools && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next, arg); + setArg(key, next); i++; } else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true', arg); + setArg(key, next === 'true'); i++; } else { - setArg(key, flags.strings[key] ? '' : true, arg); + setArg(key, flags.strings[key] ? '' : true); } } else if (/^-[^-]+/.test(arg)) { @@ -125,24 +88,24 @@ module.exports = function (args, opts) { var next = arg.slice(j+2); if (next === '-') { - setArg(letters[j], next, arg) + setArg(letters[j], next) continue; } if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next, arg); + setArg(letters[j], next); broken = true; break; } if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2), arg); + setArg(letters[j], arg.slice(j+2)); broken = true; break; } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + setArg(letters[j], flags.strings[letters[j]] ? '' : true); } } @@ -151,28 +114,22 @@ module.exports = function (args, opts) { if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) && !flags.bools[key] && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1], arg); + setArg(key, args[i+1]); i++; } else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true', arg); + setArg(key, args[i+1] === 'true'); i++; } else { - setArg(key, flags.strings[key] ? '' : true, arg); + setArg(key, flags.strings[key] ? '' : true); } } } else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); } } @@ -186,17 +143,9 @@ module.exports = function (args, opts) { } }); - if (opts['--']) { - argv['--'] = new Array(); - notFlags.forEach(function(key) { - argv['--'].push(key); - }); - } - else { - notFlags.forEach(function(key) { - argv._.push(key); - }); - } + notFlags.forEach(function(key) { + argv._.push(key); + }); return argv; }; @@ -211,6 +160,25 @@ function hasKey (obj, keys) { return key in o; } +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} + function isNumber (x) { if (typeof x === 'number') return true; if (/^0x[0-9a-f]+$/i.test(x)) return true; diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json new file mode 100644 index 0000000..c7ae290 --- /dev/null +++ b/node_modules/minimist/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + "minimist@~0.0.1", + "/home/mywebsite/node_modules/optimist" + ] + ], + "_from": "minimist@>=0.0.1 <0.1.0", + "_id": "minimist@0.0.10", + "_inCache": true, + "_installable": true, + "_location": "/minimist", + "_npmUser": { + "email": "mail@substack.net", + "name": "substack" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "name": "minimist", + "raw": "minimist@~0.0.1", + "rawSpec": "~0.0.1", + "scope": null, + "spec": ">=0.0.1 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/optimist" + ], + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "_shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", + "_shrinkwrap": null, + "_spec": "minimist@~0.0.1", + "_where": "/home/mywebsite/node_modules/optimist", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/minimist/issues" + }, + "dependencies": {}, + "description": "parse argument options", + "devDependencies": { + "tap": "~0.4.0", + "tape": "~1.0.4" + }, + "directories": {}, + "dist": { + "shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "optimist", + "parser" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "minimist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "browsers": [ + "chrome/10", + "chrome/latest", + "ff/5", + "firefox/latest", + "ie/6..latest", + "opera/12", + "safari/5.1", + "safari/latest" + ], + "files": "test/*.js" + }, + "version": "0.0.10" +} diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown similarity index 63% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/readme.markdown rename to node_modules/minimist/readme.markdown index 30a74cf..c256353 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/readme.markdown +++ b/node_modules/minimist/readme.markdown @@ -55,28 +55,10 @@ options can be: * `opts.string` - a string or array of strings argument names to always treat as strings -* `opts.boolean` - a boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) +* `opts.boolean` - a string or array of strings to always treat as booleans * `opts.alias` - an object mapping string names to strings or arrays of string argument names to use as aliases * `opts.default` - an object mapping string argument names to default values -* `opts.stopEarly` - when true, populate `argv._` with everything after the -first non-option -* `opts['--']` - when true, populate `argv._` with everything before the `--` -and `argv['--']` with everything after the `--`. Here's an example: -* `opts.unknown` - a function which is invoked with a command line parameter not -defined in the `opts` configuration object. If the function returns `false`, the -unknown option is not added to `argv`. - -``` -> require('./')('one two three -- four five --six'.split(' '), { '--': true }) -{ _: [ 'one', 'two', 'three' ], - '--': [ 'four', 'five', '--six' ] } -``` - -Note that with `opts['--']` set, parsing for arguments still stops after the -`--`. # install diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/bool.js rename to node_modules/minimist/test/bool.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js similarity index 74% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/dash.js rename to node_modules/minimist/test/dash.js index 5a4fa5b..8b034b9 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/dash.js +++ b/node_modules/minimist/test/dash.js @@ -22,10 +22,3 @@ test('-a -- b', function (t) { t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); }); - -test('move arguments after the -- into their own `--` array', function(t) { - t.plan(1); - t.deepEqual( - parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), - { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); -}); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js similarity index 58% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/default_bool.js rename to node_modules/minimist/test/default_bool.js index 780a311..f0041ee 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/default_bool.js +++ b/node_modules/minimist/test/default_bool.js @@ -18,18 +18,3 @@ test('boolean default false', function (t) { t.equal(argv.somefalse, false); t.end(); }); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, null); - var argv = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, true); - t.end(); - -}) diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/dotted.js rename to node_modules/minimist/test/dotted.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/long.js rename to node_modules/minimist/test/long.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/num.js rename to node_modules/minimist/test/num.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/parse.js rename to node_modules/minimist/test/parse.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js similarity index 80% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/parse_modified.js rename to node_modules/minimist/test/parse_modified.js index ab620dc..21851b0 100644 --- a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/parse_modified.js +++ b/node_modules/minimist/test/parse_modified.js @@ -5,5 +5,5 @@ test('parse with modifier functions' , function (t) { t.plan(1); var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); + t.deepEqual(argv, { b: true, _: ['123'] }); }); diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/short.js rename to node_modules/minimist/test/short.js diff --git a/node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js similarity index 100% rename from node_modules/forever/node_modules/forever-monitor/node_modules/watch/node_modules/minimist/test/whitespace.js rename to node_modules/minimist/test/whitespace.js diff --git a/node_modules/mkdirp/.travis.yml b/node_modules/mkdirp/.travis.yml new file mode 100644 index 0000000..74c57bf --- /dev/null +++ b/node_modules/mkdirp/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/node_modules/mkdirp/LICENSE b/node_modules/mkdirp/LICENSE new file mode 100644 index 0000000..432d1ae --- /dev/null +++ b/node_modules/mkdirp/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/mkdirp/bin/cmd.js b/node_modules/mkdirp/bin/cmd.js new file mode 100755 index 0000000..d95de15 --- /dev/null +++ b/node_modules/mkdirp/bin/cmd.js @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var mkdirp = require('../'); +var minimist = require('minimist'); +var fs = require('fs'); + +var argv = minimist(process.argv.slice(2), { + alias: { m: 'mode', h: 'help' }, + string: [ 'mode' ] +}); +if (argv.help) { + fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); + return; +} + +var paths = argv._.slice(); +var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; + +(function next () { + if (paths.length === 0) return; + var p = paths.shift(); + + if (mode === undefined) mkdirp(p, cb) + else mkdirp(p, mode, cb) + + function cb (err) { + if (err) { + console.error(err.message); + process.exit(1); + } + else next(); + } +})(); diff --git a/node_modules/mkdirp/bin/usage.txt b/node_modules/mkdirp/bin/usage.txt new file mode 100644 index 0000000..f952aa2 --- /dev/null +++ b/node_modules/mkdirp/bin/usage.txt @@ -0,0 +1,12 @@ +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + diff --git a/node_modules/mkdirp/examples/pow.js b/node_modules/mkdirp/examples/pow.js new file mode 100644 index 0000000..e692421 --- /dev/null +++ b/node_modules/mkdirp/examples/pow.js @@ -0,0 +1,6 @@ +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); diff --git a/node_modules/mkdirp/index.js b/node_modules/mkdirp/index.js new file mode 100644 index 0000000..6ce241b --- /dev/null +++ b/node_modules/mkdirp/index.js @@ -0,0 +1,98 @@ +var path = require('path'); +var fs = require('fs'); +var _0777 = parseInt('0777', 8); + +module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + +function mkdirP (p, opts, f, made) { + if (typeof opts === 'function') { + f = opts; + opts = {}; + } + else if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + var cb = f || function () {}; + p = path.resolve(p); + + xfs.mkdir(p, mode, function (er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case 'ENOENT': + mkdirP(path.dirname(p), opts, function (er, made) { + if (er) cb(er, made); + else mkdirP(p, opts, cb, made); + }); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + xfs.stat(p, function (er2, stat) { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) cb(er, made) + else cb(null, made); + }); + break; + } + }); +} + +mkdirP.sync = function sync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + p = path.resolve(p); + + try { + xfs.mkdirSync(p, mode); + made = made || p; + } + catch (err0) { + switch (err0.code) { + case 'ENOENT' : + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + var stat; + try { + stat = xfs.statSync(p); + } + catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + break; + } + } + + return made; +}; diff --git a/node_modules/mkdirp/node_modules/minimist/.travis.yml b/node_modules/mkdirp/node_modules/minimist/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/mkdirp/node_modules/minimist/LICENSE b/node_modules/mkdirp/node_modules/minimist/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mkdirp/node_modules/minimist/example/parse.js b/node_modules/mkdirp/node_modules/minimist/example/parse.js new file mode 100644 index 0000000..abff3e8 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.dir(argv); diff --git a/node_modules/mkdirp/node_modules/minimist/index.js b/node_modules/mkdirp/node_modules/minimist/index.js new file mode 100644 index 0000000..584f551 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/index.js @@ -0,0 +1,187 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {} }; + + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + }); + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function setArg (key, val) { + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + setArg(m[1], m[2]); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + } + else { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + notFlags.forEach(function(key) { + argv._.push(key); + }); + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + +function longest (xs) { + return Math.max.apply(null, xs.map(function (x) { return x.length })); +} diff --git a/node_modules/mkdirp/node_modules/minimist/package.json b/node_modules/mkdirp/node_modules/minimist/package.json new file mode 100644 index 0000000..e48a05f --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + "minimist@0.0.8", + "/home/mywebsite/node_modules/mkdirp" + ] + ], + "_from": "minimist@0.0.8", + "_id": "minimist@0.0.8", + "_inCache": true, + "_installable": true, + "_location": "/mkdirp/minimist", + "_npmUser": { + "email": "mail@substack.net", + "name": "substack" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "name": "minimist", + "raw": "minimist@0.0.8", + "rawSpec": "0.0.8", + "scope": null, + "spec": "0.0.8", + "type": "version" + }, + "_requiredBy": [ + "/mkdirp" + ], + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", + "_shrinkwrap": null, + "_spec": "minimist@0.0.8", + "_where": "/home/mywebsite/node_modules/mkdirp", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/minimist/issues" + }, + "dependencies": {}, + "description": "parse argument options", + "devDependencies": { + "tap": "~0.4.0", + "tape": "~1.0.4" + }, + "directories": {}, + "dist": { + "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "optimist", + "parser" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "minimist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "browsers": [ + "chrome/10", + "chrome/latest", + "ff/5", + "firefox/latest", + "ie/6..latest", + "opera/12", + "safari/5.1", + "safari/latest" + ], + "files": "test/*.js" + }, + "version": "0.0.8" +} diff --git a/node_modules/mkdirp/node_modules/minimist/readme.markdown b/node_modules/mkdirp/node_modules/minimist/readme.markdown new file mode 100644 index 0000000..c256353 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/readme.markdown @@ -0,0 +1,73 @@ +# minimist + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) + +[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.dir(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } +``` + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a string or array of strings to always treat as booleans +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/node_modules/mkdirp/node_modules/minimist/test/dash.js b/node_modules/mkdirp/node_modules/minimist/test/dash.js new file mode 100644 index 0000000..8b034b9 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/dash.js @@ -0,0 +1,24 @@ +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/default_bool.js b/node_modules/mkdirp/node_modules/minimist/test/default_bool.js new file mode 100644 index 0000000..f0041ee --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/default_bool.js @@ -0,0 +1,20 @@ +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/dotted.js b/node_modules/mkdirp/node_modules/minimist/test/dotted.js new file mode 100644 index 0000000..ef0ae34 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/dotted.js @@ -0,0 +1,16 @@ +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/long.js b/node_modules/mkdirp/node_modules/minimist/test/long.js new file mode 100644 index 0000000..5d3a1e0 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/long.js @@ -0,0 +1,31 @@ +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/parse.js b/node_modules/mkdirp/node_modules/minimist/test/parse.js new file mode 100644 index 0000000..8a90646 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/parse.js @@ -0,0 +1,318 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); +}); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); +}); + +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('empty strings', function(t) { + var s = parse([ '-s' ], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); + + var str = parse([ '--str' ], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); + + var letters = parse([ '-art' ], { + string: [ 'a', 't' ] + }); + + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); + + t.end(); +}); + + +test('slashBreak', function (t) { + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); + +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js b/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js new file mode 100644 index 0000000..21851b0 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: ['123'] }); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/short.js b/node_modules/mkdirp/node_modules/minimist/test/short.js new file mode 100644 index 0000000..d513a1c --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/short.js @@ -0,0 +1,67 @@ +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/whitespace.js b/node_modules/mkdirp/node_modules/minimist/test/whitespace.js new file mode 100644 index 0000000..8a52a58 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/whitespace.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); +}); diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json new file mode 100644 index 0000000..f69d476 --- /dev/null +++ b/node_modules/mkdirp/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + "mkdirp@0.x.x", + "/home/mywebsite/node_modules/utile" + ] + ], + "_from": "mkdirp@>=0.0.0 <1.0.0", + "_id": "mkdirp@0.5.1", + "_inCache": true, + "_installable": true, + "_location": "/mkdirp", + "_nodeVersion": "2.0.0", + "_npmUser": { + "email": "substack@gmail.com", + "name": "substack" + }, + "_npmVersion": "2.9.0", + "_phantomChildren": {}, + "_requested": { + "name": "mkdirp", + "raw": "mkdirp@0.x.x", + "rawSpec": "0.x.x", + "scope": null, + "spec": ">=0.0.0 <1.0.0", + "type": "range" + }, + "_requiredBy": [ + "/utile" + ], + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "_shrinkwrap": null, + "_spec": "mkdirp@0.x.x", + "_where": "/home/mywebsite/node_modules/utile", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "bugs": { + "url": "https://github.com/substack/node-mkdirp/issues" + }, + "dependencies": { + "minimist": "0.0.8" + }, + "description": "Recursively mkdir, like `mkdir -p`", + "devDependencies": { + "mock-fs": "2 >=2.7.0", + "tap": "1" + }, + "directories": {}, + "dist": { + "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7", + "homepage": "https://github.com/substack/node-mkdirp#readme", + "keywords": [ + "directory", + "mkdir" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "mkdirp", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/substack/node-mkdirp.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.5.1" +} diff --git a/node_modules/mkdirp/readme.markdown b/node_modules/mkdirp/readme.markdown new file mode 100644 index 0000000..3cc1315 --- /dev/null +++ b/node_modules/mkdirp/readme.markdown @@ -0,0 +1,100 @@ +# mkdirp + +Like `mkdir -p`, but in node.js! + +[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) + +# example + +## pow.js + +```js +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); +``` + +Output + +``` +pow! +``` + +And now /tmp/foo/bar/baz exists, huzzah! + +# methods + +```js +var mkdirp = require('mkdirp'); +``` + +## mkdirp(dir, opts, cb) + +Create a new directory and any necessary subdirectories at `dir` with octal +permission string `opts.mode`. If `opts` is a non-object, it will be treated as +the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +`cb(err, made)` fires with the error or the first directory `made` +that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and +`opts.fs.stat(path, cb)`. + +## mkdirp.sync(dir, opts) + +Synchronously create a new directory and any necessary subdirectories at `dir` +with octal permission string `opts.mode`. If `opts` is a non-object, it will be +treated as the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +Returns the first directory that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and +`opts.fs.statSync(path)`. + +# usage + +This package also ships with a `mkdirp` command. + +``` +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + +``` + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install mkdirp +``` + +to get the library, or + +``` +npm install -g mkdirp +``` + +to get the command. + +# license + +MIT diff --git a/node_modules/mkdirp/test/chmod.js b/node_modules/mkdirp/test/chmod.js new file mode 100644 index 0000000..6a404b9 --- /dev/null +++ b/node_modules/mkdirp/test/chmod.js @@ -0,0 +1,41 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); +var _0744 = parseInt('0744', 8); + +var ps = [ '', 'tmp' ]; + +for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); +} + +var file = ps.join('/'); + +test('chmod-pre', function (t) { + var mode = _0744 + mkdirp(file, mode, function (er) { + t.ifError(er, 'should not error'); + fs.stat(file, function (er, stat) { + t.ifError(er, 'should exist'); + t.ok(stat && stat.isDirectory(), 'should be directory'); + t.equal(stat && stat.mode & _0777, mode, 'should be 0744'); + t.end(); + }); + }); +}); + +test('chmod', function (t) { + var mode = _0755 + mkdirp(file, mode, function (er) { + t.ifError(er, 'should not error'); + fs.stat(file, function (er, stat) { + t.ifError(er, 'should exist'); + t.ok(stat && stat.isDirectory(), 'should be directory'); + t.end(); + }); + }); +}); diff --git a/node_modules/mkdirp/test/clobber.js b/node_modules/mkdirp/test/clobber.js new file mode 100644 index 0000000..2433b9a --- /dev/null +++ b/node_modules/mkdirp/test/clobber.js @@ -0,0 +1,38 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0755 = parseInt('0755', 8); + +var ps = [ '', 'tmp' ]; + +for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); +} + +var file = ps.join('/'); + +// a file in the way +var itw = ps.slice(0, 3).join('/'); + + +test('clobber-pre', function (t) { + console.error("about to write to "+itw) + fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); + + fs.stat(itw, function (er, stat) { + t.ifError(er) + t.ok(stat && stat.isFile(), 'should be file') + t.end() + }) +}) + +test('clobber', function (t) { + t.plan(2); + mkdirp(file, _0755, function (err) { + t.ok(err); + t.equal(err.code, 'ENOTDIR'); + t.end(); + }); +}); diff --git a/node_modules/mkdirp/test/mkdirp.js b/node_modules/mkdirp/test/mkdirp.js new file mode 100644 index 0000000..eaa8921 --- /dev/null +++ b/node_modules/mkdirp/test/mkdirp.js @@ -0,0 +1,28 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('woo', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); diff --git a/node_modules/mkdirp/test/opts_fs.js b/node_modules/mkdirp/test/opts_fs.js new file mode 100644 index 0000000..97186b6 --- /dev/null +++ b/node_modules/mkdirp/test/opts_fs.js @@ -0,0 +1,29 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('opts.fs', function (t) { + t.plan(5); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp(file, { fs: xfs, mode: _0755 }, function (err) { + t.ifError(err); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); + }); +}); diff --git a/node_modules/mkdirp/test/opts_fs_sync.js b/node_modules/mkdirp/test/opts_fs_sync.js new file mode 100644 index 0000000..6c370aa --- /dev/null +++ b/node_modules/mkdirp/test/opts_fs_sync.js @@ -0,0 +1,27 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('opts.fs sync', function (t) { + t.plan(4); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp.sync(file, { fs: xfs, mode: _0755 }); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/node_modules/mkdirp/test/perm.js b/node_modules/mkdirp/test/perm.js new file mode 100644 index 0000000..fbce44b --- /dev/null +++ b/node_modules/mkdirp/test/perm.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('async perm', function (t) { + t.plan(5); + var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); + +test('async root perm', function (t) { + mkdirp('/tmp', _0755, function (err) { + if (err) t.fail(err); + t.end(); + }); + t.end(); +}); diff --git a/node_modules/mkdirp/test/perm_sync.js b/node_modules/mkdirp/test/perm_sync.js new file mode 100644 index 0000000..398229f --- /dev/null +++ b/node_modules/mkdirp/test/perm_sync.js @@ -0,0 +1,36 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('sync perm', function (t) { + t.plan(4); + var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; + + mkdirp.sync(file, _0755); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); + +test('sync root perm', function (t) { + t.plan(3); + + var file = '/tmp'; + mkdirp.sync(file, _0755); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }); +}); diff --git a/node_modules/mkdirp/test/race.js b/node_modules/mkdirp/test/race.js new file mode 100644 index 0000000..b0b9e18 --- /dev/null +++ b/node_modules/mkdirp/test/race.js @@ -0,0 +1,37 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('race', function (t) { + t.plan(10); + var ps = [ '', 'tmp' ]; + + for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); + } + var file = ps.join('/'); + + var res = 2; + mk(file); + + mk(file); + + function mk (file, cb) { + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }) + }); + } +}); diff --git a/node_modules/mkdirp/test/rel.js b/node_modules/mkdirp/test/rel.js new file mode 100644 index 0000000..4ddb342 --- /dev/null +++ b/node_modules/mkdirp/test/rel.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('rel', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var cwd = process.cwd(); + process.chdir('/tmp'); + + var file = [x,y,z].join('/'); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + process.chdir(cwd); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); diff --git a/node_modules/mkdirp/test/return.js b/node_modules/mkdirp/test/return.js new file mode 100644 index 0000000..bce68e5 --- /dev/null +++ b/node_modules/mkdirp/test/return.js @@ -0,0 +1,25 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; + +test('return value', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + // should return the first dir created. + // By this point, it would be profoundly surprising if /tmp didn't + // already exist, since every other test makes things in there. + mkdirp(file, function (err, made) { + t.ifError(err); + t.equal(made, '/tmp/' + x); + mkdirp(file, function (err, made) { + t.ifError(err); + t.equal(made, null); + }); + }); +}); diff --git a/node_modules/mkdirp/test/return_sync.js b/node_modules/mkdirp/test/return_sync.js new file mode 100644 index 0000000..7c222d3 --- /dev/null +++ b/node_modules/mkdirp/test/return_sync.js @@ -0,0 +1,24 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; + +test('return value', function (t) { + t.plan(2); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + // should return the first dir created. + // By this point, it would be profoundly surprising if /tmp didn't + // already exist, since every other test makes things in there. + // Note that this will throw on failure, which will fail the test. + var made = mkdirp.sync(file); + t.equal(made, '/tmp/' + x); + + // making the same file again should have no effect. + made = mkdirp.sync(file); + t.equal(made, null); +}); diff --git a/node_modules/mkdirp/test/root.js b/node_modules/mkdirp/test/root.js new file mode 100644 index 0000000..9e7d079 --- /dev/null +++ b/node_modules/mkdirp/test/root.js @@ -0,0 +1,19 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0755 = parseInt('0755', 8); + +test('root', function (t) { + // '/' on unix, 'c:/' on windows. + var file = path.resolve('/'); + + mkdirp(file, _0755, function (err) { + if (err) throw err + fs.stat(file, function (er, stat) { + if (er) throw er + t.ok(stat.isDirectory(), 'target is a directory'); + t.end(); + }) + }); +}); diff --git a/node_modules/mkdirp/test/sync.js b/node_modules/mkdirp/test/sync.js new file mode 100644 index 0000000..8c8dc93 --- /dev/null +++ b/node_modules/mkdirp/test/sync.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('sync', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + try { + mkdirp.sync(file, _0755); + } catch (err) { + t.fail(err); + return t.end(); + } + + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/node_modules/mkdirp/test/umask.js b/node_modules/mkdirp/test/umask.js new file mode 100644 index 0000000..2033c63 --- /dev/null +++ b/node_modules/mkdirp/test/umask.js @@ -0,0 +1,28 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('implicit mode from umask', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + mkdirp(file, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0777 & (~process.umask())); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }) + }); +}); diff --git a/node_modules/mkdirp/test/umask_sync.js b/node_modules/mkdirp/test/umask_sync.js new file mode 100644 index 0000000..11a7614 --- /dev/null +++ b/node_modules/mkdirp/test/umask_sync.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('umask sync modes', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + try { + mkdirp.sync(file); + } catch (err) { + t.fail(err); + return t.end(); + } + + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, (_0777 & (~process.umask()))); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/node_modules/nconf/.npmignore b/node_modules/nconf/.npmignore new file mode 100644 index 0000000..d049acd --- /dev/null +++ b/node_modules/nconf/.npmignore @@ -0,0 +1,10 @@ +.DS_Store +config.json +test/fixtures/*.json +!test/fixtures/complete.json +!test/fixtures/malformed.json +!test/fixtures/bom.json +!test/fixtures/no-bom.json +node_modules/ +node_modules/* +npm-debug.log diff --git a/node_modules/nconf/.travis.yml b/node_modules/nconf/.travis.yml new file mode 100644 index 0000000..3882f98 --- /dev/null +++ b/node_modules/nconf/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - 0.10 + - 0.11 + +notifications: + email: + - travis@nodejitsu.com + irc: "irc.freenode.org#nodejitsu" + diff --git a/node_modules/nconf/CHANGELOG.md b/node_modules/nconf/CHANGELOG.md new file mode 100644 index 0000000..34c1576 --- /dev/null +++ b/node_modules/nconf/CHANGELOG.md @@ -0,0 +1,9 @@ +# CHANGELOG + +### Version 0.5.0 + +* `nconf.stores.*` is now `nconf.*` +* `nconf.stores` now represents the set of nconf.* Store instances on the nconf object. +* Added `nconf.argv()`, `nconf.env()`, `nconf.file()`, `nconf.overrides()`, `nconf.defaults()`. +* `nconf.system` no longer exists. The `nconf.System` store has been broken into `nconf.Argv`, `nconf.Env` and `nconf.Literal` +* Fixed bugs in hierarchical configuration loading. \ No newline at end of file diff --git a/node_modules/nconf/LICENSE b/node_modules/nconf/LICENSE new file mode 100644 index 0000000..1f01e2b --- /dev/null +++ b/node_modules/nconf/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Nodejitsu Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/nconf/README.md b/node_modules/nconf/README.md new file mode 100644 index 0000000..c0b6815 --- /dev/null +++ b/node_modules/nconf/README.md @@ -0,0 +1,274 @@ +# nconf [![Build Status](https://secure.travis-ci.org/flatiron/nconf.png)](http://travis-ci.org/flatiron/nconf) + +Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging. + +## Example +Using nconf is easy; it is designed to be a simple key-value store with support for both local and remote storage. Keys are namespaced and delimited by `:`. Lets dive right into sample usage: + +``` js + var fs = require('fs'), + nconf = require('nconf'); + + // + // Setup nconf to use (in-order): + // 1. Command-line arguments + // 2. Environment variables + // 3. A file located at 'path/to/config.json' + // + nconf.argv() + .env() + .file({ file: 'path/to/config.json' }); + + // + // Set a few variables on `nconf`. + // + nconf.set('database:host', '127.0.0.1'); + nconf.set('database:port', 5984); + + // + // Get the entire database object from nconf. This will output + // { host: '127.0.0.1', port: 5984 } + // + console.log('foo: ' + nconf.get('foo')); + console.log('NODE_ENV: ' + nconf.get('NODE_ENV')); + console.log('database: ' + nconf.get('database')); + + // + // Save the configuration object to disk + // + nconf.save(function (err) { + fs.readFile('path/to/your/config.json', function (err, data) { + console.dir(JSON.parse(data.toString())) + }); + }); +``` + +If you run the above script: + +``` bash + $ NODE_ENV=production sample.js --foo bar +``` + +The output will be: + +``` + foo: bar + NODE_ENV: production + database: { host: '127.0.0.1', port: 5984 } +``` + +## Hierarchical configuration + +Configuration management can get complicated very quickly for even trivial applications running in production. `nconf` addresses this problem by enabling you to setup a hierarchy for different sources of configuration with no defaults. **The order in which you attach these configuration sources determines their priority in the hierarchy.** Lets take a look at the options available to you + + 1. **nconf.argv(options)** Loads `process.argv` using optimist. If `options` is supplied it is passed along to optimist. + 2. **nconf.env(options)** Loads `process.env` into the hierarchy. + 3. **nconf.file(options)** Loads the configuration data at options.file into the hierarchy. + 4. **nconf.defaults(options)** Loads the data in options.store into the hierarchy. + 5. **nconf.overrides(options)** Loads the data in options.store into the hierarchy. + +A sane default for this could be: + +``` js + var nconf = require('nconf'); + + // + // 1. any overrides + // + nconf.overrides({ + 'always': 'be this value' + }); + + // + // 2. `process.env` + // 3. `process.argv` + // + nconf.env().argv(); + + // + // 4. Values in `config.json` + // + nconf.file('/path/to/config.json'); + + // + // Or with a custom name + // + nconf.file('custom', '/path/to/config.json'); + + // + // Or searching from a base directory. + // Note: `name` is optional. + // + nconf.file(name, { + file: 'config.json', + dir: 'search/from/here', + search: true + }); + + // + // 5. Any default values + // + nconf.defaults({ + 'if nothing else': 'use this value' + }); +``` + +## API Documentation + +The top-level of `nconf` is an instance of the `nconf.Provider` abstracts this all for you into a simple API. + +### nconf.add(name, options) +Adds a new store with the specified `name` and `options`. If `options.type` is not set, then `name` will be used instead: + +``` js + nconf.add('user', { type: 'file', file: '/path/to/userconf.json' }); + nconf.add('global', { type: 'file', file: '/path/to/globalconf.json' }); +``` + +### nconf.use(name, options) +Similar to `nconf.add`, except that it can replace an existing store if new options are provided + +``` js + // + // Load a file store onto nconf with the specified settings + // + nconf.use('file', { file: '/path/to/some/config-file.json' }); + + // + // Replace the file store with new settings + // + nconf.use('file', { file: 'path/to/a-new/config-file.json' }); +``` + +### nconf.remove(name) +Removes the store with the specified `name.` The configuration stored at that level will no longer be used for lookup(s). + +``` js + nconf.remove('file'); +``` + +## Storage Engines + +### Memory +A simple in-memory storage engine that stores a nested JSON representation of the configuration. To use this engine, just call `.use()` with the appropriate arguments. All calls to `.get()`, `.set()`, `.clear()`, `.reset()` methods are synchronous since we are only dealing with an in-memory object. + +``` js + nconf.use('memory'); +``` + +### Argv +Responsible for loading the values parsed from `process.argv` by `optimist` into the configuration hierarchy. See the [optimist option docs](https://github.com/substack/node-optimist/#optionskey-opt) for more on the option format. + +``` js + // + // Can optionally also be an object literal to pass to `optimist`. + // + nconf.argv({ + "x": { + alias: 'example', + describe: 'Example description for usage generation', + demand: true, + default: 'some-value' + } + }); +``` + +### Env +Responsible for loading the values parsed from `process.env` into the configuration hierarchy. + +``` js + // + // Can optionally also be an Array of values to limit process.env to. + // + nconf.env(['only', 'load', 'these', 'values', 'from', 'process.env']); + + // + // Can also specify a separator for nested keys (instead of the default ':') + // + nconf.env('__'); + // Get the value of the env variable 'database__host' + var dbHost = nconf.get('database:host'); + + // + // Or use both options + // + nconf.env({ + separator: '__', + whitelist: ['database__host', 'only', 'load', 'these', 'values'] + }); + var dbHost = nconf.get('database:host'); +``` + +### Literal +Loads a given object literal into the configuration hierarchy. Both `nconf.defaults()` and `nconf.overrides()` use the Literal store. + +``` js + nconf.defaults({ + 'some': 'default value' + }); +``` + +### File +Based on the Memory store, but provides additional methods `.save()` and `.load()` which allow you to read your configuration to and from file. As with the Memory store, all method calls are synchronous with the exception of `.save()` and `.load()` which take callback functions. It is important to note that setting keys in the File engine will not be persisted to disk until a call to `.save()` is made. + +``` js + nconf.file('path/to/your/config.json'); + // add multiple files, hierarchically. notice the unique key for each file + nconf.file('user', 'path/to/your/user.json'); + nconf.file('global', 'path/to/your/global.json'); +``` + +The file store is also extensible for multiple file formats, defaulting to `JSON`. To use a custom format, simply pass a format object to the `.use()` method. This object must have `.parse()` and `.stringify()` methods just like the native `JSON` object. + +### Redis +There is a separate Redis-based store available through [nconf-redis][0]. To install and use this store simply: + +``` bash + $ npm install nconf + $ npm install nconf-redis +``` + +Once installing both `nconf` and `nconf-redis`, you must require both modules to use the Redis store: + +``` js + var nconf = require('nconf'); + + // + // Requiring `nconf-redis` will extend the `nconf` + // module. + // + require('nconf-redis'); + + nconf.use('redis', { host: 'localhost', port: 6379, ttl: 60 * 60 * 1000 }); +``` + +## Installation + +### Installing npm (node package manager) +``` + curl http://npmjs.org/install.sh | sh +``` + +### Installing nconf +``` + [sudo] npm install nconf +``` + +## More Documentation +There is more documentation available through docco. I haven't gotten around to making a gh-pages branch so in the meantime if you clone the repository you can view the docs: + +``` + open docs/nconf.html +``` + +## Run Tests +Tests are written in vows and give complete coverage of all APIs and storage engines. + +``` bash + $ npm test +``` + +#### Author: [Charlie Robbins](http://nodejitsu.com) +#### License: MIT + +[0]: http://github.com/indexzero/nconf-redis diff --git a/node_modules/nconf/docs/docco.css b/node_modules/nconf/docs/docco.css new file mode 100644 index 0000000..bd54134 --- /dev/null +++ b/node_modules/nconf/docs/docco.css @@ -0,0 +1,194 @@ +/*--------------------- Layout and Typography ----------------------------*/ +body { + font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; + font-size: 15px; + line-height: 22px; + color: #252519; + margin: 0; padding: 0; +} +a { + color: #261a3b; +} + a:visited { + color: #261a3b; + } +p { + margin: 0 0 15px 0; +} +h4, h5, h6 { + color: #333; + margin: 6px 0 6px 0; + font-size: 13px; +} + h2, h3 { + margin-bottom: 0; + color: #000; + } + h1 { + margin-top: 40px; + margin-bottom: 15px; + color: #000; + } +#container { + position: relative; +} +#background { + position: fixed; + top: 0; left: 525px; right: 0; bottom: 0; + background: #f5f5ff; + border-left: 1px solid #e5e5ee; + z-index: -1; +} +#jump_to, #jump_page { + background: white; + -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777; + -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; + font: 10px Arial; + text-transform: uppercase; + cursor: pointer; + text-align: right; +} +#jump_to, #jump_wrapper { + position: fixed; + right: 0; top: 0; + padding: 5px 10px; +} + #jump_wrapper { + padding: 0; + display: none; + } + #jump_to:hover #jump_wrapper { + display: block; + } + #jump_page { + padding: 5px 0 3px; + margin: 0 0 25px 25px; + } + #jump_page .source { + display: block; + padding: 5px 10px; + text-decoration: none; + border-top: 1px solid #eee; + } + #jump_page .source:hover { + background: #f5f5ff; + } + #jump_page .source:first-child { + } +table td { + border: 0; + outline: 0; +} + td.docs, th.docs { + max-width: 450px; + min-width: 450px; + min-height: 5px; + padding: 10px 25px 1px 50px; + overflow-x: hidden; + vertical-align: top; + text-align: left; + } + .docs pre { + margin: 15px 0 15px; + padding-left: 15px; + } + .docs p tt, .docs p code { + background: #f8f8ff; + border: 1px solid #dedede; + font-size: 12px; + padding: 0 0.2em; + } + .pilwrap { + position: relative; + } + .pilcrow { + font: 12px Arial; + text-decoration: none; + color: #454545; + position: absolute; + top: 3px; left: -20px; + padding: 1px 2px; + opacity: 0; + -webkit-transition: opacity 0.2s linear; + } + td.docs:hover .pilcrow { + opacity: 1; + } + td.code, th.code { + padding: 14px 15px 16px 25px; + width: 100%; + vertical-align: top; + background: #f5f5ff; + border-left: 1px solid #e5e5ee; + } + pre, tt, code { + font-size: 12px; line-height: 18px; + font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; + margin: 0; padding: 0; + } + + +/*---------------------- Syntax Highlighting -----------------------------*/ +td.linenos { background-color: #f0f0f0; padding-right: 10px; } +span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; } +body .hll { background-color: #ffffcc } +body .c { color: #408080; font-style: italic } /* Comment */ +body .err { border: 1px solid #FF0000 } /* Error */ +body .k { color: #954121 } /* Keyword */ +body .o { color: #666666 } /* Operator */ +body .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +body .cp { color: #BC7A00 } /* Comment.Preproc */ +body .c1 { color: #408080; font-style: italic } /* Comment.Single */ +body .cs { color: #408080; font-style: italic } /* Comment.Special */ +body .gd { color: #A00000 } /* Generic.Deleted */ +body .ge { font-style: italic } /* Generic.Emph */ +body .gr { color: #FF0000 } /* Generic.Error */ +body .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +body .gi { color: #00A000 } /* Generic.Inserted */ +body .go { color: #808080 } /* Generic.Output */ +body .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +body .gs { font-weight: bold } /* Generic.Strong */ +body .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +body .gt { color: #0040D0 } /* Generic.Traceback */ +body .kc { color: #954121 } /* Keyword.Constant */ +body .kd { color: #954121; font-weight: bold } /* Keyword.Declaration */ +body .kn { color: #954121; font-weight: bold } /* Keyword.Namespace */ +body .kp { color: #954121 } /* Keyword.Pseudo */ +body .kr { color: #954121; font-weight: bold } /* Keyword.Reserved */ +body .kt { color: #B00040 } /* Keyword.Type */ +body .m { color: #666666 } /* Literal.Number */ +body .s { color: #219161 } /* Literal.String */ +body .na { color: #7D9029 } /* Name.Attribute */ +body .nb { color: #954121 } /* Name.Builtin */ +body .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +body .no { color: #880000 } /* Name.Constant */ +body .nd { color: #AA22FF } /* Name.Decorator */ +body .ni { color: #999999; font-weight: bold } /* Name.Entity */ +body .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +body .nf { color: #0000FF } /* Name.Function */ +body .nl { color: #A0A000 } /* Name.Label */ +body .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +body .nt { color: #954121; font-weight: bold } /* Name.Tag */ +body .nv { color: #19469D } /* Name.Variable */ +body .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +body .w { color: #bbbbbb } /* Text.Whitespace */ +body .mf { color: #666666 } /* Literal.Number.Float */ +body .mh { color: #666666 } /* Literal.Number.Hex */ +body .mi { color: #666666 } /* Literal.Number.Integer */ +body .mo { color: #666666 } /* Literal.Number.Oct */ +body .sb { color: #219161 } /* Literal.String.Backtick */ +body .sc { color: #219161 } /* Literal.String.Char */ +body .sd { color: #219161; font-style: italic } /* Literal.String.Doc */ +body .s2 { color: #219161 } /* Literal.String.Double */ +body .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +body .sh { color: #219161 } /* Literal.String.Heredoc */ +body .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +body .sx { color: #954121 } /* Literal.String.Other */ +body .sr { color: #BB6688 } /* Literal.String.Regex */ +body .s1 { color: #219161 } /* Literal.String.Single */ +body .ss { color: #19469D } /* Literal.String.Symbol */ +body .bp { color: #954121 } /* Name.Builtin.Pseudo */ +body .vc { color: #19469D } /* Name.Variable.Class */ +body .vg { color: #19469D } /* Name.Variable.Global */ +body .vi { color: #19469D } /* Name.Variable.Instance */ +body .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/node_modules/nconf/docs/nconf.html b/node_modules/nconf/docs/nconf.html new file mode 100644 index 0000000..cb9a1f9 --- /dev/null +++ b/node_modules/nconf/docs/nconf.html @@ -0,0 +1,20 @@ + nconf.js \ No newline at end of file diff --git a/node_modules/nconf/docs/nconf/common.html b/node_modules/nconf/docs/nconf/common.html new file mode 100644 index 0000000..5c359ce --- /dev/null +++ b/node_modules/nconf/docs/nconf/common.html @@ -0,0 +1,85 @@ + common.js

common.js

/*
+ * utils.js: Utility functions for the nconf module.
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+ 
+var fs = require('fs'),
+    async = require('async'),
+    formats = require('./formats'),
+    Memory = require('./stores/Memory').Memory;
+
+var common = exports;

function path (key)

+ +

@key {string} The ':' delimited key to split

+ +

Returns a fully-qualified path to a nested nconf key.

common.path = function (key) {
+  return key.split(':');
+};

function key (arguments)

+ +

Returns a : joined string from the arguments.

common.key = function () {
+  return Array.prototype.slice.call(arguments).join(':');
+};

function loadFiles (files, callback)

+ +

@files {Object|Array} List of files (or settings object) to load.

+ +

@callback {function} Continuation to respond to when complete.

+ +

Loads all the data in the specified files.

common.loadFiles = function (files, callback) {
+  if (!files) {
+    return callback(null, {});
+  }
+
+  var options = Array.isArray(files) ? { files: files } : files;

Set the default JSON format if not already +specified

  options.format = options.format || formats.json;
+
+  function parseFile (file, next) {
+    fs.readFile(file, function (err, data) {
+      return !err 
+        ? next(null, options.format.parse(data.toString()))
+        : next(err);
+    });
+  }
+
+  async.map(files, parseFile, function (err, objs) {
+    return err ? callback(err) : callback(null, common.merge(objs));
+  });
+};

function loadFilesSync (files)

+ +

@files {Object|Array} List of files (or settings object) to load.

+ +

Loads all the data in the specified files synchronously.

common.loadFilesSync = function (files) {
+  if (!files) {
+    return;
+  }

Set the default JSON format if not already +specified

  var options = Array.isArray(files) ? { files: files } : files;
+  options.format = options.format || formats.json;
+
+  return common.merge(files.map(function (file) {
+    return options.format.parse(fs.readFileSync(file, 'utf8'));
+  }));
+};

function merge (objs)

+ +

@objs {Array} Array of object literals to merge

+ +

Merges the specified objs using a temporary instance +of stores.Memory.

common.merge = function (objs) {
+  var store = new Memory();
+  
+  objs.forEach(function (obj) {
+    Object.keys(obj).forEach(function (key) {
+      store.merge(key, obj[key]);
+    });
+  });
+  
+  return store.store;
+};

function capitalize (str)

+ +

@str {string} String to capitalize

+ +

Capitalizes the specified str.

common.capitalize = function (str) {
+  return str && str[0].toUpperCase() + str.slice(1);
+};
+
+
\ No newline at end of file diff --git a/node_modules/nconf/docs/nconf/formats.html b/node_modules/nconf/docs/nconf/formats.html new file mode 100644 index 0000000..a2ab2f5 --- /dev/null +++ b/node_modules/nconf/docs/nconf/formats.html @@ -0,0 +1,22 @@ + formats.js

formats.js

/*
+ * formats.js: Default formats supported by nconf
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var ini = require('ini');
+
+var formats = exports;

@json

+ +

Standard JSON format which pretty prints .stringify().

formats.json = {
+  stringify: function (obj) {
+    return JSON.stringify(obj, null, 2)
+  },
+  parse: JSON.parse
+};

@ini

+ +

Standard INI format supplied from the ini module +http://en.wikipedia.org/wiki/INI_file

formats.ini = ini;
+
+
\ No newline at end of file diff --git a/node_modules/nconf/docs/nconf/provider.html b/node_modules/nconf/docs/nconf/provider.html new file mode 100644 index 0000000..66c6718 --- /dev/null +++ b/node_modules/nconf/docs/nconf/provider.html @@ -0,0 +1,378 @@ + provider.js

provider.js

/*
+ * provider.js: Abstraction providing an interface into pluggable configuration storage.
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var async = require('async'),
+    common = require('./common'),
+    stores = require('./stores');

function Provider (options)

+ +

@options {Object} Options for this instance.

+ +

Constructor function for the Provider object responsible +for exposing the pluggable storage features of nconf.

var Provider = exports.Provider = function (options) {
+  var self = this;  
+  

Setup default options for working with stores, +overrides, process.env and process.argv.

  options         = options           || {};
+  this._overrides = options.overrides || null;
+  this._argv      = options.argv      || false;
+  this._env       = options.env       || false;
+  this._reserved  = Object.keys(Provider.prototype);
+  this._stores    = [];
+  

Add the default system store for working with +overrides, process.env, process.argv and +a simple in-memory objects.

  this.add('system', options);
+  
+  if (options.type) {
+    this.add(options.type, options);
+  }
+  else if (options.store) {
+    this.add(options.store.name || options.store.type, options.store);
+  }
+  else if (options.stores) {
+    Object.keys(options.stores).forEach(function (store) {
+      self.add(store.name || store.type, store);
+    });
+  }
+};

function use (name, options)

+ +

@type {string} Type of the nconf store to use.

+ +

@options {Object} Options for the store instance.

+ +

Adds (or replaces) a new store with the specified name +and options. If options.type is not set, then name +will be used instead:

+ +

provider.use('file'); + provider.use('file', { type: 'file', filename: '/path/to/userconf' })

Provider.prototype.use = function (name, options) {
+  if (name === 'system') {
+    return;
+  }
+  else if (this._reserved.indexOf(name) !== -1) {
+    throw new Error('Cannot use reserved name: ' + name);
+  }
+  
+  options  = options      || {};
+  var type = options.type || name;
+
+  function sameOptions (store) {
+    return Object.keys(options).every(function (key) {
+      return options[key] === store[key];
+    });
+  }
+  
+  var store = this[name],
+      update = store && !sameOptions(store);
+  
+  if (!store || update) {
+    if (update) {
+      this.remove(name);
+    }
+    
+    this.add(name, options);
+  }
+  
+  return this;
+};

function add (name, options)

+ +

@name {string} Name of the store to add to this instance

+ +

@options {Object} Options for the store to create

+ +

Adds a new store with the specified name and options. If options.type +is not set, then name will be used instead:

+ +

provider.add('memory'); + provider.add('userconf', { type: 'file', filename: '/path/to/userconf' })

Provider.prototype.add = function (name, options) {
+  if (this._reserved.indexOf(name) !== -1) {
+    throw new Error('Cannot use reserved name: ' + name);
+  }
+  
+  options  = options      || {};
+  var type = options.type || name;
+  
+  if (Object.keys(stores).indexOf(common.capitalize(type)) === -1) {
+    throw new Error('Cannot add store with unknown type: ' + type);
+  }
+  
+  this[name] = this.create(type, options);
+  this._stores.push(name);
+  
+  if (this[name].loadSync) {
+    this[name].loadSync();
+  }
+};

function remove (name)

+ +

@name {string} Name of the store to remove from this instance

+ +

Removes a store with the specified name from this instance. Users +are allowed to pass in a type argument (e.g. memory) as name if +this was used in the call to .add().

Provider.prototype.remove = function (name) {
+  if (this._reserved.indexOf(name) !== -1) {
+    throw new Error('Cannot use reserved name: ' + name);
+  }
+  else if (!this[name]) {
+    throw new Error('Cannot remove store that does not exist: ' + name);
+  }
+  
+  delete this[name];
+  this._stores.splice(this._stores.indexOf(name), 1);
+};

function create (type, options)

+ +

@type {string} Type of the nconf store to use.

+ +

@options {Object} Options for the store instance.

+ +

Creates a store of the specified type using the +specified options.

Provider.prototype.create = function (type, options) {
+  return new stores[common.capitalize(type.toLowerCase())](options);
+};

function get (key, callback)

+ +

@key {string} Key to retrieve for this instance.

+ +

@callback {function} Optional Continuation to respond to when complete.

+ +

Retrieves the value for the specified key (if any).

Provider.prototype.get = function (key, callback) {

If there is no callback we can short-circuit into the default +logic for traversing stores.

  if (!callback) {
+    return this._execute('get', 1, key, callback);
+  }
+  

Otherwise the asynchronous, hierarchical get is +slightly more complicated because we do not need to traverse +the entire set of stores, but up until there is a defined value.

  var current = 0,
+      self = this,
+      response;
+      
+  async.whilst(function () {
+    return typeof response === 'undefined' && current < self._stores.length;
+  }, function (next) {
+    var store = self[self._stores[current]];
+    current++;
+    
+    if (store.get.length >= 2) {
+      return store.get(key, function (err, value) {
+        if (err) {
+          return next(err);
+        }
+        
+        response = value;
+        next();
+      });
+    }
+    
+    response = store.get(key);
+    next();
+  }, function (err) {
+    return err ? callback(err) : callback(null, response);
+  });
+};

function set (key, value, callback)

+ +

@key {string} Key to set in this instance

+ +

@value {literal|Object} Value for the specified key

+ +

@callback {function} Optional Continuation to respond to when complete.

+ +

Sets the value for the specified key in this instance.

Provider.prototype.set = function (key, value, callback) {
+  return this._execute('set', 2, key, value, callback);
+};

function reset (callback)

+ +

@callback {function} Optional Continuation to respond to when complete.

+ +

Clears all keys associated with this instance.

Provider.prototype.reset = function (callback) {
+  return this._execute('reset', 0, callback);  
+};

function clear (key, callback)

+ +

@key {string} Key to remove from this instance

+ +

@callback {function} Optional Continuation to respond to when complete.

+ +

Removes the value for the specified key from this instance.

Provider.prototype.clear = function (key, callback) {
+  return this._execute('clear', 1, key, callback);
+};

function merge ([key,] value [, callback])

+ +

@key {string} Key to merge the value into

+ +

@value {literal|Object} Value to merge into the key

+ +

@callback {function} Optional Continuation to respond to when complete.

+ +

Merges the properties in value into the existing object value at key.

+ +
    +
  1. If the existing value key is not an Object, it will be completely overwritten.
  2. +
  3. If key is not supplied, then the value will be merged into the root.
  4. +
Provider.prototype.merge = function () {
+  var self = this,
+      args = Array.prototype.slice.call(arguments),
+      callback = typeof args[args.length - 1] === 'function' && args.pop(),
+      value = args.pop(),
+      key = args.pop();
+      
+  function mergeProperty (prop, next) {
+    return self._execute('merge', 2, prop, value[prop], next);
+  }
+      
+  if (!key) {
+    if (Array.isArray(value) || typeof value !== 'object') {
+      return onError(new Error('Cannot merge non-Object into top-level.'), callback);
+    }
+    
+    return async.forEach(Object.keys(value), mergeProperty, callback || function () { })
+  }
+  
+  return this._execute('merge', 2, key, value, callback);
+};

function load (callback)

+ +

@callback {function} Continuation to respond to when complete.

+ +

Responds with an Object representing all keys associated in this instance.

Provider.prototype.load = function (callback) {
+  var self = this;
+  
+  function loadStoreSync(name) {
+    var store = self[name];
+    
+    if (!store.loadSync) {
+      throw new Error('nconf store ' + store.type + ' has no loadSync() method');
+    }
+    
+    return store.loadSync();
+  }
+  
+  function loadStore(name, next) {
+    var store = self[name];
+    
+    if (!store.load && !store.loadSync) {
+      return next(new Error('nconf store ' + store.type + ' has no load() method'));
+    }
+    
+    return store.loadSync
+      ? next(null, store.loadSync())
+      : store.load(next);
+  }
+  

If we don't have a callback and the current +store is capable of loading synchronously +then do so.

  if (!callback) {
+    return common.merge(this._stores.map(loadStoreSync));
+  }
+  
+  async.map(this._stores, loadStore, function (err, objs) {
+    return err ? callback(err) : callback(null, common.merge(objs));
+  });
+};

function save (value, callback)

+ +

@value {Object} Optional Config object to set for this instance

+ +

@callback {function} Continuation to respond to when complete.

+ +

Removes any existing configuration settings that may exist in this +instance and then adds all key-value pairs in value.

Provider.prototype.save = function (value, callback) {
+  if (!callback && typeof value === 'function') {
+    callback = value;
+    value = null;
+  }
+  
+  var self = this;
+  
+  function saveStoreSync(name) {
+    var store = self[name];
+    
+    if (!store.saveSync) {
+      throw new Error('nconf store ' + store.type + ' has no saveSync() method');
+    }
+    
+    return store.saveSync();
+  }
+  
+  function saveStore(name, next) {
+    var store = self[name];
+    
+    if (!store.save && !store.saveSync) {
+      return next(new Error('nconf store ' + store.type + ' has no save() method'));
+    }
+    
+    return store.saveSync
+      ? next(null, store.saveSync())
+      : store.save(next);
+  }
+  

If we don't have a callback and the current +store is capable of saving synchronously +then do so.

  if (!callback) {
+    return common.merge(this._stores.map(saveStoreSync));
+  }
+  
+  async.map(this._stores, saveStore, function (err, objs) {
+    return err ? callback(err) : callback();
+  });  
+};

@private function _execute (action, syncLength, [arguments])

+ +

@action {string} Action to execute on this.store.

+ +

@syncLength {number} Function length of the sync version.

+ +

@arguments {Array} Arguments array to apply to the action

+ +

Executes the specified action on all stores for this instance, ensuring a callback supplied +to a synchronous store function is still invoked.

Provider.prototype._execute = function (action, syncLength /* [arguments] */) {
+  var args = Array.prototype.slice.call(arguments, 2),
+      callback = typeof args[args.length - 1] === 'function' && args.pop(),
+      self = this,
+      response;
+  
+  function runAction (name, next) {
+    var store = self[name]
+    
+    return store[action].length > syncLength
+      ? store[action].apply(store, args.concat(next))
+      : next(null, store[action].apply(store, args));
+  }
+  
+  if (callback) {
+    return async.forEach(self._stores, runAction, function (err) {
+      return err ? callback(err) : callback();
+    });
+  }
+
+  this._stores.forEach(function (name) {
+    var store = self[name];
+    response = store[action].apply(store, args);
+  });
+    
+  return response;
+}

@argv {boolean}

+ +

Gets or sets a property representing overrides which supercede all +other values for this instance.

Provider.prototype.__defineSetter__('overrides', function (val) { updateSystem.call(this, 'overrides', val) });
+Provider.prototype.__defineGetter__('overrides', function () { return this._argv });

@argv {boolean}

+ +

Gets or sets a property indicating if we should wrap calls to .get +by checking optimist.argv. Can be a boolean or the pass-thru +options for optimist.

Provider.prototype.__defineSetter__('argv', function (val) { updateSystem.call(this, 'argv', val) });
+Provider.prototype.__defineGetter__('argv', function () { return this._argv });

@env {boolean}

+ +

Gets or sets a property indicating if we should wrap calls to .get +by checking process.env. Can be a boolean or an Array of +environment variables to extract.

Provider.prototype.__defineSetter__('env', function (val) { updateSystem.call(this, 'env', val) });
+Provider.prototype.__defineGetter__('env', function () { return this._env });

Throw the err if a callback is not supplied

function onError(err, callback) {
+  if (callback) {
+    return callback(err);
+  }
+  
+  throw err;
+}

Helper function for working with the +default system store for providers.

function updateSystem(prop, value) {
+  var system = this['system'];
+  
+  if (system[prop] === value) {
+    return;
+  }
+  
+  value = value || false;
+  this['_' + prop] = value;
+  system[prop] = value;
+  system.loadSync();
+}
+
+
\ No newline at end of file diff --git a/node_modules/nconf/docs/nconf/stores.html b/node_modules/nconf/docs/nconf/stores.html new file mode 100644 index 0000000..d799966 --- /dev/null +++ b/node_modules/nconf/docs/nconf/stores.html @@ -0,0 +1,19 @@ + stores.js

stores.js

/*
+ * stores.js: Top-level include for all nconf stores
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+ 
+var fs = require('fs'),
+    common = require('./common'),
+    stores = exports;

Setup all stores as lazy-loaded getters.

fs.readdirSync(__dirname + '/stores').forEach(function (file) {
+  var store = file.replace('.js', ''),
+      name  = common.capitalize(store);
+      
+  stores.__defineGetter__(name, function () {
+    return require('./stores/' + store)[name];
+  });
+});
+
+
\ No newline at end of file diff --git a/node_modules/nconf/docs/nconf/stores/file.html b/node_modules/nconf/docs/nconf/stores/file.html new file mode 100644 index 0000000..7a00765 --- /dev/null +++ b/node_modules/nconf/docs/nconf/stores/file.html @@ -0,0 +1,170 @@ + file.js

file.js

/*
+ * file.js: Simple file storage engine for nconf files
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var fs = require('fs'),
+    path = require('path'),
+    util = require('util'),
+    formats = require('../formats'),
+    Memory = require('./memory').Memory;
+ 

function File (options)

+ +

@options {Object} Options for this instance

+ +

Constructor function for the File nconf store, a simple abstraction +around the Memory store that can persist configuration to disk.

var File = exports.File = function (options) {
+  if (!options || !options.file) {
+    throw new Error ('Missing required option `files`');
+  }
+
+  Memory.call(this, options);
+
+  this.type   = 'file';
+  this.file   = options.file;
+  this.dir    = options.dir    || process.cwd();
+  this.format = options.format || formats.json;
+};

Inherit from the Memory store

util.inherits(File, Memory);

function save (value, callback)

+ +

@value {Object} Ignored Left here for consistency

+ +

@callback {function} Continuation to respond to when complete.

+ +

Saves the current configuration object to disk at this.file +using the format specified by this.format.

File.prototype.save = function (value, callback) {
+  if (!callback) {
+    callback = value;
+    value = null;
+  }
+  
+  fs.writeFile(this.file, this.format.stringify(this.store), function (err) {
+    return err ? callback(err) : callback();
+  });
+};

function saveSync (value, callback)

+ +

@value {Object} Ignored Left here for consistency

+ +

@callback {function} Optional Continuation to respond to when complete.

+ +

Saves the current configuration object to disk at this.file +using the format specified by this.format synchronously.

File.prototype.saveSync = function (value) {
+  try {
+    fs.writeFileSync(this.file, this.format.stringify(this.store));
+  }
+  catch (ex) {
+    throw(ex);
+  }
+};

function load (callback)

+ +

@callback {function} Continuation to respond to when complete.

+ +

Responds with an Object representing all keys associated in this instance.

File.prototype.load = function (callback) {
+  var self = this;
+
+  path.exists(self.file, function (exists) {
+    if (!exists) {

If the path we are attempting to load doesn't exist, create it

      self.save({}, function (err) {
+        self.store = {};
+        return callback(err, self.store);
+      });
+    }
+    else {

Else, the path exists, read it from disk

      fs.readFile(self.file, function (err, data) {
+        if (err) {
+          return callback(err);
+        }
+        
+        try {
+          self.store = self.format.parse(data.toString());
+        }
+        catch (ex) {
+          return callback(new Error("Error parsing your JSON configuration file."));
+        }
+        
+        callback(null, self.store);
+      });
+    }
+  });
+};

function load (callback)

+ +

@callback {function} Optional Continuation to respond to when complete.

+ +

Attempts to load the data stored in this.file synchronously and responds appropriately.

File.prototype.loadSync = function () {
+  var data, self = this;
+
+  if (!path.existsSync(self.file)) {

If the path we are attempting to load doesn't exist, create it

    self.saveSync({});
+    self.store = {};
+    data = {};
+  }
+  else {

Else, the path exists, read it from disk

    try {
+      data = this.format.parse(fs.readFileSync(this.file, 'utf8'));
+      this.store = data;
+    }
+    catch (ex) {
+      throw new Error("Error parsing your JSON configuration file.")
+    }
+  }
+
+  return data;
+};

function search (base)

+ +

@base {string} Base directory (or file) to begin searching for the target file.

+ +

Attempts to find this.file by iteratively searching up the +directory structure

File.prototype.search = function (base) {
+  var looking = true,
+      fullpath,
+      previous,
+      stats;
+
+  base = base || process.cwd();
+
+  if (this.file[0] === '/') {

If filename for this instance is a fully qualified path +(i.e. it starts with a '/') then check if it exists

    try {
+      stats = fs.statSync(fs.realpathSync(this.file));
+      if (stats.isFile()) {
+        fullpath = this.file;
+        looking = false;
+      }
+    }
+    catch (ex) {

Ignore errors

    }
+  }
+
+  if (looking && base) {

Attempt to stat the realpath located at base +if the directory does not exist then return false.

    try {
+      var stat = fs.statSync(fs.realpathSync(base));
+      looking = stat.isDirectory();
+    }
+    catch (ex) {
+      return false;
+    }
+  }
+  
+  while (looking) {

Iteratively look up the directory structure from base

    try {
+      stats = fs.statSync(fs.realpathSync(fullpath = path.join(base, this.file)));
+      looking = stats.isDirectory();
+    }
+    catch (ex) {
+      previous = base;
+      base = path.dirname(base);
+
+      if (previous === base) {

If we've reached the top of the directory structure then simply use +the default file path.

        try {
+          stats = fs.statSync(fs.realpathSync(fullpath = path.join(this.dir, this.file)));
+          if (stats.isDirectory()) {
+            fullpath = undefined;
+          }
+        }
+        catch (ex) {

Ignore errors

        }
+        
+        looking = false;
+      }
+    }
+  }

Set the file for this instance to the fullpath +that we have found during the search. In the event that +the search was unsuccessful use the original value for this.file.

  this.file = fullpath || this.file;
+  
+  return fullpath;
+};
+
+
\ No newline at end of file diff --git a/node_modules/nconf/docs/nconf/stores/memory.html b/node_modules/nconf/docs/nconf/stores/memory.html new file mode 100644 index 0000000..8867394 --- /dev/null +++ b/node_modules/nconf/docs/nconf/stores/memory.html @@ -0,0 +1,143 @@ + memory.js

memory.js

/*
+ * memory.js: Simple memory storage engine for nconf configuration(s)
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var common = require('../common');

function Memory (options)

+ +

@options {Object} Options for this instance

+ +

Constructor function for the Memory nconf store which maintains +a nested json structure based on key delimiters :.

+ +

e.g. my:nested:key ==> { my: { nested: { key: } } }

var Memory = exports.Memory = function (options) {
+  options       = options || {};
+  this.type     = 'memory';
+  this.store    = {};
+  this.mtimes   = {};
+  this.readOnly = false;
+  this.loadFrom = options.loadFrom || null;
+  
+  if (this.loadFrom) {
+    this.store = common.loadFilesSync(this.loadFrom);
+  }
+};

function get (key)

+ +

@key {string} Key to retrieve for this instance.

+ +

Retrieves the value for the specified key (if any).

Memory.prototype.get = function (key) {
+  var target = this.store, 
+      path   = common.path(key);

Scope into the object to get the appropriate nested context

  while (path.length > 0) {
+    key = path.shift();
+    if (!(target && key in target)) {
+      return;
+    }
+    
+    target = target[key];
+    if (path.length === 0) {
+      return target;
+    }
+  }
+};

function set (key, value)

+ +

@key {string} Key to set in this instance

+ +

@value {literal|Object} Value for the specified key

+ +

Sets the value for the specified key in this instance.

Memory.prototype.set = function (key, value) {
+  if (this.readOnly) {
+    return false;
+  }
+  
+  var target = this.store, 
+      path   = common.path(key);
+  

Update the mtime (modified time) of the key

  this.mtimes[key] = Date.now();
+  

Scope into the object to get the appropriate nested context

  while (path.length > 1) {
+    key = path.shift();
+    if (!target[key] || typeof target[key] !== 'object') {
+      target[key] = {};
+    }
+    
+    target = target[key];
+  }
+  

Set the specified value in the nested JSON structure

  key = path.shift();
+  target[key] = value;
+  return true;
+};

function clear (key)

+ +

@key {string} Key to remove from this instance

+ +

Removes the value for the specified key from this instance.

Memory.prototype.clear = function (key) {
+  if (this.readOnly) {
+    return false;
+  }
+  
+  var target = this.store, 
+      path   = common.path(key);
+  

Remove the key from the set of mtimes (modified times)

  delete this.mtimes[key];
+  

Scope into the object to get the appropriate nested context

  while (path.length > 1) {
+    key = path.shift();
+    if (!target[key]) {
+      return;
+    }
+    
+    target = target[key];
+  }
+  

Delete the key from the nested JSON structure

  key = path.shift();
+  delete target[key];
+  return true;
+};

function merge (key, value)

+ +

@key {string} Key to merge the value into

+ +

@value {literal|Object} Value to merge into the key

+ +

Merges the properties in value into the existing object value +at key. If the existing value key is not an Object, it will be +completely overwritten.

Memory.prototype.merge = function (key, value) {
+  if (this.readOnly) {
+    return false;
+  }
+  

If the key is not an Object or is an Array, +then simply set it. Merging is for Objects.

  if (typeof value !== 'object' || Array.isArray(value)) {
+    return this.set(key, value);
+  }
+  
+  var self    = this,
+      target  = this.store, 
+      path    = common.path(key),
+      fullKey = key;
+  

Update the mtime (modified time) of the key

  this.mtimes[key] = Date.now();
+  

Scope into the object to get the appropriate nested context

  while (path.length > 1) {
+    key = path.shift();
+    if (!target[key]) {
+      target[key] = {};
+    }
+    
+    target = target[key];
+  }

Set the specified value in the nested JSON structure

  key = path.shift();
+  

If the current value at the key target is not an Object, +or is an Array then simply override it because the new value +is an Object.

  if (typeof target[key] !== 'object' || Array.isArray(target[key])) {
+    target[key] = value;
+    return true;
+  }
+  
+  return Object.keys(value).every(function (nested) {
+    return self.merge(fullKey + ':' + nested, value[nested]);
+  });
+};

function reset (callback)

+ +

Clears all keys associated with this instance.

Memory.prototype.reset = function () {
+  if (this.readOnly) {
+    return false;
+  }
+  
+  this.mtimes = {};
+  this.store  = {};
+  return true;
+};
+
+
\ No newline at end of file diff --git a/node_modules/nconf/docs/nconf/stores/system.html b/node_modules/nconf/docs/nconf/stores/system.html new file mode 100644 index 0000000..9e89544 --- /dev/null +++ b/node_modules/nconf/docs/nconf/stores/system.html @@ -0,0 +1,98 @@ + system.js

system.js

/*
+ * system.js: Simple memory-based store for process environment variables and
+ *            command-line arguments.
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+ 
+var util = require('util'),
+    Memory = require('./memory').Memory;
+ 

function System (options)

+ +

@options {Object} Options for this instance.

+ +

Constructor function for the System nconf store, a simple abstraction +around the Memory store that can read process environment variables +and command-line arguments.

var System = exports.System = function (options) {
+  options = options || {};
+  Memory.call(this, options);
+
+  this.type      = 'system';
+  this.overrides = options.overrides || null;
+  this.env       = options.env       || false;
+  this.argv      = options.argv      || false;
+};

Inherit from the Memory store

util.inherits(System, Memory);

function loadSync ()

+ +

Loads the data passed in from process.env into this instance.

System.prototype.loadSync = function () {
+  if (this.env) {
+    this.loadEnv();
+  }
+  
+  if (this.argv) {
+    this.loadArgv();
+  }
+  
+  if (this.overrides) {
+    this.loadOverrides();
+  }
+  
+  return this.store;
+};

function loadOverrides ()

+ +

Loads any overrides set on this instance into +the underlying managed Memory store.

System.prototype.loadOverrides = function () {
+  if (!this.overrides) {
+    return;
+  }
+  
+  var self = this,
+      keys = Object.keys(this.overrides);
+  
+  keys.forEach(function (key) {
+    self.set(key, self.overrides[key]);
+  });
+  
+  return this.store;
+};

function loadArgv ()

+ +

Loads the data passed in from the command-line arguments +into this instance.

System.prototype.loadArgv = function () {
+  var self = this, 
+      argv;
+  
+  if (typeof this.argv === 'object') {
+    argv = require('optimist').options(this.argv).argv;
+  }
+  else if (this.argv) {
+    argv = require('optimist').argv;
+  }
+  
+  if (!argv) {
+    return;
+  }
+  
+  Object.keys(argv).forEach(function (key) {
+    self.set(key, argv[key]);
+  });
+  
+  return this.store;
+};

function loadEnv ()

+ +

Loads the data passed in from process.env into this instance.

System.prototype.loadEnv = function () {
+  var self = this;
+  
+  if (!this.env) {
+    return;
+  }
+  
+  Object.keys(process.env).filter(function (key) {
+    return !self.env.length || self.env.indexOf(key) !== -1;
+  }).forEach(function (key) {
+    self.set(key, process.env[key]);
+  });
+    
+  return this.store;
+};
+
+
\ No newline at end of file diff --git a/node_modules/nconf/lib/nconf.js b/node_modules/nconf/lib/nconf.js new file mode 100644 index 0000000..35271b3 --- /dev/null +++ b/node_modules/nconf/lib/nconf.js @@ -0,0 +1,40 @@ +/* + * nconf.js: Top-level include for the nconf module + * + * (C) 2011, Nodejitsu Inc. + * + */ + +var fs = require('fs'), + async = require('async'), + common = require('./nconf/common'), + Provider = require('./nconf/provider').Provider, + nconf = module.exports = new Provider(); + +// +// Expose the version from the package.json +// +nconf.version = require('../package.json').version; + +// +// Setup all stores as lazy-loaded getters. +// +fs.readdirSync(__dirname + '/nconf/stores').forEach(function (file) { + var store = file.replace('.js', ''), + name = common.capitalize(store); + + nconf.__defineGetter__(name, function () { + return require('./nconf/stores/' + store)[name]; + }); +}); + +// +// Expose the various components included with nconf +// +nconf.key = common.key; +nconf.path = common.path; +nconf.loadFiles = common.loadFiles; +nconf.loadFilesSync = common.loadFilesSync; +nconf.formats = require('./nconf/formats'); +nconf.Provider = Provider; + diff --git a/node_modules/nconf/lib/nconf/common.js b/node_modules/nconf/lib/nconf/common.js new file mode 100644 index 0000000..f7462f6 --- /dev/null +++ b/node_modules/nconf/lib/nconf/common.js @@ -0,0 +1,113 @@ +/* + * utils.js: Utility functions for the nconf module. + * + * (C) 2011, Nodejitsu Inc. + * + */ + +var fs = require('fs'), + async = require('async'), + formats = require('./formats'), + Memory = require('./stores/memory').Memory; + +var common = exports; + +// +// ### function path (key) +// #### @key {string} The ':' delimited key to split +// Returns a fully-qualified path to a nested nconf key. +// If given null or undefined it should return an empty path. +// '' should still be respected as a path. +// +common.path = function (key) { + return key == null ? [] : key.split(':'); +}; + +// +// ### function key (arguments) +// Returns a `:` joined string from the `arguments`. +// +common.key = function () { + return Array.prototype.slice.call(arguments).join(':'); +}; + +// +// ### function loadFiles (files, callback) +// #### @files {Object|Array} List of files (or settings object) to load. +// #### @callback {function} Continuation to respond to when complete. +// Loads all the data in the specified `files`. +// +common.loadFiles = function (files, callback) { + if (!files) { + return callback(null, {}); + } + + var options = Array.isArray(files) ? { files: files } : files; + + // + // Set the default JSON format if not already + // specified + // + options.format = options.format || formats.json; + + function parseFile (file, next) { + fs.readFile(file, function (err, data) { + return !err + ? next(null, options.format.parse(data.toString())) + : next(err); + }); + } + + async.map(options.files, parseFile, function (err, objs) { + return err ? callback(err) : callback(null, common.merge(objs)); + }); +}; + +// +// ### function loadFilesSync (files) +// #### @files {Object|Array} List of files (or settings object) to load. +// Loads all the data in the specified `files` synchronously. +// +common.loadFilesSync = function (files) { + if (!files) { + return; + } + + // + // Set the default JSON format if not already + // specified + // + var options = Array.isArray(files) ? { files: files } : files; + options.format = options.format || formats.json; + + return common.merge(options.files.map(function (file) { + return options.format.parse(fs.readFileSync(file, 'utf8')); + })); +}; + +// +// ### function merge (objs) +// #### @objs {Array} Array of object literals to merge +// Merges the specified `objs` using a temporary instance +// of `stores.Memory`. +// +common.merge = function (objs) { + var store = new Memory(); + + objs.forEach(function (obj) { + Object.keys(obj).forEach(function (key) { + store.merge(key, obj[key]); + }); + }); + + return store.store; +}; + +// +// ### function capitalize (str) +// #### @str {string} String to capitalize +// Capitalizes the specified `str`. +// +common.capitalize = function (str) { + return str && str[0].toUpperCase() + str.slice(1); +}; diff --git a/node_modules/nconf/lib/nconf/formats.js b/node_modules/nconf/lib/nconf/formats.js new file mode 100644 index 0000000..f32268c --- /dev/null +++ b/node_modules/nconf/lib/nconf/formats.js @@ -0,0 +1,28 @@ +/* + * formats.js: Default formats supported by nconf + * + * (C) 2011, Nodejitsu Inc. + * + */ + +var ini = require('ini'); + +var formats = exports; + +// +// ### @json +// Standard JSON format which pretty prints `.stringify()`. +// +formats.json = { + stringify: function (obj, replacer, spacing) { + return JSON.stringify(obj, replacer || null, spacing || 2) + }, + parse: JSON.parse +}; + +// +// ### @ini +// Standard INI format supplied from the `ini` module +// http://en.wikipedia.org/wiki/INI_file +// +formats.ini = ini; diff --git a/node_modules/nconf/lib/nconf/provider.js b/node_modules/nconf/lib/nconf/provider.js new file mode 100644 index 0000000..413df5f --- /dev/null +++ b/node_modules/nconf/lib/nconf/provider.js @@ -0,0 +1,565 @@ +/* + * provider.js: Abstraction providing an interface into pluggable configuration storage. + * + * (C) 2011, Nodejitsu Inc. + * + */ + +var async = require('async'), + common = require('./common'); + +// +// ### function Provider (options) +// #### @options {Object} Options for this instance. +// Constructor function for the Provider object responsible +// for exposing the pluggable storage features of `nconf`. +// +var Provider = exports.Provider = function (options) { + // + // Setup default options for working with `stores`, + // `overrides`, `process.env` and `process.argv`. + // + options = options || {}; + this.stores = {}; + this.sources = []; + this.init(options); +}; + +// +// Define wrapper functions for using basic stores +// in this instance +// +['argv', 'env'].forEach(function (type) { + Provider.prototype[type] = function (options) { + return this.add(type, options); + }; +}); + +// +// ### function file (key, options) +// #### @key {string|Object} Fully qualified options, name of file store, or path. +// #### @path {string|Object} **Optional** Full qualified options, or path. +// Adds a new `File` store to this instance. Accepts the following options +// +// nconf.file({ file: '.jitsuconf', dir: process.env.HOME, search: true }); +// nconf.file('path/to/config/file'); +// nconf.file('userconfig', 'path/to/config/file'); +// nconf.file('userconfig', { file: '.jitsuconf', search: true }); +// +Provider.prototype.file = function (key, options) { + if (arguments.length == 1) { + options = typeof key === 'string' ? { file: key } : key; + key = 'file'; + } + else { + options = typeof options === 'string' + ? { file: options } + : options; + } + + options.type = 'file'; + return this.add(key, options); +}; + +// +// Define wrapper functions for using +// overrides and defaults +// +['defaults', 'overrides'].forEach(function (type) { + Provider.prototype[type] = function (options) { + options = options || {}; + if (!options.type) { + options.type = 'literal'; + } + + return this.add(type, options); + }; +}); + +// +// ### function use (name, options) +// #### @type {string} Type of the nconf store to use. +// #### @options {Object} Options for the store instance. +// Adds (or replaces) a new store with the specified `name` +// and `options`. If `options.type` is not set, then `name` +// will be used instead: +// +// provider.use('file'); +// provider.use('file', { type: 'file', filename: '/path/to/userconf' }) +// +Provider.prototype.use = function (name, options) { + options = options || {}; + var type = options.type || name; + + function sameOptions (store) { + return Object.keys(options).every(function (key) { + return options[key] === store[key]; + }); + } + + var store = this.stores[name], + update = store && !sameOptions(store); + + if (!store || update) { + if (update) { + this.remove(name); + } + + this.add(name, options); + } + + return this; +}; + +// +// ### function add (name, options) +// #### @name {string} Name of the store to add to this instance +// #### @options {Object} Options for the store to create +// Adds a new store with the specified `name` and `options`. If `options.type` +// is not set, then `name` will be used instead: +// +// provider.add('memory'); +// provider.add('userconf', { type: 'file', filename: '/path/to/userconf' }) +// +Provider.prototype.add = function (name, options) { + options = options || {}; + var type = options.type || name; + + if (!require('../nconf')[common.capitalize(type)]) { + throw new Error('Cannot add store with unknown type: ' + type); + } + + this.stores[name] = this.create(type, options); + + if (this.stores[name].loadSync) { + this.stores[name].loadSync(); + } + + return this; +}; + +// +// ### function remove (name) +// #### @name {string} Name of the store to remove from this instance +// Removes a store with the specified `name` from this instance. Users +// are allowed to pass in a type argument (e.g. `memory`) as name if +// this was used in the call to `.add()`. +// +Provider.prototype.remove = function (name) { + delete this.stores[name]; + return this; +}; + +// +// ### function create (type, options) +// #### @type {string} Type of the nconf store to use. +// #### @options {Object} Options for the store instance. +// Creates a store of the specified `type` using the +// specified `options`. +// +Provider.prototype.create = function (type, options) { + return new (require('../nconf')[common.capitalize(type.toLowerCase())])(options); +}; + +// +// ### function init (options) +// #### @options {Object} Options to initialize this instance with. +// Initializes this instance with additional `stores` or `sources` in the +// `options` supplied. +// +Provider.prototype.init = function (options) { + var self = this; + + // + // Add any stores passed in through the options + // to this instance. + // + if (options.type) { + this.add(options.type, options); + } + else if (options.store) { + this.add(options.store.name || options.store.type, options.store); + } + else if (options.stores) { + Object.keys(options.stores).forEach(function (name) { + var store = options.stores[name]; + self.add(store.name || name || store.type, store); + }); + } + + // + // Add any read-only sources to this instance + // + if (options.source) { + this.sources.push(this.create(options.source.type || options.source.name, options.source)); + } + else if (options.sources) { + Object.keys(options.sources).forEach(function (name) { + var source = options.sources[name]; + self.sources.push(self.create(source.type || source.name || name, source)); + }); + } +}; + +// +// ### function get (key, callback) +// #### @key {string} Key to retrieve for this instance. +// #### @callback {function} **Optional** Continuation to respond to when complete. +// Retrieves the value for the specified key (if any). +// +Provider.prototype.get = function (key, callback) { + // + // If there is no callback we can short-circuit into the default + // logic for traversing stores. + // + if (!callback) { + return this._execute('get', 1, key, callback); + } + + // + // Otherwise the asynchronous, hierarchical `get` is + // slightly more complicated because we do not need to traverse + // the entire set of stores, but up until there is a defined value. + // + var current = 0, + names = Object.keys(this.stores), + self = this, + response, + mergeObjs = []; + + async.whilst(function () { + return typeof response === 'undefined' && current < names.length; + }, function (next) { + var store = self.stores[names[current]]; + current++; + + if (store.get.length >= 2) { + return store.get(key, function (err, value) { + if (err) { + return next(err); + } + + response = value; + + // Merge objects if necessary + if (typeof response === 'object' && !Array.isArray(response)) { + mergeObjs.push(response); + response = undefined; + } + + next(); + }); + } + + response = store.get(key); + + // Merge objects if necessary + if (typeof response === 'object' && !Array.isArray(response)) { + mergeObjs.push(response); + response = undefined; + } + + next(); + }, function (err) { + if (!err && mergeObjs.length) { + response = common.merge(mergeObjs.reverse()); + } + return err ? callback(err) : callback(null, response); + }); +}; + +// +// ### function set (key, value, callback) +// #### @key {string} Key to set in this instance +// #### @value {literal|Object} Value for the specified key +// #### @callback {function} **Optional** Continuation to respond to when complete. +// Sets the `value` for the specified `key` in this instance. +// +Provider.prototype.set = function (key, value, callback) { + return this._execute('set', 2, key, value, callback); +}; + +// +// ### function reset (callback) +// #### @callback {function} **Optional** Continuation to respond to when complete. +// Clears all keys associated with this instance. +// +Provider.prototype.reset = function (callback) { + return this._execute('reset', 0, callback); +}; + +// +// ### function clear (key, callback) +// #### @key {string} Key to remove from this instance +// #### @callback {function} **Optional** Continuation to respond to when complete. +// Removes the value for the specified `key` from this instance. +// +Provider.prototype.clear = function (key, callback) { + return this._execute('clear', 1, key, callback); +}; + +// +// ### function merge ([key,] value [, callback]) +// #### @key {string} Key to merge the value into +// #### @value {literal|Object} Value to merge into the key +// #### @callback {function} **Optional** Continuation to respond to when complete. +// Merges the properties in `value` into the existing object value at `key`. +// +// 1. If the existing value `key` is not an Object, it will be completely overwritten. +// 2. If `key` is not supplied, then the `value` will be merged into the root. +// +Provider.prototype.merge = function () { + var self = this, + args = Array.prototype.slice.call(arguments), + callback = typeof args[args.length - 1] === 'function' && args.pop(), + value = args.pop(), + key = args.pop(); + + function mergeProperty (prop, next) { + return self._execute('merge', 2, prop, value[prop], next); + } + + if (!key) { + if (Array.isArray(value) || typeof value !== 'object') { + return onError(new Error('Cannot merge non-Object into top-level.'), callback); + } + + return async.forEach(Object.keys(value), mergeProperty, callback || function () { }) + } + + return this._execute('merge', 2, key, value, callback); +}; + +// +// ### function load (callback) +// #### @callback {function} Continuation to respond to when complete. +// Responds with an Object representing all keys associated in this instance. +// +Provider.prototype.load = function (callback) { + var self = this; + + function getStores () { + var stores = Object.keys(self.stores); + stores.reverse(); + return stores.map(function (name) { + return self.stores[name]; + }); + } + + function loadStoreSync(store) { + if (!store.loadSync) { + throw new Error('nconf store ' + store.type + ' has no loadSync() method'); + } + + return store.loadSync(); + } + + function loadStore(store, next) { + if (!store.load && !store.loadSync) { + return next(new Error('nconf store ' + store.type + ' has no load() method')); + } + + return store.loadSync + ? next(null, store.loadSync()) + : store.load(next); + } + + function loadBatch (targets, done) { + if (!done) { + return common.merge(targets.map(loadStoreSync)); + } + + async.map(targets, loadStore, function (err, objs) { + return err ? done(err) : done(null, common.merge(objs)); + }); + } + + function mergeSources (data) { + // + // If `data` was returned then merge it into + // the system store. + // + if (data && typeof data === 'object') { + self.use('sources', { + type: 'literal', + store: data + }); + } + } + + function loadSources () { + var sourceHierarchy = self.sources.splice(0); + sourceHierarchy.reverse(); + + // + // If we don't have a callback and the current + // store is capable of loading synchronously + // then do so. + // + if (!callback) { + mergeSources(loadBatch(sourceHierarchy)); + return loadBatch(getStores()); + } + + loadBatch(sourceHierarchy, function (err, data) { + if (err) { + return callback(err); + } + + mergeSources(data); + return loadBatch(getStores(), callback); + }); + } + + return self.sources.length + ? loadSources() + : loadBatch(getStores(), callback); +}; + +// +// ### function save (callback) +// #### @callback {function} **optional** Continuation to respond to when +// complete. +// Instructs each provider to save. If a callback is provided, we will attempt +// asynchronous saves on the providers, falling back to synchronous saves if +// this isn't possible. If a provider does not know how to save, it will be +// ignored. Returns an object consisting of all of the data which was +// actually saved. +// +Provider.prototype.save = function (value, callback) { + if (!callback && typeof value === 'function') { + callback = value; + value = null; + } + + var self = this, + names = Object.keys(this.stores); + + function saveStoreSync(memo, name) { + var store = self.stores[name]; + + // + // If the `store` doesn't have a `saveSync` method, + // just ignore it and continue. + // + if (store.saveSync) { + var ret = store.saveSync(); + if (typeof ret == 'object' && ret !== null) { + memo.push(ret); + } + } + return memo; + } + + function saveStore(memo, name, next) { + var store = self.stores[name]; + + // + // If the `store` doesn't have a `save` or saveSync` + // method(s), just ignore it and continue. + // + + if (store.save) { + return store.save(function (err, data) { + if (err) { + return next(err); + } + + if (typeof data == 'object' && data !== null) { + memo.push(data); + } + + next(null, memo); + }); + } + else if (store.saveSync) { + memo.push(store.saveSync()); + } + + next(null, memo); + } + + // + // If we don't have a callback and the current + // store is capable of saving synchronously + // then do so. + // + if (!callback) { + return common.merge(names.reduce(saveStoreSync, [])); + } + + async.reduce(names, [], saveStore, function (err, objs) { + return err ? callback(err) : callback(null, common.merge(objs)); + }); +}; + +// +// ### @private function _execute (action, syncLength, [arguments]) +// #### @action {string} Action to execute on `this.store`. +// #### @syncLength {number} Function length of the sync version. +// #### @arguments {Array} Arguments array to apply to the action +// Executes the specified `action` on all stores for this instance, ensuring a callback supplied +// to a synchronous store function is still invoked. +// +Provider.prototype._execute = function (action, syncLength /* [arguments] */) { + var args = Array.prototype.slice.call(arguments, 2), + callback = typeof args[args.length - 1] === 'function' && args.pop(), + destructive = ['set', 'clear', 'merge', 'reset'].indexOf(action) !== -1, + self = this, + response, + mergeObjs = []; + + function runAction (name, next) { + var store = self.stores[name]; + + if (destructive && store.readOnly) { + return next(); + } + + return store[action].length > syncLength + ? store[action].apply(store, args.concat(next)) + : next(null, store[action].apply(store, args)); + } + + if (callback) { + return async.forEach(Object.keys(this.stores), runAction, function (err) { + return err ? callback(err) : callback(); + }); + } + + + Object.keys(this.stores).forEach(function (name) { + if (typeof response === 'undefined') { + var store = self.stores[name]; + + if (destructive && store.readOnly) { + return; + } + + response = store[action].apply(store, args); + + // Merge objects if necessary + if (response && action === 'get' && typeof response === 'object' && !Array.isArray(response)) { + mergeObjs.push(response); + response = undefined; + } + } + }); + + if (mergeObjs.length) { + response = common.merge(mergeObjs.reverse()); + } + + return response; +} + +// +// Throw the `err` if a callback is not supplied +// +function onError(err, callback) { + if (callback) { + return callback(err); + } + + throw err; +} diff --git a/node_modules/nconf/lib/nconf/stores/argv.js b/node_modules/nconf/lib/nconf/stores/argv.js new file mode 100644 index 0000000..3841f7d --- /dev/null +++ b/node_modules/nconf/lib/nconf/stores/argv.js @@ -0,0 +1,61 @@ +/* + * argv.js: Simple memory-based store for command-line arguments. + * + * (C) 2011, Nodejitsu Inc. + * + */ + +var util = require('util'), + Memory = require('./memory').Memory; + +// +// ### function Argv (options) +// #### @options {Object} Options for this instance. +// Constructor function for the Argv nconf store, a simple abstraction +// around the Memory store that can read command-line arguments. +// +var Argv = exports.Argv = function (options) { + Memory.call(this, options); + + this.type = 'argv'; + this.readOnly = true; + this.options = options || false; +}; + +// Inherit from the Memory store +util.inherits(Argv, Memory); + +// +// ### function loadSync () +// Loads the data passed in from `process.argv` into this instance. +// +Argv.prototype.loadSync = function () { + this.loadArgv(); + return this.store; +}; + +// +// ### function loadArgv () +// Loads the data passed in from the command-line arguments +// into this instance. +// +Argv.prototype.loadArgv = function () { + var self = this, + argv; + + argv = typeof this.options === 'object' + ? require('optimist')(process.argv.slice(2)).options(this.options).argv + : require('optimist')(process.argv.slice(2)).argv; + + if (!argv) { + return; + } + + this.readOnly = false; + Object.keys(argv).forEach(function (key) { + self.set(key, argv[key]); + }); + + this.readOnly = true; + return this.store; +}; \ No newline at end of file diff --git a/node_modules/nconf/lib/nconf/stores/env.js b/node_modules/nconf/lib/nconf/stores/env.js new file mode 100644 index 0000000..e73026e --- /dev/null +++ b/node_modules/nconf/lib/nconf/stores/env.js @@ -0,0 +1,67 @@ +/* + * env.js: Simple memory-based store for environment variables + * + * (C) 2011, Nodejitsu Inc. + * + */ + +var util = require('util'), + common = require('../common'), + Memory = require('./memory').Memory; + +// +// ### function Env (options) +// #### @options {Object} Options for this instance. +// Constructor function for the Env nconf store, a simple abstraction +// around the Memory store that can read process environment variables. +// +var Env = exports.Env = function (options) { + Memory.call(this, options); + + options = options || {}; + this.type = 'env'; + this.readOnly = true; + this.whitelist = options.whitelist || []; + this.separator = options.separator || ''; + if (options instanceof Array) { + this.whitelist = options; + } + if (typeof(options) === 'string') { + this.separator = options; + } +}; + +// Inherit from the Memory store +util.inherits(Env, Memory); + +// +// ### function loadSync () +// Loads the data passed in from `process.env` into this instance. +// +Env.prototype.loadSync = function () { + this.loadEnv(); + return this.store; +}; + +// +// ### function loadEnv () +// Loads the data passed in from `process.env` into this instance. +// +Env.prototype.loadEnv = function () { + var self = this; + + this.readOnly = false; + Object.keys(process.env).filter(function (key) { + return !self.whitelist.length || self.whitelist.indexOf(key) !== -1; + }).forEach(function (key) { + if (self.separator) { + self.set(common.key.apply(common, key.split(self.separator)), process.env[key]); + } else { + self.set(key, process.env[key]); + } + }); + + this.readOnly = true; + return this.store; +}; + diff --git a/node_modules/nconf/lib/nconf/stores/file.js b/node_modules/nconf/lib/nconf/stores/file.js new file mode 100644 index 0000000..6c1a56f --- /dev/null +++ b/node_modules/nconf/lib/nconf/stores/file.js @@ -0,0 +1,237 @@ +/* + * file.js: Simple file storage engine for nconf files + * + * (C) 2011, Nodejitsu Inc. + * + */ + +var fs = require('fs'), + path = require('path'), + util = require('util'), + formats = require('../formats'), + Memory = require('./memory').Memory, + exists = fs.exists || path.exists, + existsSync = fs.existsSync || path.existsSync; + +// +// ### function File (options) +// #### @options {Object} Options for this instance +// Constructor function for the File nconf store, a simple abstraction +// around the Memory store that can persist configuration to disk. +// +var File = exports.File = function (options) { + if (!options || !options.file) { + throw new Error ('Missing required option `file`'); + } + + Memory.call(this, options); + + this.type = 'file'; + this.file = options.file; + this.dir = options.dir || process.cwd(); + this.format = options.format || formats.json; + this.json_spacing = options.json_spacing || 2; + + if (options.search) { + this.search(this.dir); + } +}; + +// Inherit from the Memory store +util.inherits(File, Memory); + +// +// ### function save (value, callback) +// #### @value {Object} _Ignored_ Left here for consistency +// #### @callback {function} Continuation to respond to when complete. +// Saves the current configuration object to disk at `this.file` +// using the format specified by `this.format`. +// +File.prototype.save = function (value, callback) { + if (!callback) { + callback = value; + value = null; + } + + fs.writeFile(this.file, this.format.stringify(this.store, null, this.json_spacing), function (err) { + return err ? callback(err) : callback(); + }); +}; + +// +// ### function saveSync (value, callback) +// #### @value {Object} _Ignored_ Left here for consistency +// #### @callback {function} **Optional** Continuation to respond to when complete. +// Saves the current configuration object to disk at `this.file` +// using the format specified by `this.format` synchronously. +// +File.prototype.saveSync = function (value) { + try { + fs.writeFileSync(this.file, this.format.stringify(this.store, null, this.json_spacing)); + } + catch (ex) { + throw(ex); + } + return this.store; +}; + +// +// ### function load (callback) +// #### @callback {function} Continuation to respond to when complete. +// Responds with an Object representing all keys associated in this instance. +// +File.prototype.load = function (callback) { + var self = this; + + exists(self.file, function (exists) { + if (!exists) { + return callback(null, {}); + } + + // + // Else, the path exists, read it from disk + // + fs.readFile(self.file, function (err, data) { + if (err) { + return callback(err); + } + + try { + //deals with string that include BOM + var stringData = data.toString(); + + if (stringData.charAt(0) === '\uFEFF') stringData = stringData.substr(1); + self.store = self.format.parse(stringData); + + } + catch (ex) { + return callback(new Error("Error parsing your JSON configuration file: [" + self.file + '].')); + } + + callback(null, self.store); + }); + }); +}; + +// +// ### function loadSync (callback) +// Attempts to load the data stored in `this.file` synchronously +// and responds appropriately. +// +File.prototype.loadSync = function () { + var data, self = this; + + if (!existsSync(self.file)) { + self.store = {}; + data = {}; + } + else { + // + // Else, the path exists, read it from disk + // + try { + //deals with file that include BOM + var fileData = fs.readFileSync(this.file, 'utf8'); + if (fileData.charAt(0) === '\uFEFF') fileData = fileData.substr(1); + + data = this.format.parse(fileData); + this.store = data; + } + catch (ex) { + throw new Error("Error parsing your JSON configuration file: [" + self.file + '].'); + } + } + + return data; +}; + +// +// ### function search (base) +// #### @base {string} Base directory (or file) to begin searching for the target file. +// Attempts to find `this.file` by iteratively searching up the +// directory structure +// +File.prototype.search = function (base) { + var looking = true, + fullpath, + previous, + stats; + + base = base || process.cwd(); + + if (this.file[0] === '/') { + // + // If filename for this instance is a fully qualified path + // (i.e. it starts with a `'/'`) then check if it exists + // + try { + stats = fs.statSync(fs.realpathSync(this.file)); + if (stats.isFile()) { + fullpath = this.file; + looking = false; + } + } + catch (ex) { + // + // Ignore errors + // + } + } + + if (looking && base) { + // + // Attempt to stat the realpath located at `base` + // if the directory does not exist then return false. + // + try { + var stat = fs.statSync(fs.realpathSync(base)); + looking = stat.isDirectory(); + } + catch (ex) { + return false; + } + } + + while (looking) { + // + // Iteratively look up the directory structure from `base` + // + try { + stats = fs.statSync(fs.realpathSync(fullpath = path.join(base, this.file))); + looking = stats.isDirectory(); + } + catch (ex) { + previous = base; + base = path.dirname(base); + + if (previous === base) { + // + // If we've reached the top of the directory structure then simply use + // the default file path. + // + try { + stats = fs.statSync(fs.realpathSync(fullpath = path.join(this.dir, this.file))); + if (stats.isDirectory()) { + fullpath = undefined; + } + } + catch (ex) { + // + // Ignore errors + // + } + + looking = false; + } + } + } + + // + // Set the file for this instance to the fullpath + // that we have found during the search. In the event that + // the search was unsuccessful use the original value for `this.file`. + // + this.file = fullpath || this.file; + + return fullpath; +}; diff --git a/node_modules/nconf/lib/nconf/stores/literal.js b/node_modules/nconf/lib/nconf/stores/literal.js new file mode 100644 index 0000000..c7c1752 --- /dev/null +++ b/node_modules/nconf/lib/nconf/stores/literal.js @@ -0,0 +1,29 @@ +/* + * literal.js: Simple literal Object store for nconf. + * + * (C) 2011, Nodejitsu Inc. + * + */ + +var util = require('util'), + Memory = require('./memory').Memory + +var Literal = exports.Literal = function Literal (options) { + Memory.call(this, options); + + options = options || {} + this.type = 'literal'; + this.readOnly = true; + this.store = options.store || options; +}; + +// Inherit from Memory store. +util.inherits(Literal, Memory); + +// +// ### function loadSync (callback) +// Returns the data stored in `this.store` synchronously. +// +Literal.prototype.loadSync = function () { + return this.store; +}; \ No newline at end of file diff --git a/node_modules/nconf/lib/nconf/stores/memory.js b/node_modules/nconf/lib/nconf/stores/memory.js new file mode 100644 index 0000000..c6553c1 --- /dev/null +++ b/node_modules/nconf/lib/nconf/stores/memory.js @@ -0,0 +1,224 @@ +/* + * memory.js: Simple memory storage engine for nconf configuration(s) + * + * (C) 2011, Nodejitsu Inc. + * + */ + +var common = require('../common'); + +// +// ### function Memory (options) +// #### @options {Object} Options for this instance +// Constructor function for the Memory nconf store which maintains +// a nested json structure based on key delimiters `:`. +// +// e.g. `my:nested:key` ==> `{ my: { nested: { key: } } }` +// +var Memory = exports.Memory = function (options) { + options = options || {}; + this.type = 'memory'; + this.store = {}; + this.mtimes = {}; + this.readOnly = false; + this.loadFrom = options.loadFrom || null; + + if (this.loadFrom) { + this.store = common.loadFilesSync(this.loadFrom); + } +}; + +// +// ### function get (key) +// #### @key {string} Key to retrieve for this instance. +// Retrieves the value for the specified key (if any). +// +Memory.prototype.get = function (key) { + var target = this.store, + path = common.path(key); + + // + // Scope into the object to get the appropriate nested context + // + while (path.length > 0) { + key = path.shift(); + if (target && target.hasOwnProperty(key)) { + target = target[key]; + continue; + } + return undefined; + } + + return target; +}; + +// +// ### function set (key, value) +// #### @key {string} Key to set in this instance +// #### @value {literal|Object} Value for the specified key +// Sets the `value` for the specified `key` in this instance. +// +Memory.prototype.set = function (key, value) { + if (this.readOnly) { + return false; + } + + var target = this.store, + path = common.path(key); + + if (path.length === 0) { + // + // Root must be an object + // + if (!value || typeof value !== 'object') { + return false; + } + else { + this.reset(); + this.store = value; + return true; + } + } + + // + // Update the `mtime` (modified time) of the key + // + this.mtimes[key] = Date.now(); + + // + // Scope into the object to get the appropriate nested context + // + while (path.length > 1) { + key = path.shift(); + if (!target[key] || typeof target[key] !== 'object') { + target[key] = {}; + } + + target = target[key]; + } + + // Set the specified value in the nested JSON structure + key = path.shift(); + target[key] = value; + return true; +}; + +// +// ### function clear (key) +// #### @key {string} Key to remove from this instance +// Removes the value for the specified `key` from this instance. +// +Memory.prototype.clear = function (key) { + if (this.readOnly) { + return false; + } + + var target = this.store, + value = target, + path = common.path(key); + + // + // Remove the key from the set of `mtimes` (modified times) + // + delete this.mtimes[key]; + + // + // Scope into the object to get the appropriate nested context + // + for (var i = 0; i < path.length - 1; i++) { + key = path[i]; + value = target[key]; + if (typeof value !== 'function' && typeof value !== 'object') { + return false; + } + target = value; + } + + // Delete the key from the nested JSON structure + key = path[i]; + delete target[key]; + return true; +}; + +// +// ### function merge (key, value) +// #### @key {string} Key to merge the value into +// #### @value {literal|Object} Value to merge into the key +// Merges the properties in `value` into the existing object value +// at `key`. If the existing value `key` is not an Object, it will be +// completely overwritten. +// +Memory.prototype.merge = function (key, value) { + if (this.readOnly) { + return false; + } + + // + // If the key is not an `Object` or is an `Array`, + // then simply set it. Merging is for Objects. + // + if (typeof value !== 'object' || Array.isArray(value) || value === null) { + return this.set(key, value); + } + + var self = this, + target = this.store, + path = common.path(key), + fullKey = key; + + // + // Update the `mtime` (modified time) of the key + // + this.mtimes[key] = Date.now(); + + // + // Scope into the object to get the appropriate nested context + // + while (path.length > 1) { + key = path.shift(); + if (!target[key]) { + target[key] = {}; + } + + target = target[key]; + } + + // Set the specified value in the nested JSON structure + key = path.shift(); + + // + // If the current value at the key target is not an `Object`, + // or is an `Array` then simply override it because the new value + // is an Object. + // + if (typeof target[key] !== 'object' || Array.isArray(target[key])) { + target[key] = value; + return true; + } + + return Object.keys(value).every(function (nested) { + return self.merge(common.key(fullKey, nested), value[nested]); + }); +}; + +// +// ### function reset (callback) +// Clears all keys associated with this instance. +// +Memory.prototype.reset = function () { + if (this.readOnly) { + return false; + } + + this.mtimes = {}; + this.store = {}; + return true; +}; + +// +// ### function loadSync +// Returns the store managed by this instance +// +Memory.prototype.loadSync = function () { + return this.store || {}; +}; diff --git a/node_modules/nconf/node_modules/async/LICENSE b/node_modules/nconf/node_modules/async/LICENSE new file mode 100644 index 0000000..b7f9d50 --- /dev/null +++ b/node_modules/nconf/node_modules/async/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Caolan McMahon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/nconf/node_modules/async/README.md b/node_modules/nconf/node_modules/async/README.md new file mode 100644 index 0000000..9ff1acf --- /dev/null +++ b/node_modules/nconf/node_modules/async/README.md @@ -0,0 +1,1414 @@ +# Async.js + +Async is a utility module which provides straight-forward, powerful functions +for working with asynchronous JavaScript. Although originally designed for +use with [node.js](http://nodejs.org), it can also be used directly in the +browser. Also supports [component](https://github.com/component/component). + +Async provides around 20 functions that include the usual 'functional' +suspects (map, reduce, filter, each…) as well as some common patterns +for asynchronous control flow (parallel, series, waterfall…). All these +functions assume you follow the node.js convention of providing a single +callback as the last argument of your async function. + + +## Quick Examples + +```javascript +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); + +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); + +async.parallel([ + function(){ ... }, + function(){ ... } +], callback); + +async.series([ + function(){ ... }, + function(){ ... } +]); +``` + +There are many more functions available so take a look at the docs below for a +full list. This module aims to be comprehensive, so if you feel anything is +missing please create a GitHub issue for it. + +## Common Pitfalls + +### Binding a context to an iterator + +This section is really about bind, not about async. If you are wondering how to +make async execute your iterators in a given context, or are confused as to why +a method of another library isn't working as an iterator, study this example: + +```js +// Here is a simple object with an (unnecessarily roundabout) squaring method +var AsyncSquaringLibrary = { + squareExponent: 2, + square: function(number, callback){ + var result = Math.pow(number, this.squareExponent); + setTimeout(function(){ + callback(null, result); + }, 200); + } +}; + +async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ + // result is [NaN, NaN, NaN] + // This fails because the `this.squareExponent` expression in the square + // function is not evaluated in the context of AsyncSquaringLibrary, and is + // therefore undefined. +}); + +async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ + // result is [1, 4, 9] + // With the help of bind we can attach a context to the iterator before + // passing it to async. Now the square function will be executed in its + // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` + // will be as expected. +}); +``` + +## Download + +The source is available for download from +[GitHub](http://github.com/caolan/async). +Alternatively, you can install using Node Package Manager (npm): + + npm install async + +__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed + +## In the Browser + +So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: + +```html + + +``` + +## Documentation + +### Collections + +* [each](#each) +* [map](#map) +* [filter](#filter) +* [reject](#reject) +* [reduce](#reduce) +* [detect](#detect) +* [sortBy](#sortBy) +* [some](#some) +* [every](#every) +* [concat](#concat) + +### Control Flow + +* [series](#series) +* [parallel](#parallel) +* [whilst](#whilst) +* [doWhilst](#doWhilst) +* [until](#until) +* [doUntil](#doUntil) +* [forever](#forever) +* [waterfall](#waterfall) +* [compose](#compose) +* [applyEach](#applyEach) +* [queue](#queue) +* [cargo](#cargo) +* [auto](#auto) +* [iterator](#iterator) +* [apply](#apply) +* [nextTick](#nextTick) +* [times](#times) +* [timesSeries](#timesSeries) + +### Utils + +* [memoize](#memoize) +* [unmemoize](#unmemoize) +* [log](#log) +* [dir](#dir) +* [noConflict](#noConflict) + + +## Collections + + + +### each(arr, iterator, callback) + +Applies an iterator function to each item in an array, in parallel. +The iterator is called with an item from the list and a callback for when it +has finished. If the iterator passes an error to this callback, the main +callback for the each function is immediately called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err) which must be called once it has + completed. If no error has occured, the callback should be run without + arguments or with an explicit null argument. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + +```js +// assuming openFiles is an array of file names and saveFile is a function +// to save the modified contents of that file: + +async.each(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +--------------------------------------- + + + +### eachSeries(arr, iterator, callback) + +The same as each only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. This means the iterator functions will complete in order. + + +--------------------------------------- + + + +### eachLimit(arr, limit, iterator, callback) + +The same as each only no more than "limit" iterators will be simultaneously +running at any time. + +Note that the items are not processed in batches, so there is no guarantee that + the first "limit" iterator functions will complete before any others are +started. + +__Arguments__ + +* arr - An array to iterate over. +* limit - The maximum number of iterators to run at any time. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err) which must be called once it has + completed. If no error has occured, the callback should be run without + arguments or with an explicit null argument. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + +```js +// Assume documents is an array of JSON objects and requestApi is a +// function that interacts with a rate-limited REST api. + +async.eachLimit(documents, 20, requestApi, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +--------------------------------------- + + +### map(arr, iterator, callback) + +Produces a new array of values by mapping each value in the given array through +the iterator function. The iterator is called with an item from the array and a +callback for when it has finished processing. The callback takes 2 arguments, +an error and the transformed item from the array. If the iterator passes an +error to this callback, the main callback for the map function is immediately +called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order, however +the results array will be in the same order as the original array. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, transformed) which must be called once + it has completed with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + +```js +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + +### mapSeries(arr, iterator, callback) + +The same as map only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +--------------------------------------- + + +### mapLimit(arr, limit, iterator, callback) + +The same as map only no more than "limit" iterators will be simultaneously +running at any time. + +Note that the items are not processed in batches, so there is no guarantee that + the first "limit" iterator functions will complete before any others are +started. + +__Arguments__ + +* arr - An array to iterate over. +* limit - The maximum number of iterators to run at any time. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, transformed) which must be called once + it has completed with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + +```js +async.map(['file1','file2','file3'], 1, fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + +### filter(arr, iterator, callback) + +__Alias:__ select + +Returns a new array of all the values which pass an async truth test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(results) - A callback which is called after all the iterator + functions have finished. + +__Example__ + +```js +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); +``` + +--------------------------------------- + + +### filterSeries(arr, iterator, callback) + +__alias:__ selectSeries + +The same as filter only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + +--------------------------------------- + + +### reject(arr, iterator, callback) + +The opposite of filter. Removes values that pass an async truth test. + +--------------------------------------- + + +### rejectSeries(arr, iterator, callback) + +The same as reject, only the iterator is applied to each item in the array +in series. + + +--------------------------------------- + + +### reduce(arr, memo, iterator, callback) + +__aliases:__ inject, foldl + +Reduces a list of values into a single value using an async iterator to return +each successive step. Memo is the initial state of the reduction. This +function only operates in series. For performance reasons, it may make sense to +split a call to this function into a parallel map, then use the normal +Array.prototype.reduce on the results. This function is for situations where +each step in the reduction needs to be async, if you can get the data before +reducing it then it's probably a good idea to do so. + +__Arguments__ + +* arr - An array to iterate over. +* memo - The initial state of the reduction. +* iterator(memo, item, callback) - A function applied to each item in the + array to produce the next step in the reduction. The iterator is passed a + callback(err, reduction) which accepts an optional error as its first + argument, and the state of the reduction as the second. If an error is + passed to the callback, the reduction is stopped and the main callback is + immediately called with the error. +* callback(err, result) - A callback which is called after all the iterator + functions have finished. Result is the reduced value. + +__Example__ + +```js +async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); +}, function(err, result){ + // result is now equal to the last value of memo, which is 6 +}); +``` + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, callback) + +__Alias:__ foldr + +Same as reduce, only operates on the items in the array in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, callback) + +Returns the first value in a list that passes an async truth test. The +iterator is applied in parallel, meaning the first iterator to return true will +fire the detect callback with that result. That means the result might not be +the first item in the original array (in terms of order) that passes the test. + +If order within the original array is important then look at detectSeries. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value undefined if none passed. + +__Example__ + +```js +async.detect(['file1','file2','file3'], fs.exists, function(result){ + // result now equals the first file in the list that exists +}); +``` + +--------------------------------------- + + +### detectSeries(arr, iterator, callback) + +The same as detect, only the iterator is applied to each item in the array +in series. This means the result is always the first in the original array (in +terms of array order) that passes the truth test. + + +--------------------------------------- + + +### sortBy(arr, iterator, callback) + +Sorts a list by the results of running each value through an async iterator. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, sortValue) which must be called once it + has completed with an error (which can be null) and a value to use as the sort + criteria. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is the items from + the original array sorted by the values returned by the iterator calls. + +__Example__ + +```js +async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); +}, function(err, results){ + // results is now the original array of files sorted by + // modified date +}); +``` + +--------------------------------------- + + +### some(arr, iterator, callback) + +__Alias:__ any + +Returns true if at least one element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. Once any iterator +call returns true, the main callback is immediately called. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + either true or false depending on the values of the async tests. + +__Example__ + +```js +async.some(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then at least one of the files exists +}); +``` + +--------------------------------------- + + +### every(arr, iterator, callback) + +__Alias:__ all + +Returns true if every element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called after all the iterator + functions have finished. Result will be either true or false depending on + the values of the async tests. + +__Example__ + +```js +async.every(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then every file exists +}); +``` + +--------------------------------------- + + +### concat(arr, iterator, callback) + +Applies an iterator to each item in a list, concatenating the results. Returns the +concatenated list. The iterators are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of the arguments passed to the iterator function. + +__Arguments__ + +* arr - An array to iterate over +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, results) which must be called once it + has completed with an error (which can be null) and an array of results. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array containing + the concatenated results of the iterator function. + +__Example__ + +```js +async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories +}); +``` + +--------------------------------------- + + +### concatSeries(arr, iterator, callback) + +Same as async.concat, but executes in series instead of parallel. + + +## Control Flow + + +### series(tasks, [callback]) + +Run an array of functions in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run and the callback for the series is +immediately called with the value of the error. Once the tasks have completed, +the results are passed to the final callback as an array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.series. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + } +], +// optional callback +function(err, results){ + // results is now equal to ['one', 'two'] +}); + + +// an example using an object instead of an array +async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equal to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run an array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main callback is immediately called with the value of the error. +Once the tasks have completed, the results are passed to the final callback as an +array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.parallel. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + } +], +// optional callback +function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}); + + +// an example using an object instead of an array +async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equals to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallelLimit(tasks, limit, [callback]) + +The same as parallel only the tasks are executed in parallel with a maximum of "limit" +tasks executing at any time. + +Note that the tasks are not executed in batches, so there is no guarantee that +the first "limit" tasks will complete before any others are started. + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* limit - The maximum number of tasks to run at any time. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call fn, while test returns true. Calls the callback when stopped, +or an error occurs. + +__Arguments__ + +* test() - synchronous truth test to perform before each execution of fn. +* fn(callback) - A function to call each time the test passes. The function is + passed a callback(err) which must be called once it has completed with an + optional error argument. +* callback(err) - A callback which is called after the test fails and repeated + execution of fn has stopped. + +__Example__ + +```js +var count = 0; + +async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } +); +``` + +--------------------------------------- + + +### doWhilst(fn, test, callback) + +The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call fn, until test returns true. Calls the callback when stopped, +or an error occurs. + +The inverse of async.whilst. + +--------------------------------------- + + +### doUntil(fn, test, callback) + +Like doWhilst except the test is inverted. Note the argument ordering differs from `until`. + +--------------------------------------- + + +### forever(fn, callback) + +Calls the asynchronous function 'fn' repeatedly, in series, indefinitely. +If an error is passed to fn's callback then 'callback' is called with the +error, otherwise it will never be called. + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs an array of functions in series, each passing their results to the next in +the array. However, if any of the functions pass an error to the callback, the +next function is not executed and the main callback is immediately called with +the error. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a + callback(err, result1, result2, ...) it must call on completion. The first + argument is an error (which can be null) and any further arguments will be + passed as arguments in order to the next task. +* callback(err, [results]) - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + +```js +async.waterfall([ + function(callback){ + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback){ + callback(null, 'three'); + }, + function(arg1, callback){ + // arg1 now equals 'three' + callback(null, 'done'); + } +], function (err, result) { + // result now equals 'done' +}); +``` + +--------------------------------------- + +### compose(fn1, fn2...) + +Creates a function which is a composition of the passed asynchronous +functions. Each function consumes the return value of the function that +follows. Composing functions f(), g() and h() would produce the result of +f(g(h())), only this version uses callbacks to obtain the return values. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* functions... - the asynchronous functions to compose + + +__Example__ + +```js +function add1(n, callback) { + setTimeout(function () { + callback(null, n + 1); + }, 10); +} + +function mul3(n, callback) { + setTimeout(function () { + callback(null, n * 3); + }, 10); +} + +var add1mul3 = async.compose(mul3, add1); + +add1mul3(4, function (err, result) { + // result now equals 15 +}); +``` + +--------------------------------------- + +### applyEach(fns, args..., callback) + +Applies the provided arguments to each function in the array, calling the +callback after all functions have completed. If you only provide the first +argument then it will return a function which lets you pass in the +arguments as if it were a single function call. + +__Arguments__ + +* fns - the asynchronous functions to all call with the same arguments +* args... - any number of separate arguments to pass to the function +* callback - the final argument should be the callback, called when all + functions have completed processing + + +__Example__ + +```js +async.applyEach([enableSearch, updateSchema], 'bucket', callback); + +// partial application example: +async.each( + buckets, + async.applyEach([enableSearch, updateSchema]), + callback +); +``` + +--------------------------------------- + + +### applyEachSeries(arr, iterator, callback) + +The same as applyEach only the functions are applied in series. + +--------------------------------------- + + +### queue(worker, concurrency) + +Creates a queue object with the specified concurrency. Tasks added to the +queue will be processed in parallel (up to the concurrency limit). If all +workers are in progress, the task is queued until one is available. Once +a worker has completed a task, the task's callback is called. + +__Arguments__ + +* worker(task, callback) - An asynchronous function for processing a queued + task, which must call its callback(err) argument when finished, with an + optional error as an argument. +* concurrency - An integer for determining how many worker functions should be + run in parallel. + +__Queue objects__ + +The queue object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* concurrency - an integer for determining how many worker functions should be + run in parallel. This property can be changed after a queue is created to + alter the concurrency on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* unshift(task, [callback]) - add a new task to the front of the queue. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + +```js +// create a queue object with concurrency 2 + +var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); +}, 2); + + +// assign a callback +q.drain = function() { + console.log('all items have been processed'); +} + +// add some items to the queue + +q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); +}); +q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); + +// add some items to the queue (batch-wise) + +q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing bar'); +}); + +// add some items to the front of the queue + +q.unshift({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); +``` + +--------------------------------------- + + +### cargo(worker, [payload]) + +Creates a cargo object with the specified payload. Tasks added to the +cargo will be processed altogether (up to the payload limit). If the +worker is in progress, the task is queued until it is available. Once +the worker has completed some tasks, each callback of those tasks is called. + +__Arguments__ + +* worker(tasks, callback) - An asynchronous function for processing an array of + queued tasks, which must call its callback(err) argument when finished, with + an optional error as an argument. +* payload - An optional integer for determining how many tasks should be + processed per round; if omitted, the default is unlimited. + +__Cargo objects__ + +The cargo object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* payload - an integer for determining how many tasks should be + process per round. This property can be changed after a cargo is created to + alter the payload on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + +```js +// create a cargo object with payload 2 + +var cargo = async.cargo(function (tasks, callback) { + for(var i=0; i +### auto(tasks, [callback]) + +Determines the best order for running functions based on their requirements. +Each function can optionally depend on other functions being completed first, +and each function is run as soon as its requirements are satisfied. If any of +the functions pass an error to their callback, that function will not complete +(so any other functions depending on it will not run) and the main callback +will be called immediately with the error. Functions also receive an object +containing the results of functions which have completed so far. + +Note, all functions are called with a results object as a second argument, +so it is unsafe to pass functions in the tasks object which cannot handle the +extra argument. For example, this snippet of code: + +```js +async.auto({ + readData: async.apply(fs.readFile, 'data.txt', 'utf-8'); +}, callback); +``` + +will have the effect of calling readFile with the results object as the last +argument, which will fail: + +```js +fs.readFile('data.txt', 'utf-8', cb, {}); +``` + +Instead, wrap the call to readFile in a function which does not forward the +results object: + +```js +async.auto({ + readData: function(cb, results){ + fs.readFile('data.txt', 'utf-8', cb); + } +}, callback); +``` + +__Arguments__ + +* tasks - An object literal containing named functions or an array of + requirements, with the function itself the last item in the array. The key + used for each function or array is used when specifying requirements. The + function receives two arguments: (1) a callback(err, result) which must be + called when finished, passing an error (which can be null) and the result of + the function's execution, and (2) a results object, containing the results of + the previously executed functions. +* callback(err, results) - An optional callback which is called when all the + tasks have been completed. The callback will receive an error as an argument + if any tasks pass an error to their callback. Results will always be passed + but if an error occurred, no other tasks will be performed, and the results + object will only contain partial results. + + +__Example__ + +```js +async.auto({ + get_data: function(callback){ + // async code to get some data + }, + make_folder: function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + }, + write_file: ['get_data', 'make_folder', function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, filename); + }], + email_link: ['write_file', function(callback, results){ + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + }] +}); +``` + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + +```js +async.parallel([ + function(callback){ + // async code to get some data + }, + function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + } +], +function(err, results){ + async.series([ + function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + }, + function(callback){ + // once the file is written let's email a link to it... + } + ]); +}); +``` + +For a complicated series of async tasks using the auto function makes adding +new tasks much easier and makes the code more readable. + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the array, +returning a continuation to call the next one after that. It's also possible to +'peek' the next iterator by doing iterator.next(). + +This function is used internally by the async module but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* tasks - An array of functions to run. + +__Example__ + +```js +var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } +]); + +node> var iterator2 = iterator(); +'one' +node> var iterator3 = iterator2(); +'two' +node> iterator3(); +'three' +node> var nextfn = iterator2.next(); +node> nextfn(); +'three' +``` + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied, a useful +shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + +```js +// using apply + +async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), +]); + + +// the same process without using apply + +async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + } +]); +``` + +It's possible to pass any number of additional arguments when calling the +continuation: + +```js +node> var fn = async.apply(sys.puts, 'one'); +node> fn('two', 'three'); +one +two +three +``` + +--------------------------------------- + + +### nextTick(callback) + +Calls the callback on a later loop around the event loop. In node.js this just +calls process.nextTick, in the browser it falls back to setImmediate(callback) +if available, otherwise setTimeout(callback, 0), which means other higher priority +events may precede the execution of the callback. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* callback - The function to call on a later loop around the event loop. + +__Example__ + +```js +var call_order = []; +async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two'] +}); +call_order.push('one') +``` + + +### times(n, callback) + +Calls the callback n times and accumulates results in the same manner +you would use with async.map. + +__Arguments__ + +* n - The number of times to run the function. +* callback - The function to call n times. + +__Example__ + +```js +// Pretend this is some complicated async factory +var createUser = function(id, callback) { + callback(null, { + id: 'user' + id + }) +} +// generate 5 users +async.times(5, function(n, next){ + createUser(n, function(err, user) { + next(err, user) + }) +}, function(err, users) { + // we should now have 5 users +}); +``` + + +### timesSeries(n, callback) + +The same as times only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an async function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +The cache of results is exposed as the `memo` property of the function returned +by `memoize`. + +__Arguments__ + +* fn - the function you to proxy and cache results from. +* hasher - an optional function for generating a custom hash for storing + results, it has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + +```js +var slow_fn = function (name, callback) { + // do something + callback(null, result); +}; +var fn = async.memoize(slow_fn); + +// fn can now be used as if it were slow_fn +fn('some name', function () { + // callback +}); +``` + + +### unmemoize(fn) + +Undoes a memoized function, reverting it to the original, unmemoized +form. Comes handy in tests. + +__Arguments__ + +* fn - the memoized function + + +### log(function, arguments) + +Logs the result of an async function to the console. Only works in node.js or +in browsers that support console.log and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.log is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); +}; +``` +```js +node> async.log(hello, 'world'); +'hello world' +``` + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an async function to the console using console.dir to +display the properties of the resulting object. Only works in node.js or +in browsers that support console.dir and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.dir is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); +}; +``` +```js +node> async.dir(hello, 'world'); +{hello: 'world'} +``` + +--------------------------------------- + + +### noConflict() + +Changes the value of async back to its original value, returning a reference to the +async object. diff --git a/node_modules/nconf/node_modules/async/component.json b/node_modules/nconf/node_modules/async/component.json new file mode 100644 index 0000000..bbb0115 --- /dev/null +++ b/node_modules/nconf/node_modules/async/component.json @@ -0,0 +1,11 @@ +{ + "name": "async", + "repo": "caolan/async", + "description": "Higher-order functions and common patterns for asynchronous code", + "version": "0.1.23", + "keywords": [], + "dependencies": {}, + "development": {}, + "main": "lib/async.js", + "scripts": [ "lib/async.js" ] +} diff --git a/node_modules/nconf/node_modules/async/lib/async.js b/node_modules/nconf/node_modules/async/lib/async.js new file mode 100755 index 0000000..cb6320d --- /dev/null +++ b/node_modules/nconf/node_modules/async/lib/async.js @@ -0,0 +1,955 @@ +/*global setImmediate: false, setTimeout: false, console: false */ +(function () { + + var async = {}; + + // global on the server, window in the browser + var root, previous_async; + + root = this; + if (root != null) { + previous_async = root.async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + function only_once(fn) { + var called = false; + return function() { + if (called) throw new Error("Callback was already called."); + called = true; + fn.apply(root, arguments); + } + } + + //// cross-browser compatiblity functions //// + + var _each = function (arr, iterator) { + if (arr.forEach) { + return arr.forEach(iterator); + } + for (var i = 0; i < arr.length; i += 1) { + iterator(arr[i], i, arr); + } + }; + + var _map = function (arr, iterator) { + if (arr.map) { + return arr.map(iterator); + } + var results = []; + _each(arr, function (x, i, a) { + results.push(iterator(x, i, a)); + }); + return results; + }; + + var _reduce = function (arr, iterator, memo) { + if (arr.reduce) { + return arr.reduce(iterator, memo); + } + _each(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + }; + + var _keys = function (obj) { + if (Object.keys) { + return Object.keys(obj); + } + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + if (typeof process === 'undefined' || !(process.nextTick)) { + if (typeof setImmediate === 'function') { + async.nextTick = function (fn) { + // not a direct alias for IE10 compatibility + setImmediate(fn); + }; + async.setImmediate = async.nextTick; + } + else { + async.nextTick = function (fn) { + setTimeout(fn, 0); + }; + async.setImmediate = async.nextTick; + } + } + else { + async.nextTick = process.nextTick; + if (typeof setImmediate !== 'undefined') { + async.setImmediate = setImmediate; + } + else { + async.setImmediate = async.nextTick; + } + } + + async.each = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + _each(arr, function (x) { + iterator(x, only_once(function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(null); + } + } + })); + }); + }; + async.forEach = async.each; + + async.eachSeries = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + var iterate = function () { + iterator(arr[completed], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(null); + } + else { + iterate(); + } + } + }); + }; + iterate(); + }; + async.forEachSeries = async.eachSeries; + + async.eachLimit = function (arr, limit, iterator, callback) { + var fn = _eachLimit(limit); + fn.apply(null, [arr, iterator, callback]); + }; + async.forEachLimit = async.eachLimit; + + var _eachLimit = function (limit) { + + return function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length || limit <= 0) { + return callback(); + } + var completed = 0; + var started = 0; + var running = 0; + + (function replenish () { + if (completed >= arr.length) { + return callback(); + } + + while (running < limit && started < arr.length) { + started += 1; + running += 1; + iterator(arr[started - 1], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + running -= 1; + if (completed >= arr.length) { + callback(); + } + else { + replenish(); + } + } + }); + } + })(); + }; + }; + + + var doParallel = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.each].concat(args)); + }; + }; + var doParallelLimit = function(limit, fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [_eachLimit(limit)].concat(args)); + }; + }; + var doSeries = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.eachSeries].concat(args)); + }; + }; + + + var _asyncMap = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (err, v) { + results[x.index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + }; + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + async.mapLimit = function (arr, limit, iterator, callback) { + return _mapLimit(limit)(arr, iterator, callback); + }; + + var _mapLimit = function(limit) { + return doParallelLimit(limit, _asyncMap); + }; + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.reduce = function (arr, memo, iterator, callback) { + async.eachSeries(arr, function (x, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + // inject alias + async.inject = async.reduce; + // foldl alias + async.foldl = async.reduce; + + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, function (x) { + return x; + }).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + // foldr alias + async.foldr = async.reduceRight; + + var _filter = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.filter = doParallel(_filter); + async.filterSeries = doSeries(_filter); + // select alias + async.select = async.filter; + async.selectSeries = async.filterSeries; + + var _reject = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (!v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.reject = doParallel(_reject); + async.rejectSeries = doSeries(_reject); + + var _detect = function (eachfn, arr, iterator, main_callback) { + eachfn(arr, function (x, callback) { + iterator(x, function (result) { + if (result) { + main_callback(x); + main_callback = function () {}; + } + else { + callback(); + } + }); + }, function (err) { + main_callback(); + }); + }; + async.detect = doParallel(_detect); + async.detectSeries = doSeries(_detect); + + async.some = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (v) { + main_callback(true); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(false); + }); + }; + // any alias + async.any = async.some; + + async.every = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (!v) { + main_callback(false); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(true); + }); + }; + // all alias + async.all = async.every; + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + var fn = function (left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }; + callback(null, _map(results.sort(fn), function (x) { + return x.value; + })); + } + }); + }; + + async.auto = function (tasks, callback) { + callback = callback || function () {}; + var keys = _keys(tasks); + if (!keys.length) { + return callback(null); + } + + var results = {}; + + var listeners = []; + var addListener = function (fn) { + listeners.unshift(fn); + }; + var removeListener = function (fn) { + for (var i = 0; i < listeners.length; i += 1) { + if (listeners[i] === fn) { + listeners.splice(i, 1); + return; + } + } + }; + var taskComplete = function () { + _each(listeners.slice(0), function (fn) { + fn(); + }); + }; + + addListener(function () { + if (_keys(results).length === keys.length) { + callback(null, results); + callback = function () {}; + } + }); + + _each(keys, function (k) { + var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; + var taskCallback = function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + if (err) { + var safeResults = {}; + _each(_keys(results), function(rkey) { + safeResults[rkey] = results[rkey]; + }); + safeResults[k] = args; + callback(err, safeResults); + // stop subsequent errors hitting callback multiple times + callback = function () {}; + } + else { + results[k] = args; + async.setImmediate(taskComplete); + } + }; + var requires = task.slice(0, Math.abs(task.length - 1)) || []; + var ready = function () { + return _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + }; + if (ready()) { + task[task.length - 1](taskCallback, results); + } + else { + var listener = function () { + if (ready()) { + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + }; + addListener(listener); + } + }); + }; + + async.waterfall = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor !== Array) { + var err = new Error('First argument to waterfall must be an array of functions'); + return callback(err); + } + if (!tasks.length) { + return callback(); + } + var wrapIterator = function (iterator) { + return function (err) { + if (err) { + callback.apply(null, arguments); + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + async.setImmediate(function () { + iterator.apply(null, args); + }); + } + }; + }; + wrapIterator(async.iterator(tasks))(); + }; + + var _parallel = function(eachfn, tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + eachfn.map(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + eachfn.each(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.parallel = function (tasks, callback) { + _parallel({ map: async.map, each: async.each }, tasks, callback); + }; + + async.parallelLimit = function(tasks, limit, callback) { + _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); + }; + + async.series = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.mapSeries(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.eachSeries(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.iterator = function (tasks) { + var makeCallback = function (index) { + var fn = function () { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + }; + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + }; + return makeCallback(0); + }; + + async.apply = function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + return function () { + return fn.apply( + null, args.concat(Array.prototype.slice.call(arguments)) + ); + }; + }; + + var _concat = function (eachfn, arr, fn, callback) { + var r = []; + eachfn(arr, function (x, cb) { + fn(x, function (err, y) { + r = r.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, r); + }); + }; + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + if (test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.whilst(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doWhilst = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + if (test()) { + async.doWhilst(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.until = function (test, iterator, callback) { + if (!test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.until(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doUntil = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + if (!test()) { + async.doUntil(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.queue = function (worker, concurrency) { + if (concurrency === undefined) { + concurrency = 1; + } + function _insert(q, data, pos, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _each(data, function(task) { + var item = { + data: task, + callback: typeof callback === 'function' ? callback : null + }; + + if (pos) { + q.tasks.unshift(item); + } else { + q.tasks.push(item); + } + + if (q.saturated && q.tasks.length === concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + var workers = 0; + var q = { + tasks: [], + concurrency: concurrency, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + _insert(q, data, false, callback); + }, + unshift: function (data, callback) { + _insert(q, data, true, callback); + }, + process: function () { + if (workers < q.concurrency && q.tasks.length) { + var task = q.tasks.shift(); + if (q.empty && q.tasks.length === 0) { + q.empty(); + } + workers += 1; + var next = function () { + workers -= 1; + if (task.callback) { + task.callback.apply(task, arguments); + } + if (q.drain && q.tasks.length + workers === 0) { + q.drain(); + } + q.process(); + }; + var cb = only_once(next); + worker(task.data, cb); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + } + }; + return q; + }; + + async.cargo = function (worker, payload) { + var working = false, + tasks = []; + + var cargo = { + tasks: tasks, + payload: payload, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _each(data, function(task) { + tasks.push({ + data: task, + callback: typeof callback === 'function' ? callback : null + }); + if (cargo.saturated && tasks.length === payload) { + cargo.saturated(); + } + }); + async.setImmediate(cargo.process); + }, + process: function process() { + if (working) return; + if (tasks.length === 0) { + if(cargo.drain) cargo.drain(); + return; + } + + var ts = typeof payload === 'number' + ? tasks.splice(0, payload) + : tasks.splice(0); + + var ds = _map(ts, function (task) { + return task.data; + }); + + if(cargo.empty) cargo.empty(); + working = true; + worker(ds, function () { + working = false; + + var args = arguments; + _each(ts, function (data) { + if (data.callback) { + data.callback.apply(null, args); + } + }); + + process(); + }); + }, + length: function () { + return tasks.length; + }, + running: function () { + return working; + } + }; + return cargo; + }; + + var _console_fn = function (name) { + return function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + fn.apply(null, args.concat([function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (typeof console !== 'undefined') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _each(args, function (x) { + console[name](x); + }); + } + } + }])); + }; + }; + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + hasher = hasher || function (x) { + return x; + }; + var memoized = function () { + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + var key = hasher.apply(null, args); + if (key in memo) { + callback.apply(null, memo[key]); + } + else if (key in queues) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([function () { + memo[key] = arguments; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, arguments); + } + }])); + } + }; + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + + async.times = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.map(counter, iterator, callback); + }; + + async.timesSeries = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.mapSeries(counter, iterator, callback); + }; + + async.compose = function (/* functions... */) { + var fns = Array.prototype.reverse.call(arguments); + return function () { + var that = this; + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + async.reduce(fns, args, function (newargs, fn, cb) { + fn.apply(that, newargs.concat([function () { + var err = arguments[0]; + var nextargs = Array.prototype.slice.call(arguments, 1); + cb(err, nextargs); + }])) + }, + function (err, results) { + callback.apply(that, [err].concat(results)); + }); + }; + }; + + var _applyEach = function (eachfn, fns /*args...*/) { + var go = function () { + var that = this; + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + return eachfn(fns, function (fn, cb) { + fn.apply(that, args.concat([cb])); + }, + callback); + }; + if (arguments.length > 2) { + var args = Array.prototype.slice.call(arguments, 2); + return go.apply(this, args); + } + else { + return go; + } + }; + async.applyEach = doParallel(_applyEach); + async.applyEachSeries = doSeries(_applyEach); + + async.forever = function (fn, callback) { + function next(err) { + if (err) { + if (callback) { + return callback(err); + } + throw err; + } + fn(next); + } + next(); + }; + + // AMD / RequireJS + if (typeof define !== 'undefined' && define.amd) { + define([], function () { + return async; + }); + } + // Node.js + else if (typeof module !== 'undefined' && module.exports) { + module.exports = async; + } + // included directly via

nconf.js

/*
+ * nconf.js: Top-level include for the nconf module
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var fs = require('fs'),
+    async = require('async'),
+    common = require('./nconf/common'),
+    Provider = require('./nconf/provider').Provider,
+    nconf = module.exports = new Provider();

Expose the version from the package.json using pkginfo.

require('pkginfo')(module, 'version');

Expose the various components included with nconf

nconf.key           = common.key;
+nconf.path          = common.path;
+nconf.loadFiles     = common.loadFiles;
+nconf.loadFilesSync = common.loadFilesSync;
+nconf.formats       = require('./nconf/formats');
+nconf.stores        = require('./nconf/stores');
+nconf.Provider      = Provider;
+
+