From b0b64a865daecfdb5f5e8bd185dfecc346645c81 Mon Sep 17 00:00:00 2001 From: alfiepates Date: Tue, 12 Apr 2016 02:31:05 +0100 Subject: [PATCH] initial dev commit. everything is broken. --- app.js | 85 + node_modules/.bin/acorn | 1 + node_modules/.bin/cleancss | 1 + node_modules/.bin/jade | 1 + node_modules/.bin/knex | 1 + node_modules/.bin/mime | 1 + node_modules/.bin/mkdirp | 1 + node_modules/.bin/uglifyjs | 1 + node_modules/.bin/user-home | 1 + node_modules/accepts/HISTORY.md | 170 + node_modules/accepts/LICENSE | 23 + node_modules/accepts/README.md | 135 + node_modules/accepts/index.js | 231 + node_modules/accepts/package.json | 123 + node_modules/acorn-globals/LICENSE | 19 + node_modules/acorn-globals/README.md | 76 + node_modules/acorn-globals/index.js | 180 + node_modules/acorn-globals/package.json | 92 + 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 | 6 + node_modules/acorn/AUTHORS | 43 + node_modules/acorn/LICENSE | 19 + node_modules/acorn/README.md | 396 + node_modules/acorn/bin/acorn | 71 + node_modules/acorn/bin/build-acorn.js | 82 + .../acorn/bin/generate-identifier-regex.js | 47 + node_modules/acorn/bin/update_authors.sh | 6 + node_modules/acorn/dist/.keep | 0 node_modules/acorn/dist/acorn.js | 3340 +++ node_modules/acorn/dist/acorn_loose.js | 1300 + node_modules/acorn/dist/walk.js | 377 + node_modules/acorn/package.json | 214 + node_modules/acorn/src/bin/acorn.js | 59 + node_modules/acorn/src/expression.js | 707 + node_modules/acorn/src/identifier.js | 90 + node_modules/acorn/src/index.js | 67 + node_modules/acorn/src/location.js | 24 + node_modules/acorn/src/locutil.js | 42 + node_modules/acorn/src/loose/acorn_loose.js | 0 node_modules/acorn/src/loose/expression.js | 501 + node_modules/acorn/src/loose/index.js | 50 + node_modules/acorn/src/loose/parseutil.js | 1 + node_modules/acorn/src/loose/state.js | 160 + node_modules/acorn/src/loose/statement.js | 420 + node_modules/acorn/src/loose/tokenize.js | 108 + node_modules/acorn/src/lval.js | 215 + node_modules/acorn/src/node.js | 50 + node_modules/acorn/src/options.js | 121 + node_modules/acorn/src/parseutil.js | 102 + node_modules/acorn/src/state.js | 104 + node_modules/acorn/src/statement.js | 626 + node_modules/acorn/src/tokencontext.js | 109 + node_modules/acorn/src/tokenize.js | 682 + node_modules/acorn/src/tokentype.js | 147 + node_modules/acorn/src/util.js | 9 + node_modules/acorn/src/walk/index.js | 340 + node_modules/acorn/src/whitespace.js | 12 + node_modules/align-text/LICENSE | 21 + node_modules/align-text/README.md | 236 + node_modules/align-text/index.js | 52 + node_modules/align-text/package.json | 109 + node_modules/amdefine/LICENSE | 58 + node_modules/amdefine/README.md | 171 + node_modules/amdefine/amdefine.js | 301 + node_modules/amdefine/intercept.js | 36 + node_modules/amdefine/package.json | 75 + node_modules/ansi-regex/index.js | 4 + node_modules/ansi-regex/license | 21 + node_modules/ansi-regex/package.json | 113 + node_modules/ansi-regex/readme.md | 31 + node_modules/ansi-styles/index.js | 65 + node_modules/ansi-styles/license | 21 + node_modules/ansi-styles/package.json | 106 + node_modules/ansi-styles/readme.md | 86 + node_modules/array-flatten/LICENSE | 21 + node_modules/array-flatten/README.md | 43 + node_modules/array-flatten/array-flatten.js | 64 + node_modules/array-flatten/package.json | 88 + node_modules/asap/LICENSE.md | 20 + node_modules/asap/README.md | 81 + node_modules/asap/asap.js | 113 + node_modules/asap/package.json | 65 + node_modules/async/LICENSE | 19 + node_modules/async/README.md | 1425 ++ node_modules/async/component.json | 11 + node_modules/async/lib/async.js | 958 + node_modules/async/package.json | 86 + node_modules/balanced-match/.npmignore | 2 + node_modules/balanced-match/.travis.yml | 3 + 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 + node_modules/bluebird/LICENSE | 21 + node_modules/bluebird/README.md | 679 + node_modules/bluebird/changelog.md | 1723 ++ node_modules/bluebird/js/browser/bluebird.js | 4887 ++++ .../bluebird/js/browser/bluebird.min.js | 31 + node_modules/bluebird/js/main/any.js | 21 + node_modules/bluebird/js/main/assert.js | 55 + node_modules/bluebird/js/main/async.js | 150 + node_modules/bluebird/js/main/bind.js | 72 + node_modules/bluebird/js/main/bluebird.js | 11 + node_modules/bluebird/js/main/call_get.js | 123 + node_modules/bluebird/js/main/cancel.js | 48 + .../bluebird/js/main/captured_trace.js | 493 + node_modules/bluebird/js/main/catch_filter.js | 66 + node_modules/bluebird/js/main/context.js | 38 + .../bluebird/js/main/debuggability.js | 162 + .../bluebird/js/main/direct_resolve.js | 63 + node_modules/bluebird/js/main/each.js | 12 + node_modules/bluebird/js/main/errors.js | 111 + node_modules/bluebird/js/main/es5.js | 80 + node_modules/bluebird/js/main/filter.js | 12 + node_modules/bluebird/js/main/finally.js | 98 + node_modules/bluebird/js/main/generators.js | 136 + node_modules/bluebird/js/main/join.js | 107 + node_modules/bluebird/js/main/map.js | 133 + node_modules/bluebird/js/main/method.js | 44 + node_modules/bluebird/js/main/nodeify.js | 59 + node_modules/bluebird/js/main/progress.js | 76 + node_modules/bluebird/js/main/promise.js | 754 + .../bluebird/js/main/promise_array.js | 142 + .../bluebird/js/main/promise_resolver.js | 123 + node_modules/bluebird/js/main/promisify.js | 307 + node_modules/bluebird/js/main/props.js | 79 + node_modules/bluebird/js/main/queue.js | 90 + node_modules/bluebird/js/main/race.js | 47 + node_modules/bluebird/js/main/reduce.js | 148 + node_modules/bluebird/js/main/schedule.js | 35 + node_modules/bluebird/js/main/settle.js | 40 + node_modules/bluebird/js/main/some.js | 125 + .../js/main/synchronous_inspection.js | 94 + node_modules/bluebird/js/main/thenables.js | 84 + node_modules/bluebird/js/main/timers.js | 64 + node_modules/bluebird/js/main/using.js | 213 + node_modules/bluebird/js/main/util.js | 321 + node_modules/bluebird/package.json | 127 + 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 | 104 + node_modules/camelcase/index.js | 27 + node_modules/camelcase/license | 21 + node_modules/camelcase/package.json | 94 + node_modules/camelcase/readme.md | 56 + node_modules/center-align/LICENSE | 21 + node_modules/center-align/README.md | 74 + node_modules/center-align/index.js | 16 + node_modules/center-align/package.json | 113 + node_modules/center-align/utils.js | 40 + node_modules/chalk/index.js | 116 + node_modules/chalk/license | 21 + node_modules/chalk/package.json | 132 + node_modules/chalk/readme.md | 213 + node_modules/character-parser/.npmignore | 2 + node_modules/character-parser/LICENSE | 19 + node_modules/character-parser/README.md | 142 + node_modules/character-parser/index.js | 231 + node_modules/character-parser/package.json | 82 + node_modules/clean-css/History.md | 1049 + node_modules/clean-css/LICENSE | 19 + node_modules/clean-css/README.md | 369 + node_modules/clean-css/bin/cleancss | 183 + node_modules/clean-css/index.js | 1 + node_modules/clean-css/lib/clean.js | 231 + .../lib/colors/hex-name-shortener.js | 186 + node_modules/clean-css/lib/colors/hsl.js | 67 + node_modules/clean-css/lib/colors/rgb.js | 16 + node_modules/clean-css/lib/imports/inliner.js | 399 + .../clean-css/lib/properties/break-up.js | 329 + .../clean-css/lib/properties/can-override.js | 125 + .../clean-css/lib/properties/clone.js | 26 + .../clean-css/lib/properties/compactable.js | 285 + .../lib/properties/every-combination.js | 24 + .../clean-css/lib/properties/has-inherit.js | 10 + .../clean-css/lib/properties/optimizer.js | 212 + .../lib/properties/override-compactor.js | 379 + .../lib/properties/populate-components.js | 21 + .../clean-css/lib/properties/remove-unused.js | 10 + .../lib/properties/restore-from-optimizing.js | 60 + .../clean-css/lib/properties/restore.js | 229 + .../lib/properties/shorthand-compactor.js | 134 + .../clean-css/lib/properties/validator.js | 197 + .../lib/properties/vendor-prefixes.js | 26 + .../lib/properties/wrap-for-optimizing.js | 118 + .../clean-css/lib/selectors/advanced.js | 86 + .../clean-css/lib/selectors/clean-up.js | 89 + .../clean-css/lib/selectors/extractor.js | 69 + .../clean-css/lib/selectors/is-special.js | 5 + .../clean-css/lib/selectors/merge-adjacent.js | 35 + .../lib/selectors/merge-media-queries.js | 64 + .../selectors/merge-non-adjacent-by-body.js | 61 + .../merge-non-adjacent-by-selector.js | 76 + .../lib/selectors/reduce-non-adjacent.js | 172 + .../remove-duplicate-media-queries.js | 21 + .../lib/selectors/remove-duplicates.js | 41 + .../clean-css/lib/selectors/reorderable.js | 95 + .../clean-css/lib/selectors/restructure.js | 369 + .../clean-css/lib/selectors/simple.js | 444 + .../clean-css/lib/source-maps/track.js | 119 + .../clean-css/lib/stringifier/helpers.js | 170 + .../clean-css/lib/stringifier/one-time.js | 50 + .../clean-css/lib/stringifier/simple.js | 22 + .../clean-css/lib/stringifier/source-maps.js | 96 + .../clean-css/lib/text/comments-processor.js | 131 + .../clean-css/lib/text/escape-store.js | 53 + .../lib/text/expressions-processor.js | 117 + .../clean-css/lib/text/free-text-processor.js | 98 + .../clean-css/lib/text/urls-processor.js | 72 + .../lib/tokenizer/extract-properties.js | 193 + .../lib/tokenizer/extract-selectors.js | 17 + .../clean-css/lib/tokenizer/tokenize.js | 264 + node_modules/clean-css/lib/urls/rebase.js | 30 + node_modules/clean-css/lib/urls/reduce.js | 152 + node_modules/clean-css/lib/urls/rewrite.js | 107 + .../clean-css/lib/utils/clone-array.js | 12 + .../clean-css/lib/utils/compatibility.js | 162 + .../lib/utils/input-source-map-tracker.js | 284 + node_modules/clean-css/lib/utils/object.js | 11 + .../clean-css/lib/utils/quote-scanner.js | 119 + .../clean-css/lib/utils/source-reader.js | 96 + .../clean-css/lib/utils/source-tracker.js | 31 + node_modules/clean-css/lib/utils/split.js | 49 + .../node_modules/commander/History.md | 256 + .../clean-css/node_modules/commander/LICENSE | 22 + .../node_modules/commander/Readme.md | 342 + .../clean-css/node_modules/commander/index.js | 1103 + .../node_modules/commander/package.json | 100 + node_modules/clean-css/package.json | 115 + node_modules/cliui/.coveralls.yml | 1 + node_modules/cliui/.npmignore | 2 + node_modules/cliui/.travis.yml | 7 + node_modules/cliui/LICENSE.txt | 14 + node_modules/cliui/README.md | 104 + node_modules/cliui/index.js | 273 + .../cliui/node_modules/wordwrap/.npmignore | 1 + .../node_modules/wordwrap/README.markdown | 70 + .../node_modules/wordwrap/example/center.js | 10 + .../node_modules/wordwrap/example/meat.js | 3 + .../cliui/node_modules/wordwrap/index.js | 76 + .../cliui/node_modules/wordwrap/package.json | 86 + .../cliui/node_modules/wordwrap/test/break.js | 30 + .../node_modules/wordwrap/test/idleness.txt | 63 + .../cliui/node_modules/wordwrap/test/wrap.js | 31 + node_modules/cliui/package.json | 114 + node_modules/cliui/test/cliui.js | 349 + node_modules/commander/History.md | 222 + node_modules/commander/Readme.md | 300 + node_modules/commander/index.js | 1020 + node_modules/commander/package.json | 98 + node_modules/concat-map/.travis.yml | 4 + node_modules/concat-map/LICENSE | 18 + 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/constantinople/.gitattributes | 22 + node_modules/constantinople/.npmignore | 13 + node_modules/constantinople/.travis.yml | 3 + node_modules/constantinople/LICENSE | 19 + node_modules/constantinople/README.md | 42 + node_modules/constantinople/index.js | 100 + node_modules/constantinople/package.json | 75 + node_modules/constantinople/test/index.js | 71 + node_modules/content-disposition/HISTORY.md | 45 + node_modules/content-disposition/LICENSE | 22 + node_modules/content-disposition/README.md | 141 + node_modules/content-disposition/index.js | 445 + node_modules/content-disposition/package.json | 92 + node_modules/content-type/HISTORY.md | 9 + node_modules/content-type/LICENSE | 22 + node_modules/content-type/README.md | 92 + node_modules/content-type/index.js | 214 + node_modules/content-type/package.json | 91 + node_modules/cookie-signature/.npmignore | 4 + node_modules/cookie-signature/History.md | 38 + node_modules/cookie-signature/Readme.md | 42 + node_modules/cookie-signature/index.js | 51 + node_modules/cookie-signature/package.json | 84 + node_modules/cookie/HISTORY.md | 72 + node_modules/cookie/LICENSE | 24 + node_modules/cookie/README.md | 64 + node_modules/cookie/index.js | 156 + node_modules/cookie/package.json | 102 + node_modules/core-util-is/LICENSE | 19 + node_modules/core-util-is/README.md | 3 + node_modules/core-util-is/float.patch | 604 + node_modules/core-util-is/lib/util.js | 107 + node_modules/core-util-is/package.json | 86 + node_modules/core-util-is/test.js | 68 + node_modules/css-parse/.npmignore | 6 + node_modules/css-parse/History.md | 30 + node_modules/css-parse/Makefile | 7 + node_modules/css-parse/Readme.md | 62 + node_modules/css-parse/component.json | 8 + node_modules/css-parse/index.js | 265 + node_modules/css-parse/package.json | 66 + node_modules/css-stringify/.npmignore | 6 + node_modules/css-stringify/History.md | 30 + node_modules/css-stringify/Makefile | 7 + node_modules/css-stringify/Readme.md | 33 + node_modules/css-stringify/component.json | 8 + node_modules/css-stringify/index.js | 182 + node_modules/css-stringify/package.json | 67 + node_modules/css/.npmignore | 4 + node_modules/css/History.md | 20 + node_modules/css/Makefile | 8 + node_modules/css/Readme.md | 77 + node_modules/css/benchmark.js | 36 + node_modules/css/component.json | 13 + node_modules/css/index.js | 3 + node_modules/css/package.json | 66 + node_modules/css/test.js | 6 + node_modules/debug/.jshintrc | 3 + node_modules/debug/.npmignore | 6 + node_modules/debug/History.md | 195 + node_modules/debug/Makefile | 36 + node_modules/debug/Readme.md | 188 + node_modules/debug/bower.json | 28 + node_modules/debug/browser.js | 168 + node_modules/debug/component.json | 19 + node_modules/debug/debug.js | 197 + node_modules/debug/node.js | 209 + node_modules/debug/package.json | 100 + node_modules/decamelize/index.js | 13 + node_modules/decamelize/license | 21 + node_modules/decamelize/package.json | 98 + node_modules/decamelize/readme.md | 48 + node_modules/depd/History.md | 84 + node_modules/depd/LICENSE | 22 + node_modules/depd/Readme.md | 281 + node_modules/depd/index.js | 521 + node_modules/depd/lib/browser/index.js | 79 + node_modules/depd/lib/compat/buffer-concat.js | 35 + .../depd/lib/compat/callsite-tostring.js | 103 + .../depd/lib/compat/event-listener-count.js | 22 + node_modules/depd/lib/compat/index.js | 84 + node_modules/depd/package.json | 94 + node_modules/destroy/LICENSE | 22 + node_modules/destroy/README.md | 60 + node_modules/destroy/index.js | 75 + node_modules/destroy/package.json | 98 + node_modules/double-ended-queue/.npmignore | 31 + node_modules/double-ended-queue/Gruntfile.js | 188 + node_modules/double-ended-queue/LICENSE | 19 + node_modules/double-ended-queue/README.md | 293 + node_modules/double-ended-queue/js/deque.js | 275 + node_modules/double-ended-queue/package.json | 92 + node_modules/ee-first/LICENSE | 22 + node_modules/ee-first/README.md | 80 + node_modules/ee-first/index.js | 95 + node_modules/ee-first/package.json | 90 + node_modules/escape-html/LICENSE | 24 + node_modules/escape-html/Readme.md | 43 + node_modules/escape-html/index.js | 78 + node_modules/escape-html/package.json | 86 + node_modules/escape-string-regexp/index.js | 11 + node_modules/escape-string-regexp/license | 21 + .../escape-string-regexp/package.json | 101 + node_modules/escape-string-regexp/readme.md | 27 + node_modules/etag/HISTORY.md | 71 + node_modules/etag/LICENSE | 22 + node_modules/etag/README.md | 165 + node_modules/etag/index.js | 132 + node_modules/etag/package.json | 100 + node_modules/express/History.md | 3062 +++ node_modules/express/LICENSE | 24 + node_modules/express/Readme.md | 138 + node_modules/express/index.js | 11 + node_modules/express/lib/application.js | 643 + node_modules/express/lib/express.js | 103 + node_modules/express/lib/middleware/init.js | 36 + node_modules/express/lib/middleware/query.js | 51 + node_modules/express/lib/request.js | 489 + node_modules/express/lib/response.js | 1053 + node_modules/express/lib/router/index.js | 645 + node_modules/express/lib/router/layer.js | 176 + node_modules/express/lib/router/route.js | 210 + node_modules/express/lib/utils.js | 300 + node_modules/express/lib/view.js | 173 + node_modules/express/package.json | 168 + node_modules/extend/.jscs.json | 68 + node_modules/extend/.npmignore | 1 + node_modules/extend/.travis.yml | 36 + node_modules/extend/CHANGELOG.md | 61 + node_modules/extend/LICENSE | 23 + node_modules/extend/README.md | 62 + node_modules/extend/component.json | 32 + node_modules/extend/index.js | 89 + node_modules/extend/package.json | 95 + node_modules/finalhandler/HISTORY.md | 98 + node_modules/finalhandler/LICENSE | 22 + node_modules/finalhandler/README.md | 133 + node_modules/finalhandler/index.js | 151 + node_modules/finalhandler/package.json | 106 + node_modules/findup-sync/.npmignore | 4 + node_modules/findup-sync/LICENSE-MIT | 22 + node_modules/findup-sync/README.md | 47 + node_modules/findup-sync/lib/findup-sync.js | 49 + node_modules/findup-sync/package.json | 94 + node_modules/flagged-respawn/.npmignore | 1 + node_modules/flagged-respawn/.travis.yml | 9 + node_modules/flagged-respawn/LICENSE | 22 + node_modules/flagged-respawn/README.md | 58 + node_modules/flagged-respawn/index.js | 18 + node_modules/flagged-respawn/lib/reorder.js | 16 + node_modules/flagged-respawn/lib/respawn.js | 15 + node_modules/flagged-respawn/package.json | 97 + .../flagged-respawn/test/bin/exit_code.js | 13 + .../flagged-respawn/test/bin/respawner.js | 17 + .../flagged-respawn/test/bin/signal.js | 16 + node_modules/flagged-respawn/test/index.js | 99 + node_modules/forwarded/HISTORY.md | 4 + node_modules/forwarded/LICENSE | 22 + node_modules/forwarded/README.md | 53 + node_modules/forwarded/index.js | 35 + node_modules/forwarded/package.json | 91 + node_modules/fresh/HISTORY.md | 38 + node_modules/fresh/LICENSE | 22 + node_modules/fresh/README.md | 58 + node_modules/fresh/index.js | 57 + node_modules/fresh/package.json | 114 + node_modules/glob/LICENSE | 15 + node_modules/glob/README.md | 357 + node_modules/glob/common.js | 177 + node_modules/glob/glob.js | 649 + node_modules/glob/package.json | 97 + node_modules/glob/sync.js | 409 + node_modules/graceful-readlink/.npmignore | 3 + node_modules/graceful-readlink/.travis.yml | 5 + node_modules/graceful-readlink/LICENSE | 22 + node_modules/graceful-readlink/README.md | 17 + node_modules/graceful-readlink/index.js | 12 + node_modules/graceful-readlink/package.json | 75 + node_modules/has-ansi/index.js | 4 + node_modules/has-ansi/license | 21 + node_modules/has-ansi/package.json | 110 + node_modules/has-ansi/readme.md | 36 + node_modules/hashmap/CHANGELOG.md | 37 + node_modules/hashmap/LICENSE | 22 + node_modules/hashmap/Readme.md | 148 + node_modules/hashmap/bower.json | 29 + node_modules/hashmap/hashmap.js | 199 + node_modules/hashmap/package.json | 95 + node_modules/http-errors/HISTORY.md | 76 + node_modules/http-errors/LICENSE | 22 + node_modules/http-errors/README.md | 63 + node_modules/http-errors/index.js | 120 + node_modules/http-errors/package.json | 110 + 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 | 77 + node_modules/inherits/test.js | 25 + node_modules/interpret/CHANGELOG | 98 + node_modules/interpret/LICENSE | 22 + node_modules/interpret/README.md | 92 + node_modules/interpret/index.js | 105 + node_modules/interpret/package.json | 107 + node_modules/ipaddr.js/.npmignore | 2 + node_modules/ipaddr.js/.travis.yml | 10 + node_modules/ipaddr.js/Cakefile | 18 + node_modules/ipaddr.js/LICENSE | 19 + node_modules/ipaddr.js/README.md | 161 + node_modules/ipaddr.js/bower.json | 29 + node_modules/ipaddr.js/ipaddr.min.js | 1 + node_modules/ipaddr.js/lib/ipaddr.js | 467 + node_modules/ipaddr.js/package.json | 85 + node_modules/ipaddr.js/src/ipaddr.coffee | 396 + .../ipaddr.js/test/ipaddr.test.coffee | 282 + node_modules/is-buffer/.travis.yml | 7 + node_modules/is-buffer/.zuul.yml | 16 + 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 | 107 + node_modules/is-buffer/test/basic.js | 20 + node_modules/is-promise/.npmignore | 6 + node_modules/is-promise/.travis.yml | 3 + node_modules/is-promise/LICENSE | 19 + node_modules/is-promise/index.js | 5 + node_modules/is-promise/package.json | 74 + node_modules/is-promise/readme.md | 29 + 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 | 78 + node_modules/jade/.npmignore | 15 + node_modules/jade/.release.json | 1 + node_modules/jade/History.md | 991 + node_modules/jade/LICENSE | 22 + node_modules/jade/README.md | 154 + node_modules/jade/Readme_zh-cn.md | 1285 + node_modules/jade/bin/jade.js | 295 + node_modules/jade/block-code.html | 0 node_modules/jade/component.json | 16 + node_modules/jade/jade.js | 9196 +++++++ node_modules/jade/lib/compiler.js | 723 + node_modules/jade/lib/doctypes.js | 12 + node_modules/jade/lib/filters-client.js | 10 + node_modules/jade/lib/filters.js | 96 + node_modules/jade/lib/index.js | 418 + node_modules/jade/lib/inline-tags.js | 23 + node_modules/jade/lib/lexer.js | 949 + node_modules/jade/lib/nodes/attrs.js | 83 + node_modules/jade/lib/nodes/block-comment.js | 24 + node_modules/jade/lib/nodes/block.js | 118 + node_modules/jade/lib/nodes/case.js | 33 + node_modules/jade/lib/nodes/code.js | 26 + node_modules/jade/lib/nodes/comment.js | 23 + node_modules/jade/lib/nodes/doctype.js | 20 + node_modules/jade/lib/nodes/each.js | 26 + node_modules/jade/lib/nodes/filter.js | 24 + node_modules/jade/lib/nodes/index.js | 16 + node_modules/jade/lib/nodes/literal.js | 20 + node_modules/jade/lib/nodes/mixin-block.js | 18 + node_modules/jade/lib/nodes/mixin.js | 26 + node_modules/jade/lib/nodes/node.js | 18 + node_modules/jade/lib/nodes/tag.js | 89 + node_modules/jade/lib/nodes/text.js | 26 + node_modules/jade/lib/parser.js | 846 + node_modules/jade/lib/runtime.js | 246 + node_modules/jade/lib/utils.js | 53 + node_modules/jade/package.json | 151 + node_modules/jade/release.js | 35 + node_modules/jade/runtime.js | 252 + node_modules/jstransformer/LICENSE | 19 + node_modules/jstransformer/README.md | 103 + node_modules/jstransformer/index.js | 328 + node_modules/jstransformer/package.json | 86 + 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 | 125 + node_modules/knex/LICENSE | 22 + node_modules/knex/README.md | 77 + node_modules/knex/build/knex.js | 21001 ++++++++++++++++ node_modules/knex/knex.js | 8 + node_modules/knex/lib/bin/cli.js | 169 + node_modules/knex/lib/client.js | 268 + node_modules/knex/lib/connection/index.js | 42 + node_modules/knex/lib/dialects/maria/index.js | 147 + .../knex/lib/dialects/maria/transaction.js | 39 + .../knex/lib/dialects/mssql/formatter.js | 28 + node_modules/knex/lib/dialects/mssql/index.js | 193 + .../knex/lib/dialects/mssql/query/compiler.js | 185 + .../dialects/mssql/schema/columncompiler.js | 104 + .../lib/dialects/mssql/schema/compiler.js | 54 + .../dialects/mssql/schema/tablecompiler.js | 127 + .../knex/lib/dialects/mssql/transaction.js | 99 + node_modules/knex/lib/dialects/mysql/index.js | 137 + .../knex/lib/dialects/mysql/query/compiler.js | 70 + .../dialects/mysql/schema/columncompiler.js | 117 + .../lib/dialects/mysql/schema/compiler.js | 44 + .../dialects/mysql/schema/tablecompiler.js | 182 + .../knex/lib/dialects/mysql/transaction.js | 39 + .../knex/lib/dialects/mysql2/index.js | 74 + .../knex/lib/dialects/mysql2/transaction.js | 39 + .../knex/lib/dialects/oracle/formatter.js | 31 + .../knex/lib/dialects/oracle/index.js | 174 + .../lib/dialects/oracle/query/compiler.js | 211 + .../dialects/oracle/schema/columnbuilder.js | 19 + .../dialects/oracle/schema/columncompiler.js | 133 + .../lib/dialects/oracle/schema/compiler.js | 64 + .../dialects/oracle/schema/tablecompiler.js | 100 + .../knex/lib/dialects/oracle/stream.js | 52 + .../knex/lib/dialects/oracle/transaction.js | 57 + .../knex/lib/dialects/oracle/utils.js | 36 + .../knex/lib/dialects/postgres/index.js | 198 + .../lib/dialects/postgres/query/compiler.js | 106 + .../postgres/schema/columncompiler.js | 73 + .../lib/dialects/postgres/schema/compiler.js | 98 + .../dialects/postgres/schema/tablecompiler.js | 78 + .../knex/lib/dialects/postgres/utils.js | 101 + .../knex/lib/dialects/sqlite3/index.js | 159 + .../lib/dialects/sqlite3/query/compiler.js | 120 + .../dialects/sqlite3/schema/columncompiler.js | 21 + .../lib/dialects/sqlite3/schema/compiler.js | 43 + .../knex/lib/dialects/sqlite3/schema/ddl.js | 223 + .../dialects/sqlite3/schema/tablecompiler.js | 119 + .../knex/lib/dialects/strong-oracle/index.js | 20 + .../knex/lib/dialects/websql/index.js | 109 + .../knex/lib/dialects/websql/transaction.js | 45 + node_modules/knex/lib/formatter.js | 178 + node_modules/knex/lib/functionhelper.js | 14 + node_modules/knex/lib/helpers.js | 49 + node_modules/knex/lib/index.js | 62 + node_modules/knex/lib/interface.js | 82 + node_modules/knex/lib/migrate/index.js | 453 + node_modules/knex/lib/migrate/migrate-stub.js | 21 + .../knex/lib/migrate/stub/coffee.stub | 13 + node_modules/knex/lib/migrate/stub/eg.stub | 14 + node_modules/knex/lib/migrate/stub/js.stub | 15 + .../lib/migrate/stub/knexfile-coffee.stub | 34 + .../knex/lib/migrate/stub/knexfile-eg.stub | 43 + .../knex/lib/migrate/stub/knexfile-js.stub | 44 + .../knex/lib/migrate/stub/knexfile-ls.stub | 35 + node_modules/knex/lib/migrate/stub/ls.stub | 14 + node_modules/knex/lib/promise.js | 14 + node_modules/knex/lib/query/builder.js | 817 + node_modules/knex/lib/query/compiler.js | 434 + node_modules/knex/lib/query/joinclause.js | 91 + node_modules/knex/lib/query/methods.js | 6 + node_modules/knex/lib/query/string.js | 138 + node_modules/knex/lib/raw.js | 153 + node_modules/knex/lib/runner.js | 161 + node_modules/knex/lib/schema/builder.js | 46 + node_modules/knex/lib/schema/columnbuilder.js | 89 + .../knex/lib/schema/columncompiler.js | 139 + node_modules/knex/lib/schema/compiler.js | 71 + node_modules/knex/lib/schema/helpers.js | 26 + node_modules/knex/lib/schema/tablebuilder.js | 203 + node_modules/knex/lib/schema/tablecompiler.js | 205 + node_modules/knex/lib/seed/index.js | 130 + node_modules/knex/lib/seed/seed-stub.js | 19 + node_modules/knex/lib/seed/stub/coffee.stub | 9 + node_modules/knex/lib/seed/stub/eg.stub | 10 + node_modules/knex/lib/seed/stub/js.stub | 12 + node_modules/knex/lib/seed/stub/ls.stub | 10 + node_modules/knex/lib/statement.js | 1 + node_modules/knex/lib/transaction.js | 265 + node_modules/knex/lib/util/bluebird.js | 7 + node_modules/knex/lib/util/make-client.js | 71 + node_modules/knex/lib/util/make-knex.js | 143 + node_modules/knex/lib/util/noop.js | 3 + .../knex/lib/util/parse-connection.js | 67 + .../knex/node_modules/minimist/.travis.yml | 8 + .../knex/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../knex/node_modules/minimist/index.js | 230 + .../knex/node_modules/minimist/package.json | 97 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../knex/node_modules/minimist/test/bool.js | 166 + .../knex/node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../knex/node_modules/minimist/test/dotted.js | 22 + .../knex/node_modules/minimist/test/long.js | 31 + .../knex/node_modules/minimist/test/num.js | 36 + .../knex/node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../knex/node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/knex/package.json | 172 + node_modules/knex/src/.jshintrc | 14 + node_modules/knex/src/bin/cli.js | 203 + node_modules/knex/src/client.js | 264 + node_modules/knex/src/connection/index.js | 21 + node_modules/knex/src/dialects/maria/index.js | 152 + .../knex/src/dialects/maria/transaction.js | 41 + .../knex/src/dialects/mssql/formatter.js | 26 + node_modules/knex/src/dialects/mssql/index.js | 191 + .../knex/src/dialects/mssql/query/compiler.js | 192 + .../dialects/mssql/schema/columncompiler.js | 102 + .../src/dialects/mssql/schema/compiler.js | 53 + .../dialects/mssql/schema/tablecompiler.js | 128 + .../knex/src/dialects/mssql/transaction.js | 86 + node_modules/knex/src/dialects/mysql/index.js | 135 + .../knex/src/dialects/mysql/query/compiler.js | 73 + .../dialects/mysql/schema/columncompiler.js | 115 + .../src/dialects/mysql/schema/compiler.js | 43 + .../dialects/mysql/schema/tablecompiler.js | 186 + .../knex/src/dialects/mysql/transaction.js | 41 + .../knex/src/dialects/mysql2/index.js | 102 + .../knex/src/dialects/mysql2/transaction.js | 41 + .../knex/src/dialects/oracle/formatter.js | 31 + .../knex/src/dialects/oracle/index.js | 177 + .../src/dialects/oracle/query/compiler.js | 222 + .../dialects/oracle/schema/columnbuilder.js | 18 + .../dialects/oracle/schema/columncompiler.js | 138 + .../src/dialects/oracle/schema/compiler.js | 64 + .../dialects/oracle/schema/tablecompiler.js | 102 + .../knex/src/dialects/oracle/stream.js | 49 + .../knex/src/dialects/oracle/transaction.js | 60 + .../knex/src/dialects/oracle/utils.js | 38 + .../knex/src/dialects/postgres/index.js | 197 + .../src/dialects/postgres/query/compiler.js | 106 + .../postgres/schema/columncompiler.js | 72 + .../src/dialects/postgres/schema/compiler.js | 97 + .../dialects/postgres/schema/tablecompiler.js | 78 + .../knex/src/dialects/postgres/utils.js | 106 + .../knex/src/dialects/sqlite3/index.js | 157 + .../src/dialects/sqlite3/query/compiler.js | 122 + .../dialects/sqlite3/schema/columncompiler.js | 22 + .../src/dialects/sqlite3/schema/compiler.js | 41 + .../knex/src/dialects/sqlite3/schema/ddl.js | 239 + .../dialects/sqlite3/schema/tablecompiler.js | 119 + .../knex/src/dialects/strong-oracle/index.js | 18 + .../knex/src/dialects/websql/index.js | 107 + .../knex/src/dialects/websql/transaction.js | 48 + node_modules/knex/src/formatter.js | 178 + node_modules/knex/src/functionhelper.js | 12 + node_modules/knex/src/helpers.js | 48 + node_modules/knex/src/index.js | 61 + node_modules/knex/src/interface.js | 84 + node_modules/knex/src/migrate/index.js | 398 + node_modules/knex/src/migrate/migrate-stub.js | 19 + .../knex/src/migrate/stub/coffee.stub | 13 + node_modules/knex/src/migrate/stub/eg.stub | 14 + node_modules/knex/src/migrate/stub/js.stub | 15 + .../src/migrate/stub/knexfile-coffee.stub | 34 + .../knex/src/migrate/stub/knexfile-eg.stub | 43 + .../knex/src/migrate/stub/knexfile-js.stub | 44 + .../knex/src/migrate/stub/knexfile-ls.stub | 35 + node_modules/knex/src/migrate/stub/ls.stub | 14 + node_modules/knex/src/promise.js | 13 + node_modules/knex/src/query/builder.js | 815 + node_modules/knex/src/query/compiler.js | 443 + node_modules/knex/src/query/joinclause.js | 85 + node_modules/knex/src/query/methods.js | 83 + node_modules/knex/src/query/string.js | 127 + node_modules/knex/src/raw.js | 150 + node_modules/knex/src/runner.js | 169 + node_modules/knex/src/schema/builder.js | 64 + node_modules/knex/src/schema/columnbuilder.js | 95 + .../knex/src/schema/columncompiler.js | 141 + node_modules/knex/src/schema/compiler.js | 70 + node_modules/knex/src/schema/helpers.js | 25 + node_modules/knex/src/schema/tablebuilder.js | 255 + node_modules/knex/src/schema/tablecompiler.js | 207 + node_modules/knex/src/seed/index.js | 143 + node_modules/knex/src/seed/seed-stub.js | 17 + node_modules/knex/src/seed/stub/coffee.stub | 9 + node_modules/knex/src/seed/stub/eg.stub | 10 + node_modules/knex/src/seed/stub/js.stub | 12 + node_modules/knex/src/seed/stub/ls.stub | 10 + node_modules/knex/src/statement.js | 0 node_modules/knex/src/transaction.js | 272 + node_modules/knex/src/util/bluebird.js | 7 + node_modules/knex/src/util/make-client.js | 70 + node_modules/knex/src/util/make-knex.js | 140 + node_modules/knex/src/util/noop.js | 1 + .../knex/src/util/parse-connection.js | 55 + node_modules/lazy-cache/LICENSE | 21 + node_modules/lazy-cache/README.md | 130 + node_modules/lazy-cache/index.js | 67 + node_modules/lazy-cache/package.json | 105 + node_modules/liftoff/.jshintrc | 11 + node_modules/liftoff/.npmignore | 2 + node_modules/liftoff/.travis.yml | 9 + node_modules/liftoff/CHANGELOG | 115 + node_modules/liftoff/LICENSE | 22 + node_modules/liftoff/README.md | 304 + node_modules/liftoff/UPGRADING.md | 28 + node_modules/liftoff/appveyor.yml | 26 + node_modules/liftoff/index.js | 193 + node_modules/liftoff/lib/build_config_name.js | 17 + node_modules/liftoff/lib/file_search.js | 14 + node_modules/liftoff/lib/find_config.js | 25 + node_modules/liftoff/lib/find_cwd.js | 16 + node_modules/liftoff/lib/parse_options.js | 33 + node_modules/liftoff/lib/silent_require.js | 5 + .../liftoff/node_modules/minimist/.travis.yml | 8 + .../liftoff/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../liftoff/node_modules/minimist/index.js | 230 + .../node_modules/minimist/package.json | 99 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../node_modules/minimist/test/bool.js | 166 + .../node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/long.js | 31 + .../liftoff/node_modules/minimist/test/num.js | 36 + .../node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/liftoff/package.json | 94 + node_modules/lodash/LICENSE | 22 + node_modules/lodash/README.md | 121 + node_modules/lodash/array.js | 44 + node_modules/lodash/array/chunk.js | 46 + node_modules/lodash/array/compact.js | 30 + node_modules/lodash/array/difference.js | 29 + node_modules/lodash/array/drop.js | 39 + node_modules/lodash/array/dropRight.js | 40 + node_modules/lodash/array/dropRightWhile.js | 59 + node_modules/lodash/array/dropWhile.js | 59 + node_modules/lodash/array/fill.js | 44 + node_modules/lodash/array/findIndex.js | 53 + node_modules/lodash/array/findLastIndex.js | 53 + node_modules/lodash/array/first.js | 22 + node_modules/lodash/array/flatten.js | 32 + node_modules/lodash/array/flattenDeep.js | 21 + node_modules/lodash/array/head.js | 1 + node_modules/lodash/array/indexOf.js | 53 + node_modules/lodash/array/initial.js | 20 + node_modules/lodash/array/intersection.js | 58 + node_modules/lodash/array/last.js | 19 + node_modules/lodash/array/lastIndexOf.js | 60 + node_modules/lodash/array/object.js | 1 + node_modules/lodash/array/pull.js | 52 + node_modules/lodash/array/pullAt.js | 40 + node_modules/lodash/array/remove.js | 64 + node_modules/lodash/array/rest.js | 21 + node_modules/lodash/array/slice.js | 30 + node_modules/lodash/array/sortedIndex.js | 53 + node_modules/lodash/array/sortedLastIndex.js | 25 + node_modules/lodash/array/tail.js | 1 + node_modules/lodash/array/take.js | 39 + node_modules/lodash/array/takeRight.js | 40 + node_modules/lodash/array/takeRightWhile.js | 59 + node_modules/lodash/array/takeWhile.js | 59 + node_modules/lodash/array/union.js | 24 + node_modules/lodash/array/uniq.js | 71 + node_modules/lodash/array/unique.js | 1 + node_modules/lodash/array/unzip.js | 47 + node_modules/lodash/array/unzipWith.js | 41 + node_modules/lodash/array/without.js | 27 + node_modules/lodash/array/xor.js | 35 + node_modules/lodash/array/zip.js | 21 + node_modules/lodash/array/zipObject.js | 43 + node_modules/lodash/array/zipWith.js | 36 + node_modules/lodash/chain.js | 16 + node_modules/lodash/chain/chain.js | 35 + node_modules/lodash/chain/commit.js | 1 + node_modules/lodash/chain/concat.js | 1 + node_modules/lodash/chain/lodash.js | 125 + node_modules/lodash/chain/plant.js | 1 + node_modules/lodash/chain/reverse.js | 1 + node_modules/lodash/chain/run.js | 1 + node_modules/lodash/chain/tap.js | 29 + node_modules/lodash/chain/thru.js | 26 + node_modules/lodash/chain/toJSON.js | 1 + node_modules/lodash/chain/toString.js | 1 + node_modules/lodash/chain/value.js | 1 + node_modules/lodash/chain/valueOf.js | 1 + node_modules/lodash/chain/wrapperChain.js | 32 + node_modules/lodash/chain/wrapperCommit.js | 32 + node_modules/lodash/chain/wrapperConcat.js | 34 + node_modules/lodash/chain/wrapperPlant.js | 45 + node_modules/lodash/chain/wrapperReverse.js | 43 + node_modules/lodash/chain/wrapperToString.js | 17 + node_modules/lodash/chain/wrapperValue.js | 20 + node_modules/lodash/collection.js | 44 + node_modules/lodash/collection/all.js | 1 + node_modules/lodash/collection/any.js | 1 + node_modules/lodash/collection/at.js | 29 + node_modules/lodash/collection/collect.js | 1 + node_modules/lodash/collection/contains.js | 1 + node_modules/lodash/collection/countBy.js | 54 + node_modules/lodash/collection/detect.js | 1 + node_modules/lodash/collection/each.js | 1 + node_modules/lodash/collection/eachRight.js | 1 + node_modules/lodash/collection/every.js | 66 + node_modules/lodash/collection/filter.js | 61 + node_modules/lodash/collection/find.js | 56 + node_modules/lodash/collection/findLast.js | 25 + node_modules/lodash/collection/findWhere.js | 37 + node_modules/lodash/collection/foldl.js | 1 + node_modules/lodash/collection/foldr.js | 1 + node_modules/lodash/collection/forEach.js | 37 + .../lodash/collection/forEachRight.js | 26 + node_modules/lodash/collection/groupBy.js | 59 + node_modules/lodash/collection/include.js | 1 + node_modules/lodash/collection/includes.js | 57 + node_modules/lodash/collection/indexBy.js | 53 + node_modules/lodash/collection/inject.js | 1 + node_modules/lodash/collection/invoke.js | 42 + node_modules/lodash/collection/map.js | 68 + node_modules/lodash/collection/max.js | 1 + node_modules/lodash/collection/min.js | 1 + node_modules/lodash/collection/partition.js | 66 + node_modules/lodash/collection/pluck.js | 31 + node_modules/lodash/collection/reduce.js | 44 + node_modules/lodash/collection/reduceRight.js | 29 + node_modules/lodash/collection/reject.js | 50 + node_modules/lodash/collection/sample.js | 50 + node_modules/lodash/collection/select.js | 1 + node_modules/lodash/collection/shuffle.js | 24 + node_modules/lodash/collection/size.js | 30 + node_modules/lodash/collection/some.js | 67 + node_modules/lodash/collection/sortBy.js | 71 + node_modules/lodash/collection/sortByAll.js | 52 + node_modules/lodash/collection/sortByOrder.js | 55 + node_modules/lodash/collection/sum.js | 1 + node_modules/lodash/collection/where.js | 37 + node_modules/lodash/date.js | 3 + node_modules/lodash/date/now.js | 24 + node_modules/lodash/function.js | 28 + node_modules/lodash/function/after.js | 48 + node_modules/lodash/function/ary.js | 34 + node_modules/lodash/function/backflow.js | 1 + node_modules/lodash/function/before.js | 42 + node_modules/lodash/function/bind.js | 56 + node_modules/lodash/function/bindAll.js | 50 + node_modules/lodash/function/bindKey.js | 66 + node_modules/lodash/function/compose.js | 1 + node_modules/lodash/function/curry.js | 51 + node_modules/lodash/function/curryRight.js | 48 + node_modules/lodash/function/debounce.js | 181 + node_modules/lodash/function/defer.js | 25 + node_modules/lodash/function/delay.js | 26 + node_modules/lodash/function/flow.js | 25 + node_modules/lodash/function/flowRight.js | 25 + node_modules/lodash/function/memoize.js | 80 + node_modules/lodash/function/modArgs.js | 58 + node_modules/lodash/function/negate.js | 32 + node_modules/lodash/function/once.js | 24 + node_modules/lodash/function/partial.js | 43 + node_modules/lodash/function/partialRight.js | 42 + node_modules/lodash/function/rearg.js | 40 + node_modules/lodash/function/restParam.js | 58 + node_modules/lodash/function/spread.js | 44 + node_modules/lodash/function/throttle.js | 62 + node_modules/lodash/function/wrap.js | 33 + node_modules/lodash/index.js | 12351 +++++++++ node_modules/lodash/internal/LazyWrapper.js | 26 + node_modules/lodash/internal/LodashWrapper.js | 21 + node_modules/lodash/internal/MapCache.js | 24 + node_modules/lodash/internal/SetCache.js | 29 + node_modules/lodash/internal/arrayConcat.js | 25 + node_modules/lodash/internal/arrayCopy.js | 20 + node_modules/lodash/internal/arrayEach.js | 22 + .../lodash/internal/arrayEachRight.js | 21 + node_modules/lodash/internal/arrayEvery.js | 23 + node_modules/lodash/internal/arrayExtremum.js | 30 + node_modules/lodash/internal/arrayFilter.js | 25 + node_modules/lodash/internal/arrayMap.js | 21 + node_modules/lodash/internal/arrayPush.js | 20 + node_modules/lodash/internal/arrayReduce.js | 26 + .../lodash/internal/arrayReduceRight.js | 24 + node_modules/lodash/internal/arraySome.js | 23 + node_modules/lodash/internal/arraySum.js | 20 + .../lodash/internal/assignDefaults.js | 13 + .../lodash/internal/assignOwnDefaults.js | 26 + node_modules/lodash/internal/assignWith.js | 32 + node_modules/lodash/internal/baseAssign.js | 19 + node_modules/lodash/internal/baseAt.js | 32 + node_modules/lodash/internal/baseCallback.js | 35 + node_modules/lodash/internal/baseClone.js | 128 + .../lodash/internal/baseCompareAscending.js | 34 + node_modules/lodash/internal/baseCopy.js | 23 + node_modules/lodash/internal/baseCreate.js | 23 + node_modules/lodash/internal/baseDelay.js | 21 + .../lodash/internal/baseDifference.js | 55 + node_modules/lodash/internal/baseEach.js | 15 + node_modules/lodash/internal/baseEachRight.js | 15 + node_modules/lodash/internal/baseEvery.js | 22 + node_modules/lodash/internal/baseExtremum.js | 29 + node_modules/lodash/internal/baseFill.js | 31 + node_modules/lodash/internal/baseFilter.js | 22 + node_modules/lodash/internal/baseFind.js | 25 + node_modules/lodash/internal/baseFindIndex.js | 23 + node_modules/lodash/internal/baseFlatten.js | 41 + node_modules/lodash/internal/baseFor.js | 17 + node_modules/lodash/internal/baseForIn.js | 17 + node_modules/lodash/internal/baseForOwn.js | 17 + .../lodash/internal/baseForOwnRight.js | 17 + node_modules/lodash/internal/baseForRight.js | 15 + node_modules/lodash/internal/baseFunctions.js | 27 + node_modules/lodash/internal/baseGet.js | 29 + node_modules/lodash/internal/baseIndexOf.js | 27 + node_modules/lodash/internal/baseIsEqual.js | 28 + .../lodash/internal/baseIsEqualDeep.js | 102 + .../lodash/internal/baseIsFunction.js | 15 + node_modules/lodash/internal/baseIsMatch.js | 52 + node_modules/lodash/internal/baseLodash.js | 10 + node_modules/lodash/internal/baseMap.js | 23 + node_modules/lodash/internal/baseMatches.js | 30 + .../lodash/internal/baseMatchesProperty.js | 45 + node_modules/lodash/internal/baseMerge.js | 56 + node_modules/lodash/internal/baseMergeDeep.js | 67 + node_modules/lodash/internal/baseProperty.js | 14 + .../lodash/internal/basePropertyDeep.js | 19 + node_modules/lodash/internal/basePullAt.js | 30 + node_modules/lodash/internal/baseRandom.js | 18 + node_modules/lodash/internal/baseReduce.js | 24 + node_modules/lodash/internal/baseSetData.js | 17 + node_modules/lodash/internal/baseSlice.js | 32 + node_modules/lodash/internal/baseSome.js | 23 + node_modules/lodash/internal/baseSortBy.js | 21 + .../lodash/internal/baseSortByOrder.js | 31 + node_modules/lodash/internal/baseSum.js | 20 + node_modules/lodash/internal/baseToString.js | 13 + node_modules/lodash/internal/baseUniq.js | 60 + node_modules/lodash/internal/baseValues.js | 22 + node_modules/lodash/internal/baseWhile.js | 24 + .../lodash/internal/baseWrapperValue.js | 29 + node_modules/lodash/internal/binaryIndex.js | 39 + node_modules/lodash/internal/binaryIndexBy.js | 57 + node_modules/lodash/internal/bindCallback.js | 39 + node_modules/lodash/internal/bufferClone.js | 20 + node_modules/lodash/internal/cacheIndexOf.js | 19 + node_modules/lodash/internal/cachePush.js | 20 + .../lodash/internal/charsLeftIndex.js | 18 + .../lodash/internal/charsRightIndex.js | 17 + .../lodash/internal/compareAscending.js | 16 + .../lodash/internal/compareMultiple.js | 44 + node_modules/lodash/internal/composeArgs.js | 34 + .../lodash/internal/composeArgsRight.js | 36 + .../lodash/internal/createAggregator.js | 35 + .../lodash/internal/createAssigner.js | 41 + .../lodash/internal/createBaseEach.js | 31 + node_modules/lodash/internal/createBaseFor.js | 27 + .../lodash/internal/createBindWrapper.js | 22 + node_modules/lodash/internal/createCache.js | 21 + .../lodash/internal/createCompounder.js | 26 + .../lodash/internal/createCtorWrapper.js | 37 + node_modules/lodash/internal/createCurry.js | 23 + .../lodash/internal/createDefaults.js | 22 + .../lodash/internal/createExtremum.js | 33 + node_modules/lodash/internal/createFind.js | 25 + .../lodash/internal/createFindIndex.js | 21 + node_modules/lodash/internal/createFindKey.js | 18 + node_modules/lodash/internal/createFlow.js | 74 + node_modules/lodash/internal/createForEach.js | 20 + node_modules/lodash/internal/createForIn.js | 20 + node_modules/lodash/internal/createForOwn.js | 19 + .../lodash/internal/createHybridWrapper.js | 111 + .../lodash/internal/createObjectMapper.js | 26 + node_modules/lodash/internal/createPadDir.js | 18 + node_modules/lodash/internal/createPadding.js | 29 + node_modules/lodash/internal/createPartial.js | 20 + .../lodash/internal/createPartialWrapper.js | 43 + node_modules/lodash/internal/createReduce.js | 22 + node_modules/lodash/internal/createRound.js | 23 + .../lodash/internal/createSortedIndex.js | 20 + node_modules/lodash/internal/createWrapper.js | 86 + node_modules/lodash/internal/deburrLetter.js | 33 + node_modules/lodash/internal/equalArrays.js | 51 + node_modules/lodash/internal/equalByTag.js | 48 + node_modules/lodash/internal/equalObjects.js | 67 + .../lodash/internal/escapeHtmlChar.js | 22 + .../lodash/internal/escapeRegExpChar.js | 38 + .../lodash/internal/escapeStringChar.js | 22 + node_modules/lodash/internal/getData.js | 15 + node_modules/lodash/internal/getFuncName.js | 25 + node_modules/lodash/internal/getLength.js | 15 + node_modules/lodash/internal/getMatchData.js | 21 + node_modules/lodash/internal/getNative.js | 16 + node_modules/lodash/internal/getView.js | 33 + node_modules/lodash/internal/indexOfNaN.js | 23 + .../lodash/internal/initCloneArray.js | 26 + .../lodash/internal/initCloneByTag.js | 63 + .../lodash/internal/initCloneObject.js | 16 + node_modules/lodash/internal/invokePath.js | 26 + node_modules/lodash/internal/isArrayLike.js | 15 + node_modules/lodash/internal/isIndex.js | 24 + .../lodash/internal/isIterateeCall.js | 28 + node_modules/lodash/internal/isKey.js | 28 + node_modules/lodash/internal/isLaziable.js | 27 + node_modules/lodash/internal/isLength.js | 20 + node_modules/lodash/internal/isObjectLike.js | 12 + node_modules/lodash/internal/isSpace.js | 14 + .../lodash/internal/isStrictComparable.js | 15 + node_modules/lodash/internal/lazyClone.js | 23 + node_modules/lodash/internal/lazyReverse.js | 23 + node_modules/lodash/internal/lazyValue.js | 72 + node_modules/lodash/internal/mapDelete.js | 14 + node_modules/lodash/internal/mapGet.js | 14 + node_modules/lodash/internal/mapHas.js | 20 + node_modules/lodash/internal/mapSet.js | 18 + node_modules/lodash/internal/mergeData.js | 89 + node_modules/lodash/internal/mergeDefaults.js | 15 + node_modules/lodash/internal/metaMap.js | 9 + node_modules/lodash/internal/pickByArray.js | 28 + .../lodash/internal/pickByCallback.js | 22 + node_modules/lodash/internal/reEscape.js | 4 + node_modules/lodash/internal/reEvaluate.js | 4 + node_modules/lodash/internal/reInterpolate.js | 4 + node_modules/lodash/internal/realNames.js | 4 + node_modules/lodash/internal/reorder.js | 29 + .../lodash/internal/replaceHolders.js | 28 + node_modules/lodash/internal/setData.js | 41 + node_modules/lodash/internal/shimKeys.js | 41 + node_modules/lodash/internal/sortedUniq.js | 29 + node_modules/lodash/internal/toIterable.js | 22 + node_modules/lodash/internal/toObject.js | 14 + node_modules/lodash/internal/toPath.js | 28 + .../lodash/internal/trimmedLeftIndex.js | 19 + .../lodash/internal/trimmedRightIndex.js | 18 + .../lodash/internal/unescapeHtmlChar.js | 22 + node_modules/lodash/internal/wrapperClone.js | 18 + node_modules/lodash/lang.js | 32 + node_modules/lodash/lang/clone.js | 70 + node_modules/lodash/lang/cloneDeep.js | 55 + node_modules/lodash/lang/eq.js | 1 + node_modules/lodash/lang/gt.js | 25 + node_modules/lodash/lang/gte.js | 25 + node_modules/lodash/lang/isArguments.js | 34 + node_modules/lodash/lang/isArray.js | 40 + node_modules/lodash/lang/isBoolean.js | 35 + node_modules/lodash/lang/isDate.js | 35 + node_modules/lodash/lang/isElement.js | 24 + node_modules/lodash/lang/isEmpty.js | 47 + node_modules/lodash/lang/isEqual.js | 54 + node_modules/lodash/lang/isError.js | 36 + node_modules/lodash/lang/isFinite.js | 35 + node_modules/lodash/lang/isFunction.js | 38 + node_modules/lodash/lang/isMatch.js | 49 + node_modules/lodash/lang/isNaN.js | 34 + node_modules/lodash/lang/isNative.js | 48 + node_modules/lodash/lang/isNull.js | 21 + node_modules/lodash/lang/isNumber.js | 41 + node_modules/lodash/lang/isObject.js | 28 + node_modules/lodash/lang/isPlainObject.js | 71 + node_modules/lodash/lang/isRegExp.js | 35 + node_modules/lodash/lang/isString.js | 35 + node_modules/lodash/lang/isTypedArray.js | 74 + node_modules/lodash/lang/isUndefined.js | 21 + node_modules/lodash/lang/lt.js | 25 + node_modules/lodash/lang/lte.js | 25 + node_modules/lodash/lang/toArray.js | 32 + node_modules/lodash/lang/toPlainObject.js | 31 + node_modules/lodash/math.js | 9 + node_modules/lodash/math/add.js | 19 + node_modules/lodash/math/ceil.js | 25 + node_modules/lodash/math/floor.js | 25 + node_modules/lodash/math/max.js | 56 + node_modules/lodash/math/min.js | 56 + node_modules/lodash/math/round.js | 25 + node_modules/lodash/math/sum.js | 50 + node_modules/lodash/number.js | 4 + node_modules/lodash/number/inRange.js | 47 + node_modules/lodash/number/random.js | 70 + node_modules/lodash/object.js | 31 + node_modules/lodash/object/assign.js | 43 + node_modules/lodash/object/create.js | 47 + node_modules/lodash/object/defaults.js | 25 + node_modules/lodash/object/defaultsDeep.js | 25 + node_modules/lodash/object/extend.js | 1 + node_modules/lodash/object/findKey.js | 54 + node_modules/lodash/object/findLastKey.js | 54 + node_modules/lodash/object/forIn.js | 33 + node_modules/lodash/object/forInRight.js | 31 + node_modules/lodash/object/forOwn.js | 33 + node_modules/lodash/object/forOwnRight.js | 31 + node_modules/lodash/object/functions.js | 23 + node_modules/lodash/object/get.js | 33 + node_modules/lodash/object/has.js | 57 + node_modules/lodash/object/invert.js | 60 + node_modules/lodash/object/keys.js | 45 + node_modules/lodash/object/keysIn.js | 64 + node_modules/lodash/object/mapKeys.js | 25 + node_modules/lodash/object/mapValues.js | 46 + node_modules/lodash/object/merge.js | 54 + node_modules/lodash/object/methods.js | 1 + node_modules/lodash/object/omit.js | 47 + node_modules/lodash/object/pairs.js | 33 + node_modules/lodash/object/pick.js | 42 + node_modules/lodash/object/result.js | 49 + node_modules/lodash/object/set.js | 55 + node_modules/lodash/object/transform.js | 61 + node_modules/lodash/object/values.js | 33 + node_modules/lodash/object/valuesIn.js | 31 + node_modules/lodash/package.json | 121 + node_modules/lodash/string.js | 25 + node_modules/lodash/string/camelCase.js | 27 + node_modules/lodash/string/capitalize.js | 21 + node_modules/lodash/string/deburr.js | 29 + node_modules/lodash/string/endsWith.js | 40 + node_modules/lodash/string/escape.js | 48 + node_modules/lodash/string/escapeRegExp.js | 32 + node_modules/lodash/string/kebabCase.js | 26 + node_modules/lodash/string/pad.js | 47 + node_modules/lodash/string/padLeft.js | 27 + node_modules/lodash/string/padRight.js | 27 + node_modules/lodash/string/parseInt.js | 46 + node_modules/lodash/string/repeat.js | 47 + node_modules/lodash/string/snakeCase.js | 26 + node_modules/lodash/string/startCase.js | 26 + node_modules/lodash/string/startsWith.js | 36 + node_modules/lodash/string/template.js | 226 + .../lodash/string/templateSettings.js | 67 + node_modules/lodash/string/trim.js | 42 + node_modules/lodash/string/trimLeft.js | 36 + node_modules/lodash/string/trimRight.js | 36 + node_modules/lodash/string/trunc.js | 105 + node_modules/lodash/string/unescape.js | 33 + node_modules/lodash/string/words.js | 38 + node_modules/lodash/support.js | 10 + node_modules/lodash/utility.js | 18 + node_modules/lodash/utility/attempt.js | 32 + node_modules/lodash/utility/callback.js | 53 + node_modules/lodash/utility/constant.js | 23 + node_modules/lodash/utility/identity.js | 20 + node_modules/lodash/utility/iteratee.js | 1 + node_modules/lodash/utility/matches.js | 33 + .../lodash/utility/matchesProperty.js | 32 + node_modules/lodash/utility/method.js | 33 + node_modules/lodash/utility/methodOf.js | 32 + node_modules/lodash/utility/mixin.js | 82 + node_modules/lodash/utility/noop.js | 19 + node_modules/lodash/utility/property.js | 31 + node_modules/lodash/utility/propertyOf.js | 30 + node_modules/lodash/utility/range.js | 66 + node_modules/lodash/utility/times.js | 60 + node_modules/lodash/utility/uniqueId.js | 27 + node_modules/longest/LICENSE | 21 + node_modules/longest/README.md | 65 + node_modules/longest/index.js | 37 + node_modules/longest/package.json | 96 + node_modules/media-typer/HISTORY.md | 22 + node_modules/media-typer/LICENSE | 22 + node_modules/media-typer/README.md | 81 + node_modules/media-typer/index.js | 270 + node_modules/media-typer/package.json | 84 + node_modules/merge-descriptors/HISTORY.md | 21 + node_modules/merge-descriptors/LICENSE | 23 + node_modules/merge-descriptors/README.md | 48 + node_modules/merge-descriptors/index.js | 60 + node_modules/merge-descriptors/package.json | 164 + node_modules/methods/HISTORY.md | 29 + node_modules/methods/LICENSE | 24 + node_modules/methods/README.md | 51 + node_modules/methods/index.js | 69 + node_modules/methods/package.json | 114 + node_modules/mime-db/HISTORY.md | 320 + node_modules/mime-db/LICENSE | 22 + node_modules/mime-db/README.md | 82 + node_modules/mime-db/db.json | 6575 +++++ node_modules/mime-db/index.js | 11 + node_modules/mime-db/package.json | 125 + node_modules/mime-types/HISTORY.md | 191 + node_modules/mime-types/LICENSE | 23 + node_modules/mime-types/README.md | 103 + node_modules/mime-types/index.js | 188 + node_modules/mime-types/package.json | 115 + node_modules/mime/.npmignore | 0 node_modules/mime/LICENSE | 19 + node_modules/mime/README.md | 90 + node_modules/mime/build/build.js | 11 + node_modules/mime/build/test.js | 57 + node_modules/mime/cli.js | 8 + node_modules/mime/mime.js | 108 + node_modules/mime/package.json | 98 + node_modules/mime/types.json | 1 + node_modules/minimatch/LICENSE | 15 + node_modules/minimatch/README.md | 216 + node_modules/minimatch/browser.js | 1159 + node_modules/minimatch/minimatch.js | 912 + node_modules/minimatch/package.json | 88 + node_modules/minimist/.travis.yml | 4 + node_modules/minimist/LICENSE | 18 + node_modules/minimist/example/parse.js | 2 + node_modules/minimist/index.js | 187 + node_modules/minimist/package.json | 93 + node_modules/minimist/readme.markdown | 73 + node_modules/minimist/test/dash.js | 24 + node_modules/minimist/test/default_bool.js | 20 + node_modules/minimist/test/dotted.js | 16 + node_modules/minimist/test/long.js | 31 + node_modules/minimist/test/parse.js | 318 + node_modules/minimist/test/parse_modified.js | 9 + node_modules/minimist/test/short.js | 67 + node_modules/minimist/test/whitespace.js | 8 + 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 + 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/ms/.npmignore | 5 + node_modules/ms/History.md | 66 + node_modules/ms/LICENSE | 20 + node_modules/ms/README.md | 35 + node_modules/ms/index.js | 125 + node_modules/ms/package.json | 75 + node_modules/negotiator/HISTORY.md | 76 + node_modules/negotiator/LICENSE | 24 + node_modules/negotiator/README.md | 203 + node_modules/negotiator/index.js | 62 + node_modules/negotiator/lib/charset.js | 102 + node_modules/negotiator/lib/encoding.js | 118 + node_modules/negotiator/lib/language.js | 112 + node_modules/negotiator/lib/mediaType.js | 179 + node_modules/negotiator/package.json | 112 + node_modules/on-finished/HISTORY.md | 88 + node_modules/on-finished/LICENSE | 23 + node_modules/on-finished/README.md | 154 + node_modules/on-finished/index.js | 196 + node_modules/on-finished/package.json | 98 + 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 | 478 + node_modules/optimist/package.json | 88 + node_modules/optimist/readme.markdown | 487 + node_modules/optimist/test/_.js | 71 + node_modules/optimist/test/_/argv.js | 2 + node_modules/optimist/test/_/bin.js | 3 + node_modules/optimist/test/parse.js | 446 + node_modules/optimist/test/usage.js | 292 + node_modules/parseurl/HISTORY.md | 47 + node_modules/parseurl/LICENSE | 24 + node_modules/parseurl/README.md | 120 + node_modules/parseurl/index.js | 138 + node_modules/parseurl/package.json | 116 + node_modules/path-to-regexp/History.md | 36 + node_modules/path-to-regexp/LICENSE | 21 + node_modules/path-to-regexp/Readme.md | 35 + node_modules/path-to-regexp/index.js | 129 + node_modules/path-to-regexp/package.json | 211 + node_modules/pg-connection-string/.npmignore | 25 + node_modules/pg-connection-string/.travis.yml | 3 + node_modules/pg-connection-string/LICENSE | 21 + node_modules/pg-connection-string/README.md | 18 + node_modules/pg-connection-string/index.js | 62 + .../pg-connection-string/package.json | 80 + .../pg-connection-string/test/parse.js | 126 + node_modules/pool2/README.md | 201 + node_modules/pool2/index.js | 7 + node_modules/pool2/lib/cluster.js | 177 + node_modules/pool2/lib/pool.js | 557 + node_modules/pool2/lib/resource-request.js | 100 + node_modules/pool2/package.json | 97 + node_modules/promise/.jshintrc | 5 + node_modules/promise/.npmignore | 6 + node_modules/promise/LICENSE | 19 + node_modules/promise/Readme.md | 221 + node_modules/promise/core.js | 5 + node_modules/promise/index.js | 6 + node_modules/promise/lib/core.js | 105 + node_modules/promise/lib/done.js | 14 + node_modules/promise/lib/es6-extensions.js | 108 + node_modules/promise/lib/node-extensions.js | 63 + node_modules/promise/package.json | 82 + node_modules/promise/polyfill-done.js | 12 + node_modules/promise/polyfill.js | 10 + node_modules/proxy-addr/HISTORY.md | 80 + node_modules/proxy-addr/LICENSE | 22 + node_modules/proxy-addr/README.md | 137 + node_modules/proxy-addr/index.js | 347 + node_modules/proxy-addr/package.json | 115 + node_modules/qs/.eslintignore | 1 + node_modules/qs/.npmignore | 19 + node_modules/qs/.travis.yml | 6 + node_modules/qs/CHANGELOG.md | 88 + node_modules/qs/CONTRIBUTING.md | 1 + node_modules/qs/LICENSE | 28 + node_modules/qs/README.md | 317 + node_modules/qs/bower.json | 22 + node_modules/qs/lib/index.js | 15 + node_modules/qs/lib/parse.js | 186 + node_modules/qs/lib/stringify.js | 121 + node_modules/qs/lib/utils.js | 190 + node_modules/qs/package.json | 82 + node_modules/qs/test/parse.js | 478 + node_modules/qs/test/stringify.js | 259 + node_modules/qs/test/utils.js | 28 + node_modules/range-parser/HISTORY.md | 40 + node_modules/range-parser/LICENSE | 22 + node_modules/range-parser/README.md | 57 + node_modules/range-parser/index.js | 63 + node_modules/range-parser/package.json | 102 + node_modules/readable-stream/.npmignore | 5 + node_modules/readable-stream/LICENSE | 18 + node_modules/readable-stream/README.md | 15 + node_modules/readable-stream/duplex.js | 1 + node_modules/readable-stream/float.patch | 923 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 951 + .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 477 + node_modules/readable-stream/package.json | 95 + node_modules/readable-stream/passthrough.js | 1 + node_modules/readable-stream/readable.js | 7 + node_modules/readable-stream/transform.js | 1 + node_modules/readable-stream/writable.js | 1 + node_modules/repeat-string/LICENSE | 21 + node_modules/repeat-string/README.md | 118 + node_modules/repeat-string/index.js | 68 + node_modules/repeat-string/package.json | 129 + node_modules/resolve/.travis.yml | 4 + node_modules/resolve/LICENSE | 18 + node_modules/resolve/example/async.js | 5 + node_modules/resolve/example/sync.js | 3 + node_modules/resolve/index.js | 5 + node_modules/resolve/lib/async.js | 192 + node_modules/resolve/lib/caller.js | 8 + node_modules/resolve/lib/core.js | 4 + node_modules/resolve/lib/core.json | 38 + .../resolve/lib/node-modules-paths.js | 38 + node_modules/resolve/lib/sync.js | 81 + node_modules/resolve/package.json | 82 + node_modules/resolve/readme.markdown | 148 + node_modules/resolve/test/core.js | 12 + node_modules/resolve/test/dotdot.js | 29 + node_modules/resolve/test/dotdot/abc/index.js | 2 + node_modules/resolve/test/dotdot/index.js | 1 + node_modules/resolve/test/faulty_basedir.js | 17 + node_modules/resolve/test/filter.js | 18 + node_modules/resolve/test/filter_sync.js | 15 + node_modules/resolve/test/mock.js | 142 + node_modules/resolve/test/mock_sync.js | 68 + node_modules/resolve/test/module_dir.js | 56 + .../test/module_dir/xmodules/aaa/index.js | 1 + .../test/module_dir/ymodules/aaa/index.js | 1 + .../test/module_dir/zmodules/bbb/main.js | 1 + .../test/module_dir/zmodules/bbb/package.json | 3 + node_modules/resolve/test/node_path.js | 48 + .../resolve/test/node_path/x/aaa/index.js | 1 + .../resolve/test/node_path/x/ccc/index.js | 1 + .../resolve/test/node_path/y/bbb/index.js | 1 + .../resolve/test/node_path/y/ccc/index.js | 1 + node_modules/resolve/test/nonstring.js | 9 + node_modules/resolve/test/pathfilter.js | 35 + .../resolve/test/pathfilter/deep_ref/main.js | 0 .../deep_ref/node_modules/deep/alt.js | 0 .../deep_ref/node_modules/deep/deeper/ref.js | 0 .../deep_ref/node_modules/deep/package.json | 4 + .../deep_ref/node_modules/deep/ref.js | 0 node_modules/resolve/test/precedence.js | 23 + node_modules/resolve/test/precedence/aaa.js | 1 + .../resolve/test/precedence/aaa/index.js | 1 + .../resolve/test/precedence/aaa/main.js | 1 + node_modules/resolve/test/precedence/bbb.js | 1 + .../resolve/test/precedence/bbb/main.js | 1 + node_modules/resolve/test/resolver.js | 281 + .../resolver/bar/node_modules/foo/index.js | 1 + .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 3 + .../resolve/test/resolver/baz/quux.js | 1 + .../biz/node_modules/garply/lib/index.js | 1 + .../biz/node_modules/garply/package.json | 3 + .../resolver/biz/node_modules/grux/index.js | 1 + .../resolver/biz/node_modules/tiv/index.js | 1 + node_modules/resolve/test/resolver/cup.coffee | 1 + node_modules/resolve/test/resolver/foo.js | 1 + .../test/resolver/incorrect_main/index.js | 2 + .../test/resolver/incorrect_main/package.json | 3 + node_modules/resolve/test/resolver/mug.coffee | 0 node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../punycode/node_modules/punycode/index.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 + .../test/resolver/without_basedir/main.js | 6 + .../without_basedir/node_modules/mymodule.js | 1 + node_modules/resolve/test/resolver_sync.js | 180 + node_modules/resolve/test/subdirs.js | 13 + .../test/subdirs/node_modules/a/b/c/x.json | 1 + .../test/subdirs/node_modules/a/package.json | 1 + node_modules/right-align/LICENSE | 21 + node_modules/right-align/README.md | 77 + node_modules/right-align/index.js | 16 + node_modules/right-align/package.json | 93 + node_modules/send/HISTORY.md | 310 + node_modules/send/LICENSE | 23 + node_modules/send/README.md | 195 + node_modules/send/index.js | 820 + node_modules/send/package.json | 115 + node_modules/serve-static/HISTORY.md | 303 + node_modules/serve-static/LICENSE | 25 + node_modules/serve-static/README.md | 236 + node_modules/serve-static/index.js | 187 + node_modules/serve-static/package.json | 108 + node_modules/simple-backoff/.npmignore | 1 + node_modules/simple-backoff/README.md | 96 + node_modules/simple-backoff/package.json | 80 + node_modules/simple-backoff/simple-backoff.js | 95 + .../simple-backoff/simple-backoff.test.js | 133 + node_modules/source-map/README.md | 510 + node_modules/source-map/build/assert-shim.js | 56 + node_modules/source-map/build/mini-require.js | 152 + .../source-map/build/prefix-source-map.jsm | 21 + .../source-map/build/prefix-utils.jsm | 18 + .../source-map/build/suffix-browser.js | 8 + .../source-map/build/suffix-source-map.jsm | 6 + .../source-map/build/suffix-utils.jsm | 21 + node_modules/source-map/build/test-prefix.js | 8 + node_modules/source-map/build/test-suffix.js | 3 + node_modules/source-map/lib/source-map.js | 8 + .../source-map/lib/source-map/array-set.js | 107 + .../source-map/lib/source-map/base64-vlq.js | 146 + .../source-map/lib/source-map/base64.js | 73 + .../lib/source-map/binary-search.js | 117 + .../source-map/lib/source-map/mapping-list.js | 86 + .../source-map/lib/source-map/quick-sort.js | 120 + .../lib/source-map/source-map-consumer.js | 1077 + .../lib/source-map/source-map-generator.js | 399 + .../source-map/lib/source-map/source-node.js | 414 + .../source-map/lib/source-map/util.js | 370 + node_modules/source-map/package.json | 226 + node_modules/statuses/LICENSE | 22 + node_modules/statuses/README.md | 114 + node_modules/statuses/codes.json | 64 + node_modules/statuses/index.js | 60 + node_modules/statuses/package.json | 111 + 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/strip-ansi/index.js | 6 + node_modules/strip-ansi/license | 21 + node_modules/strip-ansi/package.json | 115 + node_modules/strip-ansi/readme.md | 33 + node_modules/supports-color/index.js | 50 + node_modules/supports-color/license | 21 + node_modules/supports-color/package.json | 105 + node_modules/supports-color/readme.md | 36 + node_modules/tildify/index.js | 6 + node_modules/tildify/package.json | 92 + node_modules/tildify/readme.md | 30 + node_modules/transformers/.npmignore | 2 + node_modules/transformers/README.md | 141 + node_modules/transformers/history.md | 77 + node_modules/transformers/lib/shared.js | 162 + node_modules/transformers/lib/transformers.js | 604 + .../transformers/node_modules/.bin/uglifyjs | 1 + .../node_modules/is-promise/.npmignore | 6 + .../node_modules/is-promise/.travis.yml | 3 + .../node_modules/is-promise/LICENSE | 19 + .../node_modules/is-promise/index.js | 5 + .../node_modules/is-promise/package.json | 72 + .../node_modules/is-promise/readme.md | 29 + .../node_modules/promise/.npmignore | 6 + .../node_modules/promise/Readme.md | 85 + .../node_modules/promise/index.js | 164 + .../node_modules/promise/package.json | 75 + .../node_modules/source-map/.npmignore | 2 + .../node_modules/source-map/.travis.yml | 4 + .../node_modules/source-map/CHANGELOG.md | 194 + .../node_modules/source-map/LICENSE | 28 + .../source-map/Makefile.dryice.js | 166 + .../node_modules/source-map/README.md | 475 + .../source-map/build/assert-shim.js | 56 + .../source-map/build/mini-require.js | 152 + .../source-map/build/prefix-source-map.jsm | 20 + .../source-map/build/prefix-utils.jsm | 18 + .../source-map/build/suffix-browser.js | 8 + .../source-map/build/suffix-source-map.jsm | 6 + .../source-map/build/suffix-utils.jsm | 21 + .../source-map/build/test-prefix.js | 8 + .../source-map/build/test-suffix.js | 3 + .../node_modules/source-map/lib/source-map.js | 8 + .../source-map/lib/source-map/array-set.js | 97 + .../source-map/lib/source-map/base64-vlq.js | 142 + .../source-map/lib/source-map/base64.js | 42 + .../lib/source-map/binary-search.js | 80 + .../source-map/lib/source-map/mapping-list.js | 86 + .../lib/source-map/source-map-consumer.js | 575 + .../lib/source-map/source-map-generator.js | 400 + .../source-map/lib/source-map/source-node.js | 414 + .../source-map/lib/source-map/util.js | 319 + .../node_modules/source-map/package.json | 211 + .../node_modules/source-map/test/run-tests.js | 62 + .../source-map/test/source-map/test-api.js | 26 + .../test/source-map/test-array-set.js | 104 + .../test/source-map/test-base64-vlq.js | 23 + .../source-map/test/source-map/test-base64.js | 35 + .../test/source-map/test-binary-search.js | 54 + .../test/source-map/test-dog-fooding.js | 84 + .../source-map/test-source-map-consumer.js | 702 + .../source-map/test-source-map-generator.js | 679 + .../test/source-map/test-source-node.js | 612 + .../source-map/test/source-map/test-util.js | 216 + .../source-map/test/source-map/util.js | 192 + .../node_modules/uglify-js/.npmignore | 2 + .../node_modules/uglify-js/README.md | 544 + .../node_modules/uglify-js/bin/uglifyjs | 370 + .../node_modules/uglify-js/lib/ast.js | 964 + .../node_modules/uglify-js/lib/compress.js | 1968 ++ .../node_modules/uglify-js/lib/mozilla-ast.js | 265 + .../node_modules/uglify-js/lib/output.js | 1220 + .../node_modules/uglify-js/lib/parse.js | 1407 ++ .../node_modules/uglify-js/lib/scope.js | 580 + .../node_modules/uglify-js/lib/sourcemap.js | 81 + .../node_modules/uglify-js/lib/transform.js | 218 + .../node_modules/uglify-js/lib/utils.js | 288 + .../node_modules/uglify-js/package.json | 88 + .../uglify-js/test/compress/arrays.js | 12 + .../uglify-js/test/compress/blocks.js | 49 + .../uglify-js/test/compress/conditionals.js | 143 + .../uglify-js/test/compress/dead-code.js | 89 + .../uglify-js/test/compress/debugger.js | 24 + .../uglify-js/test/compress/drop-unused.js | 97 + .../uglify-js/test/compress/issue-105.js | 17 + .../uglify-js/test/compress/issue-12.js | 11 + .../uglify-js/test/compress/issue-22.js | 17 + .../uglify-js/test/compress/issue-44.js | 31 + .../uglify-js/test/compress/issue-59.js | 30 + .../uglify-js/test/compress/labels.js | 163 + .../uglify-js/test/compress/loops.js | 123 + .../uglify-js/test/compress/properties.js | 25 + .../uglify-js/test/compress/sequences.js | 161 + .../uglify-js/test/compress/switch.js | 210 + .../node_modules/uglify-js/test/run-tests.js | 170 + .../node_modules/uglify-js/tools/node.js | 164 + node_modules/transformers/package.json | 122 + node_modules/type-is/HISTORY.md | 200 + node_modules/type-is/LICENSE | 23 + node_modules/type-is/README.md | 136 + node_modules/type-is/index.js | 262 + node_modules/type-is/package.json | 106 + node_modules/uglify-js/LICENSE | 29 + node_modules/uglify-js/README.md | 811 + node_modules/uglify-js/bin/extract-props.js | 77 + node_modules/uglify-js/bin/uglifyjs | 573 + node_modules/uglify-js/lib/ast.js | 1014 + node_modules/uglify-js/lib/compress.js | 2764 ++ node_modules/uglify-js/lib/mozilla-ast.js | 537 + node_modules/uglify-js/lib/output.js | 1371 + node_modules/uglify-js/lib/parse.js | 1509 ++ node_modules/uglify-js/lib/propmangle.js | 223 + node_modules/uglify-js/lib/scope.js | 636 + node_modules/uglify-js/lib/sourcemap.js | 87 + node_modules/uglify-js/lib/transform.js | 218 + node_modules/uglify-js/lib/utils.js | 310 + .../node_modules/source-map/README.md | 729 + .../source-map/dist/source-map.debug.js | 3006 +++ .../source-map/dist/source-map.js | 3005 +++ .../source-map/dist/source-map.min.js | 2 + .../source-map/dist/source-map.min.js.map | 1 + .../node_modules/source-map/lib/array-set.js | 104 + .../node_modules/source-map/lib/base64-vlq.js | 141 + .../node_modules/source-map/lib/base64.js | 68 + .../source-map/lib/binary-search.js | 112 + .../source-map/lib/mapping-list.js | 80 + .../node_modules/source-map/lib/quick-sort.js | 115 + .../source-map/lib/source-map-consumer.js | 1082 + .../source-map/lib/source-map-generator.js | 396 + .../source-map/lib/source-node.js | 408 + .../node_modules/source-map/lib/util.js | 369 + .../node_modules/source-map/package.json | 240 + .../node_modules/source-map/source-map.js | 8 + node_modules/uglify-js/package.json | 120 + node_modules/uglify-js/tools/domprops.json | 5603 +++++ node_modules/uglify-js/tools/exports.js | 18 + node_modules/uglify-js/tools/node.js | 247 + node_modules/uglify-js/tools/props.html | 61 + node_modules/uglify-to-browserify/.npmignore | 14 + node_modules/uglify-to-browserify/.travis.yml | 3 + node_modules/uglify-to-browserify/LICENSE | 19 + node_modules/uglify-to-browserify/README.md | 15 + node_modules/uglify-to-browserify/index.js | 49 + .../uglify-to-browserify/package.json | 72 + .../uglify-to-browserify/test/index.js | 22 + node_modules/unpipe/HISTORY.md | 4 + node_modules/unpipe/LICENSE | 22 + node_modules/unpipe/README.md | 43 + node_modules/unpipe/index.js | 69 + node_modules/unpipe/package.json | 85 + node_modules/user-home/cli.js | 26 + node_modules/user-home/index.js | 15 + node_modules/user-home/license | 21 + node_modules/user-home/package.json | 96 + node_modules/user-home/readme.md | 42 + node_modules/utils-merge/.travis.yml | 6 + node_modules/utils-merge/LICENSE | 20 + node_modules/utils-merge/README.md | 34 + node_modules/utils-merge/index.js | 23 + node_modules/utils-merge/package.json | 85 + node_modules/v8flags/.npmignore | 4 + node_modules/v8flags/LICENSE | 22 + node_modules/v8flags/README.md | 47 + node_modules/v8flags/index.js | 131 + node_modules/v8flags/package.json | 98 + node_modules/vary/HISTORY.md | 23 + node_modules/vary/LICENSE | 22 + node_modules/vary/README.md | 91 + node_modules/vary/index.js | 117 + node_modules/vary/package.json | 98 + node_modules/void-elements/.gitattributes | 1 + node_modules/void-elements/.npmignore | 1 + node_modules/void-elements/.travis.yml | 4 + node_modules/void-elements/LICENSE | 22 + node_modules/void-elements/README.md | 27 + node_modules/void-elements/index.js | 23 + node_modules/void-elements/package.json | 84 + node_modules/void-elements/pre-publish.js | 29 + node_modules/void-elements/test/index.js | 5 + node_modules/window-size/LICENSE-MIT | 22 + node_modules/window-size/README.md | 26 + node_modules/window-size/index.js | 33 + node_modules/window-size/package.json | 81 + node_modules/with/.npmignore | 2 + node_modules/with/LICENSE | 19 + node_modules/with/README.md | 81 + node_modules/with/index.js | 125 + node_modules/with/node_modules/.bin/acorn | 1 + .../with/node_modules/acorn/.editorconfig | 7 + .../with/node_modules/acorn/.gitattributes | 1 + .../with/node_modules/acorn/.npmignore | 3 + .../with/node_modules/acorn/.tern-project | 1 + .../with/node_modules/acorn/.travis.yml | 2 + node_modules/with/node_modules/acorn/AUTHORS | 38 + node_modules/with/node_modules/acorn/LICENSE | 19 + .../with/node_modules/acorn/README.md | 377 + .../with/node_modules/acorn/bin/acorn | 54 + .../node_modules/acorn/bin/build-acorn.js | 51 + .../acorn/bin/generate-identifier-regex.js | 47 + .../with/node_modules/acorn/bin/prepublish.sh | 2 + .../node_modules/acorn/bin/update_authors.sh | 6 + .../with/node_modules/acorn/bin/without_eval | 48 + .../with/node_modules/acorn/dist/.keep | 0 .../with/node_modules/acorn/dist/acorn.js | 4014 +++ .../with/node_modules/acorn/dist/acorn_csp.js | 3985 +++ .../node_modules/acorn/dist/acorn_loose.js | 1298 + .../with/node_modules/acorn/dist/walk.js | 342 + .../with/node_modules/acorn/package.json | 192 + .../with/node_modules/acorn/src/expression.js | 697 + .../with/node_modules/acorn/src/identifier.js | 129 + .../with/node_modules/acorn/src/index.js | 75 + .../with/node_modules/acorn/src/location.js | 68 + .../acorn/src/loose/acorn_loose.js | 0 .../acorn/src/loose/expression.js | 511 + .../node_modules/acorn/src/loose/index.js | 50 + .../node_modules/acorn/src/loose/parseutil.js | 126 + .../node_modules/acorn/src/loose/state.js | 17 + .../node_modules/acorn/src/loose/statement.js | 419 + .../node_modules/acorn/src/loose/tokenize.js | 108 + .../with/node_modules/acorn/src/lval.js | 213 + .../with/node_modules/acorn/src/node.js | 70 + .../with/node_modules/acorn/src/options.js | 119 + .../with/node_modules/acorn/src/parseutil.js | 89 + .../with/node_modules/acorn/src/state.js | 78 + .../with/node_modules/acorn/src/statement.js | 594 + .../node_modules/acorn/src/tokencontext.js | 107 + .../with/node_modules/acorn/src/tokenize.js | 672 + .../with/node_modules/acorn/src/tokentype.js | 142 + .../with/node_modules/acorn/src/util.js | 9 + .../with/node_modules/acorn/src/walk/index.js | 291 + .../with/node_modules/acorn/src/whitespace.js | 12 + node_modules/with/package.json | 77 + 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 | 89 + 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 + node_modules/yargs/CHANGELOG.md | 374 + node_modules/yargs/LICENSE | 21 + node_modules/yargs/README.md | 926 + node_modules/yargs/completion.sh.hbs | 22 + node_modules/yargs/index.js | 504 + node_modules/yargs/lib/completion.js | 71 + node_modules/yargs/lib/parser.js | 448 + node_modules/yargs/lib/usage.js | 314 + node_modules/yargs/lib/validation.js | 196 + node_modules/yargs/package.json | 145 + package.json | 16 + static/css/printinvoice.css | 114 + views/includes/head.jade | 3 + views/includes/nav.jade | 10 + views/index.jade | 4 + views/invoice.jade | 105 + 1806 files changed, 257603 insertions(+) create mode 100644 app.js create mode 120000 node_modules/.bin/acorn create mode 120000 node_modules/.bin/cleancss create mode 120000 node_modules/.bin/jade create mode 120000 node_modules/.bin/knex create mode 120000 node_modules/.bin/mime create mode 120000 node_modules/.bin/mkdirp create mode 120000 node_modules/.bin/uglifyjs create mode 120000 node_modules/.bin/user-home create mode 100644 node_modules/accepts/HISTORY.md create mode 100644 node_modules/accepts/LICENSE create mode 100644 node_modules/accepts/README.md create mode 100644 node_modules/accepts/index.js create mode 100644 node_modules/accepts/package.json create mode 100644 node_modules/acorn-globals/LICENSE create mode 100644 node_modules/acorn-globals/README.md create mode 100644 node_modules/acorn-globals/index.js create mode 100644 node_modules/acorn-globals/package.json create mode 100644 node_modules/acorn/.editorconfig create mode 100644 node_modules/acorn/.gitattributes create mode 100644 node_modules/acorn/.npmignore create mode 100644 node_modules/acorn/.tern-project create mode 100644 node_modules/acorn/.travis.yml create mode 100644 node_modules/acorn/AUTHORS create mode 100644 node_modules/acorn/LICENSE create mode 100644 node_modules/acorn/README.md create mode 100755 node_modules/acorn/bin/acorn create mode 100644 node_modules/acorn/bin/build-acorn.js create mode 100644 node_modules/acorn/bin/generate-identifier-regex.js create mode 100755 node_modules/acorn/bin/update_authors.sh create mode 100644 node_modules/acorn/dist/.keep create mode 100644 node_modules/acorn/dist/acorn.js create mode 100644 node_modules/acorn/dist/acorn_loose.js create mode 100644 node_modules/acorn/dist/walk.js create mode 100644 node_modules/acorn/package.json create mode 100644 node_modules/acorn/src/bin/acorn.js create mode 100644 node_modules/acorn/src/expression.js create mode 100644 node_modules/acorn/src/identifier.js create mode 100644 node_modules/acorn/src/index.js create mode 100644 node_modules/acorn/src/location.js create mode 100644 node_modules/acorn/src/locutil.js create mode 100644 node_modules/acorn/src/loose/acorn_loose.js create mode 100644 node_modules/acorn/src/loose/expression.js create mode 100644 node_modules/acorn/src/loose/index.js create mode 100644 node_modules/acorn/src/loose/parseutil.js create mode 100644 node_modules/acorn/src/loose/state.js create mode 100644 node_modules/acorn/src/loose/statement.js create mode 100644 node_modules/acorn/src/loose/tokenize.js create mode 100644 node_modules/acorn/src/lval.js create mode 100644 node_modules/acorn/src/node.js create mode 100644 node_modules/acorn/src/options.js create mode 100644 node_modules/acorn/src/parseutil.js create mode 100644 node_modules/acorn/src/state.js create mode 100644 node_modules/acorn/src/statement.js create mode 100644 node_modules/acorn/src/tokencontext.js create mode 100644 node_modules/acorn/src/tokenize.js create mode 100644 node_modules/acorn/src/tokentype.js create mode 100644 node_modules/acorn/src/util.js create mode 100644 node_modules/acorn/src/walk/index.js create mode 100644 node_modules/acorn/src/whitespace.js create mode 100644 node_modules/align-text/LICENSE create mode 100644 node_modules/align-text/README.md create mode 100644 node_modules/align-text/index.js create mode 100644 node_modules/align-text/package.json create mode 100644 node_modules/amdefine/LICENSE create mode 100644 node_modules/amdefine/README.md create mode 100644 node_modules/amdefine/amdefine.js create mode 100644 node_modules/amdefine/intercept.js create mode 100644 node_modules/amdefine/package.json create mode 100644 node_modules/ansi-regex/index.js create mode 100644 node_modules/ansi-regex/license create mode 100644 node_modules/ansi-regex/package.json create mode 100644 node_modules/ansi-regex/readme.md create mode 100644 node_modules/ansi-styles/index.js create mode 100644 node_modules/ansi-styles/license create mode 100644 node_modules/ansi-styles/package.json create mode 100644 node_modules/ansi-styles/readme.md create mode 100644 node_modules/array-flatten/LICENSE create mode 100644 node_modules/array-flatten/README.md create mode 100644 node_modules/array-flatten/array-flatten.js create mode 100644 node_modules/array-flatten/package.json create mode 100644 node_modules/asap/LICENSE.md create mode 100644 node_modules/asap/README.md create mode 100644 node_modules/asap/asap.js create mode 100644 node_modules/asap/package.json create mode 100644 node_modules/async/LICENSE 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 create mode 100644 node_modules/balanced-match/.npmignore create mode 100644 node_modules/balanced-match/.travis.yml 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/bluebird/LICENSE create mode 100644 node_modules/bluebird/README.md create mode 100644 node_modules/bluebird/changelog.md create mode 100644 node_modules/bluebird/js/browser/bluebird.js create mode 100644 node_modules/bluebird/js/browser/bluebird.min.js create mode 100644 node_modules/bluebird/js/main/any.js create mode 100644 node_modules/bluebird/js/main/assert.js create mode 100644 node_modules/bluebird/js/main/async.js create mode 100644 node_modules/bluebird/js/main/bind.js create mode 100644 node_modules/bluebird/js/main/bluebird.js create mode 100644 node_modules/bluebird/js/main/call_get.js create mode 100644 node_modules/bluebird/js/main/cancel.js create mode 100644 node_modules/bluebird/js/main/captured_trace.js create mode 100644 node_modules/bluebird/js/main/catch_filter.js create mode 100644 node_modules/bluebird/js/main/context.js create mode 100644 node_modules/bluebird/js/main/debuggability.js create mode 100644 node_modules/bluebird/js/main/direct_resolve.js create mode 100644 node_modules/bluebird/js/main/each.js create mode 100644 node_modules/bluebird/js/main/errors.js create mode 100644 node_modules/bluebird/js/main/es5.js create mode 100644 node_modules/bluebird/js/main/filter.js create mode 100644 node_modules/bluebird/js/main/finally.js create mode 100644 node_modules/bluebird/js/main/generators.js create mode 100644 node_modules/bluebird/js/main/join.js create mode 100644 node_modules/bluebird/js/main/map.js create mode 100644 node_modules/bluebird/js/main/method.js create mode 100644 node_modules/bluebird/js/main/nodeify.js create mode 100644 node_modules/bluebird/js/main/progress.js create mode 100644 node_modules/bluebird/js/main/promise.js create mode 100644 node_modules/bluebird/js/main/promise_array.js create mode 100644 node_modules/bluebird/js/main/promise_resolver.js create mode 100644 node_modules/bluebird/js/main/promisify.js create mode 100644 node_modules/bluebird/js/main/props.js create mode 100644 node_modules/bluebird/js/main/queue.js create mode 100644 node_modules/bluebird/js/main/race.js create mode 100644 node_modules/bluebird/js/main/reduce.js create mode 100644 node_modules/bluebird/js/main/schedule.js create mode 100644 node_modules/bluebird/js/main/settle.js create mode 100644 node_modules/bluebird/js/main/some.js create mode 100644 node_modules/bluebird/js/main/synchronous_inspection.js create mode 100644 node_modules/bluebird/js/main/thenables.js create mode 100644 node_modules/bluebird/js/main/timers.js create mode 100644 node_modules/bluebird/js/main/using.js create mode 100644 node_modules/bluebird/js/main/util.js create mode 100644 node_modules/bluebird/package.json 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/camelcase/index.js create mode 100644 node_modules/camelcase/license create mode 100644 node_modules/camelcase/package.json create mode 100644 node_modules/camelcase/readme.md create mode 100644 node_modules/center-align/LICENSE create mode 100644 node_modules/center-align/README.md create mode 100644 node_modules/center-align/index.js create mode 100644 node_modules/center-align/package.json create mode 100644 node_modules/center-align/utils.js create mode 100644 node_modules/chalk/index.js create mode 100644 node_modules/chalk/license create mode 100644 node_modules/chalk/package.json create mode 100644 node_modules/chalk/readme.md create mode 100644 node_modules/character-parser/.npmignore create mode 100644 node_modules/character-parser/LICENSE create mode 100644 node_modules/character-parser/README.md create mode 100644 node_modules/character-parser/index.js create mode 100644 node_modules/character-parser/package.json create mode 100644 node_modules/clean-css/History.md create mode 100644 node_modules/clean-css/LICENSE create mode 100644 node_modules/clean-css/README.md create mode 100755 node_modules/clean-css/bin/cleancss create mode 100644 node_modules/clean-css/index.js create mode 100644 node_modules/clean-css/lib/clean.js create mode 100644 node_modules/clean-css/lib/colors/hex-name-shortener.js create mode 100644 node_modules/clean-css/lib/colors/hsl.js create mode 100644 node_modules/clean-css/lib/colors/rgb.js create mode 100644 node_modules/clean-css/lib/imports/inliner.js create mode 100644 node_modules/clean-css/lib/properties/break-up.js create mode 100644 node_modules/clean-css/lib/properties/can-override.js create mode 100644 node_modules/clean-css/lib/properties/clone.js create mode 100644 node_modules/clean-css/lib/properties/compactable.js create mode 100644 node_modules/clean-css/lib/properties/every-combination.js create mode 100644 node_modules/clean-css/lib/properties/has-inherit.js create mode 100644 node_modules/clean-css/lib/properties/optimizer.js create mode 100644 node_modules/clean-css/lib/properties/override-compactor.js create mode 100644 node_modules/clean-css/lib/properties/populate-components.js create mode 100644 node_modules/clean-css/lib/properties/remove-unused.js create mode 100644 node_modules/clean-css/lib/properties/restore-from-optimizing.js create mode 100644 node_modules/clean-css/lib/properties/restore.js create mode 100644 node_modules/clean-css/lib/properties/shorthand-compactor.js create mode 100644 node_modules/clean-css/lib/properties/validator.js create mode 100644 node_modules/clean-css/lib/properties/vendor-prefixes.js create mode 100644 node_modules/clean-css/lib/properties/wrap-for-optimizing.js create mode 100644 node_modules/clean-css/lib/selectors/advanced.js create mode 100644 node_modules/clean-css/lib/selectors/clean-up.js create mode 100644 node_modules/clean-css/lib/selectors/extractor.js create mode 100644 node_modules/clean-css/lib/selectors/is-special.js create mode 100644 node_modules/clean-css/lib/selectors/merge-adjacent.js create mode 100644 node_modules/clean-css/lib/selectors/merge-media-queries.js create mode 100644 node_modules/clean-css/lib/selectors/merge-non-adjacent-by-body.js create mode 100644 node_modules/clean-css/lib/selectors/merge-non-adjacent-by-selector.js create mode 100644 node_modules/clean-css/lib/selectors/reduce-non-adjacent.js create mode 100644 node_modules/clean-css/lib/selectors/remove-duplicate-media-queries.js create mode 100644 node_modules/clean-css/lib/selectors/remove-duplicates.js create mode 100644 node_modules/clean-css/lib/selectors/reorderable.js create mode 100644 node_modules/clean-css/lib/selectors/restructure.js create mode 100644 node_modules/clean-css/lib/selectors/simple.js create mode 100644 node_modules/clean-css/lib/source-maps/track.js create mode 100644 node_modules/clean-css/lib/stringifier/helpers.js create mode 100644 node_modules/clean-css/lib/stringifier/one-time.js create mode 100644 node_modules/clean-css/lib/stringifier/simple.js create mode 100644 node_modules/clean-css/lib/stringifier/source-maps.js create mode 100644 node_modules/clean-css/lib/text/comments-processor.js create mode 100644 node_modules/clean-css/lib/text/escape-store.js create mode 100644 node_modules/clean-css/lib/text/expressions-processor.js create mode 100644 node_modules/clean-css/lib/text/free-text-processor.js create mode 100644 node_modules/clean-css/lib/text/urls-processor.js create mode 100644 node_modules/clean-css/lib/tokenizer/extract-properties.js create mode 100644 node_modules/clean-css/lib/tokenizer/extract-selectors.js create mode 100644 node_modules/clean-css/lib/tokenizer/tokenize.js create mode 100644 node_modules/clean-css/lib/urls/rebase.js create mode 100644 node_modules/clean-css/lib/urls/reduce.js create mode 100644 node_modules/clean-css/lib/urls/rewrite.js create mode 100644 node_modules/clean-css/lib/utils/clone-array.js create mode 100644 node_modules/clean-css/lib/utils/compatibility.js create mode 100644 node_modules/clean-css/lib/utils/input-source-map-tracker.js create mode 100644 node_modules/clean-css/lib/utils/object.js create mode 100644 node_modules/clean-css/lib/utils/quote-scanner.js create mode 100644 node_modules/clean-css/lib/utils/source-reader.js create mode 100644 node_modules/clean-css/lib/utils/source-tracker.js create mode 100644 node_modules/clean-css/lib/utils/split.js create mode 100644 node_modules/clean-css/node_modules/commander/History.md create mode 100644 node_modules/clean-css/node_modules/commander/LICENSE create mode 100644 node_modules/clean-css/node_modules/commander/Readme.md create mode 100644 node_modules/clean-css/node_modules/commander/index.js create mode 100644 node_modules/clean-css/node_modules/commander/package.json create mode 100644 node_modules/clean-css/package.json create mode 100644 node_modules/cliui/.coveralls.yml create mode 100644 node_modules/cliui/.npmignore create mode 100644 node_modules/cliui/.travis.yml create mode 100644 node_modules/cliui/LICENSE.txt create mode 100644 node_modules/cliui/README.md create mode 100644 node_modules/cliui/index.js create mode 100644 node_modules/cliui/node_modules/wordwrap/.npmignore create mode 100644 node_modules/cliui/node_modules/wordwrap/README.markdown create mode 100644 node_modules/cliui/node_modules/wordwrap/example/center.js create mode 100644 node_modules/cliui/node_modules/wordwrap/example/meat.js create mode 100644 node_modules/cliui/node_modules/wordwrap/index.js create mode 100644 node_modules/cliui/node_modules/wordwrap/package.json create mode 100644 node_modules/cliui/node_modules/wordwrap/test/break.js create mode 100644 node_modules/cliui/node_modules/wordwrap/test/idleness.txt create mode 100644 node_modules/cliui/node_modules/wordwrap/test/wrap.js create mode 100644 node_modules/cliui/package.json create mode 100644 node_modules/cliui/test/cliui.js create mode 100644 node_modules/commander/History.md create mode 100644 node_modules/commander/Readme.md create mode 100644 node_modules/commander/index.js create mode 100644 node_modules/commander/package.json create mode 100644 node_modules/concat-map/.travis.yml create mode 100644 node_modules/concat-map/LICENSE 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/constantinople/.gitattributes create mode 100644 node_modules/constantinople/.npmignore create mode 100644 node_modules/constantinople/.travis.yml create mode 100644 node_modules/constantinople/LICENSE create mode 100644 node_modules/constantinople/README.md create mode 100644 node_modules/constantinople/index.js create mode 100644 node_modules/constantinople/package.json create mode 100644 node_modules/constantinople/test/index.js create mode 100644 node_modules/content-disposition/HISTORY.md create mode 100644 node_modules/content-disposition/LICENSE create mode 100644 node_modules/content-disposition/README.md create mode 100644 node_modules/content-disposition/index.js create mode 100644 node_modules/content-disposition/package.json create mode 100644 node_modules/content-type/HISTORY.md create mode 100644 node_modules/content-type/LICENSE create mode 100644 node_modules/content-type/README.md create mode 100644 node_modules/content-type/index.js create mode 100644 node_modules/content-type/package.json create mode 100644 node_modules/cookie-signature/.npmignore create mode 100644 node_modules/cookie-signature/History.md create mode 100644 node_modules/cookie-signature/Readme.md create mode 100644 node_modules/cookie-signature/index.js create mode 100644 node_modules/cookie-signature/package.json create mode 100644 node_modules/cookie/HISTORY.md create mode 100644 node_modules/cookie/LICENSE create mode 100644 node_modules/cookie/README.md create mode 100644 node_modules/cookie/index.js create mode 100644 node_modules/cookie/package.json 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 create mode 100644 node_modules/core-util-is/lib/util.js 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/css-parse/.npmignore create mode 100644 node_modules/css-parse/History.md create mode 100644 node_modules/css-parse/Makefile create mode 100644 node_modules/css-parse/Readme.md create mode 100644 node_modules/css-parse/component.json create mode 100644 node_modules/css-parse/index.js create mode 100644 node_modules/css-parse/package.json create mode 100644 node_modules/css-stringify/.npmignore create mode 100644 node_modules/css-stringify/History.md create mode 100644 node_modules/css-stringify/Makefile create mode 100644 node_modules/css-stringify/Readme.md create mode 100644 node_modules/css-stringify/component.json create mode 100644 node_modules/css-stringify/index.js create mode 100644 node_modules/css-stringify/package.json create mode 100644 node_modules/css/.npmignore create mode 100644 node_modules/css/History.md create mode 100644 node_modules/css/Makefile create mode 100644 node_modules/css/Readme.md create mode 100644 node_modules/css/benchmark.js create mode 100644 node_modules/css/component.json create mode 100644 node_modules/css/index.js create mode 100644 node_modules/css/package.json create mode 100644 node_modules/css/test.js create mode 100644 node_modules/debug/.jshintrc create mode 100644 node_modules/debug/.npmignore create mode 100644 node_modules/debug/History.md create mode 100644 node_modules/debug/Makefile create mode 100644 node_modules/debug/Readme.md create mode 100644 node_modules/debug/bower.json create mode 100644 node_modules/debug/browser.js create mode 100644 node_modules/debug/component.json create mode 100644 node_modules/debug/debug.js create mode 100644 node_modules/debug/node.js create mode 100644 node_modules/debug/package.json create mode 100644 node_modules/decamelize/index.js create mode 100644 node_modules/decamelize/license create mode 100644 node_modules/decamelize/package.json create mode 100644 node_modules/decamelize/readme.md create mode 100644 node_modules/depd/History.md create mode 100644 node_modules/depd/LICENSE create mode 100644 node_modules/depd/Readme.md create mode 100644 node_modules/depd/index.js create mode 100644 node_modules/depd/lib/browser/index.js create mode 100644 node_modules/depd/lib/compat/buffer-concat.js create mode 100644 node_modules/depd/lib/compat/callsite-tostring.js create mode 100644 node_modules/depd/lib/compat/event-listener-count.js create mode 100644 node_modules/depd/lib/compat/index.js create mode 100644 node_modules/depd/package.json create mode 100644 node_modules/destroy/LICENSE create mode 100644 node_modules/destroy/README.md create mode 100644 node_modules/destroy/index.js create mode 100644 node_modules/destroy/package.json create mode 100644 node_modules/double-ended-queue/.npmignore create mode 100644 node_modules/double-ended-queue/Gruntfile.js create mode 100644 node_modules/double-ended-queue/LICENSE create mode 100644 node_modules/double-ended-queue/README.md create mode 100644 node_modules/double-ended-queue/js/deque.js create mode 100644 node_modules/double-ended-queue/package.json create mode 100644 node_modules/ee-first/LICENSE create mode 100644 node_modules/ee-first/README.md create mode 100644 node_modules/ee-first/index.js create mode 100644 node_modules/ee-first/package.json create mode 100644 node_modules/escape-html/LICENSE create mode 100644 node_modules/escape-html/Readme.md create mode 100644 node_modules/escape-html/index.js create mode 100644 node_modules/escape-html/package.json create mode 100644 node_modules/escape-string-regexp/index.js create mode 100644 node_modules/escape-string-regexp/license create mode 100644 node_modules/escape-string-regexp/package.json create mode 100644 node_modules/escape-string-regexp/readme.md create mode 100644 node_modules/etag/HISTORY.md create mode 100644 node_modules/etag/LICENSE create mode 100644 node_modules/etag/README.md create mode 100644 node_modules/etag/index.js create mode 100644 node_modules/etag/package.json create mode 100644 node_modules/express/History.md create mode 100644 node_modules/express/LICENSE create mode 100644 node_modules/express/Readme.md create mode 100644 node_modules/express/index.js create mode 100644 node_modules/express/lib/application.js create mode 100644 node_modules/express/lib/express.js create mode 100644 node_modules/express/lib/middleware/init.js create mode 100644 node_modules/express/lib/middleware/query.js create mode 100644 node_modules/express/lib/request.js create mode 100644 node_modules/express/lib/response.js create mode 100644 node_modules/express/lib/router/index.js create mode 100644 node_modules/express/lib/router/layer.js create mode 100644 node_modules/express/lib/router/route.js create mode 100644 node_modules/express/lib/utils.js create mode 100644 node_modules/express/lib/view.js create mode 100644 node_modules/express/package.json create mode 100644 node_modules/extend/.jscs.json create mode 100644 node_modules/extend/.npmignore create mode 100644 node_modules/extend/.travis.yml create mode 100644 node_modules/extend/CHANGELOG.md create mode 100644 node_modules/extend/LICENSE create mode 100644 node_modules/extend/README.md create mode 100644 node_modules/extend/component.json create mode 100644 node_modules/extend/index.js create mode 100644 node_modules/extend/package.json create mode 100644 node_modules/finalhandler/HISTORY.md create mode 100644 node_modules/finalhandler/LICENSE create mode 100644 node_modules/finalhandler/README.md create mode 100644 node_modules/finalhandler/index.js create mode 100644 node_modules/finalhandler/package.json create mode 100644 node_modules/findup-sync/.npmignore create mode 100644 node_modules/findup-sync/LICENSE-MIT create mode 100644 node_modules/findup-sync/README.md create mode 100644 node_modules/findup-sync/lib/findup-sync.js create mode 100644 node_modules/findup-sync/package.json create mode 100644 node_modules/flagged-respawn/.npmignore create mode 100644 node_modules/flagged-respawn/.travis.yml create mode 100644 node_modules/flagged-respawn/LICENSE create mode 100644 node_modules/flagged-respawn/README.md create mode 100644 node_modules/flagged-respawn/index.js create mode 100644 node_modules/flagged-respawn/lib/reorder.js create mode 100644 node_modules/flagged-respawn/lib/respawn.js create mode 100644 node_modules/flagged-respawn/package.json create mode 100644 node_modules/flagged-respawn/test/bin/exit_code.js create mode 100644 node_modules/flagged-respawn/test/bin/respawner.js create mode 100644 node_modules/flagged-respawn/test/bin/signal.js create mode 100644 node_modules/flagged-respawn/test/index.js create mode 100644 node_modules/forwarded/HISTORY.md create mode 100644 node_modules/forwarded/LICENSE create mode 100644 node_modules/forwarded/README.md create mode 100644 node_modules/forwarded/index.js create mode 100644 node_modules/forwarded/package.json create mode 100644 node_modules/fresh/HISTORY.md create mode 100644 node_modules/fresh/LICENSE create mode 100644 node_modules/fresh/README.md create mode 100644 node_modules/fresh/index.js create mode 100644 node_modules/fresh/package.json create mode 100644 node_modules/glob/LICENSE 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-readlink/.npmignore create mode 100644 node_modules/graceful-readlink/.travis.yml create mode 100644 node_modules/graceful-readlink/LICENSE create mode 100644 node_modules/graceful-readlink/README.md create mode 100644 node_modules/graceful-readlink/index.js create mode 100644 node_modules/graceful-readlink/package.json create mode 100644 node_modules/has-ansi/index.js create mode 100644 node_modules/has-ansi/license create mode 100644 node_modules/has-ansi/package.json create mode 100644 node_modules/has-ansi/readme.md create mode 100644 node_modules/hashmap/CHANGELOG.md create mode 100644 node_modules/hashmap/LICENSE create mode 100644 node_modules/hashmap/Readme.md create mode 100644 node_modules/hashmap/bower.json create mode 100644 node_modules/hashmap/hashmap.js create mode 100644 node_modules/hashmap/package.json create mode 100644 node_modules/http-errors/HISTORY.md create mode 100644 node_modules/http-errors/LICENSE create mode 100644 node_modules/http-errors/README.md create mode 100644 node_modules/http-errors/index.js create mode 100644 node_modules/http-errors/package.json 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 create mode 100644 node_modules/interpret/CHANGELOG create mode 100644 node_modules/interpret/LICENSE create mode 100644 node_modules/interpret/README.md create mode 100644 node_modules/interpret/index.js create mode 100644 node_modules/interpret/package.json create mode 100644 node_modules/ipaddr.js/.npmignore create mode 100644 node_modules/ipaddr.js/.travis.yml create mode 100644 node_modules/ipaddr.js/Cakefile create mode 100644 node_modules/ipaddr.js/LICENSE create mode 100644 node_modules/ipaddr.js/README.md create mode 100644 node_modules/ipaddr.js/bower.json create mode 100644 node_modules/ipaddr.js/ipaddr.min.js create mode 100644 node_modules/ipaddr.js/lib/ipaddr.js create mode 100644 node_modules/ipaddr.js/package.json create mode 100644 node_modules/ipaddr.js/src/ipaddr.coffee create mode 100644 node_modules/ipaddr.js/test/ipaddr.test.coffee 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-promise/.npmignore create mode 100644 node_modules/is-promise/.travis.yml create mode 100644 node_modules/is-promise/LICENSE create mode 100644 node_modules/is-promise/index.js create mode 100644 node_modules/is-promise/package.json create mode 100644 node_modules/is-promise/readme.md 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/jade/.npmignore create mode 100644 node_modules/jade/.release.json create mode 100644 node_modules/jade/History.md create mode 100644 node_modules/jade/LICENSE create mode 100644 node_modules/jade/README.md create mode 100644 node_modules/jade/Readme_zh-cn.md create mode 100755 node_modules/jade/bin/jade.js create mode 100644 node_modules/jade/block-code.html create mode 100644 node_modules/jade/component.json create mode 100644 node_modules/jade/jade.js create mode 100644 node_modules/jade/lib/compiler.js create mode 100644 node_modules/jade/lib/doctypes.js create mode 100644 node_modules/jade/lib/filters-client.js create mode 100644 node_modules/jade/lib/filters.js create mode 100644 node_modules/jade/lib/index.js create mode 100644 node_modules/jade/lib/inline-tags.js create mode 100644 node_modules/jade/lib/lexer.js create mode 100644 node_modules/jade/lib/nodes/attrs.js create mode 100644 node_modules/jade/lib/nodes/block-comment.js create mode 100644 node_modules/jade/lib/nodes/block.js create mode 100644 node_modules/jade/lib/nodes/case.js create mode 100644 node_modules/jade/lib/nodes/code.js create mode 100644 node_modules/jade/lib/nodes/comment.js create mode 100644 node_modules/jade/lib/nodes/doctype.js create mode 100644 node_modules/jade/lib/nodes/each.js create mode 100644 node_modules/jade/lib/nodes/filter.js create mode 100644 node_modules/jade/lib/nodes/index.js create mode 100644 node_modules/jade/lib/nodes/literal.js create mode 100644 node_modules/jade/lib/nodes/mixin-block.js create mode 100644 node_modules/jade/lib/nodes/mixin.js create mode 100644 node_modules/jade/lib/nodes/node.js create mode 100644 node_modules/jade/lib/nodes/tag.js create mode 100644 node_modules/jade/lib/nodes/text.js create mode 100644 node_modules/jade/lib/parser.js create mode 100644 node_modules/jade/lib/runtime.js create mode 100644 node_modules/jade/lib/utils.js create mode 100644 node_modules/jade/package.json create mode 100644 node_modules/jade/release.js create mode 100644 node_modules/jade/runtime.js create mode 100644 node_modules/jstransformer/LICENSE create mode 100644 node_modules/jstransformer/README.md create mode 100644 node_modules/jstransformer/index.js create mode 100644 node_modules/jstransformer/package.json 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 100644 node_modules/knex/LICENSE create mode 100644 node_modules/knex/README.md create mode 100644 node_modules/knex/build/knex.js create mode 100644 node_modules/knex/knex.js create mode 100755 node_modules/knex/lib/bin/cli.js create mode 100644 node_modules/knex/lib/client.js create mode 100644 node_modules/knex/lib/connection/index.js create mode 100644 node_modules/knex/lib/dialects/maria/index.js create mode 100644 node_modules/knex/lib/dialects/maria/transaction.js create mode 100644 node_modules/knex/lib/dialects/mssql/formatter.js create mode 100644 node_modules/knex/lib/dialects/mssql/index.js create mode 100644 node_modules/knex/lib/dialects/mssql/query/compiler.js create mode 100644 node_modules/knex/lib/dialects/mssql/schema/columncompiler.js create mode 100644 node_modules/knex/lib/dialects/mssql/schema/compiler.js create mode 100644 node_modules/knex/lib/dialects/mssql/schema/tablecompiler.js create mode 100644 node_modules/knex/lib/dialects/mssql/transaction.js create mode 100644 node_modules/knex/lib/dialects/mysql/index.js create mode 100644 node_modules/knex/lib/dialects/mysql/query/compiler.js create mode 100644 node_modules/knex/lib/dialects/mysql/schema/columncompiler.js create mode 100644 node_modules/knex/lib/dialects/mysql/schema/compiler.js create mode 100644 node_modules/knex/lib/dialects/mysql/schema/tablecompiler.js create mode 100644 node_modules/knex/lib/dialects/mysql/transaction.js create mode 100644 node_modules/knex/lib/dialects/mysql2/index.js create mode 100644 node_modules/knex/lib/dialects/mysql2/transaction.js create mode 100644 node_modules/knex/lib/dialects/oracle/formatter.js create mode 100644 node_modules/knex/lib/dialects/oracle/index.js create mode 100644 node_modules/knex/lib/dialects/oracle/query/compiler.js create mode 100644 node_modules/knex/lib/dialects/oracle/schema/columnbuilder.js create mode 100644 node_modules/knex/lib/dialects/oracle/schema/columncompiler.js create mode 100644 node_modules/knex/lib/dialects/oracle/schema/compiler.js create mode 100644 node_modules/knex/lib/dialects/oracle/schema/tablecompiler.js create mode 100644 node_modules/knex/lib/dialects/oracle/stream.js create mode 100644 node_modules/knex/lib/dialects/oracle/transaction.js create mode 100644 node_modules/knex/lib/dialects/oracle/utils.js create mode 100644 node_modules/knex/lib/dialects/postgres/index.js create mode 100644 node_modules/knex/lib/dialects/postgres/query/compiler.js create mode 100644 node_modules/knex/lib/dialects/postgres/schema/columncompiler.js create mode 100644 node_modules/knex/lib/dialects/postgres/schema/compiler.js create mode 100644 node_modules/knex/lib/dialects/postgres/schema/tablecompiler.js create mode 100644 node_modules/knex/lib/dialects/postgres/utils.js create mode 100644 node_modules/knex/lib/dialects/sqlite3/index.js create mode 100644 node_modules/knex/lib/dialects/sqlite3/query/compiler.js create mode 100644 node_modules/knex/lib/dialects/sqlite3/schema/columncompiler.js create mode 100644 node_modules/knex/lib/dialects/sqlite3/schema/compiler.js create mode 100644 node_modules/knex/lib/dialects/sqlite3/schema/ddl.js create mode 100644 node_modules/knex/lib/dialects/sqlite3/schema/tablecompiler.js create mode 100644 node_modules/knex/lib/dialects/strong-oracle/index.js create mode 100644 node_modules/knex/lib/dialects/websql/index.js create mode 100644 node_modules/knex/lib/dialects/websql/transaction.js create mode 100644 node_modules/knex/lib/formatter.js create mode 100644 node_modules/knex/lib/functionhelper.js create mode 100644 node_modules/knex/lib/helpers.js create mode 100644 node_modules/knex/lib/index.js create mode 100644 node_modules/knex/lib/interface.js create mode 100644 node_modules/knex/lib/migrate/index.js create mode 100644 node_modules/knex/lib/migrate/migrate-stub.js create mode 100644 node_modules/knex/lib/migrate/stub/coffee.stub create mode 100644 node_modules/knex/lib/migrate/stub/eg.stub create mode 100644 node_modules/knex/lib/migrate/stub/js.stub create mode 100644 node_modules/knex/lib/migrate/stub/knexfile-coffee.stub create mode 100644 node_modules/knex/lib/migrate/stub/knexfile-eg.stub create mode 100644 node_modules/knex/lib/migrate/stub/knexfile-js.stub create mode 100644 node_modules/knex/lib/migrate/stub/knexfile-ls.stub create mode 100644 node_modules/knex/lib/migrate/stub/ls.stub create mode 100644 node_modules/knex/lib/promise.js create mode 100644 node_modules/knex/lib/query/builder.js create mode 100644 node_modules/knex/lib/query/compiler.js create mode 100644 node_modules/knex/lib/query/joinclause.js create mode 100644 node_modules/knex/lib/query/methods.js create mode 100644 node_modules/knex/lib/query/string.js create mode 100644 node_modules/knex/lib/raw.js create mode 100644 node_modules/knex/lib/runner.js create mode 100644 node_modules/knex/lib/schema/builder.js create mode 100644 node_modules/knex/lib/schema/columnbuilder.js create mode 100644 node_modules/knex/lib/schema/columncompiler.js create mode 100644 node_modules/knex/lib/schema/compiler.js create mode 100644 node_modules/knex/lib/schema/helpers.js create mode 100644 node_modules/knex/lib/schema/tablebuilder.js create mode 100644 node_modules/knex/lib/schema/tablecompiler.js create mode 100644 node_modules/knex/lib/seed/index.js create mode 100644 node_modules/knex/lib/seed/seed-stub.js create mode 100644 node_modules/knex/lib/seed/stub/coffee.stub create mode 100644 node_modules/knex/lib/seed/stub/eg.stub create mode 100644 node_modules/knex/lib/seed/stub/js.stub create mode 100644 node_modules/knex/lib/seed/stub/ls.stub create mode 100644 node_modules/knex/lib/statement.js create mode 100644 node_modules/knex/lib/transaction.js create mode 100644 node_modules/knex/lib/util/bluebird.js create mode 100644 node_modules/knex/lib/util/make-client.js create mode 100644 node_modules/knex/lib/util/make-knex.js create mode 100644 node_modules/knex/lib/util/noop.js create mode 100644 node_modules/knex/lib/util/parse-connection.js create mode 100644 node_modules/knex/node_modules/minimist/.travis.yml create mode 100644 node_modules/knex/node_modules/minimist/LICENSE create mode 100644 node_modules/knex/node_modules/minimist/example/parse.js create mode 100644 node_modules/knex/node_modules/minimist/index.js create mode 100644 node_modules/knex/node_modules/minimist/package.json create mode 100644 node_modules/knex/node_modules/minimist/readme.markdown create mode 100644 node_modules/knex/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/knex/node_modules/minimist/test/bool.js create mode 100644 node_modules/knex/node_modules/minimist/test/dash.js create mode 100644 node_modules/knex/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/knex/node_modules/minimist/test/dotted.js create mode 100644 node_modules/knex/node_modules/minimist/test/long.js create mode 100644 node_modules/knex/node_modules/minimist/test/num.js create mode 100644 node_modules/knex/node_modules/minimist/test/parse.js create mode 100644 node_modules/knex/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/knex/node_modules/minimist/test/short.js create mode 100644 node_modules/knex/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/knex/node_modules/minimist/test/unknown.js create mode 100644 node_modules/knex/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/knex/package.json create mode 100644 node_modules/knex/src/.jshintrc create mode 100755 node_modules/knex/src/bin/cli.js create mode 100644 node_modules/knex/src/client.js create mode 100644 node_modules/knex/src/connection/index.js create mode 100644 node_modules/knex/src/dialects/maria/index.js create mode 100644 node_modules/knex/src/dialects/maria/transaction.js create mode 100644 node_modules/knex/src/dialects/mssql/formatter.js create mode 100644 node_modules/knex/src/dialects/mssql/index.js create mode 100644 node_modules/knex/src/dialects/mssql/query/compiler.js create mode 100644 node_modules/knex/src/dialects/mssql/schema/columncompiler.js create mode 100644 node_modules/knex/src/dialects/mssql/schema/compiler.js create mode 100644 node_modules/knex/src/dialects/mssql/schema/tablecompiler.js create mode 100644 node_modules/knex/src/dialects/mssql/transaction.js create mode 100644 node_modules/knex/src/dialects/mysql/index.js create mode 100644 node_modules/knex/src/dialects/mysql/query/compiler.js create mode 100644 node_modules/knex/src/dialects/mysql/schema/columncompiler.js create mode 100644 node_modules/knex/src/dialects/mysql/schema/compiler.js create mode 100644 node_modules/knex/src/dialects/mysql/schema/tablecompiler.js create mode 100644 node_modules/knex/src/dialects/mysql/transaction.js create mode 100644 node_modules/knex/src/dialects/mysql2/index.js create mode 100644 node_modules/knex/src/dialects/mysql2/transaction.js create mode 100644 node_modules/knex/src/dialects/oracle/formatter.js create mode 100644 node_modules/knex/src/dialects/oracle/index.js create mode 100644 node_modules/knex/src/dialects/oracle/query/compiler.js create mode 100644 node_modules/knex/src/dialects/oracle/schema/columnbuilder.js create mode 100644 node_modules/knex/src/dialects/oracle/schema/columncompiler.js create mode 100644 node_modules/knex/src/dialects/oracle/schema/compiler.js create mode 100644 node_modules/knex/src/dialects/oracle/schema/tablecompiler.js create mode 100644 node_modules/knex/src/dialects/oracle/stream.js create mode 100644 node_modules/knex/src/dialects/oracle/transaction.js create mode 100644 node_modules/knex/src/dialects/oracle/utils.js create mode 100644 node_modules/knex/src/dialects/postgres/index.js create mode 100644 node_modules/knex/src/dialects/postgres/query/compiler.js create mode 100644 node_modules/knex/src/dialects/postgres/schema/columncompiler.js create mode 100644 node_modules/knex/src/dialects/postgres/schema/compiler.js create mode 100644 node_modules/knex/src/dialects/postgres/schema/tablecompiler.js create mode 100644 node_modules/knex/src/dialects/postgres/utils.js create mode 100644 node_modules/knex/src/dialects/sqlite3/index.js create mode 100644 node_modules/knex/src/dialects/sqlite3/query/compiler.js create mode 100644 node_modules/knex/src/dialects/sqlite3/schema/columncompiler.js create mode 100644 node_modules/knex/src/dialects/sqlite3/schema/compiler.js create mode 100644 node_modules/knex/src/dialects/sqlite3/schema/ddl.js create mode 100644 node_modules/knex/src/dialects/sqlite3/schema/tablecompiler.js create mode 100644 node_modules/knex/src/dialects/strong-oracle/index.js create mode 100644 node_modules/knex/src/dialects/websql/index.js create mode 100644 node_modules/knex/src/dialects/websql/transaction.js create mode 100644 node_modules/knex/src/formatter.js create mode 100644 node_modules/knex/src/functionhelper.js create mode 100644 node_modules/knex/src/helpers.js create mode 100644 node_modules/knex/src/index.js create mode 100644 node_modules/knex/src/interface.js create mode 100644 node_modules/knex/src/migrate/index.js create mode 100644 node_modules/knex/src/migrate/migrate-stub.js create mode 100644 node_modules/knex/src/migrate/stub/coffee.stub create mode 100644 node_modules/knex/src/migrate/stub/eg.stub create mode 100644 node_modules/knex/src/migrate/stub/js.stub create mode 100644 node_modules/knex/src/migrate/stub/knexfile-coffee.stub create mode 100644 node_modules/knex/src/migrate/stub/knexfile-eg.stub create mode 100644 node_modules/knex/src/migrate/stub/knexfile-js.stub create mode 100644 node_modules/knex/src/migrate/stub/knexfile-ls.stub create mode 100644 node_modules/knex/src/migrate/stub/ls.stub create mode 100644 node_modules/knex/src/promise.js create mode 100644 node_modules/knex/src/query/builder.js create mode 100644 node_modules/knex/src/query/compiler.js create mode 100644 node_modules/knex/src/query/joinclause.js create mode 100644 node_modules/knex/src/query/methods.js create mode 100644 node_modules/knex/src/query/string.js create mode 100644 node_modules/knex/src/raw.js create mode 100644 node_modules/knex/src/runner.js create mode 100644 node_modules/knex/src/schema/builder.js create mode 100644 node_modules/knex/src/schema/columnbuilder.js create mode 100644 node_modules/knex/src/schema/columncompiler.js create mode 100644 node_modules/knex/src/schema/compiler.js create mode 100644 node_modules/knex/src/schema/helpers.js create mode 100644 node_modules/knex/src/schema/tablebuilder.js create mode 100644 node_modules/knex/src/schema/tablecompiler.js create mode 100644 node_modules/knex/src/seed/index.js create mode 100644 node_modules/knex/src/seed/seed-stub.js create mode 100644 node_modules/knex/src/seed/stub/coffee.stub create mode 100644 node_modules/knex/src/seed/stub/eg.stub create mode 100644 node_modules/knex/src/seed/stub/js.stub create mode 100644 node_modules/knex/src/seed/stub/ls.stub create mode 100644 node_modules/knex/src/statement.js create mode 100644 node_modules/knex/src/transaction.js create mode 100644 node_modules/knex/src/util/bluebird.js create mode 100644 node_modules/knex/src/util/make-client.js create mode 100644 node_modules/knex/src/util/make-knex.js create mode 100644 node_modules/knex/src/util/noop.js create mode 100644 node_modules/knex/src/util/parse-connection.js create mode 100644 node_modules/lazy-cache/LICENSE create mode 100644 node_modules/lazy-cache/README.md create mode 100644 node_modules/lazy-cache/index.js create mode 100644 node_modules/lazy-cache/package.json create mode 100644 node_modules/liftoff/.jshintrc create mode 100644 node_modules/liftoff/.npmignore create mode 100644 node_modules/liftoff/.travis.yml create mode 100644 node_modules/liftoff/CHANGELOG create mode 100644 node_modules/liftoff/LICENSE create mode 100644 node_modules/liftoff/README.md create mode 100644 node_modules/liftoff/UPGRADING.md create mode 100644 node_modules/liftoff/appveyor.yml create mode 100644 node_modules/liftoff/index.js create mode 100644 node_modules/liftoff/lib/build_config_name.js create mode 100644 node_modules/liftoff/lib/file_search.js create mode 100644 node_modules/liftoff/lib/find_config.js create mode 100644 node_modules/liftoff/lib/find_cwd.js create mode 100644 node_modules/liftoff/lib/parse_options.js create mode 100644 node_modules/liftoff/lib/silent_require.js create mode 100644 node_modules/liftoff/node_modules/minimist/.travis.yml create mode 100644 node_modules/liftoff/node_modules/minimist/LICENSE create mode 100644 node_modules/liftoff/node_modules/minimist/example/parse.js create mode 100644 node_modules/liftoff/node_modules/minimist/index.js create mode 100644 node_modules/liftoff/node_modules/minimist/package.json create mode 100644 node_modules/liftoff/node_modules/minimist/readme.markdown create mode 100644 node_modules/liftoff/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/bool.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/dash.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/dotted.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/long.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/num.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/parse.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/short.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/unknown.js create mode 100644 node_modules/liftoff/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/liftoff/package.json create mode 100644 node_modules/lodash/LICENSE create mode 100644 node_modules/lodash/README.md create mode 100644 node_modules/lodash/array.js create mode 100644 node_modules/lodash/array/chunk.js create mode 100644 node_modules/lodash/array/compact.js create mode 100644 node_modules/lodash/array/difference.js create mode 100644 node_modules/lodash/array/drop.js create mode 100644 node_modules/lodash/array/dropRight.js create mode 100644 node_modules/lodash/array/dropRightWhile.js create mode 100644 node_modules/lodash/array/dropWhile.js create mode 100644 node_modules/lodash/array/fill.js create mode 100644 node_modules/lodash/array/findIndex.js create mode 100644 node_modules/lodash/array/findLastIndex.js create mode 100644 node_modules/lodash/array/first.js create mode 100644 node_modules/lodash/array/flatten.js create mode 100644 node_modules/lodash/array/flattenDeep.js create mode 100644 node_modules/lodash/array/head.js create mode 100644 node_modules/lodash/array/indexOf.js create mode 100644 node_modules/lodash/array/initial.js create mode 100644 node_modules/lodash/array/intersection.js create mode 100644 node_modules/lodash/array/last.js create mode 100644 node_modules/lodash/array/lastIndexOf.js create mode 100644 node_modules/lodash/array/object.js create mode 100644 node_modules/lodash/array/pull.js create mode 100644 node_modules/lodash/array/pullAt.js create mode 100644 node_modules/lodash/array/remove.js create mode 100644 node_modules/lodash/array/rest.js create mode 100644 node_modules/lodash/array/slice.js create mode 100644 node_modules/lodash/array/sortedIndex.js create mode 100644 node_modules/lodash/array/sortedLastIndex.js create mode 100644 node_modules/lodash/array/tail.js create mode 100644 node_modules/lodash/array/take.js create mode 100644 node_modules/lodash/array/takeRight.js create mode 100644 node_modules/lodash/array/takeRightWhile.js create mode 100644 node_modules/lodash/array/takeWhile.js create mode 100644 node_modules/lodash/array/union.js create mode 100644 node_modules/lodash/array/uniq.js create mode 100644 node_modules/lodash/array/unique.js create mode 100644 node_modules/lodash/array/unzip.js create mode 100644 node_modules/lodash/array/unzipWith.js create mode 100644 node_modules/lodash/array/without.js create mode 100644 node_modules/lodash/array/xor.js create mode 100644 node_modules/lodash/array/zip.js create mode 100644 node_modules/lodash/array/zipObject.js create mode 100644 node_modules/lodash/array/zipWith.js create mode 100644 node_modules/lodash/chain.js create mode 100644 node_modules/lodash/chain/chain.js create mode 100644 node_modules/lodash/chain/commit.js create mode 100644 node_modules/lodash/chain/concat.js create mode 100644 node_modules/lodash/chain/lodash.js create mode 100644 node_modules/lodash/chain/plant.js create mode 100644 node_modules/lodash/chain/reverse.js create mode 100644 node_modules/lodash/chain/run.js create mode 100644 node_modules/lodash/chain/tap.js create mode 100644 node_modules/lodash/chain/thru.js create mode 100644 node_modules/lodash/chain/toJSON.js create mode 100644 node_modules/lodash/chain/toString.js create mode 100644 node_modules/lodash/chain/value.js create mode 100644 node_modules/lodash/chain/valueOf.js create mode 100644 node_modules/lodash/chain/wrapperChain.js create mode 100644 node_modules/lodash/chain/wrapperCommit.js create mode 100644 node_modules/lodash/chain/wrapperConcat.js create mode 100644 node_modules/lodash/chain/wrapperPlant.js create mode 100644 node_modules/lodash/chain/wrapperReverse.js create mode 100644 node_modules/lodash/chain/wrapperToString.js create mode 100644 node_modules/lodash/chain/wrapperValue.js create mode 100644 node_modules/lodash/collection.js create mode 100644 node_modules/lodash/collection/all.js create mode 100644 node_modules/lodash/collection/any.js create mode 100644 node_modules/lodash/collection/at.js create mode 100644 node_modules/lodash/collection/collect.js create mode 100644 node_modules/lodash/collection/contains.js create mode 100644 node_modules/lodash/collection/countBy.js create mode 100644 node_modules/lodash/collection/detect.js create mode 100644 node_modules/lodash/collection/each.js create mode 100644 node_modules/lodash/collection/eachRight.js create mode 100644 node_modules/lodash/collection/every.js create mode 100644 node_modules/lodash/collection/filter.js create mode 100644 node_modules/lodash/collection/find.js create mode 100644 node_modules/lodash/collection/findLast.js create mode 100644 node_modules/lodash/collection/findWhere.js create mode 100644 node_modules/lodash/collection/foldl.js create mode 100644 node_modules/lodash/collection/foldr.js create mode 100644 node_modules/lodash/collection/forEach.js create mode 100644 node_modules/lodash/collection/forEachRight.js create mode 100644 node_modules/lodash/collection/groupBy.js create mode 100644 node_modules/lodash/collection/include.js create mode 100644 node_modules/lodash/collection/includes.js create mode 100644 node_modules/lodash/collection/indexBy.js create mode 100644 node_modules/lodash/collection/inject.js create mode 100644 node_modules/lodash/collection/invoke.js create mode 100644 node_modules/lodash/collection/map.js create mode 100644 node_modules/lodash/collection/max.js create mode 100644 node_modules/lodash/collection/min.js create mode 100644 node_modules/lodash/collection/partition.js create mode 100644 node_modules/lodash/collection/pluck.js create mode 100644 node_modules/lodash/collection/reduce.js create mode 100644 node_modules/lodash/collection/reduceRight.js create mode 100644 node_modules/lodash/collection/reject.js create mode 100644 node_modules/lodash/collection/sample.js create mode 100644 node_modules/lodash/collection/select.js create mode 100644 node_modules/lodash/collection/shuffle.js create mode 100644 node_modules/lodash/collection/size.js create mode 100644 node_modules/lodash/collection/some.js create mode 100644 node_modules/lodash/collection/sortBy.js create mode 100644 node_modules/lodash/collection/sortByAll.js create mode 100644 node_modules/lodash/collection/sortByOrder.js create mode 100644 node_modules/lodash/collection/sum.js create mode 100644 node_modules/lodash/collection/where.js create mode 100644 node_modules/lodash/date.js create mode 100644 node_modules/lodash/date/now.js create mode 100644 node_modules/lodash/function.js create mode 100644 node_modules/lodash/function/after.js create mode 100644 node_modules/lodash/function/ary.js create mode 100644 node_modules/lodash/function/backflow.js create mode 100644 node_modules/lodash/function/before.js create mode 100644 node_modules/lodash/function/bind.js create mode 100644 node_modules/lodash/function/bindAll.js create mode 100644 node_modules/lodash/function/bindKey.js create mode 100644 node_modules/lodash/function/compose.js create mode 100644 node_modules/lodash/function/curry.js create mode 100644 node_modules/lodash/function/curryRight.js create mode 100644 node_modules/lodash/function/debounce.js create mode 100644 node_modules/lodash/function/defer.js create mode 100644 node_modules/lodash/function/delay.js create mode 100644 node_modules/lodash/function/flow.js create mode 100644 node_modules/lodash/function/flowRight.js create mode 100644 node_modules/lodash/function/memoize.js create mode 100644 node_modules/lodash/function/modArgs.js create mode 100644 node_modules/lodash/function/negate.js create mode 100644 node_modules/lodash/function/once.js create mode 100644 node_modules/lodash/function/partial.js create mode 100644 node_modules/lodash/function/partialRight.js create mode 100644 node_modules/lodash/function/rearg.js create mode 100644 node_modules/lodash/function/restParam.js create mode 100644 node_modules/lodash/function/spread.js create mode 100644 node_modules/lodash/function/throttle.js create mode 100644 node_modules/lodash/function/wrap.js create mode 100644 node_modules/lodash/index.js create mode 100644 node_modules/lodash/internal/LazyWrapper.js create mode 100644 node_modules/lodash/internal/LodashWrapper.js create mode 100644 node_modules/lodash/internal/MapCache.js create mode 100644 node_modules/lodash/internal/SetCache.js create mode 100644 node_modules/lodash/internal/arrayConcat.js create mode 100644 node_modules/lodash/internal/arrayCopy.js create mode 100644 node_modules/lodash/internal/arrayEach.js create mode 100644 node_modules/lodash/internal/arrayEachRight.js create mode 100644 node_modules/lodash/internal/arrayEvery.js create mode 100644 node_modules/lodash/internal/arrayExtremum.js create mode 100644 node_modules/lodash/internal/arrayFilter.js create mode 100644 node_modules/lodash/internal/arrayMap.js create mode 100644 node_modules/lodash/internal/arrayPush.js create mode 100644 node_modules/lodash/internal/arrayReduce.js create mode 100644 node_modules/lodash/internal/arrayReduceRight.js create mode 100644 node_modules/lodash/internal/arraySome.js create mode 100644 node_modules/lodash/internal/arraySum.js create mode 100644 node_modules/lodash/internal/assignDefaults.js create mode 100644 node_modules/lodash/internal/assignOwnDefaults.js create mode 100644 node_modules/lodash/internal/assignWith.js create mode 100644 node_modules/lodash/internal/baseAssign.js create mode 100644 node_modules/lodash/internal/baseAt.js create mode 100644 node_modules/lodash/internal/baseCallback.js create mode 100644 node_modules/lodash/internal/baseClone.js create mode 100644 node_modules/lodash/internal/baseCompareAscending.js create mode 100644 node_modules/lodash/internal/baseCopy.js create mode 100644 node_modules/lodash/internal/baseCreate.js create mode 100644 node_modules/lodash/internal/baseDelay.js create mode 100644 node_modules/lodash/internal/baseDifference.js create mode 100644 node_modules/lodash/internal/baseEach.js create mode 100644 node_modules/lodash/internal/baseEachRight.js create mode 100644 node_modules/lodash/internal/baseEvery.js create mode 100644 node_modules/lodash/internal/baseExtremum.js create mode 100644 node_modules/lodash/internal/baseFill.js create mode 100644 node_modules/lodash/internal/baseFilter.js create mode 100644 node_modules/lodash/internal/baseFind.js create mode 100644 node_modules/lodash/internal/baseFindIndex.js create mode 100644 node_modules/lodash/internal/baseFlatten.js create mode 100644 node_modules/lodash/internal/baseFor.js create mode 100644 node_modules/lodash/internal/baseForIn.js create mode 100644 node_modules/lodash/internal/baseForOwn.js create mode 100644 node_modules/lodash/internal/baseForOwnRight.js create mode 100644 node_modules/lodash/internal/baseForRight.js create mode 100644 node_modules/lodash/internal/baseFunctions.js create mode 100644 node_modules/lodash/internal/baseGet.js create mode 100644 node_modules/lodash/internal/baseIndexOf.js create mode 100644 node_modules/lodash/internal/baseIsEqual.js create mode 100644 node_modules/lodash/internal/baseIsEqualDeep.js create mode 100644 node_modules/lodash/internal/baseIsFunction.js create mode 100644 node_modules/lodash/internal/baseIsMatch.js create mode 100644 node_modules/lodash/internal/baseLodash.js create mode 100644 node_modules/lodash/internal/baseMap.js create mode 100644 node_modules/lodash/internal/baseMatches.js create mode 100644 node_modules/lodash/internal/baseMatchesProperty.js create mode 100644 node_modules/lodash/internal/baseMerge.js create mode 100644 node_modules/lodash/internal/baseMergeDeep.js create mode 100644 node_modules/lodash/internal/baseProperty.js create mode 100644 node_modules/lodash/internal/basePropertyDeep.js create mode 100644 node_modules/lodash/internal/basePullAt.js create mode 100644 node_modules/lodash/internal/baseRandom.js create mode 100644 node_modules/lodash/internal/baseReduce.js create mode 100644 node_modules/lodash/internal/baseSetData.js create mode 100644 node_modules/lodash/internal/baseSlice.js create mode 100644 node_modules/lodash/internal/baseSome.js create mode 100644 node_modules/lodash/internal/baseSortBy.js create mode 100644 node_modules/lodash/internal/baseSortByOrder.js create mode 100644 node_modules/lodash/internal/baseSum.js create mode 100644 node_modules/lodash/internal/baseToString.js create mode 100644 node_modules/lodash/internal/baseUniq.js create mode 100644 node_modules/lodash/internal/baseValues.js create mode 100644 node_modules/lodash/internal/baseWhile.js create mode 100644 node_modules/lodash/internal/baseWrapperValue.js create mode 100644 node_modules/lodash/internal/binaryIndex.js create mode 100644 node_modules/lodash/internal/binaryIndexBy.js create mode 100644 node_modules/lodash/internal/bindCallback.js create mode 100644 node_modules/lodash/internal/bufferClone.js create mode 100644 node_modules/lodash/internal/cacheIndexOf.js create mode 100644 node_modules/lodash/internal/cachePush.js create mode 100644 node_modules/lodash/internal/charsLeftIndex.js create mode 100644 node_modules/lodash/internal/charsRightIndex.js create mode 100644 node_modules/lodash/internal/compareAscending.js create mode 100644 node_modules/lodash/internal/compareMultiple.js create mode 100644 node_modules/lodash/internal/composeArgs.js create mode 100644 node_modules/lodash/internal/composeArgsRight.js create mode 100644 node_modules/lodash/internal/createAggregator.js create mode 100644 node_modules/lodash/internal/createAssigner.js create mode 100644 node_modules/lodash/internal/createBaseEach.js create mode 100644 node_modules/lodash/internal/createBaseFor.js create mode 100644 node_modules/lodash/internal/createBindWrapper.js create mode 100644 node_modules/lodash/internal/createCache.js create mode 100644 node_modules/lodash/internal/createCompounder.js create mode 100644 node_modules/lodash/internal/createCtorWrapper.js create mode 100644 node_modules/lodash/internal/createCurry.js create mode 100644 node_modules/lodash/internal/createDefaults.js create mode 100644 node_modules/lodash/internal/createExtremum.js create mode 100644 node_modules/lodash/internal/createFind.js create mode 100644 node_modules/lodash/internal/createFindIndex.js create mode 100644 node_modules/lodash/internal/createFindKey.js create mode 100644 node_modules/lodash/internal/createFlow.js create mode 100644 node_modules/lodash/internal/createForEach.js create mode 100644 node_modules/lodash/internal/createForIn.js create mode 100644 node_modules/lodash/internal/createForOwn.js create mode 100644 node_modules/lodash/internal/createHybridWrapper.js create mode 100644 node_modules/lodash/internal/createObjectMapper.js create mode 100644 node_modules/lodash/internal/createPadDir.js create mode 100644 node_modules/lodash/internal/createPadding.js create mode 100644 node_modules/lodash/internal/createPartial.js create mode 100644 node_modules/lodash/internal/createPartialWrapper.js create mode 100644 node_modules/lodash/internal/createReduce.js create mode 100644 node_modules/lodash/internal/createRound.js create mode 100644 node_modules/lodash/internal/createSortedIndex.js create mode 100644 node_modules/lodash/internal/createWrapper.js create mode 100644 node_modules/lodash/internal/deburrLetter.js create mode 100644 node_modules/lodash/internal/equalArrays.js create mode 100644 node_modules/lodash/internal/equalByTag.js create mode 100644 node_modules/lodash/internal/equalObjects.js create mode 100644 node_modules/lodash/internal/escapeHtmlChar.js create mode 100644 node_modules/lodash/internal/escapeRegExpChar.js create mode 100644 node_modules/lodash/internal/escapeStringChar.js create mode 100644 node_modules/lodash/internal/getData.js create mode 100644 node_modules/lodash/internal/getFuncName.js create mode 100644 node_modules/lodash/internal/getLength.js create mode 100644 node_modules/lodash/internal/getMatchData.js create mode 100644 node_modules/lodash/internal/getNative.js create mode 100644 node_modules/lodash/internal/getView.js create mode 100644 node_modules/lodash/internal/indexOfNaN.js create mode 100644 node_modules/lodash/internal/initCloneArray.js create mode 100644 node_modules/lodash/internal/initCloneByTag.js create mode 100644 node_modules/lodash/internal/initCloneObject.js create mode 100644 node_modules/lodash/internal/invokePath.js create mode 100644 node_modules/lodash/internal/isArrayLike.js create mode 100644 node_modules/lodash/internal/isIndex.js create mode 100644 node_modules/lodash/internal/isIterateeCall.js create mode 100644 node_modules/lodash/internal/isKey.js create mode 100644 node_modules/lodash/internal/isLaziable.js create mode 100644 node_modules/lodash/internal/isLength.js create mode 100644 node_modules/lodash/internal/isObjectLike.js create mode 100644 node_modules/lodash/internal/isSpace.js create mode 100644 node_modules/lodash/internal/isStrictComparable.js create mode 100644 node_modules/lodash/internal/lazyClone.js create mode 100644 node_modules/lodash/internal/lazyReverse.js create mode 100644 node_modules/lodash/internal/lazyValue.js create mode 100644 node_modules/lodash/internal/mapDelete.js create mode 100644 node_modules/lodash/internal/mapGet.js create mode 100644 node_modules/lodash/internal/mapHas.js create mode 100644 node_modules/lodash/internal/mapSet.js create mode 100644 node_modules/lodash/internal/mergeData.js create mode 100644 node_modules/lodash/internal/mergeDefaults.js create mode 100644 node_modules/lodash/internal/metaMap.js create mode 100644 node_modules/lodash/internal/pickByArray.js create mode 100644 node_modules/lodash/internal/pickByCallback.js create mode 100644 node_modules/lodash/internal/reEscape.js create mode 100644 node_modules/lodash/internal/reEvaluate.js create mode 100644 node_modules/lodash/internal/reInterpolate.js create mode 100644 node_modules/lodash/internal/realNames.js create mode 100644 node_modules/lodash/internal/reorder.js create mode 100644 node_modules/lodash/internal/replaceHolders.js create mode 100644 node_modules/lodash/internal/setData.js create mode 100644 node_modules/lodash/internal/shimKeys.js create mode 100644 node_modules/lodash/internal/sortedUniq.js create mode 100644 node_modules/lodash/internal/toIterable.js create mode 100644 node_modules/lodash/internal/toObject.js create mode 100644 node_modules/lodash/internal/toPath.js create mode 100644 node_modules/lodash/internal/trimmedLeftIndex.js create mode 100644 node_modules/lodash/internal/trimmedRightIndex.js create mode 100644 node_modules/lodash/internal/unescapeHtmlChar.js create mode 100644 node_modules/lodash/internal/wrapperClone.js create mode 100644 node_modules/lodash/lang.js create mode 100644 node_modules/lodash/lang/clone.js create mode 100644 node_modules/lodash/lang/cloneDeep.js create mode 100644 node_modules/lodash/lang/eq.js create mode 100644 node_modules/lodash/lang/gt.js create mode 100644 node_modules/lodash/lang/gte.js create mode 100644 node_modules/lodash/lang/isArguments.js create mode 100644 node_modules/lodash/lang/isArray.js create mode 100644 node_modules/lodash/lang/isBoolean.js create mode 100644 node_modules/lodash/lang/isDate.js create mode 100644 node_modules/lodash/lang/isElement.js create mode 100644 node_modules/lodash/lang/isEmpty.js create mode 100644 node_modules/lodash/lang/isEqual.js create mode 100644 node_modules/lodash/lang/isError.js create mode 100644 node_modules/lodash/lang/isFinite.js create mode 100644 node_modules/lodash/lang/isFunction.js create mode 100644 node_modules/lodash/lang/isMatch.js create mode 100644 node_modules/lodash/lang/isNaN.js create mode 100644 node_modules/lodash/lang/isNative.js create mode 100644 node_modules/lodash/lang/isNull.js create mode 100644 node_modules/lodash/lang/isNumber.js create mode 100644 node_modules/lodash/lang/isObject.js create mode 100644 node_modules/lodash/lang/isPlainObject.js create mode 100644 node_modules/lodash/lang/isRegExp.js create mode 100644 node_modules/lodash/lang/isString.js create mode 100644 node_modules/lodash/lang/isTypedArray.js create mode 100644 node_modules/lodash/lang/isUndefined.js create mode 100644 node_modules/lodash/lang/lt.js create mode 100644 node_modules/lodash/lang/lte.js create mode 100644 node_modules/lodash/lang/toArray.js create mode 100644 node_modules/lodash/lang/toPlainObject.js create mode 100644 node_modules/lodash/math.js create mode 100644 node_modules/lodash/math/add.js create mode 100644 node_modules/lodash/math/ceil.js create mode 100644 node_modules/lodash/math/floor.js create mode 100644 node_modules/lodash/math/max.js create mode 100644 node_modules/lodash/math/min.js create mode 100644 node_modules/lodash/math/round.js create mode 100644 node_modules/lodash/math/sum.js create mode 100644 node_modules/lodash/number.js create mode 100644 node_modules/lodash/number/inRange.js create mode 100644 node_modules/lodash/number/random.js create mode 100644 node_modules/lodash/object.js create mode 100644 node_modules/lodash/object/assign.js create mode 100644 node_modules/lodash/object/create.js create mode 100644 node_modules/lodash/object/defaults.js create mode 100644 node_modules/lodash/object/defaultsDeep.js create mode 100644 node_modules/lodash/object/extend.js create mode 100644 node_modules/lodash/object/findKey.js create mode 100644 node_modules/lodash/object/findLastKey.js create mode 100644 node_modules/lodash/object/forIn.js create mode 100644 node_modules/lodash/object/forInRight.js create mode 100644 node_modules/lodash/object/forOwn.js create mode 100644 node_modules/lodash/object/forOwnRight.js create mode 100644 node_modules/lodash/object/functions.js create mode 100644 node_modules/lodash/object/get.js create mode 100644 node_modules/lodash/object/has.js create mode 100644 node_modules/lodash/object/invert.js create mode 100644 node_modules/lodash/object/keys.js create mode 100644 node_modules/lodash/object/keysIn.js create mode 100644 node_modules/lodash/object/mapKeys.js create mode 100644 node_modules/lodash/object/mapValues.js create mode 100644 node_modules/lodash/object/merge.js create mode 100644 node_modules/lodash/object/methods.js create mode 100644 node_modules/lodash/object/omit.js create mode 100644 node_modules/lodash/object/pairs.js create mode 100644 node_modules/lodash/object/pick.js create mode 100644 node_modules/lodash/object/result.js create mode 100644 node_modules/lodash/object/set.js create mode 100644 node_modules/lodash/object/transform.js create mode 100644 node_modules/lodash/object/values.js create mode 100644 node_modules/lodash/object/valuesIn.js create mode 100644 node_modules/lodash/package.json create mode 100644 node_modules/lodash/string.js create mode 100644 node_modules/lodash/string/camelCase.js create mode 100644 node_modules/lodash/string/capitalize.js create mode 100644 node_modules/lodash/string/deburr.js create mode 100644 node_modules/lodash/string/endsWith.js create mode 100644 node_modules/lodash/string/escape.js create mode 100644 node_modules/lodash/string/escapeRegExp.js create mode 100644 node_modules/lodash/string/kebabCase.js create mode 100644 node_modules/lodash/string/pad.js create mode 100644 node_modules/lodash/string/padLeft.js create mode 100644 node_modules/lodash/string/padRight.js create mode 100644 node_modules/lodash/string/parseInt.js create mode 100644 node_modules/lodash/string/repeat.js create mode 100644 node_modules/lodash/string/snakeCase.js create mode 100644 node_modules/lodash/string/startCase.js create mode 100644 node_modules/lodash/string/startsWith.js create mode 100644 node_modules/lodash/string/template.js create mode 100644 node_modules/lodash/string/templateSettings.js create mode 100644 node_modules/lodash/string/trim.js create mode 100644 node_modules/lodash/string/trimLeft.js create mode 100644 node_modules/lodash/string/trimRight.js create mode 100644 node_modules/lodash/string/trunc.js create mode 100644 node_modules/lodash/string/unescape.js create mode 100644 node_modules/lodash/string/words.js create mode 100644 node_modules/lodash/support.js create mode 100644 node_modules/lodash/utility.js create mode 100644 node_modules/lodash/utility/attempt.js create mode 100644 node_modules/lodash/utility/callback.js create mode 100644 node_modules/lodash/utility/constant.js create mode 100644 node_modules/lodash/utility/identity.js create mode 100644 node_modules/lodash/utility/iteratee.js create mode 100644 node_modules/lodash/utility/matches.js create mode 100644 node_modules/lodash/utility/matchesProperty.js create mode 100644 node_modules/lodash/utility/method.js create mode 100644 node_modules/lodash/utility/methodOf.js create mode 100644 node_modules/lodash/utility/mixin.js create mode 100644 node_modules/lodash/utility/noop.js create mode 100644 node_modules/lodash/utility/property.js create mode 100644 node_modules/lodash/utility/propertyOf.js create mode 100644 node_modules/lodash/utility/range.js create mode 100644 node_modules/lodash/utility/times.js create mode 100644 node_modules/lodash/utility/uniqueId.js create mode 100644 node_modules/longest/LICENSE create mode 100644 node_modules/longest/README.md create mode 100644 node_modules/longest/index.js create mode 100644 node_modules/longest/package.json create mode 100644 node_modules/media-typer/HISTORY.md create mode 100644 node_modules/media-typer/LICENSE create mode 100644 node_modules/media-typer/README.md create mode 100644 node_modules/media-typer/index.js create mode 100644 node_modules/media-typer/package.json create mode 100644 node_modules/merge-descriptors/HISTORY.md create mode 100644 node_modules/merge-descriptors/LICENSE create mode 100644 node_modules/merge-descriptors/README.md create mode 100644 node_modules/merge-descriptors/index.js create mode 100644 node_modules/merge-descriptors/package.json create mode 100644 node_modules/methods/HISTORY.md create mode 100644 node_modules/methods/LICENSE create mode 100644 node_modules/methods/README.md create mode 100644 node_modules/methods/index.js create mode 100644 node_modules/methods/package.json create mode 100644 node_modules/mime-db/HISTORY.md create mode 100644 node_modules/mime-db/LICENSE create mode 100644 node_modules/mime-db/README.md create mode 100644 node_modules/mime-db/db.json create mode 100644 node_modules/mime-db/index.js create mode 100644 node_modules/mime-db/package.json create mode 100644 node_modules/mime-types/HISTORY.md create mode 100644 node_modules/mime-types/LICENSE create mode 100644 node_modules/mime-types/README.md create mode 100644 node_modules/mime-types/index.js create mode 100644 node_modules/mime-types/package.json create mode 100644 node_modules/mime/.npmignore create mode 100644 node_modules/mime/LICENSE create mode 100644 node_modules/mime/README.md create mode 100644 node_modules/mime/build/build.js create mode 100644 node_modules/mime/build/test.js create mode 100755 node_modules/mime/cli.js create mode 100644 node_modules/mime/mime.js create mode 100644 node_modules/mime/package.json create mode 100644 node_modules/mime/types.json create mode 100644 node_modules/minimatch/LICENSE create mode 100644 node_modules/minimatch/README.md create mode 100644 node_modules/minimatch/browser.js create mode 100644 node_modules/minimatch/minimatch.js create mode 100644 node_modules/minimatch/package.json create mode 100644 node_modules/minimist/.travis.yml create mode 100644 node_modules/minimist/LICENSE create mode 100644 node_modules/minimist/example/parse.js create mode 100644 node_modules/minimist/index.js create mode 100644 node_modules/minimist/package.json create mode 100644 node_modules/minimist/readme.markdown create mode 100644 node_modules/minimist/test/dash.js create mode 100644 node_modules/minimist/test/default_bool.js create mode 100644 node_modules/minimist/test/dotted.js create mode 100644 node_modules/minimist/test/long.js create mode 100644 node_modules/minimist/test/parse.js create mode 100644 node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/minimist/test/short.js create mode 100644 node_modules/minimist/test/whitespace.js 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/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/ms/.npmignore create mode 100644 node_modules/ms/History.md create mode 100644 node_modules/ms/LICENSE create mode 100644 node_modules/ms/README.md create mode 100644 node_modules/ms/index.js create mode 100644 node_modules/ms/package.json create mode 100644 node_modules/negotiator/HISTORY.md create mode 100644 node_modules/negotiator/LICENSE create mode 100644 node_modules/negotiator/README.md create mode 100644 node_modules/negotiator/index.js create mode 100644 node_modules/negotiator/lib/charset.js create mode 100644 node_modules/negotiator/lib/encoding.js create mode 100644 node_modules/negotiator/lib/language.js create mode 100644 node_modules/negotiator/lib/mediaType.js create mode 100644 node_modules/negotiator/package.json create mode 100644 node_modules/on-finished/HISTORY.md create mode 100644 node_modules/on-finished/LICENSE create mode 100644 node_modules/on-finished/README.md create mode 100644 node_modules/on-finished/index.js create mode 100644 node_modules/on-finished/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/parse.js create mode 100644 node_modules/optimist/test/usage.js create mode 100644 node_modules/parseurl/HISTORY.md create mode 100644 node_modules/parseurl/LICENSE create mode 100644 node_modules/parseurl/README.md create mode 100644 node_modules/parseurl/index.js create mode 100644 node_modules/parseurl/package.json create mode 100644 node_modules/path-to-regexp/History.md create mode 100644 node_modules/path-to-regexp/LICENSE create mode 100644 node_modules/path-to-regexp/Readme.md create mode 100644 node_modules/path-to-regexp/index.js create mode 100644 node_modules/path-to-regexp/package.json create mode 100644 node_modules/pg-connection-string/.npmignore create mode 100644 node_modules/pg-connection-string/.travis.yml create mode 100644 node_modules/pg-connection-string/LICENSE create mode 100644 node_modules/pg-connection-string/README.md create mode 100644 node_modules/pg-connection-string/index.js create mode 100644 node_modules/pg-connection-string/package.json create mode 100644 node_modules/pg-connection-string/test/parse.js create mode 100644 node_modules/pool2/README.md create mode 100644 node_modules/pool2/index.js create mode 100644 node_modules/pool2/lib/cluster.js create mode 100644 node_modules/pool2/lib/pool.js create mode 100644 node_modules/pool2/lib/resource-request.js create mode 100644 node_modules/pool2/package.json create mode 100644 node_modules/promise/.jshintrc create mode 100644 node_modules/promise/.npmignore create mode 100644 node_modules/promise/LICENSE create mode 100644 node_modules/promise/Readme.md create mode 100644 node_modules/promise/core.js create mode 100644 node_modules/promise/index.js create mode 100644 node_modules/promise/lib/core.js create mode 100644 node_modules/promise/lib/done.js create mode 100644 node_modules/promise/lib/es6-extensions.js create mode 100644 node_modules/promise/lib/node-extensions.js create mode 100644 node_modules/promise/package.json create mode 100644 node_modules/promise/polyfill-done.js create mode 100644 node_modules/promise/polyfill.js create mode 100644 node_modules/proxy-addr/HISTORY.md create mode 100644 node_modules/proxy-addr/LICENSE create mode 100644 node_modules/proxy-addr/README.md create mode 100644 node_modules/proxy-addr/index.js create mode 100644 node_modules/proxy-addr/package.json create mode 100644 node_modules/qs/.eslintignore create mode 100644 node_modules/qs/.npmignore create mode 100644 node_modules/qs/.travis.yml create mode 100644 node_modules/qs/CHANGELOG.md create mode 100644 node_modules/qs/CONTRIBUTING.md create mode 100644 node_modules/qs/LICENSE create mode 100644 node_modules/qs/README.md create mode 100644 node_modules/qs/bower.json create mode 100644 node_modules/qs/lib/index.js create mode 100644 node_modules/qs/lib/parse.js create mode 100644 node_modules/qs/lib/stringify.js create mode 100644 node_modules/qs/lib/utils.js create mode 100644 node_modules/qs/package.json create mode 100644 node_modules/qs/test/parse.js create mode 100644 node_modules/qs/test/stringify.js create mode 100644 node_modules/qs/test/utils.js create mode 100644 node_modules/range-parser/HISTORY.md create mode 100644 node_modules/range-parser/LICENSE create mode 100644 node_modules/range-parser/README.md create mode 100644 node_modules/range-parser/index.js create mode 100644 node_modules/range-parser/package.json create mode 100644 node_modules/readable-stream/.npmignore create mode 100644 node_modules/readable-stream/LICENSE create mode 100644 node_modules/readable-stream/README.md create mode 100644 node_modules/readable-stream/duplex.js create mode 100644 node_modules/readable-stream/float.patch 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/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/resolve/.travis.yml create mode 100644 node_modules/resolve/LICENSE create mode 100644 node_modules/resolve/example/async.js create mode 100644 node_modules/resolve/example/sync.js create mode 100644 node_modules/resolve/index.js create mode 100644 node_modules/resolve/lib/async.js create mode 100644 node_modules/resolve/lib/caller.js create mode 100644 node_modules/resolve/lib/core.js create mode 100644 node_modules/resolve/lib/core.json create mode 100644 node_modules/resolve/lib/node-modules-paths.js create mode 100644 node_modules/resolve/lib/sync.js create mode 100644 node_modules/resolve/package.json create mode 100644 node_modules/resolve/readme.markdown create mode 100644 node_modules/resolve/test/core.js create mode 100644 node_modules/resolve/test/dotdot.js create mode 100644 node_modules/resolve/test/dotdot/abc/index.js create mode 100644 node_modules/resolve/test/dotdot/index.js create mode 100644 node_modules/resolve/test/faulty_basedir.js create mode 100644 node_modules/resolve/test/filter.js create mode 100644 node_modules/resolve/test/filter_sync.js create mode 100644 node_modules/resolve/test/mock.js create mode 100644 node_modules/resolve/test/mock_sync.js create mode 100644 node_modules/resolve/test/module_dir.js create mode 100644 node_modules/resolve/test/module_dir/xmodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/ymodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/main.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/package.json create mode 100644 node_modules/resolve/test/node_path.js create mode 100644 node_modules/resolve/test/node_path/x/aaa/index.js create mode 100644 node_modules/resolve/test/node_path/x/ccc/index.js create mode 100644 node_modules/resolve/test/node_path/y/bbb/index.js create mode 100644 node_modules/resolve/test/node_path/y/ccc/index.js create mode 100644 node_modules/resolve/test/nonstring.js create mode 100644 node_modules/resolve/test/pathfilter.js create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/main.js create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js create mode 100644 node_modules/resolve/test/precedence.js create mode 100644 node_modules/resolve/test/precedence/aaa.js create mode 100644 node_modules/resolve/test/precedence/aaa/index.js create mode 100644 node_modules/resolve/test/precedence/aaa/main.js create mode 100644 node_modules/resolve/test/precedence/bbb.js create mode 100644 node_modules/resolve/test/precedence/bbb/main.js create mode 100644 node_modules/resolve/test/resolver.js create mode 100644 node_modules/resolve/test/resolver/bar/node_modules/foo/index.js create mode 100644 node_modules/resolve/test/resolver/baz/doom.js create mode 100644 node_modules/resolve/test/resolver/baz/package.json create mode 100644 node_modules/resolve/test/resolver/baz/quux.js create mode 100644 node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js create mode 100644 node_modules/resolve/test/resolver/biz/node_modules/garply/package.json create mode 100644 node_modules/resolve/test/resolver/biz/node_modules/grux/index.js create mode 100644 node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js create mode 100644 node_modules/resolve/test/resolver/cup.coffee create mode 100644 node_modules/resolve/test/resolver/foo.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/index.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/package.json create mode 100644 node_modules/resolve/test/resolver/mug.coffee create mode 100644 node_modules/resolve/test/resolver/mug.js create mode 100644 node_modules/resolve/test/resolver/other_path/lib/other-lib.js create mode 100644 node_modules/resolve/test/resolver/other_path/root.js create mode 100644 node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js create mode 100644 node_modules/resolve/test/resolver/quux/foo/index.js create mode 100644 node_modules/resolve/test/resolver/without_basedir/main.js create mode 100644 node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js create mode 100644 node_modules/resolve/test/resolver_sync.js create mode 100644 node_modules/resolve/test/subdirs.js create mode 100644 node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json create mode 100644 node_modules/resolve/test/subdirs/node_modules/a/package.json create mode 100644 node_modules/right-align/LICENSE create mode 100644 node_modules/right-align/README.md create mode 100644 node_modules/right-align/index.js create mode 100644 node_modules/right-align/package.json create mode 100644 node_modules/send/HISTORY.md create mode 100644 node_modules/send/LICENSE create mode 100644 node_modules/send/README.md create mode 100644 node_modules/send/index.js create mode 100644 node_modules/send/package.json create mode 100644 node_modules/serve-static/HISTORY.md create mode 100644 node_modules/serve-static/LICENSE create mode 100644 node_modules/serve-static/README.md create mode 100644 node_modules/serve-static/index.js create mode 100644 node_modules/serve-static/package.json create mode 100644 node_modules/simple-backoff/.npmignore create mode 100644 node_modules/simple-backoff/README.md create mode 100644 node_modules/simple-backoff/package.json create mode 100644 node_modules/simple-backoff/simple-backoff.js create mode 100644 node_modules/simple-backoff/simple-backoff.test.js create mode 100644 node_modules/source-map/README.md create mode 100644 node_modules/source-map/build/assert-shim.js create mode 100644 node_modules/source-map/build/mini-require.js create mode 100644 node_modules/source-map/build/prefix-source-map.jsm create mode 100644 node_modules/source-map/build/prefix-utils.jsm create mode 100644 node_modules/source-map/build/suffix-browser.js create mode 100644 node_modules/source-map/build/suffix-source-map.jsm create mode 100644 node_modules/source-map/build/suffix-utils.jsm create mode 100644 node_modules/source-map/build/test-prefix.js create mode 100644 node_modules/source-map/build/test-suffix.js create mode 100644 node_modules/source-map/lib/source-map.js create mode 100644 node_modules/source-map/lib/source-map/array-set.js create mode 100644 node_modules/source-map/lib/source-map/base64-vlq.js create mode 100644 node_modules/source-map/lib/source-map/base64.js create mode 100644 node_modules/source-map/lib/source-map/binary-search.js create mode 100644 node_modules/source-map/lib/source-map/mapping-list.js create mode 100644 node_modules/source-map/lib/source-map/quick-sort.js create mode 100644 node_modules/source-map/lib/source-map/source-map-consumer.js create mode 100644 node_modules/source-map/lib/source-map/source-map-generator.js create mode 100644 node_modules/source-map/lib/source-map/source-node.js create mode 100644 node_modules/source-map/lib/source-map/util.js create mode 100644 node_modules/source-map/package.json create mode 100644 node_modules/statuses/LICENSE create mode 100644 node_modules/statuses/README.md create mode 100644 node_modules/statuses/codes.json create mode 100644 node_modules/statuses/index.js create mode 100644 node_modules/statuses/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/strip-ansi/index.js create mode 100644 node_modules/strip-ansi/license create mode 100644 node_modules/strip-ansi/package.json create mode 100644 node_modules/strip-ansi/readme.md create mode 100644 node_modules/supports-color/index.js create mode 100644 node_modules/supports-color/license create mode 100644 node_modules/supports-color/package.json create mode 100644 node_modules/supports-color/readme.md create mode 100644 node_modules/tildify/index.js create mode 100644 node_modules/tildify/package.json create mode 100644 node_modules/tildify/readme.md create mode 100644 node_modules/transformers/.npmignore create mode 100644 node_modules/transformers/README.md create mode 100644 node_modules/transformers/history.md create mode 100644 node_modules/transformers/lib/shared.js create mode 100644 node_modules/transformers/lib/transformers.js create mode 120000 node_modules/transformers/node_modules/.bin/uglifyjs create mode 100644 node_modules/transformers/node_modules/is-promise/.npmignore create mode 100644 node_modules/transformers/node_modules/is-promise/.travis.yml create mode 100644 node_modules/transformers/node_modules/is-promise/LICENSE create mode 100644 node_modules/transformers/node_modules/is-promise/index.js create mode 100644 node_modules/transformers/node_modules/is-promise/package.json create mode 100644 node_modules/transformers/node_modules/is-promise/readme.md create mode 100644 node_modules/transformers/node_modules/promise/.npmignore create mode 100644 node_modules/transformers/node_modules/promise/Readme.md create mode 100644 node_modules/transformers/node_modules/promise/index.js create mode 100644 node_modules/transformers/node_modules/promise/package.json create mode 100644 node_modules/transformers/node_modules/source-map/.npmignore create mode 100644 node_modules/transformers/node_modules/source-map/.travis.yml create mode 100644 node_modules/transformers/node_modules/source-map/CHANGELOG.md create mode 100644 node_modules/transformers/node_modules/source-map/LICENSE create mode 100644 node_modules/transformers/node_modules/source-map/Makefile.dryice.js create mode 100644 node_modules/transformers/node_modules/source-map/README.md create mode 100644 node_modules/transformers/node_modules/source-map/build/assert-shim.js create mode 100644 node_modules/transformers/node_modules/source-map/build/mini-require.js create mode 100644 node_modules/transformers/node_modules/source-map/build/prefix-source-map.jsm create mode 100644 node_modules/transformers/node_modules/source-map/build/prefix-utils.jsm create mode 100644 node_modules/transformers/node_modules/source-map/build/suffix-browser.js create mode 100644 node_modules/transformers/node_modules/source-map/build/suffix-source-map.jsm create mode 100644 node_modules/transformers/node_modules/source-map/build/suffix-utils.jsm create mode 100644 node_modules/transformers/node_modules/source-map/build/test-prefix.js create mode 100644 node_modules/transformers/node_modules/source-map/build/test-suffix.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/array-set.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/base64-vlq.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/base64.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/binary-search.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/mapping-list.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/source-map-consumer.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/source-map-generator.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/source-node.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/util.js create mode 100644 node_modules/transformers/node_modules/source-map/package.json create mode 100755 node_modules/transformers/node_modules/source-map/test/run-tests.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-api.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-array-set.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-base64-vlq.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-base64.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-binary-search.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-dog-fooding.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-source-map-consumer.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-source-map-generator.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-source-node.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-util.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/util.js create mode 100644 node_modules/transformers/node_modules/uglify-js/.npmignore create mode 100644 node_modules/transformers/node_modules/uglify-js/README.md create mode 100755 node_modules/transformers/node_modules/uglify-js/bin/uglifyjs create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/ast.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/compress.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/mozilla-ast.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/output.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/parse.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/scope.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/sourcemap.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/transform.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/utils.js create mode 100644 node_modules/transformers/node_modules/uglify-js/package.json create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/arrays.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/blocks.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/conditionals.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/dead-code.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/debugger.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/drop-unused.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-105.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-12.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-22.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-44.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-59.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/labels.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/loops.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/properties.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/sequences.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/switch.js create mode 100755 node_modules/transformers/node_modules/uglify-js/test/run-tests.js create mode 100644 node_modules/transformers/node_modules/uglify-js/tools/node.js create mode 100644 node_modules/transformers/package.json create mode 100644 node_modules/type-is/HISTORY.md create mode 100644 node_modules/type-is/LICENSE create mode 100644 node_modules/type-is/README.md create mode 100644 node_modules/type-is/index.js create mode 100644 node_modules/type-is/package.json create mode 100644 node_modules/uglify-js/LICENSE create mode 100644 node_modules/uglify-js/README.md create mode 100755 node_modules/uglify-js/bin/extract-props.js create mode 100755 node_modules/uglify-js/bin/uglifyjs create mode 100644 node_modules/uglify-js/lib/ast.js create mode 100644 node_modules/uglify-js/lib/compress.js create mode 100644 node_modules/uglify-js/lib/mozilla-ast.js create mode 100644 node_modules/uglify-js/lib/output.js create mode 100644 node_modules/uglify-js/lib/parse.js create mode 100644 node_modules/uglify-js/lib/propmangle.js create mode 100644 node_modules/uglify-js/lib/scope.js create mode 100644 node_modules/uglify-js/lib/sourcemap.js create mode 100644 node_modules/uglify-js/lib/transform.js create mode 100644 node_modules/uglify-js/lib/utils.js create mode 100644 node_modules/uglify-js/node_modules/source-map/README.md create mode 100644 node_modules/uglify-js/node_modules/source-map/dist/source-map.debug.js create mode 100644 node_modules/uglify-js/node_modules/source-map/dist/source-map.js create mode 100644 node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js create mode 100644 node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js.map create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/array-set.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/base64-vlq.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/base64.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/binary-search.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/mapping-list.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/quick-sort.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/source-map-consumer.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/source-map-generator.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/source-node.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/util.js create mode 100644 node_modules/uglify-js/node_modules/source-map/package.json create mode 100644 node_modules/uglify-js/node_modules/source-map/source-map.js create mode 100644 node_modules/uglify-js/package.json create mode 100644 node_modules/uglify-js/tools/domprops.json create mode 100644 node_modules/uglify-js/tools/exports.js create mode 100644 node_modules/uglify-js/tools/node.js create mode 100644 node_modules/uglify-js/tools/props.html create mode 100644 node_modules/uglify-to-browserify/.npmignore create mode 100644 node_modules/uglify-to-browserify/.travis.yml create mode 100644 node_modules/uglify-to-browserify/LICENSE create mode 100644 node_modules/uglify-to-browserify/README.md create mode 100644 node_modules/uglify-to-browserify/index.js create mode 100644 node_modules/uglify-to-browserify/package.json create mode 100644 node_modules/uglify-to-browserify/test/index.js create mode 100644 node_modules/unpipe/HISTORY.md create mode 100644 node_modules/unpipe/LICENSE create mode 100644 node_modules/unpipe/README.md create mode 100644 node_modules/unpipe/index.js create mode 100644 node_modules/unpipe/package.json create mode 100755 node_modules/user-home/cli.js create mode 100644 node_modules/user-home/index.js create mode 100644 node_modules/user-home/license create mode 100644 node_modules/user-home/package.json create mode 100644 node_modules/user-home/readme.md create mode 100644 node_modules/utils-merge/.travis.yml create mode 100644 node_modules/utils-merge/LICENSE create mode 100644 node_modules/utils-merge/README.md create mode 100644 node_modules/utils-merge/index.js create mode 100644 node_modules/utils-merge/package.json create mode 100644 node_modules/v8flags/.npmignore create mode 100644 node_modules/v8flags/LICENSE create mode 100644 node_modules/v8flags/README.md create mode 100644 node_modules/v8flags/index.js create mode 100644 node_modules/v8flags/package.json create mode 100644 node_modules/vary/HISTORY.md create mode 100644 node_modules/vary/LICENSE create mode 100644 node_modules/vary/README.md create mode 100644 node_modules/vary/index.js create mode 100644 node_modules/vary/package.json create mode 100644 node_modules/void-elements/.gitattributes create mode 100644 node_modules/void-elements/.npmignore create mode 100644 node_modules/void-elements/.travis.yml create mode 100644 node_modules/void-elements/LICENSE create mode 100644 node_modules/void-elements/README.md create mode 100644 node_modules/void-elements/index.js create mode 100644 node_modules/void-elements/package.json create mode 100644 node_modules/void-elements/pre-publish.js create mode 100644 node_modules/void-elements/test/index.js create mode 100644 node_modules/window-size/LICENSE-MIT create mode 100644 node_modules/window-size/README.md create mode 100644 node_modules/window-size/index.js create mode 100644 node_modules/window-size/package.json create mode 100644 node_modules/with/.npmignore create mode 100644 node_modules/with/LICENSE create mode 100644 node_modules/with/README.md create mode 100644 node_modules/with/index.js create mode 120000 node_modules/with/node_modules/.bin/acorn create mode 100644 node_modules/with/node_modules/acorn/.editorconfig create mode 100644 node_modules/with/node_modules/acorn/.gitattributes create mode 100644 node_modules/with/node_modules/acorn/.npmignore create mode 100644 node_modules/with/node_modules/acorn/.tern-project create mode 100644 node_modules/with/node_modules/acorn/.travis.yml create mode 100644 node_modules/with/node_modules/acorn/AUTHORS create mode 100644 node_modules/with/node_modules/acorn/LICENSE create mode 100644 node_modules/with/node_modules/acorn/README.md create mode 100755 node_modules/with/node_modules/acorn/bin/acorn create mode 100644 node_modules/with/node_modules/acorn/bin/build-acorn.js create mode 100644 node_modules/with/node_modules/acorn/bin/generate-identifier-regex.js create mode 100755 node_modules/with/node_modules/acorn/bin/prepublish.sh create mode 100755 node_modules/with/node_modules/acorn/bin/update_authors.sh create mode 100755 node_modules/with/node_modules/acorn/bin/without_eval create mode 100644 node_modules/with/node_modules/acorn/dist/.keep create mode 100644 node_modules/with/node_modules/acorn/dist/acorn.js create mode 100644 node_modules/with/node_modules/acorn/dist/acorn_csp.js create mode 100644 node_modules/with/node_modules/acorn/dist/acorn_loose.js create mode 100644 node_modules/with/node_modules/acorn/dist/walk.js create mode 100644 node_modules/with/node_modules/acorn/package.json create mode 100755 node_modules/with/node_modules/acorn/src/expression.js create mode 100644 node_modules/with/node_modules/acorn/src/identifier.js create mode 100644 node_modules/with/node_modules/acorn/src/index.js create mode 100755 node_modules/with/node_modules/acorn/src/location.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/acorn_loose.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/expression.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/index.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/parseutil.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/state.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/statement.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/tokenize.js create mode 100755 node_modules/with/node_modules/acorn/src/lval.js create mode 100755 node_modules/with/node_modules/acorn/src/node.js create mode 100644 node_modules/with/node_modules/acorn/src/options.js create mode 100644 node_modules/with/node_modules/acorn/src/parseutil.js create mode 100644 node_modules/with/node_modules/acorn/src/state.js create mode 100644 node_modules/with/node_modules/acorn/src/statement.js create mode 100644 node_modules/with/node_modules/acorn/src/tokencontext.js create mode 100644 node_modules/with/node_modules/acorn/src/tokenize.js create mode 100644 node_modules/with/node_modules/acorn/src/tokentype.js create mode 100644 node_modules/with/node_modules/acorn/src/util.js create mode 100644 node_modules/with/node_modules/acorn/src/walk/index.js create mode 100644 node_modules/with/node_modules/acorn/src/whitespace.js create mode 100644 node_modules/with/package.json 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 create mode 100644 node_modules/yargs/CHANGELOG.md create mode 100644 node_modules/yargs/LICENSE create mode 100644 node_modules/yargs/README.md create mode 100644 node_modules/yargs/completion.sh.hbs create mode 100644 node_modules/yargs/index.js create mode 100644 node_modules/yargs/lib/completion.js create mode 100644 node_modules/yargs/lib/parser.js create mode 100644 node_modules/yargs/lib/usage.js create mode 100644 node_modules/yargs/lib/validation.js create mode 100644 node_modules/yargs/package.json create mode 100644 package.json create mode 100644 static/css/printinvoice.css create mode 100644 views/includes/head.jade create mode 100644 views/includes/nav.jade create mode 100644 views/index.jade create mode 100644 views/invoice.jade diff --git a/app.js b/app.js new file mode 100644 index 0000000..babf0a7 --- /dev/null +++ b/app.js @@ -0,0 +1,85 @@ +//TODO: per-item discounts + +var express = require('express') +var app = express() +var testData = + { + number: 247, + date: "1st May 2016", + dateDue: "28th May 2016", + myDetails: "Alfie Pates\n1 Address Way\nTestville, AB12 3CD" + "\n" + "01234 567 890", + customerAddress: "ACME Customer Inc.\nCustomer Building\n14 Customer Street\nPaymenow, FF22 2FF", + careOf: "Caroline Accounting", + items: [ + { + name: "test item one", + rate: "£100.00", + quantity: "1", + subtotal: "£100.00" + }, + { + name: "test item two", + category: "test category", + rate: "£5.00", + quantity: "1", + subtotal: "£10.00" + }, + { + name: "test hourly item", + category: "hourly items", + rate: "£15.00", + rateSuffix: "/hr", + quantity: "8", + quantitySuffix: "hrs", + subtotal: "£120.00" + }, + { + name: "test item with comment", + comment: "here is a long test comment with some newlines. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex\n ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \n non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", + rate: "£1.50", + quantity: "1", + subtotal: "£1.50" + } + ], + // subtotal before discounts, £231.50 + discounts: [ + { + percentage: "10%", + amount: "-£23.15" + } + ], + subtotal: "£208.35", + taxes: [ + { + name: "VAT", + rate: "20%", + amount: "£250.02" + } + ], + shipping: [ + { + name: "Royal Mail First Class", + amount: "£4.00" + } + ], + payments: [ + { + type: "Cash", + amount: "-£50.02", + } + ], + balanceDue: "£200.00", + comments: "Here's a test\nmulti-line\ncomment!", + terms: "Payment due within 28 days from date of invoice." + }; + +app.set('view engine', 'jade'); +app.use('/static', express.static('static')); + +app.get('/', function(req, res) { + res.render('invoice', testData); +}); + +app.listen(3000, function() { + console.log('Listening on Port 3000!') +}); diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/cleancss b/node_modules/.bin/cleancss new file mode 120000 index 0000000..2a3439e --- /dev/null +++ b/node_modules/.bin/cleancss @@ -0,0 +1 @@ +../clean-css/bin/cleancss \ No newline at end of file diff --git a/node_modules/.bin/jade b/node_modules/.bin/jade new file mode 120000 index 0000000..65a3bac --- /dev/null +++ b/node_modules/.bin/jade @@ -0,0 +1 @@ +../jade/bin/jade.js \ No newline at end of file diff --git a/node_modules/.bin/knex b/node_modules/.bin/knex new file mode 120000 index 0000000..7659ddd --- /dev/null +++ b/node_modules/.bin/knex @@ -0,0 +1 @@ +../knex/lib/bin/cli.js \ No newline at end of file diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime new file mode 120000 index 0000000..fbb7ee0 --- /dev/null +++ b/node_modules/.bin/mime @@ -0,0 +1 @@ +../mime/cli.js \ No newline at end of file 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/uglifyjs b/node_modules/.bin/uglifyjs new file mode 120000 index 0000000..fef3468 --- /dev/null +++ b/node_modules/.bin/uglifyjs @@ -0,0 +1 @@ +../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/node_modules/.bin/user-home b/node_modules/.bin/user-home new file mode 120000 index 0000000..d72d76b --- /dev/null +++ b/node_modules/.bin/user-home @@ -0,0 +1 @@ +../user-home/cli.js \ No newline at end of file diff --git a/node_modules/accepts/HISTORY.md b/node_modules/accepts/HISTORY.md new file mode 100644 index 0000000..397636e --- /dev/null +++ b/node_modules/accepts/HISTORY.md @@ -0,0 +1,170 @@ +1.2.13 / 2015-09-06 +=================== + + * deps: mime-types@~2.1.6 + - deps: mime-db@~1.18.0 + +1.2.12 / 2015-07-30 +=================== + + * deps: mime-types@~2.1.4 + - deps: mime-db@~1.16.0 + +1.2.11 / 2015-07-16 +=================== + + * deps: mime-types@~2.1.3 + - deps: mime-db@~1.15.0 + +1.2.10 / 2015-07-01 +=================== + + * deps: mime-types@~2.1.2 + - deps: mime-db@~1.14.0 + +1.2.9 / 2015-06-08 +================== + + * deps: mime-types@~2.1.1 + - perf: fix deopt during mapping + +1.2.8 / 2015-06-07 +================== + + * deps: mime-types@~2.1.0 + - deps: mime-db@~1.13.0 + * perf: avoid argument reassignment & argument slice + * perf: avoid negotiator recursive construction + * perf: enable strict mode + * perf: remove unnecessary bitwise operator + +1.2.7 / 2015-05-10 +================== + + * deps: negotiator@0.5.3 + - Fix media type parameter matching to be case-insensitive + +1.2.6 / 2015-05-07 +================== + + * deps: mime-types@~2.0.11 + - deps: mime-db@~1.9.1 + * deps: negotiator@0.5.2 + - Fix comparing media types with quoted values + - Fix splitting media types with quoted commas + +1.2.5 / 2015-03-13 +================== + + * deps: mime-types@~2.0.10 + - deps: mime-db@~1.8.0 + +1.2.4 / 2015-02-14 +================== + + * Support Node.js 0.6 + * deps: mime-types@~2.0.9 + - deps: mime-db@~1.7.0 + * deps: negotiator@0.5.1 + - Fix preference sorting to be stable for long acceptable lists + +1.2.3 / 2015-01-31 +================== + + * deps: mime-types@~2.0.8 + - deps: mime-db@~1.6.0 + +1.2.2 / 2014-12-30 +================== + + * deps: mime-types@~2.0.7 + - deps: mime-db@~1.5.0 + +1.2.1 / 2014-12-30 +================== + + * deps: mime-types@~2.0.5 + - deps: mime-db@~1.3.1 + +1.2.0 / 2014-12-19 +================== + + * deps: negotiator@0.5.0 + - Fix list return order when large accepted list + - Fix missing identity encoding when q=0 exists + - Remove dynamic building of Negotiator class + +1.1.4 / 2014-12-10 +================== + + * deps: mime-types@~2.0.4 + - deps: mime-db@~1.3.0 + +1.1.3 / 2014-11-09 +================== + + * deps: mime-types@~2.0.3 + - deps: mime-db@~1.2.0 + +1.1.2 / 2014-10-14 +================== + + * deps: negotiator@0.4.9 + - Fix error when media type has invalid parameter + +1.1.1 / 2014-09-28 +================== + + * deps: mime-types@~2.0.2 + - deps: mime-db@~1.1.0 + * deps: negotiator@0.4.8 + - Fix all negotiations to be case-insensitive + - Stable sort preferences of same quality according to client order + +1.1.0 / 2014-09-02 +================== + + * update `mime-types` + +1.0.7 / 2014-07-04 +================== + + * Fix wrong type returned from `type` when match after unknown extension + +1.0.6 / 2014-06-24 +================== + + * deps: negotiator@0.4.7 + +1.0.5 / 2014-06-20 +================== + + * fix crash when unknown extension given + +1.0.4 / 2014-06-19 +================== + + * use `mime-types` + +1.0.3 / 2014-06-11 +================== + + * deps: negotiator@0.4.6 + - Order by specificity when quality is the same + +1.0.2 / 2014-05-29 +================== + + * Fix interpretation when header not in request + * deps: pin negotiator@0.4.5 + +1.0.1 / 2014-01-18 +================== + + * Identity encoding isn't always acceptable + * deps: negotiator@~0.4.0 + +1.0.0 / 2013-12-27 +================== + + * Genesis diff --git a/node_modules/accepts/LICENSE b/node_modules/accepts/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/node_modules/accepts/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +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/accepts/README.md b/node_modules/accepts/README.md new file mode 100644 index 0000000..ae36676 --- /dev/null +++ b/node_modules/accepts/README.md @@ -0,0 +1,135 @@ +# accepts + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Extracted from [koa](https://www.npmjs.com/package/koa) for general use. + +In addition to negotiator, it allows: + +- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`. +- Allows type shorthands such as `json`. +- Returns `false` when no types match +- Treats non-existent headers as `*` + +## Installation + +```sh +npm install accepts +``` + +## API + +```js +var accepts = require('accepts') +``` + +### accepts(req) + +Create a new `Accepts` object for the given `req`. + +#### .charset(charsets) + +Return the first accepted charset. If nothing in `charsets` is accepted, +then `false` is returned. + +#### .charsets() + +Return the charsets that the request accepts, in the order of the client's +preference (most preferred first). + +#### .encoding(encodings) + +Return the first accepted encoding. If nothing in `encodings` is accepted, +then `false` is returned. + +#### .encodings() + +Return the encodings that the request accepts, in the order of the client's +preference (most preferred first). + +#### .language(languages) + +Return the first accepted language. If nothing in `languages` is accepted, +then `false` is returned. + +#### .languages() + +Return the languages that the request accepts, in the order of the client's +preference (most preferred first). + +#### .type(types) + +Return the first accepted type (and it is returned as the same text as what +appears in the `types` array). If nothing in `types` is accepted, then `false` +is returned. + +The `types` array can contain full MIME types or file extensions. Any value +that is not a full MIME types is passed to `require('mime-types').lookup`. + +#### .types() + +Return the types that the request accepts, in the order of the client's +preference (most preferred first). + +## Examples + +### Simple type negotiation + +This simple example shows how to use `accepts` to return a different typed +respond body based on what the client wants to accept. The server lists it's +preferences in order and will get back the best match between the client and +server. + +```js +var accepts = require('accepts') +var http = require('http') + +function app(req, res) { + var accept = accepts(req) + + // the order of this list is significant; should be server preferred order + switch(accept.type(['json', 'html'])) { + case 'json': + res.setHeader('Content-Type', 'application/json') + res.write('{"hello":"world!"}') + break + case 'html': + res.setHeader('Content-Type', 'text/html') + res.write('hello, world!') + break + default: + // the fallback is text/plain, so no need to specify it above + res.setHeader('Content-Type', 'text/plain') + res.write('hello, world!') + break + } + + res.end() +} + +http.createServer(app).listen(3000) +``` + +You can test this out with the cURL program: +```sh +curl -I -H'Accept: text/html' http://localhost:3000/ +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/accepts.svg +[npm-url]: https://npmjs.org/package/accepts +[node-version-image]: https://img.shields.io/node/v/accepts.svg +[node-version-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg +[travis-url]: https://travis-ci.org/jshttp/accepts +[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/accepts +[downloads-image]: https://img.shields.io/npm/dm/accepts.svg +[downloads-url]: https://npmjs.org/package/accepts diff --git a/node_modules/accepts/index.js b/node_modules/accepts/index.js new file mode 100644 index 0000000..e80192a --- /dev/null +++ b/node_modules/accepts/index.js @@ -0,0 +1,231 @@ +/*! + * accepts + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var Negotiator = require('negotiator') +var mime = require('mime-types') + +/** + * Module exports. + * @public + */ + +module.exports = Accepts + +/** + * Create a new Accepts object for the given req. + * + * @param {object} req + * @public + */ + +function Accepts(req) { + if (!(this instanceof Accepts)) + return new Accepts(req) + + this.headers = req.headers + this.negotiator = new Negotiator(req) +} + +/** + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single mime type string + * such as "application/json", the extension name + * such as "json" or an array `["json", "html", "text/plain"]`. When a list + * or array is given the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * this.types('html'); + * // => "html" + * + * // Accept: text/*, application/json + * this.types('html'); + * // => "html" + * this.types('text/html'); + * // => "text/html" + * this.types('json', 'text'); + * // => "json" + * this.types('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * this.types('image/png'); + * this.types('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * this.types(['html', 'json']); + * this.types('html', 'json'); + * // => "json" + * + * @param {String|Array} types... + * @return {String|Array|Boolean} + * @public + */ + +Accepts.prototype.type = +Accepts.prototype.types = function (types_) { + var types = types_ + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length) + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i] + } + } + + // no types, return all requested types + if (!types || types.length === 0) { + return this.negotiator.mediaTypes() + } + + if (!this.headers.accept) return types[0]; + var mimes = types.map(extToMime); + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)); + var first = accepts[0]; + if (!first) return false; + return types[mimes.indexOf(first)]; +} + +/** + * Return accepted encodings or best fit based on `encodings`. + * + * Given `Accept-Encoding: gzip, deflate` + * an array sorted by quality is returned: + * + * ['gzip', 'deflate'] + * + * @param {String|Array} encodings... + * @return {String|Array} + * @public + */ + +Accepts.prototype.encoding = +Accepts.prototype.encodings = function (encodings_) { + var encodings = encodings_ + + // support flattened arguments + if (encodings && !Array.isArray(encodings)) { + encodings = new Array(arguments.length) + for (var i = 0; i < encodings.length; i++) { + encodings[i] = arguments[i] + } + } + + // no encodings, return all requested encodings + if (!encodings || encodings.length === 0) { + return this.negotiator.encodings() + } + + return this.negotiator.encodings(encodings)[0] || false +} + +/** + * Return accepted charsets or best fit based on `charsets`. + * + * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` + * an array sorted by quality is returned: + * + * ['utf-8', 'utf-7', 'iso-8859-1'] + * + * @param {String|Array} charsets... + * @return {String|Array} + * @public + */ + +Accepts.prototype.charset = +Accepts.prototype.charsets = function (charsets_) { + var charsets = charsets_ + + // support flattened arguments + if (charsets && !Array.isArray(charsets)) { + charsets = new Array(arguments.length) + for (var i = 0; i < charsets.length; i++) { + charsets[i] = arguments[i] + } + } + + // no charsets, return all requested charsets + if (!charsets || charsets.length === 0) { + return this.negotiator.charsets() + } + + return this.negotiator.charsets(charsets)[0] || false +} + +/** + * Return accepted languages or best fit based on `langs`. + * + * Given `Accept-Language: en;q=0.8, es, pt` + * an array sorted by quality is returned: + * + * ['es', 'pt', 'en'] + * + * @param {String|Array} langs... + * @return {Array|String} + * @public + */ + +Accepts.prototype.lang = +Accepts.prototype.langs = +Accepts.prototype.language = +Accepts.prototype.languages = function (languages_) { + var languages = languages_ + + // support flattened arguments + if (languages && !Array.isArray(languages)) { + languages = new Array(arguments.length) + for (var i = 0; i < languages.length; i++) { + languages[i] = arguments[i] + } + } + + // no languages, return all requested languages + if (!languages || languages.length === 0) { + return this.negotiator.languages() + } + + return this.negotiator.languages(languages)[0] || false +} + +/** + * Convert extnames to mime. + * + * @param {String} type + * @return {String} + * @private + */ + +function extToMime(type) { + return type.indexOf('/') === -1 + ? mime.lookup(type) + : type +} + +/** + * Check if mime is valid. + * + * @param {String} type + * @return {String} + * @private + */ + +function validMime(type) { + return typeof type === 'string'; +} diff --git a/node_modules/accepts/package.json b/node_modules/accepts/package.json new file mode 100644 index 0000000..1bae80a --- /dev/null +++ b/node_modules/accepts/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + "accepts@~1.2.12", + "/Users/alfiepates/src/invoicer/node_modules/express" + ] + ], + "_from": "accepts@>=1.2.12 <1.3.0", + "_id": "accepts@1.2.13", + "_inCache": true, + "_installable": true, + "_location": "/accepts", + "_npmUser": { + "email": "doug@somethingdoug.com", + "name": "dougwilson" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "name": "accepts", + "raw": "accepts@~1.2.12", + "rawSpec": "~1.2.12", + "scope": null, + "spec": ">=1.2.12 <1.3.0", + "type": "range" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz", + "_shasum": "e5f1f3928c6d95fd96558c36ec3d9d0de4a6ecea", + "_shrinkwrap": null, + "_spec": "accepts@~1.2.12", + "_where": "/Users/alfiepates/src/invoicer/node_modules/express", + "bugs": { + "url": "https://github.com/jshttp/accepts/issues" + }, + "contributors": [ + { + "email": "doug@somethingdoug.com", + "name": "Douglas Christopher Wilson" + }, + { + "email": "me@jongleberry.com", + "name": "Jonathan Ong", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "mime-types": "~2.1.6", + "negotiator": "0.5.3" + }, + "description": "Higher-level content negotiation", + "devDependencies": { + "istanbul": "0.3.19", + "mocha": "~1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "e5f1f3928c6d95fd96558c36ec3d9d0de4a6ecea", + "tarball": "http://localhost:4873/accepts/-/accepts-1.2.13.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "gitHead": "b7e15ecb25dacc0b2133ed0553d64f8a79537e01", + "homepage": "https://github.com/jshttp/accepts", + "keywords": [ + "content", + "negotiation", + "accept", + "accepts" + ], + "license": "MIT", + "maintainers": [ + { + "email": "jonathanrichardong@gmail.com", + "name": "jongleberry" + }, + { + "email": "federomero@gmail.com", + "name": "federomero" + }, + { + "email": "doug@somethingdoug.com", + "name": "dougwilson" + }, + { + "email": "fishrock123@rocketmail.com", + "name": "fishrock123" + }, + { + "email": "tj@vision-media.ca", + "name": "tjholowaychuk" + }, + { + "email": "mscdex@mscdex.net", + "name": "mscdex" + }, + { + "email": "shtylman@gmail.com", + "name": "defunctzombie" + } + ], + "name": "accepts", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/accepts.git" + }, + "scripts": { + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.2.13" +} diff --git a/node_modules/acorn-globals/LICENSE b/node_modules/acorn-globals/LICENSE new file mode 100644 index 0000000..27cc9f3 --- /dev/null +++ b/node_modules/acorn-globals/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Forbes Lindesay + +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/acorn-globals/README.md b/node_modules/acorn-globals/README.md new file mode 100644 index 0000000..d8cd372 --- /dev/null +++ b/node_modules/acorn-globals/README.md @@ -0,0 +1,76 @@ +# acorn-globals + +Detect global variables in JavaScript using acorn + +[![Build Status](https://img.shields.io/travis/ForbesLindesay/acorn-globals/master.svg)](https://travis-ci.org/ForbesLindesay/acorn-globals) +[![Dependency Status](https://img.shields.io/david/ForbesLindesay/acorn-globals.svg)](https://david-dm.org/ForbesLindesay/acorn-globals) +[![NPM version](https://img.shields.io/npm/v/acorn-globals.svg)](https://www.npmjs.org/package/acorn-globals) + +## Installation + + npm install acorn-globals + +## Usage + +detect.js + +```js +var fs = require('fs'); +var detect = require('acorn-globals'); + +var src = fs.readFileSync(__dirname + '/input.js', 'utf8'); + +var scope = detect(src); +console.dir(scope); +``` + +input.js + +```js +var x = 5; +var y = 3, z = 2; + +w.foo(); +w = 2; + +RAWR=444; +RAWR.foo(); + +BLARG=3; + +foo(function () { + var BAR = 3; + process.nextTick(function (ZZZZZZZZZZZZ) { + console.log('beep boop'); + var xyz = 4; + x += 10; + x.zzzzzz; + ZZZ=6; + }); + function doom () { + } + ZZZ.foo(); + +}); + +console.log(xyz); +``` + +output: + +``` +$ node example/detect.js +[ { name: 'BLARG', nodes: [ [Object] ] }, + { name: 'RAWR', nodes: [ [Object], [Object] ] }, + { name: 'ZZZ', nodes: [ [Object], [Object] ] }, + { name: 'console', nodes: [ [Object], [Object] ] }, + { name: 'foo', nodes: [ [Object] ] }, + { name: 'process', nodes: [ [Object] ] }, + { name: 'w', nodes: [ [Object], [Object] ] }, + { name: 'xyz', nodes: [ [Object] ] } ] +``` + + +## License + + MIT diff --git a/node_modules/acorn-globals/index.js b/node_modules/acorn-globals/index.js new file mode 100644 index 0000000..ff924c9 --- /dev/null +++ b/node_modules/acorn-globals/index.js @@ -0,0 +1,180 @@ +'use strict'; + +var acorn = require('acorn'); +var walk = require('acorn/dist/walk'); + +function isScope(node) { + return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration' || node.type === 'ArrowFunctionExpression' || node.type === 'Program'; +} +function isBlockScope(node) { + return node.type === 'BlockStatement' || isScope(node); +} + +function declaresArguments(node) { + return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; +} + +function declaresThis(node) { + return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; +} + +function reallyParse(source) { + try { + return acorn.parse(source, { + ecmaVersion: 6, + allowReturnOutsideFunction: true, + allowImportExportEverywhere: true, + allowHashBang: true + }); + } catch (ex) { + return acorn.parse(source, { + ecmaVersion: 5, + allowReturnOutsideFunction: true, + allowImportExportEverywhere: true, + allowHashBang: true + }); + } +} +module.exports = findGlobals; +module.exports.parse = reallyParse; +function findGlobals(source) { + var globals = []; + var ast; + // istanbul ignore else + if (typeof source === 'string') { + ast = reallyParse(source); + } else { + ast = source; + } + // istanbul ignore if + if (!(ast && typeof ast === 'object' && ast.type === 'Program')) { + throw new TypeError('Source must be either a string of JavaScript or an acorn AST'); + } + var declareFunction = function (node) { + var fn = node; + fn.locals = fn.locals || {}; + node.params.forEach(function (node) { + declarePattern(node, fn); + }); + if (node.id) { + fn.locals[node.id.name] = true; + } + } + var declarePattern = function (node, parent) { + switch (node.type) { + case 'Identifier': + parent.locals[node.name] = true; + break; + case 'ObjectPattern': + node.properties.forEach(function (node) { + declarePattern(node.value, parent); + }); + break; + case 'ArrayPattern': + node.elements.forEach(function (node) { + if (node) declarePattern(node, parent); + }); + break; + case 'RestElement': + declarePattern(node.argument, parent); + break; + case 'AssignmentPattern': + declarePattern(node.left, parent); + break; + // istanbul ignore next + default: + throw new Error('Unrecognized pattern type: ' + node.type); + } + } + var declareModuleSpecifier = function (node, parents) { + ast.locals = ast.locals || {}; + ast.locals[node.local.name] = true; + } + walk.ancestor(ast, { + 'VariableDeclaration': function (node, parents) { + var parent = null; + for (var i = parents.length - 1; i >= 0 && parent === null; i--) { + if (node.kind === 'var' ? isScope(parents[i]) : isBlockScope(parents[i])) { + parent = parents[i]; + } + } + parent.locals = parent.locals || {}; + node.declarations.forEach(function (declaration) { + declarePattern(declaration.id, parent); + }); + }, + 'FunctionDeclaration': function (node, parents) { + var parent = null; + for (var i = parents.length - 2; i >= 0 && parent === null; i--) { + if (isScope(parents[i])) { + parent = parents[i]; + } + } + parent.locals = parent.locals || {}; + parent.locals[node.id.name] = true; + declareFunction(node); + }, + 'Function': declareFunction, + 'ClassDeclaration': function (node, parents) { + var parent = null; + for (var i = parents.length - 2; i >= 0 && parent === null; i--) { + if (isScope(parents[i])) { + parent = parents[i]; + } + } + parent.locals = parent.locals || {}; + parent.locals[node.id.name] = true; + }, + 'TryStatement': function (node) { + if (node.handler === null) return; + node.handler.body.locals = node.handler.body.locals || {}; + node.handler.body.locals[node.handler.param.name] = true; + }, + 'ImportDefaultSpecifier': declareModuleSpecifier, + 'ImportSpecifier': declareModuleSpecifier, + 'ImportNamespaceSpecifier': declareModuleSpecifier + }); + function identifier(node, parents) { + var name = node.name; + if (name === 'undefined') return; + for (var i = 0; i < parents.length; i++) { + if (name === 'arguments' && declaresArguments(parents[i])) { + return; + } + if (parents[i].locals && name in parents[i].locals) { + return; + } + } + if ( + parents[parents.length - 2] && + parents[parents.length - 2].type === 'TryStatement' && + parents[parents.length - 2].handler && + node === parents[parents.length - 2].handler.param + ) { + return; + } + node.parents = parents; + globals.push(node); + } + walk.ancestor(ast, { + 'VariablePattern': identifier, + 'Identifier': identifier, + 'ThisExpression': function (node, parents) { + for (var i = 0; i < parents.length; i++) { + if (declaresThis(parents[i])) { + return; + } + } + node.parents = parents; + globals.push(node); + } + }); + var groupedGlobals = {}; + globals.forEach(function (node) { + groupedGlobals[node.name] = (groupedGlobals[node.name] || []); + groupedGlobals[node.name].push(node); + }); + return Object.keys(groupedGlobals).sort().map(function (name) { + return {name: name, nodes: groupedGlobals[name]}; + }); +} diff --git a/node_modules/acorn-globals/package.json b/node_modules/acorn-globals/package.json new file mode 100644 index 0000000..f2ebcf2 --- /dev/null +++ b/node_modules/acorn-globals/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + "acorn-globals@^1.0.3", + "/Users/alfiepates/src/invoicer/node_modules/with" + ] + ], + "_from": "acorn-globals@>=1.0.3 <2.0.0", + "_id": "acorn-globals@1.0.9", + "_inCache": true, + "_installable": true, + "_location": "/acorn-globals", + "_nodeVersion": "1.6.2", + "_npmUser": { + "email": "forbes@lindesay.co.uk", + "name": "forbeslindesay" + }, + "_npmVersion": "2.7.1", + "_phantomChildren": {}, + "_requested": { + "name": "acorn-globals", + "raw": "acorn-globals@^1.0.3", + "rawSpec": "^1.0.3", + "scope": null, + "spec": ">=1.0.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/with" + ], + "_resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", + "_shasum": "55bb5e98691507b74579d0513413217c380c54cf", + "_shrinkwrap": null, + "_spec": "acorn-globals@^1.0.3", + "_where": "/Users/alfiepates/src/invoicer/node_modules/with", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/ForbesLindesay/acorn-globals/issues" + }, + "dependencies": { + "acorn": "^2.1.0" + }, + "description": "Detect global variables in JavaScript using acorn", + "devDependencies": { + "testit": "^2.0.2" + }, + "directories": {}, + "dist": { + "shasum": "55bb5e98691507b74579d0513413217c380c54cf", + "tarball": "http://localhost:4873/acorn-globals/-/acorn-globals-1.0.9.tgz" + }, + "files": [ + "index.js", + "LICENSE" + ], + "gitHead": "808cab09764b63679138b012602ca1bb51657f97", + "homepage": "https://github.com/ForbesLindesay/acorn-globals", + "keywords": [ + "ast", + "variable", + "name", + "lexical", + "scope", + "local", + "global", + "implicit" + ], + "license": "MIT", + "maintainers": [ + { + "email": "forbes@lindesay.co.uk", + "name": "forbeslindesay" + }, + { + "email": "timothygu99@gmail.com", + "name": "timothygu" + } + ], + "name": "acorn-globals", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/acorn-globals.git" + }, + "scripts": { + "test": "node test" + }, + "version": "1.0.9" +} diff --git a/node_modules/acorn/.editorconfig b/node_modules/acorn/.editorconfig new file mode 100644 index 0000000..c14d5c6 --- /dev/null +++ b/node_modules/acorn/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true diff --git a/node_modules/acorn/.gitattributes b/node_modules/acorn/.gitattributes new file mode 100644 index 0000000..fcadb2c --- /dev/null +++ b/node_modules/acorn/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/node_modules/acorn/.npmignore b/node_modules/acorn/.npmignore new file mode 100644 index 0000000..ecba291 --- /dev/null +++ b/node_modules/acorn/.npmignore @@ -0,0 +1,3 @@ +/.tern-port +/test +/local diff --git a/node_modules/acorn/.tern-project b/node_modules/acorn/.tern-project new file mode 100644 index 0000000..6718ce0 --- /dev/null +++ b/node_modules/acorn/.tern-project @@ -0,0 +1,6 @@ +{ + "plugins": { + "node": true, + "es_modules": true + } +} \ No newline at end of file diff --git a/node_modules/acorn/.travis.yml b/node_modules/acorn/.travis.yml new file mode 100644 index 0000000..f50c379 --- /dev/null +++ b/node_modules/acorn/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +sudo: false +node_js: + - '0.10' + - '0.12' + - '4' diff --git a/node_modules/acorn/AUTHORS b/node_modules/acorn/AUTHORS new file mode 100644 index 0000000..0e8f48b --- /dev/null +++ b/node_modules/acorn/AUTHORS @@ -0,0 +1,43 @@ +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 +ForbesLindesay +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 +Timothy Gu +zsjforcn diff --git a/node_modules/acorn/LICENSE b/node_modules/acorn/LICENSE new file mode 100644 index 0000000..d4c7fc5 --- /dev/null +++ b/node_modules/acorn/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2014 by various contributors (see AUTHORS) + +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/acorn/README.md b/node_modules/acorn/README.md new file mode 100644 index 0000000..acd39a8 --- /dev/null +++ b/node_modules/acorn/README.md @@ -0,0 +1,396 @@ +# Acorn + +[![Build Status](https://travis-ci.org/ternjs/acorn.svg?branch=master)](https://travis-ci.org/ternjs/acorn) +[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/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. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/ternjs/acorn/blob/master/LICENSE). + +You are welcome to +[report bugs](https://github.com/ternjs/acorn/issues) or create pull +requests on [github](https://github.com/ternjs/acorn). For questions +and discussion, please use the +[Tern discussion forum](https://discuss.ternjs.net). + +## Installation + +The easiest way to install acorn is with [`npm`][npm]. + +[npm]: https://www.npmjs.com/ + +```sh +npm install acorn +``` + +Alternately, download the source. + +```sh +git clone https://github.com/ternjs/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` for `ecmaVersion` 3, `false` for higher + versions. 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 tokens returned from + `tokenizer().getToken()`. + + 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", + "start": Number, + "end": Number, + // If `locations` option is on: + "loc": { + "start": {line: Number, column: Number} + "end": {line: Number, column: Number} + }, + // If `ranges` option is on: + "range": [Number, Number] + } + ``` + + 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.tokenizer(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenizer(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/estools/escodegen + +### 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 is 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` and `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. + +- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. + +- `--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. + +Similarly, the loose parser allows plugins to register themselves via +`acorn.pluginsLoose`. The extension mechanism is the same as for the +normal parser: + +```javascript +looseParser.extend("readToken", function(nextMethod) { + return function() { + console.log("Reading a token in the loose parser!") + return nextMethod.call(this) + } +}) +``` + +There is a proof-of-concept JSX plugin in the [`acorn-jsx`](https://github.com/RReverser/acorn-jsx) project. diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn new file mode 100755 index 0000000..db07909 --- /dev/null +++ b/node_modules/acorn/bin/acorn @@ -0,0 +1,71 @@ +#!/usr/bin/env node +"use strict"; + +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 _path = require("path"); + +var _fs = require("fs"); + +var _distAcornJs = require("../dist/acorn.js"); + +var acorn = _interopRequireWildcard(_distAcornJs); + +var infile = undefined, + forceFile = undefined, + silent = false, + compact = false, + tokenize = false; +var options = {}; + +function help(status) { + var print = status == 0 ? console.log : console.error; + print("usage: " + (0, _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 == "-" || arg[0] != "-") && !infile) infile = arg;else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = 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 == "--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); +} + +function run(code) { + var result = undefined; + if (!tokenize) { + try { + result = acorn.parse(code, options); + } catch (e) { + console.error(e.message);process.exit(1); + } + } else { + result = []; + var tokenizer = acorn.tokenizer(code, options), + token = undefined; + while (true) { + try { + token = tokenizer.getToken(); + } catch (e) { + console.error(e.message);process.exit(1); + } + result.push(token); + if (token.type == acorn.tokTypes.eof) break; + } + } + if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)); +} + +if (forceFile || infile && infile != "-") { + run((0, _fs.readFileSync)(infile, "utf8")); +} else { + (function () { + var code = ""; + process.stdin.resume(); + process.stdin.on("data", function (chunk) { + return code += chunk; + }); + process.stdin.on("end", function () { + return run(code); + }); + })(); +} \ No newline at end of file diff --git a/node_modules/acorn/bin/build-acorn.js b/node_modules/acorn/bin/build-acorn.js new file mode 100644 index 0000000..71f2cf9 --- /dev/null +++ b/node_modules/acorn/bin/build-acorn.js @@ -0,0 +1,82 @@ +var fs = require("fs"), path = require("path") +var stream = require("stream") + +var browserify = require("browserify") +var babel = require('babel-core') +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")) + +var ACORN_PLACEHOLDER = "this_function_call_should_be_replaced_with_a_call_to_load_acorn()"; +function acornShimPrepare(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, ACORN_PLACEHOLDER); + } else { + callback() + } + } + } else { + tr._transform = function(chunk, _, callback) { callback(null, chunk) } + } + return tr +} +function acornShimComplete() { + var tr = new stream.Transform + var buffer = ""; + tr._transform = function(chunk, _, callback) { + buffer += chunk.toString("utf8"); + callback(); + }; + tr._flush = function (callback) { + tr.push(buffer.replace(ACORN_PLACEHOLDER, "module.exports = typeof acorn != 'undefined' ? acorn : require(\"./acorn\")")); + callback(null); + }; + return tr; +} + +browserify({standalone: "acorn.loose"}) + .plugin(require('browserify-derequire')) + .transform(acornShimPrepare) + .transform(babelify) + .require("./src/loose/index.js", {entry: true}) + .bundle() + .on("error", function (err) { console.log("Error: " + err.message) }) + .pipe(acornShimComplete()) + .pipe(fs.createWriteStream("dist/acorn_loose.js")) + +browserify({standalone: "acorn.walk"}) + .plugin(require('browserify-derequire')) + .transform(acornShimPrepare) + .transform(babelify) + .require("./src/walk/index.js", {entry: true}) + .bundle() + .on("error", function (err) { console.log("Error: " + err.message) }) + .pipe(acornShimComplete()) + .pipe(fs.createWriteStream("dist/walk.js")) + +babel.transformFile("./src/bin/acorn.js", function (err, result) { + if (err) return console.log("Error: " + err.message) + fs.writeFile("bin/acorn", result.code, function (err) { + if (err) return console.log("Error: " + err.message) + + // Make bin/acorn executable + if (process.platform === 'win32') + return + var stat = fs.statSync("bin/acorn") + var newPerm = stat.mode | parseInt('111', 8) + fs.chmodSync("bin/acorn", newPerm) + }) +}) diff --git a/node_modules/acorn/bin/generate-identifier-regex.js b/node_modules/acorn/bin/generate-identifier-regex.js new file mode 100644 index 0000000..0d7c50f --- /dev/null +++ b/node_modules/acorn/bin/generate-identifier-regex.js @@ -0,0 +1,47 @@ +// 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/acorn/bin/update_authors.sh b/node_modules/acorn/bin/update_authors.sh new file mode 100755 index 0000000..466c8db --- /dev/null +++ b/node_modules/acorn/bin/update_authors.sh @@ -0,0 +1,6 @@ +# 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/acorn/dist/.keep b/node_modules/acorn/dist/.keep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js new file mode 100644 index 0000000..9419f86 --- /dev/null +++ b/node_modules/acorn/dist/acorn.js @@ -0,0 +1,3340 @@ +(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;var 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; + } + name = "$" + name; + var other = propHash[name]; + if (other) { + 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, refDestructuringErrors) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); + 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, refDestructuringErrors)); + return this.finishNode(node, "SequenceExpression"); + } + return expr; +}; + +// Parse an assignment expression. This includes applications of +// operators like `+=`. + +pp.parseMaybeAssign = function (noIn, refDestructuringErrors, afterLeftParse) { + if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield(); + + var validateDestructuring = false; + if (!refDestructuringErrors) { + refDestructuringErrors = { shorthandAssign: 0, trailingComma: 0 }; + validateDestructuring = true; + } + 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, refDestructuringErrors); + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); + if (this.type.isAssign) { + if (validateDestructuring) this.checkPatternErrors(refDestructuringErrors, true); + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; + refDestructuringErrors.shorthandAssign = 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 (validateDestructuring) this.checkExpressionErrors(refDestructuringErrors, true); + } + return left; +}; + +// Parse a ternary conditional (`?:`) operator. + +pp.parseMaybeConditional = function (noIn, refDestructuringErrors) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseExprOps(noIn, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) 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, refDestructuringErrors) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) 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 (refDestructuringErrors) { + 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(); + this.checkExpressionErrors(refDestructuringErrors, true); + 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(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) 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 (refDestructuringErrors) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors); + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) 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 (refDestructuringErrors) { + 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, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression"); + + case _tokentype.types.braceL: + return this.parseObj(false, refDestructuringErrors); + + 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 refDestructuringErrors = { shorthandAssign: 0, trailingComma: 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, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.start, + innerEndLoc = this.startLoc; + this.expect(_tokentype.types.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, true); + if (innerParenStart) this.unexpected(innerParenStart); + return this.parseParenArrowList(startPos, startLoc, exprList); + } + + if (!exprList.length) this.unexpected(this.lastTokStart); + if (spreadStart) this.unexpected(spreadStart); + this.checkExpressionErrors(refDestructuringErrors, true); + + 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 noCalls +// argument to parseSubscripts to prevent it from consuming the +// argument list. + +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"); + if (!this.inFunction) this.raise(node.start, "new.target can only be used in functions"); + 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, refDestructuringErrors) { + 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 || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) isGenerator = this.eat(_tokentype.types.star); + } + this.parsePropertyName(prop); + this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors); + 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, refDestructuringErrors) { + if (this.eat(_tokentype.types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + 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"); + } + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") this.raise(prop.value.params[0].start, "Setter cannot use rest params"); + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + prop.kind = "init"; + if (isPattern) { + if (this.keywords.test(prop.key.name) || (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(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 && refDestructuringErrors) { + if (!refDestructuringErrors.shorthandAssign) refDestructuringErrors.shorthandAssign = 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); + 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, isArrowFunction) { + var isExpression = isArrowFunction && 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 oldStrict = this.strict; + this.strict = true; + if (node.id) this.checkLVal(node.id, true); + this.checkParams(node); + this.strict = oldStrict; + } else if (isArrowFunction) { + this.checkParams(node); + } +}; + +// Checks function params for various disallowed patterns such as using "eval" +// or "arguments" and duplicate parameters. + +pp.checkParams = function (node) { + var nameHash = {}; + for (var i = 0; i < node.params.length; i++) { + this.checkLVal(node.params[i], true, nameHash); + } +}; + +// 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, refDestructuringErrors) { + var elts = [], + first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(_tokentype.types.comma); + if (this.type === close && refDestructuringErrors && !refDestructuringErrors.trailingComma) { + refDestructuringErrors.trailingComma = this.lastTokStart; + } + 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(refDestructuringErrors);else elt = this.parseMaybeAssign(false, refDestructuringErrors); + 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.strict ? this.reservedWordsStrict : this.reservedWords).test(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"); +}; + +},{"./state":10,"./tokentype":14}],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. + +// Reserved word lists for various dialects of the language + +"use strict"; + +exports.__esModule = true; +exports.isIdentifierStart = isIdentifierStart; +exports.isIdentifierChar = isIdentifierChar; +var reservedWords = { + 3: "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: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "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: ecma5AndLessKeywords, + 6: 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 `bin/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/ternjs/acorn.git +// +// Please use the [github bug tracker][ghbt] to report issues. +// +// [ghbt]: https://github.com/ternjs/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"); + +_dereq_("./parseutil"); + +_dereq_("./statement"); + +_dereq_("./lval"); + +_dereq_("./expression"); + +_dereq_("./location"); + +exports.Parser = _state.Parser; +exports.plugins = _state.plugins; + +var _options = _dereq_("./options"); + +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.7.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 `tokenizer` 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; +} + +// 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. + +; + +exports.SourceLocation = SourceLocation; + +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 _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": + 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; + // falls through to AssignmentPattern + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); + break; + } + + case "AssignmentPattern": + if (node.right.type === "YieldExpression") this.raise(node.right.start, "Yield expression cannot be a 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; + } + + if (isBinding && last.type === "RestElement" && last.argument.type !== "Identifier") this.unexpected(last.argument.start); + } + 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 (refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(refDestructuringErrors); + return this.finishNode(node, "SpreadElement"); +}; + +pp.parseRest = function (allowNonIdent) { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (allowNonIdent) node.argument = this.type === _tokentype.types.name ? this.parseIdent() : this.unexpected();else 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, allowNonIdent) { + 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(allowNonIdent); + 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.options.ecmaVersion < 6 || !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 && this.reservedWordsStrictBind.test(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"); + 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"); + } +}; + +},{"./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]; +} + +// Start an AST node, attaching a start offset. + +; + +exports.Node = Node; +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 only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // 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 tokens returned from `tokenizer().getToken()`. 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 (options.allowReserved == null) options.allowReserved = options.ecmaVersion < 5; + + 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"); +}; + +pp.checkPatternErrors = function (refDestructuringErrors, andThrow) { + var pos = refDestructuringErrors && refDestructuringErrors.trailingComma; + if (!andThrow) return !!pos; + if (pos) this.raise(pos, "Trailing comma is not permitted in destructuring patterns"); +}; + +pp.checkExpressionErrors = function (refDestructuringErrors, andThrow) { + var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign; + if (!andThrow) return !!pos; + if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns"); +}; + +},{"./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; +function keywordRegexp(words) { + return new RegExp("^(" + words.replace(/ /g, "|") + ")$"); +} + +var Parser = (function () { + function Parser(options, input, startPos) { + _classCallCheck(this, Parser); + + this.options = options = _options.getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = keywordRegexp(_identifier.keywords[options.ecmaVersion >= 6 ? 6 : 5]); + var reserved = options.allowReserved ? "" : _identifier.reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : ""); + this.reservedWords = keywordRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + _identifier.reservedWords.strict; + this.reservedWordsStrict = keywordRegexp(reservedStrict); + this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + _identifier.reservedWords.strictBind); + 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(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 = 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 && options.allowHashBang && this.input.slice(0, 2) === '#!') this.skipLineComment(2); + } + + // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them + + Parser.prototype.isKeyword = function isKeyword(word) { + return this.keywords.test(word); + }; + + Parser.prototype.isReservedWord = function isReservedWord(word) { + return this.reservedWords.test(word); + }; + + 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 refDestructuringErrors = { shorthandAssign: 0, trailingComma: 0 }; + var init = this.parseExpression(true, refDestructuringErrors); + if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { + this.checkPatternErrors(refDestructuringErrors, true); + this.toAssignable(init); + this.checkLVal(init); + return this.parseForIn(node, init); + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + 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.body = this.parseBlock(); + node.handler = this.finishNode(clause, "CatchClause"); + } + 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, true); +}; + +// 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"); + } + if (method.kind === "set" && method.value.params[0].type === "RestElement") this.raise(method.value.params[0].start, "Setter cannot use rest params"); + } + } + 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 { + // check for keywords used as local names + for (var i = 0; i < node.specifiers.length; i++) { + if (this.keywords.test(node.specifiers[i].local.name) || this.reservedWords.test(node.specifiers[i].local.name)) { + this.unexpected(node.specifiers[i].local.start); + } + } + + 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); + if (this.eatContextual("as")) { + node.local = this.parseIdent(); + } else { + node.local = node.imported; + if (this.isKeyword(node.local.name)) this.unexpected(node.local.start); + if (this.reservedWordsStrict.test(node.local.name)) this.raise(node.local.start, "The keyword '" + node.local.name + "' is reserved"); + } + 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 () { + // tokExprAllowed stays unchanged +}; + +_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; +}; + +},{"./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]; +} + +// ## Tokenizer + +; + +exports.Token = Token; +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(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() + // ` "some value" +``` +### No stringification + +```js +map.set("1", "string one"); +map.set(1, "number one"); +map.get("1"); // --> "string one" +``` + +A regular `Object` used as a map would yield `"number one"` + +### Objects as keys + +```js +var key = {}; +var key2 = {}; +map.set(key, 123); +map.set(key2, 321); +map.get(key); // --> 123 +``` +A regular `Object` used as a map would yield `321` + +### Iterating + +```js +map.set(1, "test 1"); +map.set(2, "test 2"); +map.set(3, "test 3"); + +map.forEach(function(value, key) { + console.log(key + " : " + value); +}); +``` + +### Method chaining + +```js +map + .set(1, "test 1") + .set(2, "test 2") + .set(3, "test 3") + .forEach(function(value, key) { + console.log(key + " : " + value); + }); +``` + +## LICENSE + +The MIT License (MIT) + +Copyright (c) 2012-2015 Ariel Flesler + +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 + +## To-Do + +* (?) Allow extending the hashing function in a AOP way or by passing a service +* Make tests work on the browser diff --git a/node_modules/hashmap/bower.json b/node_modules/hashmap/bower.json new file mode 100644 index 0000000..029306e --- /dev/null +++ b/node_modules/hashmap/bower.json @@ -0,0 +1,29 @@ +{ + "name": "hashmap", + "version": "2.0.5", + "description": "HashMap Class for JavaScript", + "homepage": "https://github.com/flesler/hashmap", + "main": "./hashmap.js", + "dependencies": {}, + "keywords": [ + "hashmap", + "map", + "object", + "array", + "associative", + "javascript", + "nodejs", + "node", + "browser" + ], + "author": { + "name": "Ariel Flesler", + "web": "http://flesler.blogspot.com/" + }, + "ignore": [ + "**/.*", + "node_modules", + "test", + "components" + ] +} diff --git a/node_modules/hashmap/hashmap.js b/node_modules/hashmap/hashmap.js new file mode 100644 index 0000000..95883f7 --- /dev/null +++ b/node_modules/hashmap/hashmap.js @@ -0,0 +1,199 @@ +/** + * HashMap - HashMap Class for JavaScript + * @author Ariel Flesler + * @version 2.0.5 + * Homepage: https://github.com/flesler/hashmap + */ + +(function(factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], factory); + } else if (typeof module === 'object') { + // Node js environment + var HashMap = module.exports = factory(); + // Keep it backwards compatible + HashMap.HashMap = HashMap; + } else { + // Browser globals (this is window) + this.HashMap = factory(); + } +}(function() { + + function HashMap(other) { + this.clear(); + switch (arguments.length) { + case 0: break; + case 1: this.copy(other); break; + default: multi(this, arguments); break; + } + } + + var proto = HashMap.prototype = { + constructor:HashMap, + + get:function(key) { + var data = this._data[this.hash(key)]; + return data && data[1]; + }, + + set:function(key, value) { + // Store original key as well (for iteration) + var hash = this.hash(key); + if ( !(hash in this._data) ) { + this._count++; + } + this._data[hash] = [key, value]; + }, + + multi:function() { + multi(this, arguments); + }, + + copy:function(other) { + for (var hash in other._data) { + if ( !(hash in this._data) ) { + this._count++; + } + this._data[hash] = other._data[hash]; + } + }, + + has:function(key) { + return this.hash(key) in this._data; + }, + + search:function(value) { + for (var key in this._data) { + if (this._data[key][1] === value) { + return this._data[key][0]; + } + } + + return null; + }, + + remove:function(key) { + var hash = this.hash(key); + if ( hash in this._data ) { + this._count--; + delete this._data[hash]; + } + }, + + type:function(key) { + var str = Object.prototype.toString.call(key); + var type = str.slice(8, -1).toLowerCase(); + // Some browsers yield DOMWindow for null and undefined, works fine on Node + if (type === 'domwindow' && !key) { + return key + ''; + } + return type; + }, + + keys:function() { + var keys = []; + this.forEach(function(_, key) { keys.push(key); }); + return keys; + }, + + values:function() { + var values = []; + this.forEach(function(value) { values.push(value); }); + return values; + }, + + count:function() { + return this._count; + }, + + clear:function() { + // TODO: Would Object.create(null) make any difference + this._data = {}; + this._count = 0; + }, + + clone:function() { + return new HashMap(this); + }, + + hash:function(key) { + switch (this.type(key)) { + case 'undefined': + case 'null': + case 'boolean': + case 'number': + case 'regexp': + return key + ''; + + case 'date': + return '♣' + key.getTime(); + + case 'string': + return '♠' + key; + + case 'array': + var hashes = []; + for (var i = 0; i < key.length; i++) { + hashes[i] = this.hash(key[i]); + } + return '♥' + hashes.join('⁞'); + + default: + // TODO: Don't use expandos when Object.defineProperty is not available? + if (!key.hasOwnProperty('_hmuid_')) { + key._hmuid_ = ++HashMap.uid; + hide(key, '_hmuid_'); + } + + return '♦' + key._hmuid_; + } + }, + + forEach:function(func, ctx) { + for (var key in this._data) { + var data = this._data[key]; + func.call(ctx || this, data[1], data[0]); + } + } + }; + + HashMap.uid = 0; + + //- Automatically add chaining to some methods + + for (var method in proto) { + // Skip constructor, valueOf, toString and any other built-in method + if (method === 'constructor' || !proto.hasOwnProperty(method)) { + continue; + } + var fn = proto[method]; + if (fn.toString().indexOf('return ') === -1) { + proto[method] = chain(fn); + } + } + + //- Utils + + function multi(map, args) { + for (var i = 0; i < args.length; i += 2) { + map.set(args[i], args[i+1]); + } + } + + function chain(fn) { + return function() { + fn.apply(this, arguments); + return this; + }; + } + + function hide(obj, prop) { + // Make non iterable if supported + if (Object.defineProperty) { + Object.defineProperty(obj, prop, {enumerable:false}); + } + } + + return HashMap; +})); diff --git a/node_modules/hashmap/package.json b/node_modules/hashmap/package.json new file mode 100644 index 0000000..5616a51 --- /dev/null +++ b/node_modules/hashmap/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "hashmap@^2.0.1", + "/Users/alfiepates/src/invoicer/node_modules/pool2" + ] + ], + "_from": "hashmap@>=2.0.1 <3.0.0", + "_id": "hashmap@2.0.5", + "_inCache": true, + "_installable": true, + "_location": "/hashmap", + "_nodeVersion": "0.12.9", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/hashmap-2.0.5.tgz_1460119216049_0.5537721696309745" + }, + "_npmUser": { + "email": "aflesler@gmail.com", + "name": "flesler" + }, + "_npmVersion": "2.14.9", + "_phantomChildren": {}, + "_requested": { + "name": "hashmap", + "raw": "hashmap@^2.0.1", + "rawSpec": "^2.0.1", + "scope": null, + "spec": ">=2.0.1 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/pool2" + ], + "_resolved": "http://localhost:4873/hashmap/-/hashmap-2.0.5.tgz", + "_shasum": "a039ec55bd6d56676e970efe5ed30288bee33c66", + "_shrinkwrap": null, + "_spec": "hashmap@^2.0.1", + "_where": "/Users/alfiepates/src/invoicer/node_modules/pool2", + "author": { + "email": "aflesler@gmail.com", + "name": "Ariel Flesler" + }, + "bugs": { + "url": "https://github.com/flesler/hashmap/issues" + }, + "dependencies": {}, + "description": "HashMap Class for JavaScript", + "devDependencies": { + "chai": "^3.5.0", + "husky": "^0.11.4", + "mocha": "^2.4.5" + }, + "directories": {}, + "dist": { + "shasum": "a039ec55bd6d56676e970efe5ed30288bee33c66", + "tarball": "http://localhost:4873/hashmap/-/hashmap-2.0.5.tgz" + }, + "engines": { + "node": "*" + }, + "gitHead": "70248f506cd4a3b19fb5d56a804b67f6a6821491", + "homepage": "https://github.com/flesler/hashmap", + "keywords": [ + "hashmap", + "map", + "object", + "array", + "associative", + "javascript", + "nodejs", + "node", + "browser" + ], + "license": "MIT", + "main": "./hashmap.js", + "maintainers": [ + { + "email": "aflesler@gmail.com", + "name": "flesler" + } + ], + "name": "hashmap", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/flesler/hashmap.git" + }, + "scripts": { + "prepush": "npm test -- --reporter dot", + "test": "mocha test/*.js" + }, + "version": "2.0.5" +} diff --git a/node_modules/http-errors/HISTORY.md b/node_modules/http-errors/HISTORY.md new file mode 100644 index 0000000..4c7087d --- /dev/null +++ b/node_modules/http-errors/HISTORY.md @@ -0,0 +1,76 @@ +2015-02-02 / 1.3.1 +================== + + * Fix regression where status can be overwritten in `createError` `props` + +2015-02-01 / 1.3.0 +================== + + * Construct errors using defined constructors from `createError` + * Fix error names that are not identifiers + - `createError["I'mateapot"]` is now `createError.ImATeapot` + * Set a meaningful `name` property on constructed errors + +2014-12-09 / 1.2.8 +================== + + * Fix stack trace from exported function + * Remove `arguments.callee` usage + +2014-10-14 / 1.2.7 +================== + + * Remove duplicate line + +2014-10-02 / 1.2.6 +================== + + * Fix `expose` to be `true` for `ClientError` constructor + +2014-09-28 / 1.2.5 +================== + + * deps: statuses@1 + +2014-09-21 / 1.2.4 +================== + + * Fix dependency version to work with old `npm`s + +2014-09-21 / 1.2.3 +================== + + * deps: statuses@~1.1.0 + +2014-09-21 / 1.2.2 +================== + + * Fix publish error + +2014-09-21 / 1.2.1 +================== + + * Support Node.js 0.6 + * Use `inherits` instead of `util` + +2014-09-09 / 1.2.0 +================== + + * Fix the way inheriting functions + * Support `expose` being provided in properties argument + +2014-09-08 / 1.1.0 +================== + + * Default status to 500 + * Support provided `error` to extend + +2014-09-08 / 1.0.1 +================== + + * Fix accepting string message + +2014-09-08 / 1.0.0 +================== + + * Initial release diff --git a/node_modules/http-errors/LICENSE b/node_modules/http-errors/LICENSE new file mode 100644 index 0000000..a7ae8ee --- /dev/null +++ b/node_modules/http-errors/LICENSE @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.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/http-errors/README.md b/node_modules/http-errors/README.md new file mode 100644 index 0000000..520271e --- /dev/null +++ b/node_modules/http-errors/README.md @@ -0,0 +1,63 @@ +# http-errors + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Create HTTP errors for Express, Koa, Connect, etc. with ease. + +## Example + +```js +var createError = require('http-errors'); + +app.use(function (req, res, next) { + if (!req.user) return next(createError(401, 'Please login to view this page.')); + next(); +}) +``` + +## API + +This is the current API, currently extracted from Koa and subject to change. + +### Error Properties + +- `message` +- `status` and `statusCode` - the status code of the error, defaulting to `500` + +### createError([status], [message], [properties]) + +```js +var err = createError(404, 'This video does not exist!'); +``` + +- `status: 500` - the status code as a number +- `message` - the message of the error, defaulting to node's text for that status code. +- `properties` - custom properties to attach to the object + +### new createError\[code || name\](\[msg]\)) + +```js +var err = new createError.NotFound(); +``` + +- `code` - the status code as a number +- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/http-errors.svg?style=flat +[npm-url]: https://npmjs.org/package/http-errors +[node-version-image]: https://img.shields.io/node/v/http-errors.svg?style=flat +[node-version-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/jshttp/http-errors.svg?style=flat +[travis-url]: https://travis-ci.org/jshttp/http-errors +[coveralls-image]: https://img.shields.io/coveralls/jshttp/http-errors.svg?style=flat +[coveralls-url]: https://coveralls.io/r/jshttp/http-errors +[downloads-image]: https://img.shields.io/npm/dm/http-errors.svg?style=flat +[downloads-url]: https://npmjs.org/package/http-errors diff --git a/node_modules/http-errors/index.js b/node_modules/http-errors/index.js new file mode 100644 index 0000000..d84b114 --- /dev/null +++ b/node_modules/http-errors/index.js @@ -0,0 +1,120 @@ + +var statuses = require('statuses'); +var inherits = require('inherits'); + +function toIdentifier(str) { + return str.split(' ').map(function (token) { + return token.slice(0, 1).toUpperCase() + token.slice(1) + }).join('').replace(/[^ _0-9a-z]/gi, '') +} + +exports = module.exports = function httpError() { + // so much arity going on ~_~ + var err; + var msg; + var status = 500; + var props = {}; + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (arg instanceof Error) { + err = arg; + status = err.status || err.statusCode || status; + continue; + } + switch (typeof arg) { + case 'string': + msg = arg; + break; + case 'number': + status = arg; + break; + case 'object': + props = arg; + break; + } + } + + if (typeof status !== 'number' || !statuses[status]) { + status = 500 + } + + // constructor + var HttpError = exports[status] + + if (!err) { + // create error + err = HttpError + ? new HttpError(msg) + : new Error(msg || statuses[status]) + Error.captureStackTrace(err, httpError) + } + + if (!HttpError || !(err instanceof HttpError)) { + // add properties to generic error + err.expose = status < 500 + err.status = err.statusCode = status + } + + for (var key in props) { + if (key !== 'status' && key !== 'statusCode') { + err[key] = props[key] + } + } + + return err; +}; + +// create generic error objects +var codes = statuses.codes.filter(function (num) { + return num >= 400; +}); + +codes.forEach(function (code) { + var name = toIdentifier(statuses[code]) + var className = name.match(/Error$/) ? name : name + 'Error' + + if (code >= 500) { + var ServerError = function ServerError(msg) { + var self = new Error(msg != null ? msg : statuses[code]) + Error.captureStackTrace(self, ServerError) + self.__proto__ = ServerError.prototype + Object.defineProperty(self, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true + }) + return self + } + inherits(ServerError, Error); + ServerError.prototype.status = + ServerError.prototype.statusCode = code; + ServerError.prototype.expose = false; + exports[code] = + exports[name] = ServerError + return; + } + + var ClientError = function ClientError(msg) { + var self = new Error(msg != null ? msg : statuses[code]) + Error.captureStackTrace(self, ClientError) + self.__proto__ = ClientError.prototype + Object.defineProperty(self, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true + }) + return self + } + inherits(ClientError, Error); + ClientError.prototype.status = + ClientError.prototype.statusCode = code; + ClientError.prototype.expose = true; + exports[code] = + exports[name] = ClientError + return; +}); + +// backwards-compatibility +exports["I'mateapot"] = exports.ImATeapot diff --git a/node_modules/http-errors/package.json b/node_modules/http-errors/package.json new file mode 100644 index 0000000..d0513b5 --- /dev/null +++ b/node_modules/http-errors/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + "http-errors@~1.3.1", + "/Users/alfiepates/src/invoicer/node_modules/send" + ] + ], + "_from": "http-errors@>=1.3.1 <1.4.0", + "_id": "http-errors@1.3.1", + "_inCache": true, + "_installable": true, + "_location": "/http-errors", + "_npmUser": { + "email": "doug@somethingdoug.com", + "name": "dougwilson" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "name": "http-errors", + "raw": "http-errors@~1.3.1", + "rawSpec": "~1.3.1", + "scope": null, + "spec": ">=1.3.1 <1.4.0", + "type": "range" + }, + "_requiredBy": [ + "/send" + ], + "_resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz", + "_shasum": "197e22cdebd4198585e8694ef6786197b91ed942", + "_shrinkwrap": null, + "_spec": "http-errors@~1.3.1", + "_where": "/Users/alfiepates/src/invoicer/node_modules/send", + "author": { + "email": "me@jongleberry.com", + "name": "Jonathan Ong", + "url": "http://jongleberry.com" + }, + "bugs": { + "url": "https://github.com/jshttp/http-errors/issues" + }, + "contributors": [ + { + "email": "me@pluma.io", + "name": "Alan Plum" + }, + { + "email": "doug@somethingdoug.com", + "name": "Douglas Christopher Wilson" + } + ], + "dependencies": { + "inherits": "~2.0.1", + "statuses": "1" + }, + "description": "Create HTTP error objects", + "devDependencies": { + "istanbul": "0", + "mocha": "1" + }, + "directories": {}, + "dist": { + "shasum": "197e22cdebd4198585e8694ef6786197b91ed942", + "tarball": "http://localhost:4873/http-errors/-/http-errors-1.3.1.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "index.js", + "HISTORY.md", + "LICENSE", + "README.md" + ], + "gitHead": "89a8502b40d5dd42da2908f265275e2eeb8d0699", + "homepage": "https://github.com/jshttp/http-errors", + "keywords": [ + "http", + "error" + ], + "license": "MIT", + "maintainers": [ + { + "email": "npm@egeste.net", + "name": "egeste" + }, + { + "email": "jonathanrichardong@gmail.com", + "name": "jongleberry" + }, + { + "email": "doug@somethingdoug.com", + "name": "dougwilson" + } + ], + "name": "http-errors", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/http-errors.git" + }, + "scripts": { + "test": "mocha --reporter spec --bail", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot" + }, + "version": "1.3.1" +} 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..74ee418 --- /dev/null +++ b/node_modules/inflight/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "inflight@^1.0.4", + "/Users/alfiepates/src/invoicer/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": "/Users/alfiepates/src/invoicer/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://localhost:4873/inflight/-/inflight-1.0.4.tgz" + }, + "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "main": "inflight.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + }, + { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "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..38311df --- /dev/null +++ b/node_modules/inherits/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "inherits@~2.0.1", + "/Users/alfiepates/src/invoicer/node_modules/http-errors" + ] + ], + "_from": "inherits@>=2.0.1 <2.1.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.0.1", + "rawSpec": "~2.0.1", + "scope": null, + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/http-errors" + ], + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_shrinkwrap": null, + "_spec": "inherits@~2.0.1", + "_where": "/Users/alfiepates/src/invoicer/node_modules/http-errors", + "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://localhost:4873/inherits/-/inherits-2.0.1.tgz" + }, + "homepage": "https://github.com/isaacs/inherits#readme", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "license": "ISC", + "main": "./inherits.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + } + ], + "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/interpret/CHANGELOG b/node_modules/interpret/CHANGELOG new file mode 100644 index 0000000..9f94ae5 --- /dev/null +++ b/node_modules/interpret/CHANGELOG @@ -0,0 +1,98 @@ +v0.6.6: + date: 2015-09-21 + changes: + - add support for ts-node (formerly typescript-node) +v0.6.5: + date: 2015-07-22 + changes: + - add support for typescript 1.5 via typescript-node +v0.6.4: + date: 2015-07-07 + changes: + - add support for earlgrey +v0.6.3: + date: 2015-07-03 + changes: + - prefer babel/core to babel +v0.6.2: + date: 2015-05-20 + changes: + - update module list for iced coffee-script +v0.6.1: + date: 2015-05-20 + changes: + - Fix toml loader. +v0.6.0: + date: 2015-05-19 + changes: + - Combine fallbacks and loaders into `extensions`. + - Provide implementation guidance. +v0.5.1: + date: 2015-03-01 + changes: + - Add support for CirruScript. +v0.5.0: + date: 2015-02-27 + changes: + - Refactor es6 support via Babel (formerly 6to5) +v0.4.3: + date: 2015-02-09 + changes: + - Switch support from typescript-require to typescript-register. +v0.4.2: + date: 2015-01-16 + changes: + - Add support for wisp. +v0.4.1: + date: 2015-01-10 + changes: + - Add support for 6to5 (es6) +v0.4.0: + date: 2014-01-09 + changes: + - Add support for fallback (legacy) modules + - Add support for module configurations +v0.3.10: + date: 2014-12-17 + changes: + - Add support for json5. +v0.3.9: + date: 2014-12-08 + changes: + - Add support for literate iced coffee. +v0.3.8: + date: 2014-11-20 + changes: + - Add support for [cjsx](https://github.com/jsdf/coffee-react). +v0.3.7: + date: 2014-09-08 + changes: + - Add support for [TypeScript](http://www.typescriptlang.org/). +v0.3.6: + date: 2014-08-25 + changes: + - Add support for coffee.md. +v0.3.5: + date: 2014-07-03 + changes: + - Add support for jsx. +v0.3.4: + date: 2014-06-27 + changes: + - Make .js first jsVariant entry. +v0.3.3: + date: 2014-06-02 + changes: + - Fix casing on livescript dependency. +v0.3.0: + date: 2014-04-20 + changes: + - Simplify loading of coffee-script and iced-coffee-script. +v0.2.0: + date: 2014-04-20 + changes: + - Move module loading into rechoir. +v0.1.0: + date: 2014-04-20 + changes: + - Initial public release. diff --git a/node_modules/interpret/LICENSE b/node_modules/interpret/LICENSE new file mode 100644 index 0000000..a55f5b7 --- /dev/null +++ b/node_modules/interpret/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2014 Tyler Kellen + +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/interpret/README.md b/node_modules/interpret/README.md new file mode 100644 index 0000000..5b897ff --- /dev/null +++ b/node_modules/interpret/README.md @@ -0,0 +1,92 @@ +# interpret +> A dictionary of file extensions and associated module loaders. + +[![NPM](https://nodei.co/npm/interpret.png)](https://nodei.co/npm/interpret/) + +## What is it +This is used by [Liftoff](http://github.com/tkellen/node-liftoff) to automatically require dependencies for configuration files, and by [rechoir](http://github.com/tkellen/node-rechoir) for registering module loaders. + +## API + +### extensions +Map file types to modules which provide a [require.extensions] loader. + +```js +{ + '.babel.js': { + module: 'babel/register', + register: function (module) { + module({ + // register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353 + // which only captures the final extension (.babel.js -> .js) + extensions: '.js' + }) + } + }, + '.cirru': 'cirru-script/lib/register', + '.cjsx': 'node-cjsx/register', + '.co': 'coco', + '.coffee': ['coffee-script/register', 'coffee-script'], + '.coffee.md': ['coffee-script/register', 'coffee-script'], + '.csv': 'require-csv', + '.eg': 'earlgrey/register', + '.iced': ['iced-coffee-script/register', 'iced-coffee-script'], + '.iced.md': 'iced-coffee-script/register', + '.ini': 'require-ini', + '.js': null, + '.json': null, + '.json5': 'json5/lib/require', + '.jsx': [ + { + module: 'babel/register', + register: function (module) { + module({ + extensions: '.jsx' + }); + }, + }, + { + module: 'node-jsx', + register: function (module) { + module.install({ + extension: '.jsx', + harmony: true + }); + } + } + ], + '.litcoffee': ['coffee-script/register', 'coffee-script'], + '.liticed': 'iced-coffee-script/register', + '.ls': ['livescript', 'LiveScript'], + '.node': null, + '.toml': { + module: 'toml-require', + register: function (module) { + module.install(); + } + }, + '.ts': ['typescript-node/register', 'typescript-register', 'typescript-require'], + '.tsx': ['typescript-node/register'], + '.wisp': 'wisp/engine/node', + '.xml': 'require-xml', + '.yaml': 'require-yaml', + '.yml': 'require-yaml' +}; +``` + +### jsVariants +Same as above, but only include the extensions which are javascript variants. + +## How to use it + +Consumers should use the exported `extensions` or `jsVariants` object to determine which module should be loaded for a given extension. If a matching extension is found, consumers should do the following: + +1. If the value is null, do nothing. + +2. If the value is a string, try to require it. + +3. If the value is an object, try to require the `module` property. If successful, the `register` property (a function) should be called with the module passed as the first argument. + +4. If the value is an array, iterate over it, attempting step #2 or #3 until one of the attempts does not throw. + +[require.extensions]: http://nodejs.org/api/globals.html#globals_require_extensions diff --git a/node_modules/interpret/index.js b/node_modules/interpret/index.js new file mode 100644 index 0000000..3e498ff --- /dev/null +++ b/node_modules/interpret/index.js @@ -0,0 +1,105 @@ +const extensions = { + '.babel.js': [ + { + module: 'babel-core/register', + register: function (module) { + module({ + // register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353 + // which only captures the final extension (.babel.js -> .js) + extensions: '.js' + }); + } + }, + { + module: 'babel/register', + register: function (module) { + module({ + extensions: '.js' + }); + } + } + ], + '.cirru': 'cirru-script/lib/register', + '.cjsx': 'node-cjsx/register', + '.co': 'coco', + '.coffee': ['coffee-script/register', 'coffee-script'], + '.coffee.md': ['coffee-script/register', 'coffee-script'], + '.csv': 'require-csv', + '.eg': 'earlgrey/register', + '.iced': ['iced-coffee-script/register', 'iced-coffee-script'], + '.iced.md': 'iced-coffee-script/register', + '.ini': 'require-ini', + '.js': null, + '.json': null, + '.json5': 'json5/lib/require', + '.jsx': [ + { + module: 'babel-core/register', + register: function (module) { + module({ + extensions: '.jsx' + }); + } + }, + { + module: 'babel/register', + register: function (module) { + module({ + extensions: '.jsx' + }); + }, + }, + { + module: 'node-jsx', + register: function (module) { + module.install({ + extension: '.jsx', + harmony: true + }); + } + } + ], + '.litcoffee': ['coffee-script/register', 'coffee-script'], + '.liticed': 'iced-coffee-script/register', + '.ls': ['livescript', 'LiveScript'], + '.node': null, + '.toml': { + module: 'toml-require', + register: function (module) { + module.install(); + } + }, + '.ts': ['ts-node/register', 'typescript-node/register', 'typescript-register', 'typescript-require'], + '.tsx': ['ts-node/register', 'typescript-node/register'], + '.wisp': 'wisp/engine/node', + '.xml': 'require-xml', + '.yaml': 'require-yaml', + '.yml': 'require-yaml' +}; + +const jsVariantExtensions = [ + '.js', + '.babel.js', + '.cirru', + '.cjsx', + '.co', + '.coffee', + '.coffee.md', + '.eg', + '.iced', + '.iced.md', + '.jsx', + '.litcoffee', + '.liticed', + '.ls', + '.ts', + '.wisp' +]; + +module.exports = { + extensions: extensions, + jsVariants: jsVariantExtensions.reduce(function (result, ext) { + result[ext] = extensions[ext]; + return result; + }, {}) +}; diff --git a/node_modules/interpret/package.json b/node_modules/interpret/package.json new file mode 100644 index 0000000..633cf63 --- /dev/null +++ b/node_modules/interpret/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + "interpret@^0.6.5", + "/Users/alfiepates/src/invoicer/node_modules/knex" + ] + ], + "_from": "interpret@>=0.6.5 <0.7.0", + "_id": "interpret@0.6.6", + "_inCache": true, + "_installable": true, + "_location": "/interpret", + "_nodeVersion": "4.0.0", + "_npmUser": { + "email": "tyler@sleekcode.net", + "name": "tkellen" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "name": "interpret", + "raw": "interpret@^0.6.5", + "rawSpec": "^0.6.5", + "scope": null, + "spec": ">=0.6.5 <0.7.0", + "type": "range" + }, + "_requiredBy": [ + "/knex" + ], + "_resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", + "_shasum": "fecd7a18e7ce5ca6abfb953e1f86213a49f1625b", + "_shrinkwrap": null, + "_spec": "interpret@^0.6.5", + "_where": "/Users/alfiepates/src/invoicer/node_modules/knex", + "author": { + "name": "Tyler Kellen", + "url": "http://goingslowly.com/" + }, + "bugs": { + "url": "https://github.com/tkellen/node-interpret/issues" + }, + "dependencies": {}, + "description": "A dictionary of file extensions and associated module loaders.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "fecd7a18e7ce5ca6abfb953e1f86213a49f1625b", + "tarball": "http://localhost:4873/interpret/-/interpret-0.6.6.tgz" + }, + "gitHead": "a4056f7e7996effb277ce9cead87f9e73ecf72ae", + "homepage": "https://github.com/tkellen/node-interpret", + "keywords": [ + "cirru-script", + "cjsx", + "co", + "coco", + "coffee-script", + "coffee", + "coffee.md", + "csv", + "earlgrey", + "es", + "es6", + "iced", + "iced.md", + "iced-coffee-script", + "ini", + "js", + "json", + "json5", + "jsx", + "react", + "litcoffee", + "liticed", + "ls", + "livescript", + "toml", + "ts", + "typescript", + "wisp", + "xml", + "yaml", + "yml" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "tyler@sleekcode.net", + "name": "tkellen" + }, + { + "email": "blaine@iceddev.com", + "name": "phated" + } + ], + "name": "interpret", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/tkellen/node-interpret.git" + }, + "scripts": {}, + "version": "0.6.6" +} diff --git a/node_modules/ipaddr.js/.npmignore b/node_modules/ipaddr.js/.npmignore new file mode 100644 index 0000000..7a1537b --- /dev/null +++ b/node_modules/ipaddr.js/.npmignore @@ -0,0 +1,2 @@ +.idea +node_modules diff --git a/node_modules/ipaddr.js/.travis.yml b/node_modules/ipaddr.js/.travis.yml new file mode 100644 index 0000000..aa3d14a --- /dev/null +++ b/node_modules/ipaddr.js/.travis.yml @@ -0,0 +1,10 @@ +language: node_js + +node_js: + - "0.10" + - "0.11" + - "0.12" + - "4.0" + - "4.1" + - "4.2" + - "5" diff --git a/node_modules/ipaddr.js/Cakefile b/node_modules/ipaddr.js/Cakefile new file mode 100644 index 0000000..7fd355a --- /dev/null +++ b/node_modules/ipaddr.js/Cakefile @@ -0,0 +1,18 @@ +fs = require 'fs' +CoffeeScript = require 'coffee-script' +nodeunit = require 'nodeunit' +UglifyJS = require 'uglify-js' + +task 'build', 'build the JavaScript files from CoffeeScript source', build = (cb) -> + source = fs.readFileSync 'src/ipaddr.coffee' + fs.writeFileSync 'lib/ipaddr.js', CoffeeScript.compile source.toString() + + invoke 'test' + invoke 'compress' + +task 'test', 'run the bundled tests', (cb) -> + nodeunit.reporters.default.run ['test'] + +task 'compress', 'uglify the resulting javascript', (cb) -> + result = UglifyJS.minify('lib/ipaddr.js') + fs.writeFileSync('ipaddr.min.js', result.code) diff --git a/node_modules/ipaddr.js/LICENSE b/node_modules/ipaddr.js/LICENSE new file mode 100644 index 0000000..3493f0d --- /dev/null +++ b/node_modules/ipaddr.js/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011 Peter Zotov + +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/ipaddr.js/README.md b/node_modules/ipaddr.js/README.md new file mode 100644 index 0000000..f4f8776 --- /dev/null +++ b/node_modules/ipaddr.js/README.md @@ -0,0 +1,161 @@ +# ipaddr.js — an IPv6 and IPv4 address manipulation library [![Build Status](https://travis-ci.org/whitequark/ipaddr.js.svg)](https://travis-ci.org/whitequark/ipaddr.js) + +ipaddr.js is a small (1.9K minified and gzipped) library for manipulating +IP addresses in JavaScript environments. It runs on both CommonJS runtimes +(e.g. [nodejs]) and in a web browser. + +ipaddr.js allows you to verify and parse string representation of an IP +address, match it against a CIDR range or range list, determine if it falls +into some reserved ranges (examples include loopback and private ranges), +and convert between IPv4 and IPv4-mapped IPv6 addresses. + +[nodejs]: http://nodejs.org + +## Installation + +`npm install ipaddr.js` + +## API + +ipaddr.js defines one object in the global scope: `ipaddr`. In CommonJS, +it is exported from the module: + +```js +var ipaddr = require('ipaddr.js'); +``` + +The API consists of several global methods and two classes: ipaddr.IPv6 and ipaddr.IPv4. + +### Global methods + +There are three global methods defined: `ipaddr.isValid`, `ipaddr.parse` and +`ipaddr.process`. All of them receive a string as a single parameter. + +The `ipaddr.isValid` method returns `true` if the address is a valid IPv4 or +IPv6 address, and `false` otherwise. It does not throw any exceptions. + +The `ipaddr.parse` method returns an object representing the IP address, +or throws an `Error` if the passed string is not a valid representation of an +IP address. + +The `ipaddr.process` method works just like the `ipaddr.parse` one, but it +automatically converts IPv4-mapped IPv6 addresses to their IPv4 couterparts +before returning. It is useful when you have a Node.js instance listening +on an IPv6 socket, and the `net.ivp6.bindv6only` sysctl parameter (or its +equivalent on non-Linux OS) is set to 0. In this case, you can accept IPv4 +connections on your IPv6-only socket, but the remote address will be mangled. +Use `ipaddr.process` method to automatically demangle it. + +### Object representation + +Parsing methods return an object which descends from `ipaddr.IPv6` or +`ipaddr.IPv4`. These objects share some properties, but most of them differ. + +#### Shared properties + +One can determine the type of address by calling `addr.kind()`. It will return +either `"ipv6"` or `"ipv4"`. + +An address can be converted back to its string representation with `addr.toString()`. +Note that this method: + * does not return the original string used to create the object (in fact, there is + no way of getting that string) + * returns a compact representation (when it is applicable) + +A `match(range, bits)` method can be used to check if the address falls into a +certain CIDR range. +Note that an address can be (obviously) matched only against an address of the same type. + +For example: + +```js +var addr = ipaddr.parse("2001:db8:1234::1"); +var range = ipaddr.parse("2001:db8::"); + +addr.match(range, 32); // => true +``` + +Alternatively, `match` can also be called as `match([range, bits])`. In this way, +it can be used together with the `parseCIDR(string)` method, which parses an IP +address together with a CIDR range. + +For example: + +```js +var addr = ipaddr.parse("2001:db8:1234::1"); + +addr.match(ipaddr.parseCIDR("2001:db8::/32")); // => true +``` + +A `range()` method returns one of predefined names for several special ranges defined +by IP protocols. The exact names (and their respective CIDR ranges) can be looked up +in the source: [IPv6 ranges] and [IPv4 ranges]. Some common ones include `"unicast"` +(the default one) and `"reserved"`. + +You can match against your own range list by using +`ipaddr.subnetMatch(address, rangeList, defaultName)` method. It can work with both +IPv6 and IPv4 addresses, and accepts a name-to-subnet map as the range list. For example: + +```js +var rangeList = { + documentationOnly: [ ipaddr.parse('2001:db8::'), 32 ], + tunnelProviders: [ + [ ipaddr.parse('2001:470::'), 32 ], // he.net + [ ipaddr.parse('2001:5c0::'), 32 ] // freenet6 + ] +}; +ipaddr.subnetMatch(ipaddr.parse('2001:470:8:66::1'), rangeList, 'unknown'); // => "he.net" +``` + +The addresses can be converted to their byte representation with `toByteArray()`. +(Actually, JavaScript mostly does not know about byte buffers. They are emulated with +arrays of numbers, each in range of 0..255.) + +```js +var bytes = ipaddr.parse('2a00:1450:8007::68').toByteArray(); // ipv6.google.com +bytes // => [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, , 0x00, 0x68 ] +``` + +The `ipaddr.IPv4` and `ipaddr.IPv6` objects have some methods defined, too. All of them +have the same interface for both protocols, and are similar to global methods. + +`ipaddr.IPvX.isValid(string)` can be used to check if the string is a valid address +for particular protocol, and `ipaddr.IPvX.parse(string)` is the error-throwing parser. + +[IPv6 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L186 +[IPv4 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L71 + +#### IPv6 properties + +Sometimes you will want to convert IPv6 not to a compact string representation (with +the `::` substitution); the `toNormalizedString()` method will return an address where +all zeroes are explicit. + +For example: + +```js +var addr = ipaddr.parse("2001:0db8::0001"); +addr.toString(); // => "2001:db8::1" +addr.toNormalizedString(); // => "2001:db8:0:0:0:0:0:1" +``` + +The `isIPv4MappedAddress()` method will return `true` if this address is an IPv4-mapped +one, and `toIPv4Address()` will return an IPv4 object address. + +To access the underlying binary representation of the address, use `addr.parts`. + +```js +var addr = ipaddr.parse("2001:db8:10::1234:DEAD"); +addr.parts // => [0x2001, 0xdb8, 0x10, 0, 0, 0, 0x1234, 0xdead] +``` + +#### IPv4 properties + +`toIPv4MappedAddress()` will return a corresponding IPv4-mapped IPv6 address. + +To access the underlying representation of the address, use `addr.octets`. + +```js +var addr = ipaddr.parse("192.168.1.1"); +addr.octets // => [192, 168, 1, 1] +``` diff --git a/node_modules/ipaddr.js/bower.json b/node_modules/ipaddr.js/bower.json new file mode 100644 index 0000000..bc04ffe --- /dev/null +++ b/node_modules/ipaddr.js/bower.json @@ -0,0 +1,29 @@ +{ + "name": "ipaddr.js", + "version": "1.0.5", + "homepage": "https://github.com/whitequark/ipaddr.js", + "authors": [ + "whitequark " + ], + "description": "IP address manipulation library in JavaScript (CoffeeScript, actually)", + "main": "lib/ipaddr.js", + "moduleType": [ + "globals", + "node" + ], + "keywords": [ + "javscript", + "ip", + "address", + "ipv4", + "ipv6" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/node_modules/ipaddr.js/ipaddr.min.js b/node_modules/ipaddr.js/ipaddr.min.js new file mode 100644 index 0000000..ee5179d --- /dev/null +++ b/node_modules/ipaddr.js/ipaddr.min.js @@ -0,0 +1 @@ +(function(){var r,t,n,e,i,o,a,s;t={},s=this,"undefined"!=typeof module&&null!==module&&module.exports?module.exports=t:s.ipaddr=t,a=function(r,t,n,e){var i,o;if(r.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(i=0;e>0;){if(o=n-e,0>o&&(o=0),r[i]>>o!==t[i]>>o)return!1;e-=n,i+=1}return!0},t.subnetMatch=function(r,t,n){var e,i,o,a,s;null==n&&(n="unicast");for(e in t)for(i=t[e],!i[0]||i[0]instanceof Array||(i=[i]),a=0,s=i.length;s>a;a++)if(o=i[a],r.match.apply(r,o))return e;return n},t.IPv4=function(){function r(r){var t,n,e;if(4!==r.length)throw new Error("ipaddr: ipv4 octet count should be 4");for(n=0,e=r.length;e>n;n++)if(t=r[n],!(t>=0&&255>=t))throw new Error("ipaddr: ipv4 octet is a byte");this.octets=r}return r.prototype.kind=function(){return"ipv4"},r.prototype.toString=function(){return this.octets.join(".")},r.prototype.toByteArray=function(){return this.octets.slice(0)},r.prototype.match=function(r,t){var n;if(void 0===t&&(n=r,r=n[0],t=n[1]),"ipv4"!==r.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return a(this.octets,r.octets,8,t)},r.prototype.SpecialRanges={unspecified:[[new r([0,0,0,0]),8]],broadcast:[[new r([255,255,255,255]),32]],multicast:[[new r([224,0,0,0]),4]],linkLocal:[[new r([169,254,0,0]),16]],loopback:[[new r([127,0,0,0]),8]],"private":[[new r([10,0,0,0]),8],[new r([172,16,0,0]),12],[new r([192,168,0,0]),16]],reserved:[[new r([192,0,0,0]),24],[new r([192,0,2,0]),24],[new r([192,88,99,0]),24],[new r([198,51,100,0]),24],[new r([203,0,113,0]),24],[new r([240,0,0,0]),4]]},r.prototype.range=function(){return t.subnetMatch(this,this.SpecialRanges)},r.prototype.toIPv4MappedAddress=function(){return t.IPv6.parse("::ffff:"+this.toString())},r}(),n="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp("^"+n+"\\."+n+"\\."+n+"\\."+n+"$","i"),longValue:new RegExp("^"+n+"$","i")},t.IPv4.parser=function(r){var t,n,i,o,a;if(n=function(r){return"0"===r[0]&&"x"!==r[1]?parseInt(r,8):parseInt(r)},t=r.match(e.fourOctet))return function(){var r,e,o,a;for(o=t.slice(1,6),a=[],r=0,e=o.length;e>r;r++)i=o[r],a.push(n(i));return a}();if(t=r.match(e.longValue)){if(a=n(t[1]),a>4294967295||0>a)throw new Error("ipaddr: address outside defined range");return function(){var r,t;for(t=[],o=r=0;24>=r;o=r+=8)t.push(a>>o&255);return t}().reverse()}return null},t.IPv6=function(){function r(r){var t,n,e;if(8!==r.length)throw new Error("ipaddr: ipv6 part count should be 8");for(n=0,e=r.length;e>n;n++)if(t=r[n],!(t>=0&&65535>=t))throw new Error("ipaddr: ipv6 part should fit to two octets");this.parts=r}return r.prototype.kind=function(){return"ipv6"},r.prototype.toString=function(){var r,t,n,e,i,o,a;for(i=function(){var r,n,e,i;for(e=this.parts,i=[],r=0,n=e.length;n>r;r++)t=e[r],i.push(t.toString(16));return i}.call(this),r=[],n=function(t){return r.push(t)},e=0,o=0,a=i.length;a>o;o++)switch(t=i[o],e){case 0:n("0"===t?"":t),e=1;break;case 1:"0"===t?e=2:n(t);break;case 2:"0"!==t&&(n(""),n(t),e=3);break;case 3:n(t)}return 2===e&&(n(""),n("")),r.join(":")},r.prototype.toByteArray=function(){var r,t,n,e,i;for(r=[],i=this.parts,n=0,e=i.length;e>n;n++)t=i[n],r.push(t>>8),r.push(255&t);return r},r.prototype.toNormalizedString=function(){var r;return function(){var t,n,e,i;for(e=this.parts,i=[],t=0,n=e.length;n>t;t++)r=e[t],i.push(r.toString(16));return i}.call(this).join(":")},r.prototype.match=function(r,t){var n;if(void 0===t&&(n=r,r=n[0],t=n[1]),"ipv6"!==r.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return a(this.parts,r.parts,16,t)},r.prototype.SpecialRanges={unspecified:[new r([0,0,0,0,0,0,0,0]),128],linkLocal:[new r([65152,0,0,0,0,0,0,0]),10],multicast:[new r([65280,0,0,0,0,0,0,0]),8],loopback:[new r([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new r([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new r([0,0,0,0,0,65535,0,0]),96],rfc6145:[new r([0,0,0,0,65535,0,0,0]),96],rfc6052:[new r([100,65435,0,0,0,0,0,0]),96],"6to4":[new r([8194,0,0,0,0,0,0,0]),16],teredo:[new r([8193,0,0,0,0,0,0,0]),32],reserved:[[new r([8193,3512,0,0,0,0,0,0]),32]]},r.prototype.range=function(){return t.subnetMatch(this,this.SpecialRanges)},r.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},r.prototype.toIPv4Address=function(){var r,n,e;if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");return e=this.parts.slice(-2),r=e[0],n=e[1],new t.IPv4([r>>8,255&r,n>>8,255&n])},r}(),i="(?:[0-9a-f]+::?)+",o={"native":new RegExp("^(::)?("+i+")?([0-9a-f]+)?(::)?$","i"),transitional:new RegExp("^((?:"+i+")|(?:::)(?:"+i+")?)"+(""+n+"\\."+n+"\\."+n+"\\."+n+"$"),"i")},r=function(r,t){var n,e,i,o,a;if(r.indexOf("::")!==r.lastIndexOf("::"))return null;for(n=0,e=-1;(e=r.indexOf(":",e+1))>=0;)n++;if("::"===r.substr(0,2)&&n--,"::"===r.substr(-2,2)&&n--,n>t)return null;for(a=t-n,o=":";a--;)o+="0:";return r=r.replace("::",o),":"===r[0]&&(r=r.slice(1)),":"===r[r.length-1]&&(r=r.slice(0,-1)),function(){var t,n,e,o;for(e=r.split(":"),o=[],t=0,n=e.length;n>t;t++)i=e[t],o.push(parseInt(i,16));return o}()},t.IPv6.parser=function(t){var n,e;return t.match(o["native"])?r(t,8):(n=t.match(o.transitional))&&(e=r(n[1].slice(0,-1),6))?(e.push(parseInt(n[2])<<8|parseInt(n[3])),e.push(parseInt(n[4])<<8|parseInt(n[5])),e):null},t.IPv4.isIPv4=t.IPv6.isIPv6=function(r){return null!==this.parser(r)},t.IPv4.isValid=function(r){var t;try{return new this(this.parser(r)),!0}catch(n){return t=n,!1}},t.IPv6.isValid=function(r){var t;if("string"==typeof r&&-1===r.indexOf(":"))return!1;try{return new this(this.parser(r)),!0}catch(n){return t=n,!1}},t.IPv4.parse=t.IPv6.parse=function(r){var t;if(t=this.parser(r),null===t)throw new Error("ipaddr: string is not formatted like ip address");return new this(t)},t.IPv4.parseCIDR=function(r){var t,n;if((n=r.match(/^(.+)\/(\d+)$/))&&(t=parseInt(n[2]),t>=0&&32>=t))return[this.parse(n[1]),t];throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},t.IPv6.parseCIDR=function(r){var t,n;if((n=r.match(/^(.+)\/(\d+)$/))&&(t=parseInt(n[2]),t>=0&&128>=t))return[this.parse(n[1]),t];throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},t.isValid=function(r){return t.IPv6.isValid(r)||t.IPv4.isValid(r)},t.parse=function(r){if(t.IPv6.isValid(r))return t.IPv6.parse(r);if(t.IPv4.isValid(r))return t.IPv4.parse(r);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},t.parseCIDR=function(r){var n;try{return t.IPv6.parseCIDR(r)}catch(e){n=e;try{return t.IPv4.parseCIDR(r)}catch(e){throw n=e,new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},t.process=function(r){var t;return t=this.parse(r),"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t}}).call(this); \ No newline at end of file diff --git a/node_modules/ipaddr.js/lib/ipaddr.js b/node_modules/ipaddr.js/lib/ipaddr.js new file mode 100644 index 0000000..ef179b4 --- /dev/null +++ b/node_modules/ipaddr.js/lib/ipaddr.js @@ -0,0 +1,467 @@ +(function() { + var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root; + + ipaddr = {}; + + root = this; + + if ((typeof module !== "undefined" && module !== null) && module.exports) { + module.exports = ipaddr; + } else { + root['ipaddr'] = ipaddr; + } + + matchCIDR = function(first, second, partSize, cidrBits) { + var part, shift; + if (first.length !== second.length) { + throw new Error("ipaddr: cannot match CIDR for objects with different lengths"); + } + part = 0; + while (cidrBits > 0) { + shift = partSize - cidrBits; + if (shift < 0) { + shift = 0; + } + if (first[part] >> shift !== second[part] >> shift) { + return false; + } + cidrBits -= partSize; + part += 1; + } + return true; + }; + + ipaddr.subnetMatch = function(address, rangeList, defaultName) { + var rangeName, rangeSubnets, subnet, _i, _len; + if (defaultName == null) { + defaultName = 'unicast'; + } + for (rangeName in rangeList) { + rangeSubnets = rangeList[rangeName]; + if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) { + rangeSubnets = [rangeSubnets]; + } + for (_i = 0, _len = rangeSubnets.length; _i < _len; _i++) { + subnet = rangeSubnets[_i]; + if (address.match.apply(address, subnet)) { + return rangeName; + } + } + } + return defaultName; + }; + + ipaddr.IPv4 = (function() { + function IPv4(octets) { + var octet, _i, _len; + if (octets.length !== 4) { + throw new Error("ipaddr: ipv4 octet count should be 4"); + } + for (_i = 0, _len = octets.length; _i < _len; _i++) { + octet = octets[_i]; + if (!((0 <= octet && octet <= 255))) { + throw new Error("ipaddr: ipv4 octet is a byte"); + } + } + this.octets = octets; + } + + IPv4.prototype.kind = function() { + return 'ipv4'; + }; + + IPv4.prototype.toString = function() { + return this.octets.join("."); + }; + + IPv4.prototype.toByteArray = function() { + return this.octets.slice(0); + }; + + IPv4.prototype.match = function(other, cidrRange) { + var _ref; + if (cidrRange === void 0) { + _ref = other, other = _ref[0], cidrRange = _ref[1]; + } + if (other.kind() !== 'ipv4') { + throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one"); + } + return matchCIDR(this.octets, other.octets, 8, cidrRange); + }; + + IPv4.prototype.SpecialRanges = { + unspecified: [[new IPv4([0, 0, 0, 0]), 8]], + broadcast: [[new IPv4([255, 255, 255, 255]), 32]], + multicast: [[new IPv4([224, 0, 0, 0]), 4]], + linkLocal: [[new IPv4([169, 254, 0, 0]), 16]], + loopback: [[new IPv4([127, 0, 0, 0]), 8]], + "private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]], + reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]] + }; + + IPv4.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + + IPv4.prototype.toIPv4MappedAddress = function() { + return ipaddr.IPv6.parse("::ffff:" + (this.toString())); + }; + + return IPv4; + + })(); + + ipv4Part = "(0?\\d+|0x[a-f0-9]+)"; + + ipv4Regexes = { + fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", 'i'), + longValue: new RegExp("^" + ipv4Part + "$", 'i') + }; + + ipaddr.IPv4.parser = function(string) { + var match, parseIntAuto, part, shift, value; + parseIntAuto = function(string) { + if (string[0] === "0" && string[1] !== "x") { + return parseInt(string, 8); + } else { + return parseInt(string); + } + }; + if (match = string.match(ipv4Regexes.fourOctet)) { + return (function() { + var _i, _len, _ref, _results; + _ref = match.slice(1, 6); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + part = _ref[_i]; + _results.push(parseIntAuto(part)); + } + return _results; + })(); + } else if (match = string.match(ipv4Regexes.longValue)) { + value = parseIntAuto(match[1]); + if (value > 0xffffffff || value < 0) { + throw new Error("ipaddr: address outside defined range"); + } + return ((function() { + var _i, _results; + _results = []; + for (shift = _i = 0; _i <= 24; shift = _i += 8) { + _results.push((value >> shift) & 0xff); + } + return _results; + })()).reverse(); + } else { + return null; + } + }; + + ipaddr.IPv6 = (function() { + function IPv6(parts) { + var part, _i, _len; + if (parts.length !== 8) { + throw new Error("ipaddr: ipv6 part count should be 8"); + } + for (_i = 0, _len = parts.length; _i < _len; _i++) { + part = parts[_i]; + if (!((0 <= part && part <= 0xffff))) { + throw new Error("ipaddr: ipv6 part should fit to two octets"); + } + } + this.parts = parts; + } + + IPv6.prototype.kind = function() { + return 'ipv6'; + }; + + IPv6.prototype.toString = function() { + var compactStringParts, part, pushPart, state, stringParts, _i, _len; + stringParts = (function() { + var _i, _len, _ref, _results; + _ref = this.parts; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + part = _ref[_i]; + _results.push(part.toString(16)); + } + return _results; + }).call(this); + compactStringParts = []; + pushPart = function(part) { + return compactStringParts.push(part); + }; + state = 0; + for (_i = 0, _len = stringParts.length; _i < _len; _i++) { + part = stringParts[_i]; + switch (state) { + case 0: + if (part === '0') { + pushPart(''); + } else { + pushPart(part); + } + state = 1; + break; + case 1: + if (part === '0') { + state = 2; + } else { + pushPart(part); + } + break; + case 2: + if (part !== '0') { + pushPart(''); + pushPart(part); + state = 3; + } + break; + case 3: + pushPart(part); + } + } + if (state === 2) { + pushPart(''); + pushPart(''); + } + return compactStringParts.join(":"); + }; + + IPv6.prototype.toByteArray = function() { + var bytes, part, _i, _len, _ref; + bytes = []; + _ref = this.parts; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + part = _ref[_i]; + bytes.push(part >> 8); + bytes.push(part & 0xff); + } + return bytes; + }; + + IPv6.prototype.toNormalizedString = function() { + var part; + return ((function() { + var _i, _len, _ref, _results; + _ref = this.parts; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + part = _ref[_i]; + _results.push(part.toString(16)); + } + return _results; + }).call(this)).join(":"); + }; + + IPv6.prototype.match = function(other, cidrRange) { + var _ref; + if (cidrRange === void 0) { + _ref = other, other = _ref[0], cidrRange = _ref[1]; + } + if (other.kind() !== 'ipv6') { + throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one"); + } + return matchCIDR(this.parts, other.parts, 16, cidrRange); + }; + + IPv6.prototype.SpecialRanges = { + unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128], + linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10], + multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8], + loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128], + uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7], + ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96], + rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96], + rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96], + '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16], + teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32], + reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]] + }; + + IPv6.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + + IPv6.prototype.isIPv4MappedAddress = function() { + return this.range() === 'ipv4Mapped'; + }; + + IPv6.prototype.toIPv4Address = function() { + var high, low, _ref; + if (!this.isIPv4MappedAddress()) { + throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4"); + } + _ref = this.parts.slice(-2), high = _ref[0], low = _ref[1]; + return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]); + }; + + return IPv6; + + })(); + + ipv6Part = "(?:[0-9a-f]+::?)+"; + + ipv6Regexes = { + "native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?$", 'i'), + transitional: new RegExp(("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)") + ("" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$"), 'i') + }; + + expandIPv6 = function(string, parts) { + var colonCount, lastColon, part, replacement, replacementCount; + if (string.indexOf('::') !== string.lastIndexOf('::')) { + return null; + } + colonCount = 0; + lastColon = -1; + while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) { + colonCount++; + } + if (string.substr(0, 2) === '::') { + colonCount--; + } + if (string.substr(-2, 2) === '::') { + colonCount--; + } + if (colonCount > parts) { + return null; + } + replacementCount = parts - colonCount; + replacement = ':'; + while (replacementCount--) { + replacement += '0:'; + } + string = string.replace('::', replacement); + if (string[0] === ':') { + string = string.slice(1); + } + if (string[string.length - 1] === ':') { + string = string.slice(0, -1); + } + return (function() { + var _i, _len, _ref, _results; + _ref = string.split(":"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + part = _ref[_i]; + _results.push(parseInt(part, 16)); + } + return _results; + })(); + }; + + ipaddr.IPv6.parser = function(string) { + var match, parts; + if (string.match(ipv6Regexes['native'])) { + return expandIPv6(string, 8); + } else if (match = string.match(ipv6Regexes['transitional'])) { + parts = expandIPv6(match[1].slice(0, -1), 6); + if (parts) { + parts.push(parseInt(match[2]) << 8 | parseInt(match[3])); + parts.push(parseInt(match[4]) << 8 | parseInt(match[5])); + return parts; + } + } + return null; + }; + + ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) { + return this.parser(string) !== null; + }; + + ipaddr.IPv4.isValid = function(string) { + var e; + try { + new this(this.parser(string)); + return true; + } catch (_error) { + e = _error; + return false; + } + }; + + ipaddr.IPv6.isValid = function(string) { + var e; + if (typeof string === "string" && string.indexOf(":") === -1) { + return false; + } + try { + new this(this.parser(string)); + return true; + } catch (_error) { + e = _error; + return false; + } + }; + + ipaddr.IPv4.parse = ipaddr.IPv6.parse = function(string) { + var parts; + parts = this.parser(string); + if (parts === null) { + throw new Error("ipaddr: string is not formatted like ip address"); + } + return new this(parts); + }; + + ipaddr.IPv4.parseCIDR = function(string) { + var maskLength, match; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 32) { + return [this.parse(match[1]), maskLength]; + } + } + throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range"); + }; + + ipaddr.IPv6.parseCIDR = function(string) { + var maskLength, match; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 128) { + return [this.parse(match[1]), maskLength]; + } + } + throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range"); + }; + + ipaddr.isValid = function(string) { + return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string); + }; + + ipaddr.parse = function(string) { + if (ipaddr.IPv6.isValid(string)) { + return ipaddr.IPv6.parse(string); + } else if (ipaddr.IPv4.isValid(string)) { + return ipaddr.IPv4.parse(string); + } else { + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format"); + } + }; + + ipaddr.parseCIDR = function(string) { + var e; + try { + return ipaddr.IPv6.parseCIDR(string); + } catch (_error) { + e = _error; + try { + return ipaddr.IPv4.parseCIDR(string); + } catch (_error) { + e = _error; + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format"); + } + } + }; + + ipaddr.process = function(string) { + var addr; + addr = this.parse(string); + if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) { + return addr.toIPv4Address(); + } else { + return addr; + } + }; + +}).call(this); diff --git a/node_modules/ipaddr.js/package.json b/node_modules/ipaddr.js/package.json new file mode 100644 index 0000000..9cd222e --- /dev/null +++ b/node_modules/ipaddr.js/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + "ipaddr.js@1.0.5", + "/Users/alfiepates/src/invoicer/node_modules/proxy-addr" + ] + ], + "_from": "ipaddr.js@1.0.5", + "_id": "ipaddr.js@1.0.5", + "_inCache": true, + "_installable": true, + "_location": "/ipaddr.js", + "_npmUser": { + "email": "whitequark@whitequark.org", + "name": "whitequark" + }, + "_npmVersion": "1.4.21", + "_phantomChildren": {}, + "_requested": { + "name": "ipaddr.js", + "raw": "ipaddr.js@1.0.5", + "rawSpec": "1.0.5", + "scope": null, + "spec": "1.0.5", + "type": "version" + }, + "_requiredBy": [ + "/proxy-addr" + ], + "_resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz", + "_shasum": "5fa78cf301b825c78abc3042d812723049ea23c7", + "_shrinkwrap": null, + "_spec": "ipaddr.js@1.0.5", + "_where": "/Users/alfiepates/src/invoicer/node_modules/proxy-addr", + "author": { + "email": "whitequark@whitequark.org", + "name": "whitequark" + }, + "bugs": { + "url": "https://github.com/whitequark/ipaddr.js/issues" + }, + "dependencies": {}, + "description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.", + "devDependencies": { + "coffee-script": "~1.6", + "nodeunit": ">=0.8.2 <0.8.7", + "uglify-js": "latest" + }, + "directories": { + "lib": "./lib" + }, + "dist": { + "shasum": "5fa78cf301b825c78abc3042d812723049ea23c7", + "tarball": "http://localhost:4873/ipaddr.js/-/ipaddr.js-1.0.5.tgz" + }, + "engines": { + "node": ">= 0.10" + }, + "gitHead": "46438c8bfa187505b7007a277f09a4a9e73d5686", + "homepage": "https://github.com/whitequark/ipaddr.js#readme", + "keywords": [ + "ip", + "ipv4", + "ipv6" + ], + "license": "MIT", + "main": "./lib/ipaddr", + "maintainers": [ + { + "email": "whitequark@whitequark.org", + "name": "whitequark" + } + ], + "name": "ipaddr.js", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/whitequark/ipaddr.js.git" + }, + "scripts": { + "test": "cake build test" + }, + "version": "1.0.5" +} diff --git a/node_modules/ipaddr.js/src/ipaddr.coffee b/node_modules/ipaddr.js/src/ipaddr.coffee new file mode 100644 index 0000000..550174f --- /dev/null +++ b/node_modules/ipaddr.js/src/ipaddr.coffee @@ -0,0 +1,396 @@ +# Define the main object +ipaddr = {} + +root = this + +# Export for both the CommonJS and browser-like environment +if module? && module.exports + module.exports = ipaddr +else + root['ipaddr'] = ipaddr + +# A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher. +matchCIDR = (first, second, partSize, cidrBits) -> + if first.length != second.length + throw new Error "ipaddr: cannot match CIDR for objects with different lengths" + + part = 0 + while cidrBits > 0 + shift = partSize - cidrBits + shift = 0 if shift < 0 + + if first[part] >> shift != second[part] >> shift + return false + + cidrBits -= partSize + part += 1 + + return true + +# An utility function to ease named range matching. See examples below. +ipaddr.subnetMatch = (address, rangeList, defaultName='unicast') -> + for rangeName, rangeSubnets of rangeList + # ECMA5 Array.isArray isn't available everywhere + if rangeSubnets[0] && !(rangeSubnets[0] instanceof Array) + rangeSubnets = [ rangeSubnets ] + + for subnet in rangeSubnets + return rangeName if address.match.apply(address, subnet) + + return defaultName + +# An IPv4 address (RFC791). +class ipaddr.IPv4 + # Constructs a new IPv4 address from an array of four octets. + # Verifies the input. + constructor: (octets) -> + if octets.length != 4 + throw new Error "ipaddr: ipv4 octet count should be 4" + + for octet in octets + if !(0 <= octet <= 255) + throw new Error "ipaddr: ipv4 octet is a byte" + + @octets = octets + + # The 'kind' method exists on both IPv4 and IPv6 classes. + kind: -> + return 'ipv4' + + # Returns the address in convenient, decimal-dotted format. + toString: -> + return @octets.join "." + + # Returns an array of byte-sized values in network order + toByteArray: -> + return @octets.slice(0) # octets.clone + + # Checks if this address matches other one within given CIDR range. + match: (other, cidrRange) -> + if cidrRange == undefined + [other, cidrRange] = other + + if other.kind() != 'ipv4' + throw new Error "ipaddr: cannot match ipv4 address with non-ipv4 one" + + return matchCIDR(this.octets, other.octets, 8, cidrRange) + + # Special IPv4 address ranges. + SpecialRanges: + unspecified: [ + [ new IPv4([0, 0, 0, 0]), 8 ] + ] + broadcast: [ + [ new IPv4([255, 255, 255, 255]), 32 ] + ] + multicast: [ # RFC3171 + [ new IPv4([224, 0, 0, 0]), 4 ] + ] + linkLocal: [ # RFC3927 + [ new IPv4([169, 254, 0, 0]), 16 ] + ] + loopback: [ # RFC5735 + [ new IPv4([127, 0, 0, 0]), 8 ] + ] + private: [ # RFC1918 + [ new IPv4([10, 0, 0, 0]), 8 ] + [ new IPv4([172, 16, 0, 0]), 12 ] + [ new IPv4([192, 168, 0, 0]), 16 ] + ] + reserved: [ # Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700 + [ new IPv4([192, 0, 0, 0]), 24 ] + [ new IPv4([192, 0, 2, 0]), 24 ] + [ new IPv4([192, 88, 99, 0]), 24 ] + [ new IPv4([198, 51, 100, 0]), 24 ] + [ new IPv4([203, 0, 113, 0]), 24 ] + [ new IPv4([240, 0, 0, 0]), 4 ] + ] + + # Checks if the address corresponds to one of the special ranges. + range: -> + return ipaddr.subnetMatch(this, @SpecialRanges) + + # Convrets this IPv4 address to an IPv4-mapped IPv6 address. + toIPv4MappedAddress: -> + return ipaddr.IPv6.parse "::ffff:#{@toString()}" + +# A list of regular expressions that match arbitrary IPv4 addresses, +# for which a number of weird notations exist. +# Note that an address like 0010.0xa5.1.1 is considered legal. +ipv4Part = "(0?\\d+|0x[a-f0-9]+)" +ipv4Regexes = + fourOctet: new RegExp "^#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}$", 'i' + longValue: new RegExp "^#{ipv4Part}$", 'i' + +# Classful variants (like a.b, where a is an octet, and b is a 24-bit +# value representing last three octets; this corresponds to a class C +# address) are omitted due to classless nature of modern Internet. +ipaddr.IPv4.parser = (string) -> + parseIntAuto = (string) -> + if string[0] == "0" && string[1] != "x" + parseInt(string, 8) + else + parseInt(string) + + # parseInt recognizes all that octal & hexadecimal weirdness for us + if match = string.match(ipv4Regexes.fourOctet) + return (parseIntAuto(part) for part in match[1..5]) + else if match = string.match(ipv4Regexes.longValue) + value = parseIntAuto(match[1]) + if value > 0xffffffff || value < 0 + throw new Error "ipaddr: address outside defined range" + return ((value >> shift) & 0xff for shift in [0..24] by 8).reverse() + else + return null + +# An IPv6 address (RFC2460) +class ipaddr.IPv6 + # Constructs an IPv6 address from an array of eight 16-bit parts. + # Throws an error if the input is invalid. + constructor: (parts) -> + if parts.length != 8 + throw new Error "ipaddr: ipv6 part count should be 8" + + for part in parts + if !(0 <= part <= 0xffff) + throw new Error "ipaddr: ipv6 part should fit to two octets" + + @parts = parts + + # The 'kind' method exists on both IPv4 and IPv6 classes. + kind: -> + return 'ipv6' + + # Returns the address in compact, human-readable format like + # 2001:db8:8:66::1 + toString: -> + stringParts = (part.toString(16) for part in @parts) + + compactStringParts = [] + pushPart = (part) -> compactStringParts.push part + + state = 0 + for part in stringParts + switch state + when 0 + if part == '0' + pushPart('') + else + pushPart(part) + + state = 1 + when 1 + if part == '0' + state = 2 + else + pushPart(part) + when 2 + unless part == '0' + pushPart('') + pushPart(part) + state = 3 + when 3 + pushPart(part) + + if state == 2 + pushPart('') + pushPart('') + + return compactStringParts.join ":" + + # Returns an array of byte-sized values in network order + toByteArray: -> + bytes = [] + for part in @parts + bytes.push(part >> 8) + bytes.push(part & 0xff) + + return bytes + + # Returns the address in expanded format with all zeroes included, like + # 2001:db8:8:66:0:0:0:1 + toNormalizedString: -> + return (part.toString(16) for part in @parts).join ":" + + # Checks if this address matches other one within given CIDR range. + match: (other, cidrRange) -> + if cidrRange == undefined + [other, cidrRange] = other + + if other.kind() != 'ipv6' + throw new Error "ipaddr: cannot match ipv6 address with non-ipv6 one" + + return matchCIDR(this.parts, other.parts, 16, cidrRange) + + # Special IPv6 ranges + SpecialRanges: + unspecified: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128 ] # RFC4291, here and after + linkLocal: [ new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10 ] + multicast: [ new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8 ] + loopback: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128 ] + uniqueLocal: [ new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7 ] + ipv4Mapped: [ new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96 ] + rfc6145: [ new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96 ] # RFC6145 + rfc6052: [ new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96 ] # RFC6052 + '6to4': [ new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16 ] # RFC3056 + teredo: [ new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32 ] # RFC6052, RFC6146 + reserved: [ + [ new IPv6([ 0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32 ] # RFC4291 + ] + + # Checks if the address corresponds to one of the special ranges. + range: -> + return ipaddr.subnetMatch(this, @SpecialRanges) + + # Checks if this address is an IPv4-mapped IPv6 address. + isIPv4MappedAddress: -> + return @range() == 'ipv4Mapped' + + # Converts this address to IPv4 address if it is an IPv4-mapped IPv6 address. + # Throws an error otherwise. + toIPv4Address: -> + unless @isIPv4MappedAddress() + throw new Error "ipaddr: trying to convert a generic ipv6 address to ipv4" + + [high, low] = @parts[-2..-1] + + return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]) + +# IPv6-matching regular expressions. +# For IPv6, the task is simpler: it is enough to match the colon-delimited +# hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at +# the end. +ipv6Part = "(?:[0-9a-f]+::?)+" +ipv6Regexes = + native: new RegExp "^(::)?(#{ipv6Part})?([0-9a-f]+)?(::)?$", 'i' + transitional: new RegExp "^((?:#{ipv6Part})|(?:::)(?:#{ipv6Part})?)" + + "#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}$", 'i' + +# Expand :: in an IPv6 address or address part consisting of `parts` groups. +expandIPv6 = (string, parts) -> + # More than one '::' means invalid adddress + if string.indexOf('::') != string.lastIndexOf('::') + return null + + # How many parts do we already have? + colonCount = 0 + lastColon = -1 + while (lastColon = string.indexOf(':', lastColon + 1)) >= 0 + colonCount++ + + # 0::0 is two parts more than :: + colonCount-- if string.substr(0, 2) == '::' + colonCount-- if string.substr(-2, 2) == '::' + + # The following loop would hang if colonCount > parts + if colonCount > parts + return null + + # replacement = ':' + '0:' * (parts - colonCount) + replacementCount = parts - colonCount + replacement = ':' + while replacementCount-- + replacement += '0:' + + # Insert the missing zeroes + string = string.replace('::', replacement) + + # Trim any garbage which may be hanging around if :: was at the edge in + # the source string + string = string[1..-1] if string[0] == ':' + string = string[0..-2] if string[string.length-1] == ':' + + return (parseInt(part, 16) for part in string.split(":")) + +# Parse an IPv6 address. +ipaddr.IPv6.parser = (string) -> + if string.match(ipv6Regexes['native']) + return expandIPv6(string, 8) + + else if match = string.match(ipv6Regexes['transitional']) + parts = expandIPv6(match[1][0..-2], 6) + if parts + parts.push(parseInt(match[2]) << 8 | parseInt(match[3])) + parts.push(parseInt(match[4]) << 8 | parseInt(match[5])) + return parts + + return null + +# Checks if a given string is formatted like IPv4/IPv6 address. +ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = (string) -> + return @parser(string) != null + +# Checks if a given string is a valid IPv4/IPv6 address. +ipaddr.IPv4.isValid = (string) -> + try + new this(@parser(string)) + return true + catch e + return false + +ipaddr.IPv6.isValid = (string) -> + # Since IPv6.isValid is always called first, this shortcut + # provides a substantial performance gain. + if typeof string == "string" and string.indexOf(":") == -1 + return false + + try + new this(@parser(string)) + return true + catch e + return false + +# Tries to parse and validate a string with IPv4/IPv6 address. +# Throws an error if it fails. +ipaddr.IPv4.parse = ipaddr.IPv6.parse = (string) -> + parts = @parser(string) + if parts == null + throw new Error "ipaddr: string is not formatted like ip address" + + return new this(parts) + +ipaddr.IPv4.parseCIDR = (string) -> + if match = string.match(/^(.+)\/(\d+)$/) + maskLength = parseInt(match[2]) + if maskLength >= 0 and maskLength <= 32 + return [@parse(match[1]), maskLength] + + throw new Error "ipaddr: string is not formatted like an IPv4 CIDR range" + +ipaddr.IPv6.parseCIDR = (string) -> + if match = string.match(/^(.+)\/(\d+)$/) + maskLength = parseInt(match[2]) + if maskLength >= 0 and maskLength <= 128 + return [@parse(match[1]), maskLength] + + throw new Error "ipaddr: string is not formatted like an IPv6 CIDR range" + +# Checks if the address is valid IP address +ipaddr.isValid = (string) -> + return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string) + +# Try to parse an address and throw an error if it is impossible +ipaddr.parse = (string) -> + if ipaddr.IPv6.isValid(string) + return ipaddr.IPv6.parse(string) + else if ipaddr.IPv4.isValid(string) + return ipaddr.IPv4.parse(string) + else + throw new Error "ipaddr: the address has neither IPv6 nor IPv4 format" + +ipaddr.parseCIDR = (string) -> + try + return ipaddr.IPv6.parseCIDR(string) + catch e + try + return ipaddr.IPv4.parseCIDR(string) + catch e + throw new Error "ipaddr: the address has neither IPv6 nor IPv4 CIDR format" + +# Parse an address and return plain IPv4 address if it is an IPv4-mapped address +ipaddr.process = (string) -> + addr = @parse(string) + if addr.kind() == 'ipv6' && addr.isIPv4MappedAddress() + return addr.toIPv4Address() + else + return addr diff --git a/node_modules/ipaddr.js/test/ipaddr.test.coffee b/node_modules/ipaddr.js/test/ipaddr.test.coffee new file mode 100644 index 0000000..17739e2 --- /dev/null +++ b/node_modules/ipaddr.js/test/ipaddr.test.coffee @@ -0,0 +1,282 @@ +ipaddr = require '../lib/ipaddr' + +module.exports = + 'should define main classes': (test) -> + test.ok(ipaddr.IPv4?, 'defines IPv4 class') + test.ok(ipaddr.IPv6?, 'defines IPv6 class') + test.done() + + 'can construct IPv4 from octets': (test) -> + test.doesNotThrow -> + new ipaddr.IPv4([192, 168, 1, 2]) + test.done() + + 'refuses to construct invalid IPv4': (test) -> + test.throws -> + new ipaddr.IPv4([300, 1, 2, 3]) + test.throws -> + new ipaddr.IPv4([8, 8, 8]) + test.done() + + 'converts IPv4 to string correctly': (test) -> + addr = new ipaddr.IPv4([192, 168, 1, 1]) + test.equal(addr.toString(), '192.168.1.1') + test.done() + + 'returns correct kind for IPv4': (test) -> + addr = new ipaddr.IPv4([1, 2, 3, 4]) + test.equal(addr.kind(), 'ipv4') + test.done() + + 'allows to access IPv4 octets': (test) -> + addr = new ipaddr.IPv4([42, 0, 0, 0]) + test.equal(addr.octets[0], 42) + test.done() + + 'checks IPv4 address format': (test) -> + test.equal(ipaddr.IPv4.isIPv4('192.168.007.0xa'), true) + test.equal(ipaddr.IPv4.isIPv4('1024.0.0.1'), true) + test.equal(ipaddr.IPv4.isIPv4('8.0xa.wtf.6'), false) + test.done() + + 'validates IPv4 addresses': (test) -> + test.equal(ipaddr.IPv4.isValid('192.168.007.0xa'), true) + test.equal(ipaddr.IPv4.isValid('1024.0.0.1'), false) + test.equal(ipaddr.IPv4.isValid('8.0xa.wtf.6'), false) + test.done() + + 'parses IPv4 in several weird formats': (test) -> + test.deepEqual(ipaddr.IPv4.parse('192.168.1.1').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('0xc0.168.1.1').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('192.0250.1.1').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('0xc0a80101').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('030052000401').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('3232235777').octets, [192, 168, 1, 1]) + test.done() + + 'barfs at invalid IPv4': (test) -> + test.throws -> + ipaddr.IPv4.parse('10.0.0.wtf') + test.done() + + 'matches IPv4 CIDR correctly': (test) -> + addr = new ipaddr.IPv4([10, 5, 0, 1]) + test.equal(addr.match(ipaddr.IPv4.parse('0.0.0.0'), 0), true) + test.equal(addr.match(ipaddr.IPv4.parse('11.0.0.0'), 8), false) + test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.0'), 8), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.1'), 8), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.10'), 8), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.5.5.0'), 16), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 16), false) + test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 15), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.5.0.2'), 32), false) + test.equal(addr.match(addr, 32), true) + test.done() + + 'parses IPv4 CIDR correctly': (test) -> + addr = new ipaddr.IPv4([10, 5, 0, 1]) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('0.0.0.0/0')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('11.0.0.0/8')), false) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.0.0.0/8')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.0.0.1/8')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.0.0.10/8')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.5.5.0/16')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.4.5.0/16')), false) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.4.5.0/15')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.5.0.2/32')), false) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.5.0.1/32')), true) + test.throws -> + ipaddr.IPv4.parseCIDR('10.5.0.1') + test.throws -> + ipaddr.IPv4.parseCIDR('0.0.0.0/-1') + test.throws -> + ipaddr.IPv4.parseCIDR('0.0.0.0/33') + test.done() + + 'detects reserved IPv4 networks': (test) -> + test.equal(ipaddr.IPv4.parse('0.0.0.0').range(), 'unspecified') + test.equal(ipaddr.IPv4.parse('0.1.0.0').range(), 'unspecified') + test.equal(ipaddr.IPv4.parse('10.1.0.1').range(), 'private') + test.equal(ipaddr.IPv4.parse('192.168.2.1').range(), 'private') + test.equal(ipaddr.IPv4.parse('224.100.0.1').range(), 'multicast') + test.equal(ipaddr.IPv4.parse('169.254.15.0').range(), 'linkLocal') + test.equal(ipaddr.IPv4.parse('127.1.1.1').range(), 'loopback') + test.equal(ipaddr.IPv4.parse('255.255.255.255').range(), 'broadcast') + test.equal(ipaddr.IPv4.parse('240.1.2.3').range(), 'reserved') + test.equal(ipaddr.IPv4.parse('8.8.8.8').range(), 'unicast') + test.done() + + 'can construct IPv6 from parts': (test) -> + test.doesNotThrow -> + new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) + test.done() + + 'refuses to construct invalid IPv6': (test) -> + test.throws -> + new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 0, 1]) + test.throws -> + new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 1]) + test.done() + + 'converts IPv6 to string correctly': (test) -> + addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) + test.equal(addr.toNormalizedString(), '2001:db8:f53a:0:0:0:0:1') + test.equal(addr.toString(), '2001:db8:f53a::1') + test.equal(new ipaddr.IPv6([0, 0, 0, 0, 0, 0, 0, 1]).toString(), '::1') + test.equal(new ipaddr.IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]).toString(), '2001:db8::') + test.done() + + 'returns correct kind for IPv6': (test) -> + addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) + test.equal(addr.kind(), 'ipv6') + test.done() + + 'allows to access IPv6 address parts': (test) -> + addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 42, 0, 1]) + test.equal(addr.parts[5], 42) + test.done() + + 'checks IPv6 address format': (test) -> + test.equal(ipaddr.IPv6.isIPv6('2001:db8:F53A::1'), true) + test.equal(ipaddr.IPv6.isIPv6('200001::1'), true) + test.equal(ipaddr.IPv6.isIPv6('::ffff:192.168.1.1'), true) + test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1'), true) + test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1:0'), false) + test.equal(ipaddr.IPv6.isIPv6('fe80::wtf'), false) + test.done() + + 'validates IPv6 addresses': (test) -> + test.equal(ipaddr.IPv6.isValid('2001:db8:F53A::1'), true) + test.equal(ipaddr.IPv6.isValid('200001::1'), false) + test.equal(ipaddr.IPv6.isValid('::ffff:192.168.1.1'), true) + test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1'), false) + test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1:0'), false) + test.equal(ipaddr.IPv6.isValid('2001:db8::F53A::1'), false) + test.equal(ipaddr.IPv6.isValid('fe80::wtf'), false) + test.equal(ipaddr.IPv6.isValid('2002::2:'), false) + test.equal(ipaddr.IPv6.isValid(undefined), false) + test.done() + + 'parses IPv6 in different formats': (test) -> + test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A:0:0:0:0:1').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) + test.deepEqual(ipaddr.IPv6.parse('fe80::10').parts, [0xfe80, 0, 0, 0, 0, 0, 0, 0x10]) + test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A::').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 0]) + test.deepEqual(ipaddr.IPv6.parse('::1').parts, [0, 0, 0, 0, 0, 0, 0, 1]) + test.deepEqual(ipaddr.IPv6.parse('::').parts, [0, 0, 0, 0, 0, 0, 0, 0]) + test.done() + + 'barfs at invalid IPv6': (test) -> + test.throws -> + ipaddr.IPv6.parse('fe80::0::1') + test.done() + + 'matches IPv6 CIDR correctly': (test) -> + addr = ipaddr.IPv6.parse('2001:db8:f53a::1') + test.equal(addr.match(ipaddr.IPv6.parse('::'), 0), true) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53a::1:1'), 64), true) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53b::1:1'), 48), false) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f531::1:1'), 44), true) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f500::1'), 40), true) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db9:f500::1'), 40), false) + test.equal(addr.match(addr, 128), true) + test.done() + + 'parses IPv6 CIDR correctly': (test) -> + addr = ipaddr.IPv6.parse('2001:db8:f53a::1') + test.equal(addr.match(ipaddr.IPv6.parseCIDR('::/0')), true) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f53a::1:1/64')), true) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f53b::1:1/48')), false) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f531::1:1/44')), true) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f500::1/40')), true) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db9:f500::1/40')), false) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f53a::1/128')), true) + test.throws -> + ipaddr.IPv6.parseCIDR('2001:db8:f53a::1') + test.throws -> + ipaddr.IPv6.parseCIDR('2001:db8:f53a::1/-1') + test.throws -> + ipaddr.IPv6.parseCIDR('2001:db8:f53a::1/129') + test.done() + + 'converts between IPv4-mapped IPv6 addresses and IPv4 addresses': (test) -> + addr = ipaddr.IPv4.parse('77.88.21.11') + mapped = addr.toIPv4MappedAddress() + test.deepEqual(mapped.parts, [0, 0, 0, 0, 0, 0xffff, 0x4d58, 0x150b]) + test.deepEqual(mapped.toIPv4Address().octets, addr.octets) + test.done() + + 'refuses to convert non-IPv4-mapped IPv6 address to IPv4 address': (test) -> + test.throws -> + ipaddr.IPv6.parse('2001:db8::1').toIPv4Address() + test.done() + + 'detects reserved IPv6 networks': (test) -> + test.equal(ipaddr.IPv6.parse('::').range(), 'unspecified') + test.equal(ipaddr.IPv6.parse('fe80::1234:5678:abcd:0123').range(), 'linkLocal') + test.equal(ipaddr.IPv6.parse('ff00::1234').range(), 'multicast') + test.equal(ipaddr.IPv6.parse('::1').range(), 'loopback') + test.equal(ipaddr.IPv6.parse('fc00::').range(), 'uniqueLocal') + test.equal(ipaddr.IPv6.parse('::ffff:192.168.1.10').range(), 'ipv4Mapped') + test.equal(ipaddr.IPv6.parse('::ffff:0:192.168.1.10').range(), 'rfc6145') + test.equal(ipaddr.IPv6.parse('64:ff9b::1234').range(), 'rfc6052') + test.equal(ipaddr.IPv6.parse('2002:1f63:45e8::1').range(), '6to4') + test.equal(ipaddr.IPv6.parse('2001::4242').range(), 'teredo') + test.equal(ipaddr.IPv6.parse('2001:db8::3210').range(), 'reserved') + test.equal(ipaddr.IPv6.parse('2001:470:8:66::1').range(), 'unicast') + test.done() + + 'is able to determine IP address type': (test) -> + test.equal(ipaddr.parse('8.8.8.8').kind(), 'ipv4') + test.equal(ipaddr.parse('2001:db8:3312::1').kind(), 'ipv6') + test.done() + + 'throws an error if tried to parse an invalid address': (test) -> + test.throws -> + ipaddr.parse('::some.nonsense') + test.done() + + 'correctly processes IPv4-mapped addresses': (test) -> + test.equal(ipaddr.process('8.8.8.8').kind(), 'ipv4') + test.equal(ipaddr.process('2001:db8:3312::1').kind(), 'ipv6') + test.equal(ipaddr.process('::ffff:192.168.1.1').kind(), 'ipv4') + test.done() + + 'correctly converts IPv6 and IPv4 addresses to byte arrays': (test) -> + test.deepEqual(ipaddr.parse('1.2.3.4').toByteArray(), + [0x1, 0x2, 0x3, 0x4]); + # Fuck yeah. The first byte of Google's IPv6 address is 42. 42! + test.deepEqual(ipaddr.parse('2a00:1450:8007::68').toByteArray(), + [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68 ]) + test.done() + + 'correctly parses 1 as an IPv4 address': (test) -> + test.equal(ipaddr.IPv6.isValid('1'), false) + test.equal(ipaddr.IPv4.isValid('1'), true) + test.deepEqual(new ipaddr.IPv4([0, 0, 0, 1]), ipaddr.parse('1')) + test.done() + + 'correctly detects IPv4 and IPv6 CIDR addresses': (test) -> + test.deepEqual([ipaddr.IPv6.parse('fc00::'), 64], + ipaddr.parseCIDR('fc00::/64')) + test.deepEqual([ipaddr.IPv4.parse('1.2.3.4'), 5], + ipaddr.parseCIDR('1.2.3.4/5')) + test.done() + + 'does not consider a very large or very small number a valid IP address': (test) -> + test.equal(ipaddr.isValid('4999999999'), false) + test.equal(ipaddr.isValid('-1'), false) + test.done() + + 'does not hang on ::8:8:8:8:8:8:8:8:8': (test) -> + test.equal(ipaddr.IPv6.isValid('::8:8:8:8:8:8:8:8:8'), false) + test.done() + + 'subnetMatch does not fail on empty range': (test) -> + ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {}, false) + ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {subnet: []}, false) + test.done() + + 'subnetMatch returns default subnet on empty range': (test) -> + test.equal(ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {}, false), false) + test.equal(ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {subnet: []}, false), false) + test.done() 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..dc1efba --- /dev/null +++ b/node_modules/is-buffer/.zuul.yml @@ -0,0 +1,16 @@ +ui: tape +browsers: + - name: chrome + version: 39..latest + - name: firefox + version: 34..latest + - name: safari + version: 5..latest + - name: microsoftedge + version: latest + - name: ie + version: 8..latest + - name: opera + version: 11..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..e6eb61a --- /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 +[travis-url]: https://travis-ci.org/feross/is-buffer +[npm-image]: https://img.shields.io/npm/v/is-buffer.svg +[npm-url]: https://npmjs.org/package/is-buffer +[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg +[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..dc5893e --- /dev/null +++ b/node_modules/is-buffer/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + "is-buffer@^1.0.2", + "/Users/alfiepates/src/invoicer/node_modules/kind-of" + ] + ], + "_from": "is-buffer@>=1.0.2 <2.0.0", + "_id": "is-buffer@1.1.3", + "_inCache": true, + "_installable": true, + "_location": "/is-buffer", + "_nodeVersion": "4.3.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/is-buffer-1.1.3.tgz_1457390977775_0.6384289276320487" + }, + "_npmUser": { + "email": "feross@feross.org", + "name": "feross" + }, + "_npmVersion": "2.14.12", + "_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.3.tgz", + "_shasum": "db897fc3f7aca2d50de94b6c8c2896a4771627af", + "_shrinkwrap": null, + "_spec": "is-buffer@^1.0.2", + "_where": "/Users/alfiepates/src/invoicer/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": { + "standard": "^6.0.5", + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "directories": {}, + "dist": { + "shasum": "db897fc3f7aca2d50de94b6c8c2896a4771627af", + "tarball": "http://localhost:4873/is-buffer/-/is-buffer-1.1.3.tgz" + }, + "engines": { + "node": ">=0.12" + }, + "gitHead": "dfd658d887e6b63254b89d22af1a755a39313455", + "homepage": "https://github.com/feross/is-buffer", + "keywords": [ + "buffer", + "buffers", + "type", + "core buffer", + "browser buffer", + "browserify", + "typed array", + "uint32array", + "int16array", + "int32array", + "float32array", + "float64array", + "browser", + "arraybuffer", + "dataview" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "feross@feross.org", + "name": "feross" + } + ], + "name": "is-buffer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/feross/is-buffer.git" + }, + "scripts": { + "test": "standard && 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.3" +} 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-promise/.npmignore b/node_modules/is-promise/.npmignore new file mode 100644 index 0000000..aeb7b45 --- /dev/null +++ b/node_modules/is-promise/.npmignore @@ -0,0 +1,6 @@ +component +build +node_modules +test.js +component.json +.gitignore \ No newline at end of file diff --git a/node_modules/is-promise/.travis.yml b/node_modules/is-promise/.travis.yml new file mode 100644 index 0000000..87f8cd9 --- /dev/null +++ b/node_modules/is-promise/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" \ No newline at end of file diff --git a/node_modules/is-promise/LICENSE b/node_modules/is-promise/LICENSE new file mode 100644 index 0000000..27cc9f3 --- /dev/null +++ b/node_modules/is-promise/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Forbes Lindesay + +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/is-promise/index.js b/node_modules/is-promise/index.js new file mode 100644 index 0000000..ca2444c --- /dev/null +++ b/node_modules/is-promise/index.js @@ -0,0 +1,5 @@ +module.exports = isPromise; + +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} diff --git a/node_modules/is-promise/package.json b/node_modules/is-promise/package.json new file mode 100644 index 0000000..8d2fb51 --- /dev/null +++ b/node_modules/is-promise/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "is-promise@^2.0.0", + "/Users/alfiepates/src/invoicer/node_modules/jstransformer" + ] + ], + "_from": "is-promise@>=2.0.0 <3.0.0", + "_id": "is-promise@2.1.0", + "_inCache": true, + "_installable": true, + "_location": "/is-promise", + "_nodeVersion": "1.6.2", + "_npmUser": { + "email": "forbes@lindesay.co.uk", + "name": "forbeslindesay" + }, + "_npmVersion": "2.7.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-promise", + "raw": "is-promise@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/jstransformer" + ], + "_resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "_shasum": "79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa", + "_shrinkwrap": null, + "_spec": "is-promise@^2.0.0", + "_where": "/Users/alfiepates/src/invoicer/node_modules/jstransformer", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/then/is-promise/issues" + }, + "dependencies": {}, + "description": "Test whether an object looks like a promises-a+ promise", + "devDependencies": { + "better-assert": "~0.1.0", + "mocha": "~1.7.4" + }, + "directories": {}, + "dist": { + "shasum": "79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa", + "tarball": "http://localhost:4873/is-promise/-/is-promise-2.1.0.tgz" + }, + "gitHead": "056f8ac12eed91886ac4f0f7d872a176f6ed698f", + "homepage": "https://github.com/then/is-promise", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "forbes@lindesay.co.uk", + "name": "forbeslindesay" + } + ], + "name": "is-promise", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/then/is-promise.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "2.1.0" +} diff --git a/node_modules/is-promise/readme.md b/node_modules/is-promise/readme.md new file mode 100644 index 0000000..50d5d98 --- /dev/null +++ b/node_modules/is-promise/readme.md @@ -0,0 +1,29 @@ + +# is-promise + + Test whether an object looks like a promises-a+ promise + + [![Build Status](https://img.shields.io/travis/then/is-promise/master.svg)](https://travis-ci.org/then/is-promise) + [![Dependency Status](https://img.shields.io/gemnasium/then/is-promise.svg)](https://gemnasium.com/then/is-promise) + [![NPM version](https://img.shields.io/npm/v/is-promise.svg)](https://www.npmjs.org/package/is-promise) + +## Installation + + $ npm install is-promise + +You can also use it client side via npm. + +## API + +```javascript +var isPromise = require('is-promise'); + +isPromise({then:function () {...}});//=>true +isPromise(null);//=>false +isPromise({});//=>false +isPromise({then: true})//=>false +``` + +## License + + MIT 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..b4f7338 --- /dev/null +++ b/node_modules/isarray/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "isarray@0.0.1", + "/Users/alfiepates/src/invoicer/node_modules/readable-stream" + ] + ], + "_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": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "_shrinkwrap": null, + "_spec": "isarray@0.0.1", + "_where": "/Users/alfiepates/src/invoicer/node_modules/readable-stream", + "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://localhost:4873/isarray/-/isarray-0.0.1.tgz" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "julian@juliangruber.com", + "name": "juliangruber" + } + ], + "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/jade/.npmignore b/node_modules/jade/.npmignore new file mode 100644 index 0000000..f53cdc5 --- /dev/null +++ b/node_modules/jade/.npmignore @@ -0,0 +1,15 @@ +test +support +benchmarks +examples +lib-cov +coverage +.gitmodules +.travis.yml +History.md +Makefile +test/ +support/ +benchmarks/ +examples/ +docs/ diff --git a/node_modules/jade/.release.json b/node_modules/jade/.release.json new file mode 100644 index 0000000..fda2396 --- /dev/null +++ b/node_modules/jade/.release.json @@ -0,0 +1 @@ +"2ab04e8289982bfac3548a9c6016476472dcdb4f" diff --git a/node_modules/jade/History.md b/node_modules/jade/History.md new file mode 100644 index 0000000..ec54631 --- /dev/null +++ b/node_modules/jade/History.md @@ -0,0 +1,991 @@ +1.11.0 / 2015-06-12 +================== + + * Added block code support ([@alephyud](https://github.com/alephyud)) + * Improved runtime performance of mixins significantly ([Andreas Lubbe](https://github.com/alubbe)) + * Improved runtime performance of jade's string escaping ([Andreas Lubbe](https://github.com/alubbe)) and ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Better line number counting for pipeless text ([@alephyud](https://github.com/alephyud)) + + +1.10.0 / 2015-05-25 +================== + + * Now supports jstransformers, which allows improved handling of embedded languages such as Coffee-Script, and deprecated Transformers support in filters - to be removed in 2.0.0 ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * CLI: added a flag to keep directory hierarchy when a directory is specified - this behavior will be the default in 2.0.0 ([@TimothyGu](https://github.com/TimothyGu)) + * disabled 'compileDebug' flag by default when used with express in production mode ([Andreas Lubbe](https://github.com/alubbe)) + * Fixed a memory leak on modern versions of Chrome as well as node 0.12 and iojs ([Andreas Lubbe](https://github.com/alubbe)) + * update website ([@GarthDB](https://github.com/GarthDB)) + +1.9.2 / 2015-01-18 +================== + + * Do not ignore some parser errors for mismatched parenthesis ([@TimothyGu](https://github.com/TimothyGu)) + * Warn for `:` that is not followed by a space ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix #1794 (a bizzare bug with a certain combination of inheritance, mixins and &attributes) ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Add `compileClientWithDependenciesTracked` ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Support comments in `case` blocks ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix blocks in nested mixins ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Lots more documentation ([@enlore](https://github.com/enlore)) + * Fix watching in CLI ([@pavel](https://github.com/pavel)) + +1.9.1 / 2015-01-17 +================== + + * Clean up path/fs functions in CLI as we no longer support node@0.6 ([@TimothyGu](https://github.com/TimothyGu)) + * Update commander ([@TimothyGu](https://github.com/TimothyGu)) + * Document `cache` and `parser` options ([@TimothyGu](https://github.com/TimothyGu)) + * Fix bug in 1.9.0 where we read the file if cache was enabled, even if a string was provided ([@TimothyGu](https://github.com/TimothyGu)) + * Fix year in changelog ([@tomByrer](https://github.com/tomByrer)) + +1.9.0 / 2015-01-13 +================== + + * Fix `--watch` sometimes dying when there were file-system errors ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix `--watch` by using `fs.watchFile` correctly ([@TimothyGu](https://github.com/TimothyGu)) + * Fix errors with using the CLI to compile from stdin + * Better looking badges ([@TimothyGu](https://github.com/TimothyGu)) + * Added `--extension` to CLI([@nicocedron](https://github.com/nicocedron) and [@TimothyGu](https://github.com/TimothyGu)) + * Refactor and improve internal cache handling ([@TimothyGu](https://github.com/TimothyGu)) + * Loads more tests ([@TimothyGu](https://github.com/TimothyGu)) + +1.8.2 / 2014-12-16 +================== + + * Use `-` as the default filename when using stdin on CLI ([@TimothyGu](https://github.com/TimothyGu)) + * Prevent some compiler errors being silenced ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove use of non-standard `string.trimLeft()` ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix bug in CLI when no name was provided for child template ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove dependency on monocle (hopefully fixing installation on 0.8) ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Add gitter chat room ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.8.1 / 2014-11-30 +================== + + * Fix corner case when the pretty option was passed a non-string truthy value ([@TimothyGu](https://github.com/TimothyGu)) + * Warn when `lexer` is given as an option ([@TimothyGu](https://github.com/TimothyGu)) + * Update dependencies ([@TimothyGu](https://github.com/TimothyGu)) + +1.8.0 / 2014-11-28 +================== + + * Fix empty text-only block ([@rlidwka](https://github.com/rlidwka)) + * Warn about future change to ISO 8601 style dates ([@TimothyGu](https://github.com/TimothyGu) and [@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Add warnings when data-attributes contain ampersands ([@TimothyGu](https://github.com/TimothyGu)) + * Allow custom pretty indentation ([@bfred-it](https://github.com/bfred-it)) + * Add support for an object in the style attribute ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Add support for an object in the class attribute ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Ignore fs module in browser builds ([@sokra](https://github.com/sokra)) + * Update dependencies ([@hildjj](https://github.com/hildjj)) + * Check mixin arguments are valid JavaScript expressions ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove symlink ([@slang800](https://github.com/slang800)) + +1.7.0 / 2014-09-17 +================== + + * Add Doctype option on command line ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Support ES6 style rest args in mixins ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix support for unicode newlines (\u2028, \u2029) ([@rlidwka](https://github.com/rlidwka)) + * Expose `globals` option from the `with` module ([@sokra](https://github.com/sokra)) + * Lots of new documentation ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.6.0 / 2014-08-31 +================== + + * Allow optional white space after `+` when calling a mixin ([@char101](https://github.com/char101)) + * Use void-elements module to replace internal self-closing list ([@hemanth](https://github.com/hemanth)) + * Fix a warning that eroniously warned for un-used blocks if in an extending template from an include (Reported by [@Dissimulazione](https://github.com/Dissimulazione)) + * Fix mixins not working at end of file ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix error reporting when mixin block was followed by blank lines ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + + +1.5.0 / 2014-07-23 +================== + + * Added compileFile API ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix line number in un-used blocks warning ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix a warning that eroniously warned for un-used blocks if they were under another block (Reported by [@pesho](https://github.com/pesho)) + +1.4.2 / 2014-07-16 +================== + + * Fix a warning that eroniously warned for un-used blocks if they were under a "Code" element (Reported by [@narirou](https://github.com/narirou)) + +1.4.1 / 2014-07-16 +================== + + * Fix an error that sometimes resulted in 'unexpected token "pipless-text"' being erroniously thrown (Reported by [@Artazor](https://github.com/Artazor) and [@thenitai](https://github.com/thenitai)) + +1.4.0 / 2014-07-15 +================== + + * Fix CLI so it keeps watching when errors occur ([@AndrewTsao](https://github.com/AndrewTsao)) + * Support custom names for client side templates ([@ForbesLindesay](http://www.forbeslindesay.co.uk/) and [@dscape](https://github.com/dscape)) + * Allow whitepsace other than "space" before attributes passed to mixins (N.B. there is a small chance this could be a breaking change for you) ([@regular](https://github.com/regular)) + * Track dependencies so file watchers can be more clever ([@ForbesLindesay](http://www.forbeslindesay.co.uk/) and [@sdether](https://github.com/sdether)) + * Allow passing options to filtered includes ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix bugs with indentation in filters ([@ForbesLindesay](http://www.forbeslindesay.co.uk/) and [@lackac](https://github.com/lackac)) + * Warn on block names that are never used ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.3.1 / 2014-04-04 +================== + + * Fix error with tags in xml that are self-closing in html ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix error message for inline tags with content ([@hiddentao](https://github.com/hiddentao)) + +1.3.0 / 2014-03-02 +================== + + * Fix a bug where sometimes mixins were removed by an optimisation even though they were being called ([@ForbesLindesay](http://www.forbeslindesay.co.uk/), reported by [@leider](https://github.com/leider)) + * Updated with to support automatically detecting when a value is "global" and removed redundant `options.globals` option ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Improve warnings for tags with multiple attributes ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Deprecate (with a warning) `node.clone`, `block.replace`, `attrs.removeAttribute`, `attrs.getAttribute` - these are all internal APIs for the AST ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.2.0 / 2014-02-26 +================== + + * Use variables instead of properties of jade, improving performance and reliability with nested templates ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Support compiling templates from stdin via a user typing ([@yorkie](https://github.com/yorkie)) + * Lazily add mixins ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix case fall-through ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Earlier errors for `when` without `case` and `else` without `if` ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Allow `if`/`else` etc. to not have a block. + * Remove lib-cov legacy to make browserify work better ([@silver83](https://github.com/silver83)) + * Add and improve test coverage using istanbul ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.1.5 / 2014-01-19 +================== + + * Add filename to and fix line numbers for missing space before text warning (@ijin82) + * Fix filenames for some error reporting in extends/includes (@doublerebel) + * Fix a corner case where a mixin was called with `&attributes` but no other attributes and a block that was supposed to be fixed in 1.1.4 ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.1.4 / 2014-01-09 +================== + + * Fix a corner case where a mixin was called with `&attributes` but no other attributes and a block ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.1.3 / 2014-01-09 +================== + + * Fix failure of npm prepublish not running + +1.1.2 / 2014-01-09 +================== + + * Fix same interaction of `&attributes` with `false` `null` or `undefined` but combined with dynamic attributes ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.1.1 / 2014-01-09 +================== + + * Fix a bug when `&attributes` is combined with static attributes that evaluate to `false` or `null` or `undefined` ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.1.0 / 2014-01-07 +================== + + * Fix class merging to work as documented ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Throw an error when the same attribute is duplicated multiple times ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Move more errors into the parser/lexer so they have more info about line numbers ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Support mixin blocks at the end of files ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.0.2 / 2013-12-31 +================== + + * Fix a bug when `&attributes` is combined with dynamic attributes ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.0.1 / 2013-12-29 +================== + + * Allow self closing tags to contian whitespace ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Allow tags to have a single white space after them ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Support text bodies of tags that begin with `//` rather than treating them as comments ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + +1.0.0 / 2013-12-22 +================== + + * No longer support node@0.8 ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix error reporting in layouts & includes ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Allow a list of 'globals' to be passed as an array at compile time & don't automatically expose all globals ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Escape apostrophes in data attributes (@qualiabyte) + * Fix mixin/block interaction ([@ForbesLindesay](http://www.forbeslindesay.co.uk/) & [@paulyoung](https://github.com/paulyoung)) + * Ignore trailing space after mixin declaration ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Make literal `.` work as expected ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove implicit text only for script/style ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Stop parsing comments and remove support for conditional comments ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Make filtering includes explicit ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove special assignment syntax ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove `!!!` shortcut for `doctype` ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove `5` shorcut for `html` doctype ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove `colons` option from the distant past ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Add a sepatate `compileClient` and `compileFileClient` to replace the `client` option ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove polyfills for supporting old browsers ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Allow interpolation for mixin names ([@jeromew](https://github.com/jeromew) + * Use `node.type` instead of `node.constructor.name` so it can be minified ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Allow hyphens in filter names ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Throw an error if a self closing tag has content ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Support inline tags ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Replace `attributes` magic attribute with `&attributes(attributes)` ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove automatic tag wrapping for filters, you can just put the tags in yourself now ([@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Remove whitespace from tags nested inside pre tags ([@markdalgleish](http://markdalgleish.com)) + +0.35.0 / 2013-08-21 +=================== + + * Add support for space separated attributes (thanks to [@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Add earlier errors for invalid JavaScript expressions (thanks to [@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * Fix parsing files with UTF8 BOMs when they are includes or parent/layout templates (thanks to [@kiinoo](https://github.com/kiinoo)) + +0.34.1 / 2013-07-26 +=================== + + * fix render file not working when called with callback (reported by [@xieren58](https://github.com/xieren58)) + +0.34.0 / 2013-07-26 +=================== + + * callbacks only called once for async methods even if they throw (reported by [@davidcornu](https://github.com/davidcornu)) + * HTML comments are pretty printed better (thanks to [@eddiemonge](https://github.com/eddiemonge)) + * callbacks are optional and leaving them out results in synchronous operation (thanks to [@ForbesLindesay](http://www.forbeslindesay.co.uk/)) + * empty filter nodes are now permitted (thanks to [@coderanger](https://github.com/coderanger)) + * overhaul website and documentation (thanks to [@ForbesLindesay](http://www.forbeslindesay.co.uk/)), much more of this to come. + +0.33.0 / 2013-07-12 +=================== + + * Hugely more powerful error reporting (especially with `compileDebug` set explicitly to `true`) + * Add a warning for tags with multiple attributes + * be strict about requiring newlines after tags to fix some odd corner cases + * fix escaping of class to allow it to be unescaped (thanks to [@christiangenco](https://github.com/christiangenco)) + +0.32.0 / 2013-06-28 +=================== + + * remove `jade.version` and fix `jade --version` + * add file name and line number to deprecation warnings + * use constantinople for better constant detection + * update `with` for a massive performance upgrade at compile time + +0.31.2 / 2013-06-07 +=================== + + * fix overzealous deprecation warnings + +0.31.1 / 2013-05-31 +=================== + + * fix line endings for executable command + * fix `locals` variable being undefined + * fix an obscure bug that could occur if multiple mixins interact badly (see [substack/lexical-scope#13](https://github.com/substack/lexical-scope/issues/13)) + +0.31.0 / 2013-05-30 +================== + + * deprecate implicit text-only `script` and `style` tags + * make `with` at compile time using `lexical-scope` + * add `options.parser` that behaves exactly like `options.compiler` + * add "component.json" for component (runtime) support + * removed `hasOwnProperty` check in each loops + * removed .min files from the repository (people can just generate these themselves) + * use browserify to compile client side libraries + * fix buggy block extending should now be fixed + * fix preserve case of custom doctypes + * fix regexps in attributes sometimes not being accepted + * fix allow `$` sign in each loop variable names + * fix mixins with buffered code on the same line + * fix separate class names by ` ` rather than `,` (was sometimes incorrect) + +0.30.0 / 2013-04-25 +================== + + * add support for 'include' and 'extends' to use paths relative to basedir + * fix accidental calling of functions in iteration block. Closes #986 + * fix: skip rethrow on client + * fix each/else prefixed with `-` + * fix multi-block prepend/append + * swap -o and -O, set -o to --out + +0.29.0 / 2013-04-16 +================== + + * add "monocle" for watcher that actually works... + * fix interpolation in blocks of text + * fix attribute interpolation + * move filters to an external library + * fix JavaScript escaping corner cases + +0.28.2 / 2013-03-04 +================== + + * wtf coffeescript is not a dep + +0.28.1 / 2013-01-10 +================== + + * add passing of filename to include filters + * fix wrong new lines for include filters + +0.28.0 / 2013-01-08 +================== + + * add .css and .js "filters". re #438 + * add include filters. Closes #283 + * fix "class:" within attribute escaping + * removing ast filters + * things I can't read: + * 反馈地址 + * 样式 + * 联系 + * 初稿,翻译完 + * 接受大鸟的建议 + * 头晕,翻译一点点 + * 到过滤器翻译完毕 + * 翻译一部分 + * 中文翻译单独放 + * 特性部分 + * 再翻 + * 翻译一点点 + +0.27.7 / 2012-11-05 +================== + + * fix each/else clause for enumerated objects + * fix #764 (incorrect line number for error messages) + * fix double-escaping of interpolated js slashes. Closes #784 + +0.27.6 / 2012-10-05 +================== + + * Included templates can not override blocks of their parent. Closes #699 + +0.27.5 / 2012-09-24 +================== + + * fix attr interpolation escaping. Closes #771 + +0.27.4 / 2012-09-18 +================== + + * fix include yields. Closes #770 + +0.27.3 / 2012-09-18 +================== + + * fix escaping of interpolation. Closes #769 + * loosen "mkdirp" version restriction [TooTallNate] + +0.27.2 / 2012-08-07 +================== + + * Revert "fixing string interpolation escaping #731", problems reported + +0.27.1 / 2012-08-06 +================== + + * fix attribute interpolation escaping #731 + * fix string interpolation escaping #731 + +0.27.0 / 2012-07-26 +================== + + * added ability to pass in json file to `--obj` + * add preliminary `each` `else` support. Closes #716 + * fix doctype bug overlooked in #712 + * fix stripping of utf-8 BOMs + +0.26.3 / 2012-06-25 +================== + + * Update version of commander that supports node v0.8. + +0.26.2 / 2012-06-22 +================== + + * Added --options alias of --obj + * Added reserved word conflict prevention in Google's Closure Compiler + * Added tag interpolation. Closes #657 + * Allow the compiled client to use it's own jade util functions [3rd-Eden] + * Fixed `attrs()` escape bug [caseywebdev] + +0.26.1 / 2012-05-27 +================== + + * Changed default doctype to __html5__ + * Performance: statically compile attrs when possible [chowey] + * Fixed some class attribute merging cases + * Fixed so `block` doesn't consume `blockquotes` tag [chowey] + * Fixed backslashes in text nodes [chowey] + * Fixed / in text. Closes #638 + +0.26.0 / 2012-05-04 +================== + + * Added package.json __component__ support + * Added explicit self-closing tag support. Closes #605 + * Added `block` statement + * Added mixin tag-like behaviour [chowey] + * Fixed mixins with extends [chowey] + +0.25.0 / 2012-04-18 +================== + + * Added preliminary mixin block support. Closes #310 + * Fixed whitespace handling in various situations [chowey] + * Fixed indentation in various situations [chowey] + +0.24.0 / 2012-04-12 +================== + + * Fixed unescaped attribute compilation + * Fixed pretty-printing of text-only tags (__Warning__: this may affect rendering) [chowey] + +0.23.0 / 2012-04-11 +================== + + * Added data-attr json stringification support. Closes #572 + * Added unescaped attr support. Closes #198 + * Fixed #1070, reverted mixin function statements + * Fixed jade.1 typo + +0.22.1 / 2012-04-04 +================== + + * Fixed source tags. now self-closing. Closes #308 + * Fixed: escape backslashes in coffeescript filter + +0.22.0 / 2012-03-22 +================== + + * Added jade manpage (`man jade` after installation for docs) + * Added `-D, --no-debug` to jade(1) + * Added `-p, --pretty` to jade(1) + * Added `-c, --client` option to jade(1) + * Fixed `-o { client: true }` with stdin + * Fixed: skip blank lines in lexer (unless within pipeless text). Closes #399 + +0.21.0 / 2012-03-10 +================== + + * Added new input/output test suite using Mocha's string diffing + * Added alias `extend` -> `extends`. Closes #527 [guillermo] + * Fixed include escapes. Closes #513 + * Fixed block-expansion with .foo and #foo short-hands. Closes #498 + +0.20.3 / 2012-02-16 +================== + + * Changed: pass `.filename` to filters only + +0.20.2 / 2012-02-16 +================== + + * Fixed `:stylus` import capabilities, pass .filename + +0.20.1 / 2012-02-02 +================== + + * Fixed Block#includeBlock() with textOnly blocks + +0.20.0 / 2011-12-28 +================== + + * Added a browser example + * Added `yield` for block `include`s + * Changed: replaced internal `__` var with `__jade` [chrisleishman] + * Fixed two globals. Closes #433 + +0.19.0 / 2011-12-02 +================== + + * Added block `append` / `prepend` support. Closes #355 + * Added link in readme to jade-mode for Emacs + * Added link to python implementation + +0.18.0 / 2011-11-21 +================== + + * Changed: only ['script', 'style'] are text-only. Closes #398' + +0.17.0 / 2011-11-10 +================== + + * jade.renderFile() is back! (for express 3.x) + * Fixed `Object.keys()` failover bug + +0.16.4 / 2011-10-24 +================== + + * Fixed a test due to reserved keyword + * Fixed: commander 0.1.x dep for 0.5.x + +0.16.3 / 2011-10-24 +================== + + * Added: allow leading space for conditional comments + * Added quick implementation of a switch statement + * Fixed parens in mixin args. Closes #380 + * Fixed: include files with a .jade extension as jade files + +0.16.2 / 2011-09-30 +================== + + * Fixed include regression. Closes #354 + +0.16.1 / 2011-09-29 +================== + + * Fixed unexpected `else` bug when compileDebug: false + * Fixed attr state issue for balancing pairs. Closes #353 + +0.16.0 / 2011-09-26 +================== + + * Added `include` block support. Closes #303 + * Added template inheritance via `block` and `extends`. Closes #242 + * Added 'type="text/css"' to the style tags generated by filters. + * Added 'uglifyjs' as an explicit devDependency. + * Added -p, --path flag to jade(1) + * Added support for any arbitrary doctype + * Added `jade.render(str[,options], fn)` back + * Added first-class `while` support + * Added first-class assignment support + * Fixed runtime.js `Array.isArray()` polyfill. Closes #345 + * Fixed: set .filename option in jade(1) when passing filenames + * Fixed `Object.keys()` polyfill typo. Closes #331 + * Fixed `include` error context + * Renamed magic "index" to "$index". Closes #350 + +0.15.4 / 2011-09-05 +================== + + * Fixed script template html. Closes #316 + * Revert "Fixed script() tag with trailing ".". Closes #314" + +0.15.3 / 2011-08-30 +================== + + * Added Makefile example. Closes #312 + * Fixed script() tag with trailing ".". Closes #314 + +0.15.2 / 2011-08-26 +================== + + * Fixed new conditional boundaries. Closes #307 + +0.15.1 / 2011-08-26 +================== + + * Fixed jade(1) support due to `res.render()` removal + * Removed --watch support (use a makefile + watch...) + +0.15.0 / 2011-08-26 +================== + + * Added `client` option to reference runtime helpers + * Added `Array.isArray()` for runtime.js as well + * Added `Object.keys()` for the client-side runtime + * Added first-class `if`, `unless`, `else` and `else if` support + * Added first-class `each` / `for` support + * Added `make benchmark` for continuous-bench + * Removed `inline` option, SS helpers are no longer inlined either + * Removed `Parser#debug()` + * Removed `jade.render()` and `jade.renderFile()` + * Fixed runtime.js `escape()` bug causing window.escape to be used + * Fixed a bunch of tests + +0.14.2 / 2011-08-16 +================== + + * Added `include` support for non-jade files + * Fixed code indentation when followed by newline(s). Closes #295 [reported by masylum] + +0.14.1 / 2011-08-14 +================== + + * Added `colons` option for everyone stuck with ":". Closes #231 + * Optimization: consecutive lines are merged in compiled js + +0.14.0 / 2011-08-08 +================== + + * Added array iteration with index example. Closes #276 + * Added _runtime.js_ + * Added `compileDebug` option to enable lineno instrumentation + * Added `inline` option to disable inlining of helpers (for client-side) + +0.13.0 / 2011-07-13 +================== + + * Added `mixin` support + * Added `include` support + * Added array support for the class attribute + +0.12.4 / 2011-06-23 +================== + + * Fixed filter indentation bug. Closes #243 + +0.12.3 / 2011-06-21 +================== + + * Fixed empty strings support. Closes #223 + * Fixed conditional comments documentation. Closes #245 + +0.12.2 / 2011-06-16 +================== + + * Fixed `make test` + * Fixed block comments + +0.12.1 / 2011-06-04 +================== + + * Fixed attribute interpolation with double quotes. Fixes #232 [topaxi] + +0.12.0 / 2011-06-03 +================== + + * Added `doctype` as alias of `!!!` + * Added; doctype value is now case-insensitive + * Added attribute interpolation support + * Fixed; retain original indentation spaces in text blocks + +0.11.1 / 2011-06-01 +================== + + * Fixed text block indentation [Laszlo Bacsi] + * Changed; utilizing devDependencies + * Fixed try/catch issue with renderFile(). Closes #227 + * Removed attribute ":" support, use "=" (option for ':' coming soon) + +0.11.0 / 2011-05-14 +================== + + * Added `self` object to avoid poor `with(){}` performance [masylum] + * Added `doctype` option [Jeremy Larkin] + +0.10.7 / 2011-05-04 +================== + + * expose Parser + +0.10.6 / 2011-04-29 +================== + + * Fixed CS `Object.keys()` [reported by robholland] + +0.10.5 / 2011-04-26 +================== + + * Added error context after the lineno + * Added; indicate failing lineno with ">" + * Added `Object.keys()` for the client-side + * Fixed attr strings when containing the opposite quote. Closes 207 + * Fixed attr issue with js expressions within strings + * Fixed single-quote filter escape bug. Closes #196 + + +0.10.4 / 2011-04-05 +================== + + * Added `html` doctype, same as "5" + * Fixed `pre`, no longer text-only + +0.10.3 / 2011-03-30 +================== + + * Fixed support for quoted attribute keys ex `rss("xmlns:atom"="atom")` + +0.10.2 / 2011-03-30 +================== + + * Fixed pipeless text bug with missing outdent + +0.10.1 / 2011-03-28 +================== + + * Fixed `support/compile.js` to exclude browser js in node + * Fixes for IE [Patrick Pfeiffer] + +0.10.0 / 2011-03-25 +================== + + * Added AST-filter support back in the form of `[attrs]<:>` + +0.9.3 / 2011-03-24 +================== + + * Added `Block#unshift(node)` + * Added `jade.js` for the client-side to the repo + * Added `jade.min.js` for the client-side to the repo + * Removed need for pipes in filters. Closes #185 + Note that this _will_ break filters used to + manipulate the AST, until we have a different + syntax for doing so. + +0.9.2 / 2011-03-23 +================== + + * Added jade `--version` + * Removed `${}` interpolation support, use `#{}` + +0.9.1 / 2011-03-16 +================== + + * Fixed invalid `.map()` call due to recent changes + +0.9.0 / 2011-03-16 +================== + + * Added client-side browser support via `make jade.js` and `make jade.min.js`. + +0.8.9 / 2011-03-15 +================== + + * Fixed preservation of newlines in text blocks + +0.8.8 / 2011-03-14 +================== + + * Fixed jade(1) stdio + +0.8.7 / 2011-03-14 +================== + + * Added `mkdirs()` to jade(1) + * Added jade(1) stdio support + * Added new features to jade(1), `--watch`, recursive compilation etc [khingebjerg] + * Fixed pipe-less text newlines + * Removed jade(1) `--pipe` flag + +0.8.6 / 2011-03-11 +================== + + * Fixed parenthesized expressions in attrs. Closes #170 + * Changed; default interpolation values `== null` to ''. Closes #167 + +0.8.5 / 2011-03-09 +================== + + * Added pipe-less text support with immediate ".". Closes #157 + * Fixed object support in attrs + * Fixed array support for attrs + +0.8.4 / 2011-03-08 +================== + + * Fixed issue with expressions being evaluated several times. closes #162 + +0.8.2 / 2011-03-07 +================== + + * Added markdown, discount, and markdown-js support to `:markdown`. Closes #160 + * Removed `:discount` + +0.8.1 / 2011-03-04 +================== + + * Added `pre` pipe-less text support (and auto-escaping) + +0.8.0 / 2011-03-04 +================== + + * Added block-expansion support. Closes #74 + * Added support for multi-line attrs without commas. Closes #65 + +0.7.1 / 2011-03-04 +================== + + * Fixed `script()` etc pipe-less text with attrs + +0.7.0 / 2011-03-04 +================== + + * Removed `:javascript` filter (it doesn't really do anything special, use `script` tags) + * Added pipe-less text support. Tags that only accept text nodes (`script`, `textarea`, etc) do not require `|`. + * Added `:text` filter for ad-hoc pipe-less + * Added flexible indentation. Tabs, arbitrary number of spaces etc + * Added conditional-comment support. Closes #146 + * Added block comment support + * Added rss example + * Added `:stylus` filter + * Added `:discount` filter + * Fixed; auto-detect xml and do not self-close tags. Closes #147 + * Fixed whitespace issue. Closes #118 + * Fixed attrs. `,`, `=`, and `:` within attr value strings are valid Closes #133 + * Fixed; only output "" when code == null. Ex: `span.name= user.name` when undefined or null will not output "undefined". Closes #130 + * Fixed; throw on unexpected token instead of hanging + +0.6.3 / 2011-02-02 +================== + + * Added `each` support for Array-like objects [guillermo] + +0.6.2 / 2011-02-02 +================== + + * Added CSRF example, showing how you can transparently add inputs to a form + * Added link to vim-jade + * Fixed self-closing col support [guillermo] + * Fixed exception when getAttribute or removeAttribute run into removed attributes [Naitik Shah] + +0.6.0 / 2010-12-19 +================== + + * Added unescaped interpolation variant `!{code}`. Closes #124 + * Changed; escape interpolated code by default `#{code}` + +0.5.7 / 2010-12-08 +================== + + * Fixed; hyphen in get `tag()` + +0.5.6 / 2010-11-24 +================== + + * Added `exports.compile(str, options)` + * Renamed internal `_` to `__`, since `_()` is commonly used for translation + +0.5.5 / 2010-10-30 +================== + + * Add _coffeescript_ filter [Michael Hampton] + * Added link to _slim_; a ruby implementation + * Fixed quoted attributes issue. + + * Fixed attribute issue with over greedy regexp. + Previously "p(foo=(((('bar')))))= ((('baz')))" + would __fail__ for example since the regexp + would lookahead to far. Now we simply pair + the delimiters. + +0.5.4 / 2010-10-18 +================== + + * Adding newline when using tag code when preceding text + * Assume newline in tag text when preceding text + * Changed; retain leading text whitespace + * Fixed code block support to prevent multiple buffer openings [Jake Luer] + * Fixed nested filter support + +0.5.3 / 2010-10-06 +================== + + * Fixed bug when tags with code also have a block [reported by chrisirhc] + +0.5.2 / 2010-10-05 +================== + + * Added; Text introduces newlines to mimic the grammar. + Whitespace handling is a little tricky with this sort of grammar. + Jade will now mimic the written grammar, meaning that text blocks + using the "|" margin character will introduce a literal newline, + where as immediate tag text (ex "a(href='#') Link") will not. + + This may not be ideal, but it makes more sense than what Jade was + previously doing. + + * Added `Tag#text` to disambiguate between immediate / block text + * Removed _pretty_ option (was kinda useless in the state it was in) + * Reverted ignoring of newlines. Closes #92. + * Fixed; `Parser#parse()` ignoring newlines + +0.5.1 / 2010-10-04 +================== + + * Added many examples + * Added; compiler api is now public + * Added; filters can accept / manipulate the parse tree + * Added filter attribute support. Closes #79 + * Added LL(*) capabilities + * Performance; wrapping code blocks in {} instead of `(function(){}).call(this)` + * Performance; Optimized attribute buffering + * Fixed trailing newlines in blocks + +0.5.0 / 2010-09-11 +================== + + * __Major__ refactor. Logic now separated into lexer/parser/compiler for future extensibility. + * Added _pretty_ option + * Added parse tree output for _debug_ option + * Added new examples + * Removed _context_ option, use _scope_ + +0.4.1 / 2010-09-09 +================== + + * Added support for arbitrary indentation for single-line comments. Closes #71 + * Only strip first space in text (ex '| foo' will buffer ' foo') + +0.4.0 / 2010-08-30 +================== + + * Added tab naive support (tabs are converted to a single indent, aka two spaces). Closes #24 + * Added unbuffered comment support. Closes #62 + * Added hyphen support for tag names, ex: "fb:foo-bar" + * Fixed bug with single quotes in comments. Closes #61 + * Fixed comment whitespace issue, previously padding. Closes #55 + +0.3.0 / 2010-08-04 +================== + + * Added single line comment support. Closes #25 + * Removed CDATA from _:javascript_ filter. Closes #47 + * Removed _sys_ local + * Fixed code following tag + +0.2.4 / 2010-08-02 +================== + + * Added Buffer support to `render()` + * Fixed filter text block exception reporting + * Fixed tag exception reporting + +0.2.3 / 2010-07-27 +================== + + * Fixed newlines before block + * Fixed; tag text allowing arbitrary trailing whitespace + +0.2.2 / 2010-07-16 +================== + + * Added support for `jade.renderFile()` to utilize primed cache + * Added link to [textmate bundle](http://github.com/miksago/jade-tmbundle) + * Fixed filter issue with single quotes + * Fixed hyphenated attr bug + * Fixed interpolation single quotes. Closes #28 + * Fixed issue with comma in attrs + +0.2.1 / 2010-07-09 +================== + + * Added support for node-discount and markdown-js + depending on which is available. + + * Added support for tags to have blocks _and_ text. + this kinda fucks with arbitrary whitespace unfortunately, + but also fixes trailing spaces after tags _with_ blocks. + + * Caching generated functions. Closes #46 + +0.2.0 / 2010-07-08 +================== + + * Added `- each` support for readable iteration + * Added [markdown-js](http://github.com/evilstreak/markdown-js) support (no compilation required) + * Removed node-discount support + +0.1.0 / 2010-07-05 +================== + + * Added `${}` support for interpolation. Closes #45 + * Added support for quoted attr keys: `label("for": 'something')` is allowed (_although not required_) [Guillermo] + * Added `:less` filter [jakeluer] + +0.0.2 / 2010-07-03 +================== + + * Added `context` as synonym for `scope` option [Guillermo] + * Fixed attr splitting: `div(style:"color: red")` is now allowed + * Fixed issue with `(` and `)` within attrs: `a(class: (a ? 'a' : 'b'))` is now allowed + * Fixed issue with leading / trailing spaces in attrs: `a( href="#" )` is now allowed [Guillermo] + diff --git a/node_modules/jade/LICENSE b/node_modules/jade/LICENSE new file mode 100644 index 0000000..0f3c767 --- /dev/null +++ b/node_modules/jade/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2009-2014 TJ Holowaychuk + +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/jade/README.md b/node_modules/jade/README.md new file mode 100644 index 0000000..5ff6d97 --- /dev/null +++ b/node_modules/jade/README.md @@ -0,0 +1,154 @@ +# [![Jade - Node Template Engine](http://garthdb.com/img/jade_branding/jade-01.svg)](http://jade-lang.com/) + +Full documentation is at [jade-lang.com](http://jade-lang.com/) + + Jade is a high performance template engine heavily influenced by [Haml](http://haml-lang.com) + and implemented with JavaScript for [node](http://nodejs.org) and browsers. For bug reports, + feature requests and questions, [open an issue](https://github.com/jadejs/jade/issues/new). + For discussion join the [chat room](https://gitter.im/jadejs/jade). + + You can test drive Jade online [here](http://naltatis.github.com/jade-syntax-docs). + + [![Build Status](https://img.shields.io/travis/jadejs/jade/master.svg?style=flat)](https://travis-ci.org/jadejs/jade) + [![Coverage Status](https://img.shields.io/coveralls/jadejs/jade/master.svg?style=flat)](https://coveralls.io/r/jadejs/jade?branch=master) + [![Dependency Status](https://img.shields.io/david/jadejs/jade.svg?style=flat)](https://david-dm.org/jadejs/jade) + [![devDependencies Status](https://img.shields.io/david/dev/jadejs/jade.svg?style=flat)](https://david-dm.org/jadejs/jade#info=devDependencies) + [![NPM version](https://img.shields.io/npm/v/jade.svg?style=flat)](http://badge.fury.io/js/jade) + [![Join Gitter Chat](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg?style=flat)](https://gitter.im/jadejs/jade?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +## Installation + +via npm: + +```bash +$ npm install jade +``` + +## Syntax + +Jade is a clean, whitespace sensitive syntax for writing html. Here is a simple example: + +```jade +doctype html +html(lang="en") + head + title= pageTitle + script(type='text/javascript'). + if (foo) bar(1 + 5) + body + h1 Jade - node template engine + #container.col + if youAreUsingJade + p You are amazing + else + p Get on it! + p. + Jade is a terse and simple templating language with a + strong focus on performance and powerful features. +``` + +becomes + + +```html + + + + Jade + + + +

Jade - node template engine

+
+

You are amazing

+

Jade is a terse and simple templating language with a strong focus on performance and powerful features.

+
+ + +``` + +The official [jade tutorial](http://jade-lang.com/tutorial/) is a great place to start. While that (and the syntax documentation) is being finished, you can view some of the old documentation [here](https://github.com/jadejs/jade/blob/master/jade.md) and [here](https://github.com/jadejs/jade/blob/master/jade-language.md) + +## API + +For full API, see [jade-lang.com/api](http://jade-lang.com/api/) + +```js +var jade = require('jade'); + +// compile +var fn = jade.compile('string of jade', options); +var html = fn(locals); + +// render +var html = jade.render('string of jade', merge(options, locals)); + +// renderFile +var html = jade.renderFile('filename.jade', merge(options, locals)); +``` + +### Options + + - `filename` Used in exceptions, and required when using includes + - `compileDebug` When `false` no debug instrumentation is compiled + - `pretty` Add pretty-indentation whitespace to output _(false by default)_ + +## Browser Support + + The latest version of jade can be download for the browser in standalone form from [here](https://github.com/jadejs/jade/raw/master/jade.js). It only supports the very latest browsers though, and is a large file. It is recommended that you pre-compile your jade templates to JavaScript and then just use the [runtime.js](https://github.com/jadejs/jade/raw/master/runtime.js) library on the client. + + To compile a template for use on the client using the command line, do: + +```console +$ jade --client --no-debug filename.jade +``` + +which will produce `filename.js` containing the compiled template. + +## Command Line + +After installing the latest version of [node](http://nodejs.org/), install with: + +```console +$ npm install jade -g +``` + +and run with + +```console +$ jade --help +``` + +## Additional Resources + +Tutorials: + + - cssdeck interactive [Jade syntax tutorial](http://cssdeck.com/labs/learning-the-jade-templating-engine-syntax) + - cssdeck interactive [Jade logic tutorial](http://cssdeck.com/labs/jade-templating-tutorial-codecast-part-2) + - [Jade について。](https://gist.github.com/japboy/5402844) (A Japanese Tutorial) + - [Jade - 模板引擎](https://github.com/jadejs/jade/blob/master/Readme_zh-cn.md) + +Implementations in other languages: + + - [php](http://github.com/everzet/jade.php) + - [scala](http://scalate.fusesource.org/versions/snapshot/documentation/scaml-reference.html) + - [ruby](https://github.com/slim-template/slim) + - [python](https://github.com/SyrusAkbary/pyjade) + - [java](https://github.com/neuland/jade4j) + +Other: + + - [Emacs Mode](https://github.com/brianc/jade-mode) + - [Vim Syntax](https://github.com/digitaltoad/vim-jade) + - [TextMate Bundle](http://github.com/miksago/jade-tmbundle) + - [Coda/SubEtha syntax Mode](https://github.com/aaronmccall/jade.mode) + - [Screencasts](http://tjholowaychuk.com/post/1004255394/jade-screencast-template-engine-for-nodejs) + - [html2jade](https://github.com/donpark/html2jade) converter + - [jade2php](https://github.com/SE7ENSKY/jade2php) converter + - [Jade Server](https://github.com/ded/jade-server) Ideal for building local prototypes apart from any application + +## License + +MIT diff --git a/node_modules/jade/Readme_zh-cn.md b/node_modules/jade/Readme_zh-cn.md new file mode 100644 index 0000000..da54583 --- /dev/null +++ b/node_modules/jade/Readme_zh-cn.md @@ -0,0 +1,1285 @@ +# Jade - 模板引擎 + +Jade 是一个高性能的模板引擎,它深受 [Haml](http://haml-lang.com) 影响,它是用 JavaScript 实现的, 并且可以供 [Node](http://nodejs.org) 使用. + +翻译: [草依山](http://jser.me) 等 + +## 声明 + +从 Jade `v0.31.0` 开始放弃了对于 `" +| !{html} +``` + +内联标签同样可以使用文本块来包含文本: + +```jade +label + | Username: + input(name='user[name]') +``` + +或者直接使用标签文本: + +```jade +label Username: + input(name='user[name]') +``` + +_只_ 包含文本的标签,比如 ` + + +

My Site

+

Welcome to my super lame site.

+ + + +``` + +前面已经提到,`include` 可以包含比如 HTML 或者 CSS 这样的内容。给定一个扩展名后,Jade 不会把这个文件当作一个 Jade 源代码,并且会把它当作一个普通文本包含进来: + +``` +html + head + //- css and js have simple filters that wrap them in +